* goptions removed

* small patches from antonio talamini
This commit is contained in:
peter 2004-12-15 19:14:11 +00:00
parent 24bea4f525
commit fbb6b1c6fe
2 changed files with 22 additions and 40 deletions

View File

@ -1290,11 +1290,9 @@ BEGIN
S.Read(W, sizeof(w)); SelStart:=w; { Read selected start }
S.Read(W, sizeof(w)); SelEnd:=w; { Read selected end }
S.Read(B, SizeOf(B)); { Read string length }
If (MaxAvail > MaxLen+1) Then Begin { Check enough memory }
GetMem(Data, MaxLen + 1); { Allocate memory }
S.Read(Data^[1], Length(Data^)); { Read string data }
SetLength(Data^, B); { Xfer string length }
End Else S.Seek(S.GetPos + B); { Move to position }
GetMem(Data, B + 1); { Allocate memory }
S.Read(Data^[1], B); { Read string data }
SetLength(Data^, B); { Xfer string length }
If (Options AND ofVersion >= ofVersion20) Then { Version 2 or above }
Validator := PValidator(S.Get); { Get any validator }
Options := Options OR ofVersion20; { Set version 2 flag }
@ -2164,8 +2162,7 @@ BEGIN
CNorm := GetColor($0301); { Normal colour }
CSel := GetColor($0402); { Selected colour }
CDis := GetColor($0505); { Disabled colour }
If (Options AND ofFramed <>0) OR { Normal frame }
(GOptions AND goThickFramed <>0) Then { Thick frame }
If (Options AND ofFramed <>0) Then { Thick frame }
K := 1 Else K := 0; { Select offset }
For I := 0 To Size.Y-K-K-1 Do Begin { For each line }
MoveChar(B, ' ', Byte(CNorm), Size.X-K-K); { Fill buffer }
@ -2305,8 +2302,7 @@ BEGIN
End;
ClearEvent(Event); { Event was handled }
End Else If (Event.What = evKeyDown) Then Begin { KEY EVENT }
If (Options AND ofFramed <> 0) OR { Normal frame }
(GOptions AND goThickFramed <> 0) Then { Thick frame }
If (Options AND ofFramed <> 0) Then { Thick frame }
J := 1 Else J := 0; { Adjust value }
Vh := Size.Y - J - J; { View height }
S := Sel; { Hold current item }
@ -2383,8 +2379,7 @@ VAR I, J, S, Vh: Sw_Integer; R: TRect;
BEGIN
GetExtent(R); { Get view extents }
If R.Contains(P) Then Begin { Point in view }
If (Options AND ofFramed <> 0) OR { Normal frame }
(GOptions AND goThickFramed <> 0) Then { Thick frame }
If (Options AND ofFramed <> 0) Then { Thick frame }
J := 1 Else J := 0; { Adjust value }
Vh := Size.Y - J - J; { View height }
I := 0; { Preset zero value }
@ -2400,8 +2395,7 @@ END;
{---------------------------------------------------------------------------}
FUNCTION TCluster.Row (Item: Sw_Integer): Sw_Integer;
BEGIN
If (Options AND ofFramed <> 0) OR { Normal frame }
(GOptions AND goThickFramed <> 0) Then { Thick frame }
If (Options AND ofFramed <> 0) Then { Thick frame }
Row := Item MOD (Size.Y - 2) Else { Allow for frames }
Row := Item MOD Size.Y; { Normal mod value }
END;
@ -2412,8 +2406,7 @@ END;
FUNCTION TCluster.Column (Item: Sw_Integer): Sw_Integer;
VAR I, J, Col, Width, L, Vh: Sw_Integer; Ts: PString;
BEGIN
If (Options AND ofFramed <> 0) OR { Normal frame }
(GOptions AND goThickFramed <> 0) Then { Thick frame }
If (Options AND ofFramed <> 0) Then { Thick frame }
J := 1 Else J := 0; { Adjust value }
Vh := Size.Y - J - J; { Vertical size }
If (Item >= Vh) Then Begin { Valid selection }
@ -2633,7 +2626,7 @@ END;
TYPE
TListBoxRec = PACKED RECORD
List: PCollection; { List collection ptr }
Selection: Word; { Selected item }
Selection: sw_integer; { Selected item }
END;
{--TListBox-----------------------------------------------------------------}
@ -4158,7 +4151,11 @@ END;
END.
{
$Log$
Revision 1.28 2004-11-06 23:24:36 peter
Revision 1.29 2004-12-15 19:14:11 peter
* goptions removed
* small patches from antonio talamini
Revision 1.28 2004/11/06 23:24:36 peter
* fixed button click
Revision 1.27 2004/11/06 17:08:48 peter

View File

@ -122,16 +122,6 @@ CONST
dmLimitHiY = $80; { Limit bottom side }
dmLimitAll = $F0; { Limit all sides }
{---------------------------------------------------------------------------}
{ >> NEW << TView OPTION MASKS }
{---------------------------------------------------------------------------}
CONST
goThickFramed = $0001; { Thick framed mask }
goTabSelect = $0002; { Tab selectable }
goEveryKey = $0004; { Report every key }
goEndModal = $0008; { End modal }
goNativeClass = $4000; { Native class window }
{---------------------------------------------------------------------------}
{ >> NEW << TAB OPTION MASKS }
{---------------------------------------------------------------------------}
@ -335,7 +325,6 @@ TYPE
State : Word; { View state masks }
Options : Word; { View options masks }
EventMask: Word; { View event masks }
GOptions : Word; { Graphics options }
Origin : TPoint; { View origin }
Size : TPoint; { View size }
Cursor : TPoint; { Cursor position }
@ -952,7 +941,6 @@ BEGIN
HelpCtx := hcNoContext; { Clear help context }
State := sfVisible; { Default state }
EventMask := evMouseDown + evKeyDown + evCommand; { Default event masks }
GOptions := goTabSelect; { Set new options }
BackgroundChar := ' ';
SetBounds(Bounds); { Set view bounds }
END;
@ -1930,7 +1918,6 @@ BEGIN
Options := Options OR (ofSelectable + ofBuffered); { Set options }
GetExtent(Clip); { Get clip extents }
EventMask := $FFFF; { See all events }
GOptions := GOptions OR goTabSelect; { Set graphic options }
END;
{--TGroup-------------------------------------------------------------------}
@ -2505,7 +2492,7 @@ END;
{ GetSubViewPtr -> Platforms DOS/DPMI/WIN/NT/OS2 - Updated 20May98 LdB }
{---------------------------------------------------------------------------}
PROCEDURE TGroup.GetSubViewPtr (Var S: TStream; Var P);
VAR Index, I: Word; Q: PView;
VAR Index, I: Sw_Word; Q: PView;
BEGIN
Index := 0; { Zero index value }
S.Read(Index, SizeOf(Index)); { Read view index }
@ -2561,9 +2548,8 @@ BEGIN
Repeat
If Forwards Then P := P^.Next { Get next view }
Else P := P^.Prev; { Get prev view }
Until ((P^.State AND (sfVisible+sfDisabled) = sfVisible)
AND ((P^.Options AND ofSelectable <> 0) AND { Selectable }
(P^.GOptions AND goTabSelect <> 0))) OR { Tab selectable }
Until ((P^.State AND (sfVisible+sfDisabled) = sfVisible) AND
(P^.Options AND ofSelectable <> 0)) OR { Tab selectable }
(P = Current); { Not singular select }
If (P <> Current) Then FindNext := P; { Return result }
End;
@ -3744,7 +3730,6 @@ BEGIN
Title := NewStr(ATitle); { Hold title }
Number := ANumber; { Hold number }
Palette := wpBlueWindow; { Default palette }
GOptions := GOptions OR goThickFramed; { Thick frame }
InitFrame; { Initialize frame }
If (Frame <> Nil) Then Insert(Frame); { Insert any frame }
GetBounds(ZoomRect); { Default zoom rect }
@ -3768,10 +3753,6 @@ BEGIN
S.Read(i, SizeOf(i)); ZoomRect.B.X:=i; { Read zoom area x2 }
S.Read(i, SizeOf(i)); ZoomRect.B.Y:=i; { Read zoom area y2 }
GetSubViewPtr(S, Frame); { Now read frame object }
If (Frame <> Nil) Then Begin
Dispose(Frame, Done); { Kill we don't use it }
Frame := Nil; { Clear the pointer }
End;
Title := S.ReadStr; { Read title }
END;
@ -4639,7 +4620,11 @@ END.
{
$Log$
Revision 1.50 2004-11-24 21:03:05 florian
Revision 1.51 2004-12-15 19:14:11 peter
* goptions removed
* small patches from antonio talamini
Revision 1.50 2004/11/24 21:03:05 florian
* increased max. possible screen/view width to 255
Revision 1.49 2004/11/06 23:24:37 peter