Browse Source

* drawing of tview merged from old fv code

peter 21 years ago
parent
commit
5fc99ad45c
16 changed files with 367 additions and 1080 deletions
  1. 6 47
      fv/app.pas
  2. 2 12
      fv/asciitab.pas
  3. 2 14
      fv/buildfv.pas
  4. 98 162
      fv/dialogs.pas
  5. 2 111
      fv/drivers.pas
  6. 2 14
      fv/fvcommon.pas
  7. 2 8
      fv/fvconsts.pas
  8. 22 24
      fv/gadgets.pas
  9. 2 17
      fv/histlist.pas
  10. 2 11
      fv/memory.pas
  11. 13 90
      fv/menus.pas
  12. 2 5
      fv/msgbox.pas
  13. 2 5
      fv/sysmsg.pas
  14. 3 21
      fv/time.pas
  15. 2 8
      fv/validate.pas
  16. 205 531
      fv/views.pas

+ 6 - 47
fv/app.pas

@@ -193,7 +193,7 @@ TYPE
       CONSTRUCTOR Init (Var Bounds: TRect; APattern: Char);
       CONSTRUCTOR Load (Var S: TStream);
       FUNCTION GetPalette: PPalette; Virtual;
-      PROCEDURE DrawBackGround; Virtual;
+      PROCEDURE Draw; Virtual;
       PROCEDURE Store (Var S: TStream);
    END;
    PBackGround = ^TBackGround;
@@ -444,7 +444,7 @@ END;
 {--TBackGround--------------------------------------------------------------}
 {  DrawBackground -> Platforms DOS/DPMI/WIN/NT/OS2 - Updated 12Sep97 LdB    }
 {---------------------------------------------------------------------------}
-PROCEDURE TBackground.DrawBackground;
+PROCEDURE TBackground.Draw;
 VAR B: TDrawBuffer;
 BEGIN
    MoveChar(B, Pattern, GetColor($01), Size.X);       { Fill draw buffer }
@@ -655,9 +655,9 @@ END;
 {  Init -> Platforms DOS/DPMI/WIN/NT/OS2 - Updated 22Oct99 LdB              }
 {---------------------------------------------------------------------------}
 CONSTRUCTOR TProgram.Init;
-VAR I: Integer; R: TRect;
+VAR R: TRect;
 BEGIN
-   R.Assign(0, 0, -(ScreenWidth+1), -(ScreenHeight+1)); { Full screen area }
+   R.Assign(0, 0, ScreenWidth, ScreenHeight);         { Full screen area }
    Inherited Init(R);                                 { Call ancestor }
    Application := @Self;                              { Set application ptr }
    InitScreen;                                        { Initialize screen }
@@ -678,7 +678,6 @@ END;
 {  Done -> Platforms DOS/DPMI/WIN/NT/OS2 - Updated 22Oct99 LdB              }
 {---------------------------------------------------------------------------}
 DESTRUCTOR TProgram.Done;
-VAR I: Integer;
 BEGIN
    { Do not free the Buffer of Video Unit }
    If Buffer = Views.PVideoBuf(VideoBuf) then
@@ -1158,47 +1157,7 @@ END;
 END.
 {
  $Log$
- Revision 1.24  2004-11-04 20:57:58  peter
- sysmsgs is always available
-
- Revision 1.23  2004/11/03 20:33:05  peter
-   * removed unnecesasry graphfv stuff
-
- Revision 1.22  2002/09/22 19:42:52  hajny
-   + FPC/2 support added
-
- Revision 1.21  2002/09/09 08:04:05  pierre
-  * remove all warnings about far
-
- Revision 1.20  2002/09/07 15:06:35  peter
-   * old logs removed and tabs fixed
-
- Revision 1.19  2002/08/22 13:39:29  pierre
-  * Postpone InitDesktop to set the correct size
-
- Revision 1.18  2002/06/07 14:12:21  pierre
-  * try to get resizing to work
-
- Revision 1.17  2002/06/06 20:34:19  pierre
-  + also check for system events
-
- Revision 1.16  2002/05/25 23:24:29  pierre
-  * add DoneResource to fix memory leak
-
- Revision 1.15  2002/05/23 07:30:33  pierre
-  * fix problem in InitScreen
+ Revision 1.25  2004-11-06 17:08:48  peter
+   * drawing of tview merged from old fv code
 
 }
-{******************[ REVISION HISTORY ]********************}
-{  Version  Date        Fix                                }
-{  -------  ---------   ---------------------------------  }
-{  1.00     12 Dec 96   First multi platform release       }
-{  1.10     12 Sep 97   FPK pascal 0.92 conversion added.  }
-{  1.20     29 Aug 97   Platform.inc sort added.           }
-{  1.30     05 May 98   Virtual pascal 2.0 code added.     }
-{  1.40     22 Oct 99   Object registration added.         }
-{  1.50     22 Oct 99   Complete recheck preformed         }
-{  1.51     03 Nov 99   FPC Windows support added          }
-{  1.60     26 Nov 99   Graphics stuff moved to GFVGraph   }
-
-

+ 2 - 12
fv/asciitab.pas

@@ -323,17 +323,7 @@ end;
 END.
 {
  $Log$
- Revision 1.4  2004-11-03 20:33:05  peter
-   * removed unnecesasry graphfv stuff
-
- Revision 1.3  2002/05/30 22:23:15  pierre
-  * current char color changed
-
- Revision 1.2  2002/05/30 14:52:53  pierre
-  * some more fixes
-
- Revision 1.1  2002/05/29 22:14:53  pierre
-  Newfile
-
+ Revision 1.5  2004-11-06 17:08:48  peter
+   * drawing of tview merged from old fv code
 
 }

+ 2 - 14
fv/buildfv.pas

@@ -34,19 +34,7 @@ implementation
 end.
 {
   $Log$
-  Revision 1.7  2004-11-03 20:33:05  peter
-    * removed unnecesasry graphfv stuff
-
-  Revision 1.6  2004/11/02 23:53:19  peter
-    * fixed crashes with ide and 1.9.x
-
-  Revision 1.5  2002/09/07 15:06:36  peter
-    * old logs removed and tabs fixed
-
-  Revision 1.4  2002/05/29 22:15:19  pierre
-   + asciitab unit added
-
-  Revision 1.3  2002/01/29 22:00:33  peter
-    * colortxt added
+  Revision 1.8  2004-11-06 17:08:48  peter
+    * drawing of tview merged from old fv code
 
 }

+ 98 - 162
fv/dialogs.pas

@@ -178,7 +178,6 @@ TYPE
       FUNCTION Valid (Command: Word): Boolean; Virtual;
       PROCEDURE Draw; Virtual;
       PROCEDURE DrawCursor; Virtual;
-      PROCEDURE DrawbackGround; Virtual;
       PROCEDURE SelectAll (Enable: Boolean);
       PROCEDURE SetValidator (AValid: PValidator);
       PROCEDURE SetState (AState: Word; Enable: Boolean); Virtual;
@@ -206,7 +205,7 @@ TYPE
       DESTRUCTOR Done; Virtual;
       FUNCTION GetPalette: PPalette; Virtual;
       PROCEDURE Press; Virtual;
-      PROCEDURE DrawFocus; Virtual;
+      PROCEDURE Draw; Virtual;
       PROCEDURE DrawState (Down: Boolean);
       PROCEDURE MakeDefault (Enable: Boolean);
       PROCEDURE SetState (AState: Word; Enable: Boolean); Virtual;
@@ -243,7 +242,7 @@ TYPE
       FUNCTION Mark (Item: Sw_Integer): Boolean; Virtual;
       FUNCTION MultiMark (Item: Sw_Integer): Byte; Virtual;
       FUNCTION ButtonState (Item: Sw_Integer): Boolean;
-      PROCEDURE DrawFocus;                                           Virtual;
+      PROCEDURE Draw;                                           Virtual;
       PROCEDURE Press (Item: Sw_Integer); Virtual;
       PROCEDURE MovedTo (Item: Sw_Integer); Virtual;
       PROCEDURE SetState (AState: Word; Enable: Boolean); Virtual;
@@ -275,7 +274,7 @@ TYPE
 TYPE
    TRadioButtons = OBJECT (TCluster)
       FUNCTION Mark (Item: Sw_Integer): Boolean; Virtual;
-      PROCEDURE DrawFocus; Virtual;
+      PROCEDURE Draw; Virtual;
       PROCEDURE Press (Item: Sw_Integer); Virtual;
       PROCEDURE MovedTo(Item: Sw_Integer); Virtual;
       PROCEDURE SetData (Var Rec); Virtual;
@@ -295,7 +294,7 @@ TYPE
 TYPE
    TCheckBoxes = OBJECT (TCluster)
       FUNCTION Mark (Item: Sw_Integer): Boolean; Virtual;
-      PROCEDURE DrawFocus; Virtual;
+      PROCEDURE Draw; Virtual;
       PROCEDURE Press (Item: Sw_Integer); Virtual;
    END;
    PCheckBoxes = ^TCheckBoxes;
@@ -321,7 +320,7 @@ TYPE
       DESTRUCTOR Done; Virtual;
       FUNCTION DataSize: Sw_Word; Virtual;
       FUNCTION MultiMark (Item: Sw_Integer): Byte; Virtual;
-      PROCEDURE DrawFocus; Virtual;
+      PROCEDURE Draw; Virtual;
       PROCEDURE Press (Item: Sw_Integer); Virtual;
       PROCEDURE GetData (Var Rec); Virtual;
       PROCEDURE SetData (Var Rec); Virtual;
@@ -398,7 +397,7 @@ TYPE
       CONSTRUCTOR Load (Var S: TStream);
       DESTRUCTOR Done; Virtual;
       FUNCTION GetPalette: PPalette; Virtual;
-      PROCEDURE DrawBackGround;                                      Virtual;
+      PROCEDURE Draw;                                      Virtual;
       PROCEDURE Store (Var S: TStream);
       PROCEDURE GetText (Var S: String); Virtual;
    END;
@@ -436,7 +435,7 @@ TYPE
       CONSTRUCTOR Init (Var Bounds: TRect; CONST AText: String; ALink: PView);
       CONSTRUCTOR Load (Var S: TStream);
       FUNCTION GetPalette: PPalette; Virtual;
-      PROCEDURE DrawBackGround; Virtual;
+      PROCEDURE Draw; Virtual;
       PROCEDURE Store (Var S: TStream);
       PROCEDURE HandleEvent (Var Event: TEvent); Virtual;
    END;
@@ -1370,48 +1369,39 @@ END;
 {  Draw -> Platforms DOS/DPMI/WIN/NT/OS2 - Updated 04Oct99 LdB              }
 {---------------------------------------------------------------------------}
 PROCEDURE TInputLine.Draw;
-VAR Color: Byte; X, L, R: Sw_Integer; S, T: String;
+VAR Color: Byte; L, R: Sw_Integer;
+  B : TDrawBuffer;
 BEGIN
-   If (State AND sfFocused = 0) Then Color := 1       { Not focused colour }
-     Else Color := 2;                                 { Focused colour }
-   If CanScroll(-1) Then WriteStr(0, 0, LeftArr, 4);  { Set left scroll mark }
-   If CanScroll(1) Then WriteStr(-(Size.X + 1 -
-     TextWidth(RightArr)), 0, RightArr, 4);           { Set right scroll mark }
-   If (Data <> Nil) Then S := Copy(Data^, FirstPos+1,
-    Length(Data^)-FirstPos) Else S := '';             { Fetch data string }
-   X := TextWidth(LeftArr);                           { left arrow width }
-   While (TextWidth(S) > (Size.X-X-TextWidth(
-     RightArr))) Do Delete(S, Length(S), 1);          { Cut to right length }
-   If (State AND sfFocused <> 0) Then Begin
-     L := SelStart - FirstPos;                        { Selected left end }
-     R := SelEnd - FirstPos;                          { Selected right end }
-     If (L < 0) Then L := 0;                          { Fix any negative }
-     If (R > Length(S)) Then R := Length(S);          { Fix to long case }
-     If (L > 0) Then Begin
-       T := Copy(S, 1, L);                            { Unhighlight bit }
-       WriteStr(-X, 0, T, Color);                     { Write string to screen }
-       X := X + TextWidth(T);                         { New x position }
-       Delete(S, 1, L);                               { Reduce string }
-     End;
-     If (L < R) Then Begin
-       T := Copy(S, 1, R-L);                          { Highlight bit }
-       WriteStr(-X, 0, T, 3);                         { Write string to screen }
-       X := X + TextWidth(T);                         { New x position }
-       Delete(S, 1, R-L);                             { Reduce string }
-     End;
-     If (Length(S) > 0) Then
-       WriteStr(-X, 0, S, Color);                     { Write string to screen }
-   End Else WriteStr(-X, 0, S, Color);                { Write string to screen }
-   Cursor.X := CurPos - FirstPos + 1;                 { Update cursor position }
-END;
+  if Options and ofSelectable = 0 then
+    Color := GetColor(5)
+  else
+    If (State AND sfFocused = 0) Then
+      Color := GetColor(1)       { Not focused colour }
+    Else
+      Color := GetColor(2);      { Focused colour }
+  MoveChar(B, ' ',      Color, Size.X);
+  MoveStr(B[1], Copy(Data^, FirstPos + 1, Size.X - 2), Color);
+  if CanScroll(1) then
+    MoveChar(B[Size.X - 1], RightArr, GetColor(4), 1);
+  if (State and sfFocused <> 0) and
+     (Options and ofSelectable <> 0) then
+    begin
+      if CanScroll(-1) then
+        MoveChar(B[0], LeftArr, GetColor(4), 1);
+      { Highlighted part }
+      L := SelStart - FirstPos;
+      R := SelEnd - FirstPos;
+      if L < 0 then
+        L := 0;
+      if R > Size.X - 2 then
+        R := Size.X - 2;
+      if L < R then
+        MoveChar(B[L + 1], #0, GetColor(3), R - L);
+      SetCursor(CurPos - FirstPos + 1, 0);
+    end;
+  WriteLine(0, 0, Size.X, Size.Y, B);
+end;
 
-{--TInputLine---------------------------------------------------------------}
-{  DrawbackGround -> Platforms DOS/DPMI/WIN/NT/OS2 - Updated 04Oct99 LdB    }
-{---------------------------------------------------------------------------}
-PROCEDURE TInputLine.DrawBackGround;
-BEGIN
-   Inherited DrawBackGround;                          { Call ancestor }
-END;
 
 {--TInputLine---------------------------------------------------------------}
 {  DrawCursor -> Platforms DOS/DPMI/WIN/NT/OS2 - Updated 05Oct99 LdB        }
@@ -1766,7 +1756,6 @@ CONSTRUCTOR TButton.Init (Var Bounds: TRect; ATitle: TTitleStr;
 BEGIN
    Inherited Init(Bounds);                            { Call ancestor }
    EventMask := EventMask OR evBroadcast;             { Handle broadcasts }
-   GOptions := GOptions OR goDrawFocus;               { Set new option mask }
    Options := Options OR (ofSelectable + ofFirstClick
      + ofPreProcess + ofPostProcess);                 { Set option flags }
    If NOT CommandEnabled(ACommand) Then
@@ -1831,10 +1820,10 @@ BEGIN
 END;
 
 {--TButton------------------------------------------------------------------}
-{  DrawFocus -> Platforms DOS/DPMI/WIN/NT/OS2 - Updated 30Apr98 LdB         }
+{  Draw -> Platforms DOS/DPMI/WIN/NT/OS2 - Updated 30Apr98 LdB         }
 {---------------------------------------------------------------------------}
-PROCEDURE TButton.DrawFocus;
-VAR B: Byte; I, J, Pos: Sw_Integer;
+PROCEDURE TButton.Draw;
+VAR I, J, Pos: Sw_Integer;
     Bc: Word; Db: TDrawBuffer;
     C : char;
 BEGIN
@@ -1893,7 +1882,6 @@ END;
 PROCEDURE TButton.DrawState (Down: Boolean);
 BEGIN
    DownFlag := Down;                                  { Set down flag }
-   SetDrawMask(vdFocus);                              { Set focus mask }
    DrawView;                                          { Redraw the view }
 END;
 
@@ -2021,7 +2009,6 @@ CONSTRUCTOR TCluster.Init (Var Bounds: TRect; AStrings: PSItem);
 VAR I: Sw_Integer; P: PSItem;
 BEGIN
    Inherited Init(Bounds);                            { Call ancestor }
-   GOptions := GOptions OR goDrawFocus;               { Draw focus view }
    Options := Options OR (ofSelectable + ofFirstClick
      + ofPreProcess + ofPostProcess + ofVersion20);   { Set option masks }
    I := 0;                                            { Zero string count }
@@ -2040,7 +2027,7 @@ BEGIN
    Sel := 0;
    SetCursor(2,0);
    ShowCursor;
-   EnableMask := $FFFFFFFF;                           { Enable bit masks }
+   EnableMask := Sw_Integer($FFFFFFFF);                           { Enable bit masks }
 END;
 
 {--TCluster-----------------------------------------------------------------}
@@ -2059,9 +2046,9 @@ BEGIN
    Else
      Begin
      w:=Value;
-     S.Read(w, SizeOf(w)); Value:=w;               { Read value }
+     S.Read(w, SizeOf(w)); Value:=w;                  { Read value }
      S.Read(Sel, SizeOf(Sel));                        { Read select item }
-     EnableMask := $FFFFFFFF;                         { Enable all masks }
+     EnableMask := Sw_integer($FFFFFFFF);             { Enable all masks }
      Options := Options OR ofVersion20;               { Set version 2 mask }
    End;
    Strings.Load(S);                                   { Load string data }
@@ -2072,7 +2059,6 @@ END;
 {  Done -> Platforms DOS/DPMI/WIN/NT/OS2 - Updated 26Jul99 LdB              }
 {---------------------------------------------------------------------------}
 DESTRUCTOR TCluster.Done;
-VAR I: Sw_Integer;
 BEGIN
    Strings.Done;                                      { Dispose of strings }
    Inherited Done;                                    { Call ancestor }
@@ -2131,9 +2117,9 @@ BEGIN
 END;
 
 {--TCluster-----------------------------------------------------------------}
-{  DrawFocus -> Platforms DOS/DPMI/WIN/NT/OS2 - Updated 28Jul99 LdB         }
+{  Draw -> Platforms DOS/DPMI/WIN/NT/OS2 - Updated 28Jul99 LdB         }
 {---------------------------------------------------------------------------}
-PROCEDURE TCluster.DrawFocus;
+PROCEDURE TCluster.Draw;
 BEGIN
 END;
 
@@ -2162,7 +2148,6 @@ PROCEDURE TCluster.SetState (AState: Word; Enable: Boolean);
 BEGIN
    Inherited SetState(AState, Enable);                { Call ancestor }
    If (AState AND sfFocused <> 0) Then Begin
-     SetDrawMask(vdFocus OR vdInner);                 { Set redraw masks }
      DrawView;                                        { Redraw masked areas }
    End;
 END;
@@ -2172,7 +2157,6 @@ END;
 {---------------------------------------------------------------------------}
 PROCEDURE TCluster.DrawMultiBox (Const Icon, Marker: String);
 VAR I, J, K, Cur, Col: Sw_Integer; CNorm, CSel, CDis, Color: Word; B: TDrawBuffer;
-    Tb, SCOff: Byte;
 BEGIN
    CNorm := GetColor($0301);                          { Normal colour }
    CSel := GetColor($0402);                           { Selected colour }
@@ -2259,7 +2243,6 @@ END;
 PROCEDURE TCluster.SetData (Var Rec);
 BEGIN
    Value :=sw_Word(Rec);                              { Set current value }
-   SetDrawMask(vdFocus OR vdInner);                   { Set redraw mask }
    DrawView;                                          { Redraw masked areas }
 END;
 
@@ -2295,7 +2278,6 @@ VAR C: Char; I, J, S, Vh: Sw_Integer; Key: Word; Mouse: TPoint; Ts: PString;
      If (I <= Strings.Count) Then Begin
        Sel := S;                                      { Set selected item }
        MovedTo(Sel);                                  { Move to selected }
-       SetDrawMask(vdInner OR vdFocus);               { Set draw masks }
        DrawView;                                      { Now draw changes }
      End;
    END;
@@ -2308,7 +2290,6 @@ BEGIN
      I := FindSel(Mouse);                             { Find selected item }
      If (I <> -1) Then                                { Check in view }
        If ButtonState(I) Then Sel := I;               { If enabled select }
-     SetDrawMask(vdFocus OR vdInner);                 { Set draw mask }
      DrawView;                                        { Now draw changes }
      Repeat
        MakeLocal(Event.Where, Mouse);                 { Make point local }
@@ -2317,7 +2298,6 @@ BEGIN
      If (FindSel(Mouse) = Sel) AND ButtonState(Sel)   { If valid/selected }
      Then Begin
        Press(Sel);                                    { Call pressed }
-       SetDrawMask(vdFocus OR vdInner);               { Set draw mask }
        DrawView;                                      { Now draw changes }
      End;
      ClearEvent(Event);                               { Event was handled }
@@ -2369,7 +2349,6 @@ BEGIN
                  Sel := I;                            { Set selected }
                  MovedTo(Sel);                        { Move to selected }
                  Press(Sel);                          { Call pressed }
-                 SetDrawMask(vdFocus OR vdInner);     { Set draw mask }
                  DrawView;                            { Now draw changes }
                End;
                ClearEvent(Event);                     { Event was handled }
@@ -2381,7 +2360,6 @@ BEGIN
          (State AND sfFocused <> 0) AND               { Check focused view }
          ButtonState(Sel) Then Begin                  { Check item enabled }
            Press(Sel);                                { Call pressed }
-           SetDrawMask(vdFocus OR vdInner);           { Set draw mask }
            DrawView;                                  { Now draw changes }
            ClearEvent(Event);                         { Event was handled }
          End;
@@ -2469,10 +2447,10 @@ END;
 {--TRadioButtons------------------------------------------------------------}
 {  Draw -> Platforms DOS/DPMI/WIN/NT/OS2 - Updated 04May98 LdB              }
 {---------------------------------------------------------------------------}
-PROCEDURE TRadioButtons.DrawFocus;
+PROCEDURE TRadioButtons.Draw;
 CONST Button = ' ( ) ';
 BEGIN
-   Inherited DrawFocus;
+   Inherited Draw;
    DrawMultiBox(Button, ' *');                       { Redraw the text }
 END;
 
@@ -2520,10 +2498,10 @@ END;
 {--TCheckBoxes--------------------------------------------------------------}
 {  Draw -> Platforms DOS/DPMI/WIN/NT/OS2 - Updated 04May98 LdB              }
 {---------------------------------------------------------------------------}
-PROCEDURE TCheckBoxes.DrawFocus;
+PROCEDURE TCheckBoxes.Draw;
 CONST Button = ' [ ] ';
 BEGIN
-   Inherited DrawFocus;
+   Inherited Draw;
    DrawMultiBox(Button, ' X');                        { Redraw the text }
 END;
 
@@ -2592,10 +2570,10 @@ END;
 {--TMultiCheckBoxes---------------------------------------------------------}
 {  Draw -> Platforms DOS/DPMI/WIN/NT/OS2 - Updated 06Jun98 LdB              }
 {---------------------------------------------------------------------------}
-PROCEDURE TMultiCheckBoxes.DrawFocus;
+PROCEDURE TMultiCheckBoxes.Draw;
 CONST Button = ' [ ] ';
 BEGIN
-   Inherited DrawFocus;
+   Inherited Draw;
    DrawMultiBox(Button, States^);                     { Draw the items }
 END;
 
@@ -2631,7 +2609,6 @@ END;
 PROCEDURE TMultiCheckBoxes.SetData (Var Rec);
 BEGIN
    Value := Longint(Rec);                             { Set value }
-   SetDrawMask(vdFocus OR vdInner);                   { Set redraw mask }
    DrawView;                                          { Redraw masked areas }
 END;
 
@@ -2867,42 +2844,54 @@ END;
 {--TStaticText--------------------------------------------------------------}
 {  DrawBackGround -> Platforms DOS/DPMI/WIN/NT/OS2 - Updated 26Oct99 LdB    }
 {---------------------------------------------------------------------------}
-PROCEDURE TStaticText.DrawBackGround;
-VAR Just: Byte; I, J, P, Y, L: Sw_Integer; S, T: String;
+PROCEDURE TStaticText.Draw;
+VAR Just: Byte; I, J, P, Y, L: Sw_Integer; S: String;
+  B : TDrawBuffer;
+  Color : Byte;
 BEGIN
-   Inherited DrawBackGround;                          { Call ancestor }
    GetText(S);                                        { Fetch text to write }
+   Color := GetColor(1);
    P := 1;                                            { X start position }
    Y := 0;                                            { Y start position }
    L := Length(S);                                    { Length of text }
-   While (Y < Size.Y) AND (P <= L) Do Begin
-     Just := 0;                                       { Default left justify }
-     If (S[P] = #2) Then Begin                        { Right justify char }
-       Just := 2;                                     { Set right justify }
-       Inc(P);                                        { Next character }
-     End;
-     If (S[P] = #3) Then Begin                        { Centre justify char }
-       Just := 1;                                     { Set centre justify }
-       Inc(P);                                        { Next character }
-     End;
-     I := P;                                          { Start position }
-     While (P <= L) AND (P-I <= Size.X) AND (S[P] <> #13) Do
-       Inc(P);                                        { Scan for end }
-     T := Copy(S, I, P-I);                            { String to write }
-     Case Just Of
-       0: J := 0;                                     { Left justify }
-       1: J := (Size.X - TextWidth(T)) DIV 2;      { Centre justify }
-       2: J := Size.X - TextWidth(T);              { Right justify }
-     End;
-     While (J < 0) Do Begin                           { Text to long }
-       J := J + TextWidth(T[1]);                      { Add width to J }
-       Delete(T, 1, 1);                               { Delete the char }
-     End;
-     WriteStr(-J, -Y, T, 1);             { Write the text }
-     While (P <= L) AND (P-I <= Size.X) AND ((S[P] = #13) OR (S[P] = #10))
-       Do Inc(P);                                     { Remove CR/LF }
-     Inc(Y);                                          { Next line }
-   End;
+   While (Y < Size.Y) Do Begin
+    MoveChar(B, ' ', Color, Size.X);
+    if P <= L then
+    begin
+      Just := 0;                                       { Default left justify }
+      If (S[P] = #2) Then Begin                        { Right justify char }
+        Just := 2;                                     { Set right justify }
+        Inc(P);                                        { Next character }
+      End;
+      If (S[P] = #3) Then Begin                        { Centre justify char }
+        Just := 1;                                     { Set centre justify }
+        Inc(P);                                        { Next character }
+      End;
+      I := P;                                          { Start position }
+      repeat
+        J := P;
+        while (P <= L) and (S[P] = ' ') do
+          Inc(P);
+        while (P <= L) and (S[P] <> ' ') and (S[P] <> #13) do
+          Inc(P);
+      until (P > L) or (P >= I + Size.X) or (S[P] = #13);
+      If P > I + Size.X Then                           { Text to long }
+        If J > I Then
+          P := J
+        Else
+          P := I + Size.X;
+      Case Just Of
+        0: J := 0;                           { Left justify }
+        1: J := (Size.X - (P-I)) DIV 2;      { Centre justify }
+        2: J := Size.X - (P-I);              { Right justify }
+      End;
+      MoveBuf(B[J], S[I], Color, P - I);
+      While (P <= L) AND (P-I <= Size.X) AND ((S[P] = #13) OR (S[P] = #10))
+        Do Inc(P);                                     { Remove CR/LF }
+    End;
+    WriteLine(0, Y, Size.X, 1, B);
+    Inc(Y);                                          { Next line }
+  End;
 END;
 
 {--TStaticText--------------------------------------------------------------}
@@ -3027,10 +3016,9 @@ END;
 {--TLabel-------------------------------------------------------------------}
 {  DrawBackGround -> Platforms DOS/DPMI/WIN/NT/OS2 - Updated 26Oct99 LdB    }
 {---------------------------------------------------------------------------}
-PROCEDURE TLabel.DrawBackGround;
+PROCEDURE TLabel.Draw;
 VAR SCOff: Byte; Color: Word; B: TDrawBuffer;
 BEGIN
-   TView.DrawBackGround;                              { Explict call to TView }
    If Light Then Begin                                { Light colour select }
      Color := GetColor($0402);                        { Choose light colour }
      SCOff := 0;                                      { Zero offset }
@@ -3705,7 +3693,6 @@ end;
 procedure TEditListBox.EditField (var Event : TEvent);
 var R : TRect;
     InputLine : PModalInputLine;
-    Data : String;
 begin
   R.Assign(StartColumn,(Origin.Y + Focused - TopItem),
            (StartColumn + FieldWidth + 2),(Origin.Y + Focused - TopItem + 1));
@@ -4168,58 +4155,7 @@ END;
 END.
 {
  $Log$
- Revision 1.26  2004-11-03 20:33:05  peter
-   * removed unnecesasry graphfv stuff
-
- Revision 1.25  2004/11/03 12:09:08  peter
-   * textwidth doesn't support ~ anymore, added CTextWidth with ~ support
-
- Revision 1.24  2004/11/03 10:37:24  peter
-   * cursor probs fixed
-
- Revision 1.23  2004/11/02 23:53:19  peter
-   * fixed crashes with ide and 1.9.x
-
- Revision 1.22  2002/10/17 13:27:53  pierre
-  * fix TCluster.Get/SetData on big endian machines
-
- Revision 1.21  2002/10/17 11:24:16  pierre
-  * Clean up the Load/Store routines so they are endian independent
-
- Revision 1.20  2002/09/22 19:42:23  hajny
-   + FPC/2 support added
-
- Revision 1.19  2002/09/09 08:14:47  pierre
-  * remove virtual modifer from store methods
-
- Revision 1.18  2002/09/07 15:06:36  peter
-   * old logs removed and tabs fixed
-
- Revision 1.17  2002/05/31 12:35:21  pierre
-  * use graph mode to display button title
-
- Revision 1.16  2002/05/24 21:00:10  pierre
-  * correct cursor position for TInputLine
-
- Revision 1.15  2002/05/23 12:16:11  pierre
-  * fix textmode button to be displayed like in TV
-
- Revision 1.14  2002/05/23 09:06:53  pierre
-  * use normal cursor for textmode TInputLine
-
- Revision 1.13  2002/05/16 20:36:24  pierre
-  * break lines of static text if too long
+ Revision 1.27  2004-11-06 17:08:48  peter
+   * drawing of tview merged from old fv code
 
 }
-{******************[ REVISION HISTORY ]********************}
-{  Version  Date        Fix                                }
-{  -------  ---------   ---------------------------------  }
-{  1.00     11 Nov 96   First DOS/DPMI platform release.   }
-{  1.10     13 Jul 97   Windows platform code added.       }
-{  1.20     29 Aug 97   Platform.inc sort added.           }
-{  1.30     13 Oct 97   Delphi 2 32 bit code added.        }
-{  1.40     05 May 98   Virtual pascal 2.0 code added.     }
-{  1.50     27 Oct 99   All objects completed and checked  }
-{  1.51     03 Nov 99   FPC windows support added          }
-{  1.60     26 Nov 99   Graphics stuff moved to GFVGraph   }
-{**********************************************************}

+ 2 - 111
fv/drivers.pas

@@ -1443,116 +1443,7 @@ BEGIN
 END.
 {
  $Log$
- Revision 1.42  2004-11-04 20:57:58  peter
- sysmsgs is always available
-
- Revision 1.41  2004/11/03 20:51:36  florian
-   * fixed problems on targets requiring proper alignment
-
- Revision 1.40  2004/11/03 20:33:05  peter
-   * removed unnecesasry graphfv stuff
-
- Revision 1.39  2004/11/02 23:53:19  peter
-   * fixed crashes with ide and 1.9.x
-
- Revision 1.38  2003/10/01 16:20:27  marco
-  * baseunix fixes for 1.1
-
- Revision 1.37  2002/10/17 11:22:46  pierre
-  * fix a problem in InitVideo with StoreVideoMode
-
- Revision 1.36  2002/10/07 15:44:43  pierre
-  * consider endianess for KeyCode/CharCode-ScanCode pairs
-
- Revision 1.35  2002/09/22 19:42:22  hajny
-   + FPC/2 support added
-
- Revision 1.34  2002/09/13 22:24:30  pierre
-  * fix Alt+'9' recognition in GetAltChar function
-
- Revision 1.33  2002/09/13 09:21:15  pierre
-  * don't call InitVideo in DetectVideo procedure
-
- Revision 1.32  2002/09/09 08:04:05  pierre
-  * remove all warnings about far
-
- Revision 1.31  2002/09/07 15:06:36  peter
-   * old logs removed and tabs fixed
-
- Revision 1.30  2002/06/10 19:40:14  pierre
-  * add DoneMouse in DoneEvents
-
- Revision 1.29  2002/06/10 18:16:55  pierre
-  * set Event.What to evNothing if no event in GetSystemEvent
-
- Revision 1.28  2002/06/07 14:08:28  pierre
-  * try to get resizing to work
-
- Revision 1.27  2002/06/06 20:33:35  pierre
-  * remove system event by calling sysmsg.getsystemevent
-
- Revision 1.26  2002/06/06 13:57:50  pierre
-  + activate/desactivate system messages
-
- Revision 1.25  2002/06/06 06:43:29  pierre
-  * avoid more than 132 columns, to avoid TDrawBuffer overrun
-
- Revision 1.24  2002/06/04 11:12:41  marco
-  * Renamefest
-
- Revision 1.23  2002/05/31 12:38:37  pierre
-  * try to enhance graph mode
-
- Revision 1.22  2002/05/29 21:21:54  pierre
-  * Use VGAHi for go32v2 graph version for now
-
- Revision 1.21  2002/05/29 19:36:12  pierre
-  * fix graph related problems
-
- Revision 1.20  2002/05/28 19:14:35  pierre
-  * adapt to new GraphUpdateScreen function
-
- Revision 1.19  2002/05/24 10:36:52  pierre
-  * Try to enhance win32 special chars support
-
- Revision 1.18  2002/05/24 09:36:33  pierre
-  + use win32gr unit to add mouse and keyboard support for win32 graph
-
- Revision 1.17  2002/05/23 15:07:31  pierre
-  * compute graphic size correctly
-
- Revision 1.16  2002/05/23 06:34:06  pierre
-  * fix go32v2 build failure
-
- Revision 1.15  2002/05/21 12:21:53  pierre
-  * fix various graphic problems
-
- Revision 1.14  2002/05/16 20:21:50  pierre
-  + fix for bug report 1953 adapted from S Wiktor
+ Revision 1.43  2004-11-06 17:08:48  peter
+   * drawing of tview merged from old fv code
 
 }
-{******************[ REVISION HISTORY ]********************}
-{  Version  Date        Fix                                }
-{  -------  ---------   ---------------------------------  }
-{  1.00     26 Jul 96   First DOS/DPMI platform release    }
-{  1.10     18 Nov 97   Windows conversion added.          }
-{  1.20     29 Aug 97   Platform.inc sort added.           }
-{  1.30     10 Jun 98   Virtual pascal 2.0 code added.     }
-{  1.40     13 Jul 98   Added FormatStr by Marco Schmidt.  }
-{  1.50     14 Jul 98   Fixed width = 0 in FormatStr.      }
-{  1.60     13 Aug 98   Complete rewrite of FormatStr.     }
-{  1.70     10 Sep 98   Added mouse int hook for FPC.      }
-{  1.80     10 Sep 98   Checks run & commenting added.     }
-{  1.90     15 Oct 98   Fixed for FPC version 0.998        }
-{  1.91     18 Feb 99   Added PrintStr functions           }
-{  1.92     18 Feb 99   FormatStr literal '%' fix added    }
-{  1.93     10 Jul 99   Sybil 2.0 code added               }
-{  1.94     15 Jul 99   Fixed for FPC 0.9912 release       }
-{  1.95     26 Jul 99   Windows..Scales to GFV system font }
-{  1.96     30 Jul 99   Fixed Ctrl+F1..F10 in GetKeyEvent  }
-{  1.97     07 Sep 99   InitEvent, DoneEvent fixed for OS2 }
-{  1.98     09 Sep 99   GetMouseEvent fixed for OS2.       }
-{  1.99     03 Nov 99   FPC windows support added.         }
-{  2.00     26 Nov 99   Graphics stuff moved to GFVGraph   }
-{  2.01     21 May 00   DOS fixed to use std GRAPH unit    }
-{**********************************************************}

+ 2 - 14
fv/fvcommon.pas

@@ -372,19 +372,7 @@ END;
 END.
 {
  $Log$
- Revision 1.7  2004-11-05 12:48:18  peter
- removed types already in system unit
-
- Revision 1.6  2004/11/02 23:53:19  peter
-   * fixed crashes with ide and 1.9.x
-
- Revision 1.5  2003/06/05 14:45:06  peter
-   * use Windows THandle
-
- Revision 1.4  2002/09/07 15:06:36  peter
-   * old logs removed and tabs fixed
-
- Revision 1.3  2002/06/04 11:12:41  marco
-  * Renamefest
+ Revision 1.8  2004-11-06 17:08:48  peter
+   * drawing of tview merged from old fv code
 
 }

+ 2 - 8
fv/fvconsts.pas

@@ -626,13 +626,7 @@ implementation
 end.
 {
   $Log$
-  Revision 1.5  2002-09-07 15:06:36  peter
-    * old logs removed and tabs fixed
-
-  Revision 1.4  2002/05/21 12:21:53  pierre
-   * fix various graphic problems
-
-  Revision 1.3  2002/05/21 12:00:49  pierre
-   + cmResizeApp added
+  Revision 1.6  2004-11-06 17:08:48  peter
+    * drawing of tview merged from old fv code
 
 }

+ 22 - 24
fv/gadgets.pas

@@ -115,7 +115,7 @@ TYPE
       constructor InitKb(var Bounds: TRect);
       constructor InitMb(var Bounds: TRect);
       PROCEDURE Update;
-      PROCEDURE DrawBackGround; Virtual;
+      PROCEDURE Draw; Virtual;
       Function  Comma ( N : LongInt ) : String;
    END;
    PHeapView = ^THeapView;                            { Heapview pointer }
@@ -132,7 +132,7 @@ TYPE
       CONSTRUCTOR Init (Var Bounds: TRect);
       FUNCTION FormatTimeStr (H, M, S: Word): String; Virtual;
       PROCEDURE Update; Virtual;
-      PROCEDURE DrawBackGround; Virtual;
+      PROCEDURE Draw; Virtual;
    END;
    PClockView = ^TClockView;                          { Clockview ptr }
 
@@ -183,16 +183,18 @@ PROCEDURE THeapView.Update;
 BEGIN
    If (OldMem <> MemAvail) Then Begin                 { Memory differs }
      OldMem := MemAvail;                              { Hold memory avail }
-     SetDrawMask(vdBackGnd OR vdInner);               { Set draw masks }
      DrawView;                                        { Now redraw }
    End;
 END;
 
 {--THeapView----------------------------------------------------------------}
-{  DrawBackGround -> Platforms DOS/DPMI/WIN/NT/OS2 - Updated 12Nov99 LdB    }
+{  Draw -> Platforms DOS/DPMI/WIN/NT/OS2 - Updated 12Nov99 LdB              }
 {---------------------------------------------------------------------------}
-PROCEDURE THeapView.DrawBackGround;
-VAR HOfs: Integer; S: String;
+PROCEDURE THeapView.Draw;
+VAR
+  C : Byte;
+  S : String;
+  B : TDrawBuffer;
 begin
   case mode of
     HVNormal :
@@ -210,11 +212,10 @@ begin
         S:=S+'M';
       end;
   end;
-  HOfs := ColourOfs;                                 { Hold any offset }
-  ColourOfs := 2;                                    { Set colour offset }
-  Inherited DrawBackGround;                          { Clear the backgound }
-  ColourOfs := HOfs;                                 { Reset any offset }
-  WriteStr(-(Size.X-TextWidth(S)), 0, S, 2);    { Write the string }
+  C:=GetColor(2);
+  MoveChar(B,' ',C,Size.X);
+  MoveStr(B,S,C);
+  WriteLine(0,0,Size.X,1,B);
 END;
 
 Function THeapView.Comma ( n : LongInt) : String;
@@ -282,7 +283,6 @@ BEGIN
    If (Abs(Sec - LastTime) >= Refresh) Then Begin     { Refresh time elapsed }
      LastTime := Sec;                                 { Hold second }
      TimeStr := FormatTimeStr(Hour, Min, Sec);        { Create time string }
-     SetDrawMask(vdBackGnd OR vdInner);               { Set draw masks }
      DrawView;                                        { Now redraw }
    End;
 END;
@@ -290,23 +290,21 @@ END;
 {--TClockView---------------------------------------------------------------}
 {  DrawBackGround -> Platforms DOS/DPMI/WIN/NT/OS2 - Updated 12Nov99 LdB    }
 {---------------------------------------------------------------------------}
-PROCEDURE TClockView.DrawBackGround;
-VAR HOfs: Integer;
+PROCEDURE TClockView.Draw;
+VAR
+  C : Byte;
+  B : TDrawBuffer;
 BEGIN
-   HOfs := ColourOfs;                                 { Hold any offset }
-   ColourOfs := 2;                                    { Set colour offset }
-   Inherited DrawBackGround;                          { Clear the backgound }
-   ColourOfs := HOfs;                                 { Reset any offset }
-   WriteStr(0, 0, TimeStr, 2);                        { Write the string }
+  C:=GetColor(2);
+  MoveChar(B,' ',C,Size.X);
+  MoveStr(B,TimeStr,C);
+  WriteLine(0,0,Size.X,1,B);
 END;
 
 END.
 {
  $Log$
- Revision 1.6  2004-11-03 20:33:05  peter
-   * removed unnecesasry graphfv stuff
-
- Revision 1.5  2002/09/07 15:06:36  peter
-   * old logs removed and tabs fixed
+ Revision 1.7  2004-11-06 17:08:48  peter
+   * drawing of tview merged from old fv code
 
 }

+ 2 - 17
fv/histlist.pas

@@ -424,22 +424,7 @@ END.
 
 {
  $Log$
- Revision 1.11  2004-11-03 20:51:36  florian
-   * fixed problems on targets requiring proper alignment
-
- Revision 1.10  2002/10/17 11:24:16  pierre
-  * Clean up the Load/Store routines so they are endian independent
-
- Revision 1.9  2002/09/07 15:06:37  peter
-   * old logs removed and tabs fixed
-
- Revision 1.8  2002/06/10 11:51:08  pierre
-  * render history load/store compatible with older fvnew lib
-
- Revision 1.7  2002/06/03 20:07:44  pierre
-  * DeleteString was moving to much memory
-
- Revision 1.6  2002/05/24 09:30:33  pierre
-  * fix bug with HistoryUsed, now is really a used size
+ Revision 1.12  2004-11-06 17:08:48  peter
+   * drawing of tview merged from old fv code
 
 }

+ 2 - 11
fv/memory.pas

@@ -848,16 +848,7 @@ END.
 
 {
  $Log$
- Revision 1.8  2004-11-03 20:51:36  florian
-   * fixed problems on targets requiring proper alignment
-
- Revision 1.7  2002/09/22 19:42:22  hajny
-   + FPC/2 support added
-
- Revision 1.6  2002/09/09 08:04:06  pierre
-  * remove all warnings about far
-
- Revision 1.5  2002/09/07 15:06:37  peter
-   * old logs removed and tabs fixed
+ Revision 1.9  2004-11-06 17:08:48  peter
+   * drawing of tview merged from old fv code
 
 }

+ 13 - 90
fv/menus.pas

@@ -216,7 +216,6 @@ TYPE
       CONSTRUCTOR Init (Var Bounds: TRect; AMenu: PMenu);
       DESTRUCTOR Done; Virtual;
       PROCEDURE Draw; Virtual;
-      PROCEDURE DrawBackGround; Virtual;
       private
       PROCEDURE GetItemRectX (Item: PMenuItem; Var R: TRect); Virtual;
    END;
@@ -230,7 +229,6 @@ TYPE
       CONSTRUCTOR Init (Var Bounds: TRect; AMenu: PMenu;
         AParentMenu: PMenuView);
       PROCEDURE Draw; Virtual;
-      PROCEDURE DrawBackGround; Virtual;
       private
       PROCEDURE GetItemRectX (Item: PMenuItem; Var R: TRect); Virtual;
    END;
@@ -665,7 +663,6 @@ BEGIN
      If (ItemShown <> Current) Then Begin             { New current item }
        OldItem := ItemShown;                          { Hold old item }
        ItemShown := Current;                          { Hold new item }
-       SetDrawMask(vdFocus OR vdInner);               { Set the draw mask }
        DrawView;                                      { Redraw the items }
        OldItem := Nil;                                { Clear old item }
      End;
@@ -933,56 +930,18 @@ BEGIN
    Inherited Done;                                    { Call ancestor }
 END;
 
-{--TMenuBar-----------------------------------------------------------------}
-{  Draw -> Platforms DOS/DPMI/WIN/NT/OS2 - Updated 08May98 LdB              }
-{---------------------------------------------------------------------------}
-PROCEDURE TMenuBar.Draw;
-VAR I, J, K, L, CNormal, CSelect, CNormDisabled, CSelDisabled, Color: Word;
-    P: PMenuItem; B: TDrawBuffer;
-BEGIN
-   CNormal := GetColor($0301);                        { Normal colour }
-   CSelect := GetColor($0604);                        { Select colour }
-   CNormDisabled := GetColor($0202);                  { Disabled colour }
-   CSelDisabled := GetColor($0505);                   { Select disabled }
-   If (Menu <> Nil) Then Begin                        { Valid menu }
-     I := 0;                                          { Set start position }
-     P := Menu^.Items;                                { First item }
-     While (P <> Nil) Do Begin
-       If (P^.Name <> Nil) Then Begin                 { Name valid }
-         J := CStrLen(P^.Name^) + 2;                  { Name string length }
-         If (P = OldItem) OR (P = Current) Then Begin { Matches a state }
-           If P^.Disabled Then Begin
-             If (P = Current) Then
-               Color := CSelDisabled                  { Select disabled }
-               Else Color := CNormDisabled            { Normal disabled }
-           End Else Begin
-             If (P = Current) Then Color := CSelect   { Select colour }
-               Else Color := CNormal;                 { Normal colour }
-           End;
-           MoveCStr(B, ' '+P^.Name^+' ', Color);      { Name to buffer }
-           WriteBuf(I, 0, J, 1, B);                   { Write the string }
-           K := I;                          { X start position }
-           L := K + CTextWidth(' '+P^.Name^+' ');      { X end position }
-         End;
-         Inc(I, J);                                   { Advance position }
-       End;
-       P := P^.Next;                                  { Next item }
-     End;
-   End;
-END;
-
 {--TMenuBar-----------------------------------------------------------------}
 {  DrawBackGround -> Platforms DOS/DPMI/WIN/NT/OS2 - Updated 08May98 LdB    }
 {---------------------------------------------------------------------------}
-PROCEDURE TMenuBar.DrawBackGround;
+PROCEDURE TMenuBar.Draw;
 VAR I, J, CNormal, CSelect, CNormDisabled, CSelDisabled, Color: Word;
     P: PMenuItem; B: TDrawBuffer;
 BEGIN
-   Inherited DrawBackGround;                          { Call ancestor }
    CNormal := GetColor($0301);                        { Normal colour }
    CSelect := GetColor($0604);                        { Select colour }
    CNormDisabled := GetColor($0202);                  { Disabled colour }
    CSelDisabled := GetColor($0505);                   { Select disabled }
+   MoveChar(B, ' ', Byte(CNormal), Size.X);           { Empty bar }
    If (Menu <> Nil) Then Begin                        { Valid menu }
      I := 0;                                          { Set start position }
      P := Menu^.Items;                                { First item }
@@ -995,14 +954,16 @@ BEGIN
            If (P = Current) Then Color := CSelect     { Select colour }
              Else Color := CNormal;                   { Normal colour }
          End;
-         J := CStrLen(P^.Name^) + 2;                  { Length of string }
-         MoveCStr(B, ' '+P^.Name^+' ', Color);        { Name to buffer }
-         WriteBuf(I, 0, J, 1, B);                     { Write the string }
-         Inc(I, J);                                   { Advance position }
+         J := CStrLen(P^.Name^);                      { Length of string }
+         MoveChar(B[I], ' ', Byte(Color), 1);
+         MoveCStr(B[I+1], P^.Name^, Color);           { Name to buffer }
+         MoveChar(B[I+1+J], ' ', Byte(Color), 1);
+         Inc(I, J+2);                                 { Advance position }
        End;
        P := P^.Next;                                  { Next item }
      End;
    End;
+  WriteBuf(0, 0, Size.X, 1, B);                       { Write the string }
 END;
 
 {--TMenuBar-----------------------------------------------------------------}
@@ -1070,7 +1031,7 @@ END;
 {  Draw -> Platforms DOS/DPMI/WIN/NT/OS2 - Updated 11May98 LdB              }
 {---------------------------------------------------------------------------}
 PROCEDURE TMenuBox.Draw;
-VAR CNormal, CSelect, CSelectDisabled, CDisabled, Color: Word; Index, Tx, Ty, Y: Integer;
+VAR CNormal, CSelect, CSelectDisabled, CDisabled, Color: Word; Index, Y: Integer;
     S: String; P: PMenuItem; B: TDrawBuffer;
 Type
    FrameLineType = (UpperLine,NormalLine,SeparationLine,LowerLine);
@@ -1127,10 +1088,6 @@ BEGIN
             (Current = P) Then
            Begin                     { We need to fix draw }
              WriteBuf(0, Y, Size.X, 1, B);             { Write the whole line }
-           If (P = Current) Then Begin                { Selected item }
-             Tx := 2;                     { X offset }
-             Ty := Y;                    { Y offset }
-           End;
          End;
        End Else Begin { no text NewLine }
          Color := CNormal;                              { Normal colour }
@@ -1146,13 +1103,6 @@ BEGIN
    WriteBuf(0, Size.Y-1, Size.X, 1, B);                  { Write the line }
 END;
 
-{--TMenuBox-----------------------------------------------------------------}
-{  DrawBackGround -> Platforms DOS/DPMI/WIN/NT/OS2 - Updated 11May98 LdB    }
-{---------------------------------------------------------------------------}
-PROCEDURE TMenuBox.DrawBackGround;
-BEGIN
-   Inherited DrawBackGround;                          { Call ancestor }
-END;
 
 {--TMenuBox-----------------------------------------------------------------}
 {  GetItemRectX -> Platforms DOS/DPMI/WIN/NT/OS2 - Updated 11May98 LdB      }
@@ -1503,7 +1453,7 @@ BEGIN
    CSelect := GetColor($0604);                        { Select colour }
    CNormDisabled := GetColor($0202);                  { Disabled colour }
    CSelDisabled := GetColor($0505);                   { Select disabled }
-   MoveChar(B, ' ', Byte(CNormal), 80);               { Clear the buffer }
+   MoveChar(B, ' ', Byte(CNormal), Size.X);      { Clear the buffer }
    T := Items;                                        { First item }
    I := 0;                                            { Clear the count }
    L := 0;
@@ -1532,7 +1482,7 @@ BEGIN
      MoveStr(B[I], HintBuf, Byte(CNormal));           { Move hint to buffer }
      I := I + Length(HintBuf);                        { Hint length }
    End;
-   WriteLine(0, 0, I, 1, B);                          { Write the buffer }
+   WriteLine(0, 0, Size.X, 1, B);                          { Write the buffer }
 END;
 
 {***************************************************************************}
@@ -1703,34 +1653,7 @@ END;
 END.
 {
  $Log$
- Revision 1.20  2004-11-03 20:51:36  florian
-   * fixed problems on targets requiring proper alignment
-
- Revision 1.19  2004/11/03 20:33:05  peter
-   * removed unnecesasry graphfv stuff
-
- Revision 1.18  2004/11/03 12:09:08  peter
-   * textwidth doesn't support ~ anymore, added CTextWidth with ~ support
-
- Revision 1.17  2004/11/02 23:53:19  peter
-   * fixed crashes with ide and 1.9.x
-
- Revision 1.16  2002/10/17 11:24:17  pierre
-  * Clean up the Load/Store routines so they are endian independent
-
- Revision 1.15  2002/09/07 15:06:37  peter
-   * old logs removed and tabs fixed
-
- Revision 1.14  2002/06/10 18:41:26  pierre
-  + add Submenu recognition sign
-
- Revision 1.13  2002/05/30 06:58:28  pierre
-  * fix grpah related menubar draw issues
-
- Revision 1.12  2002/05/29 19:36:52  pierre
-  * fix UseFixedFont related code
-
- Revision 1.11  2002/05/21 10:53:25  pierre
-  * fix graphical separation lines
+ Revision 1.21  2004-11-06 17:08:48  peter
+   * drawing of tview merged from old fv code
 
 }

+ 2 - 5
fv/msgbox.pas

@@ -291,10 +291,7 @@ END.
 
 {
  $Log$
- Revision 1.5  2004-02-18 05:50:38  pierre
-  *fix for MessageBox error by Berthold Studemund
-
- Revision 1.4  2002/09/07 15:06:38  peter
-   * old logs removed and tabs fixed
+ Revision 1.6  2004-11-06 17:08:48  peter
+   * drawing of tview merged from old fv code
 
 }

+ 2 - 5
fv/sysmsg.pas

@@ -128,10 +128,7 @@ end;
 end.
 {
   $Log$
-  Revision 1.2  2004-11-04 20:57:59  peter
-  sysmsgs is always available
-
-  Revision 1.1  2002/05/21 11:59:57  pierre
-   + system messages unit added
+  Revision 1.3  2004-11-06 17:08:48  peter
+    * drawing of tview merged from old fv code
 
 }

+ 3 - 21
fv/time.pas

@@ -168,7 +168,7 @@ PROCEDURE SecondsToTime (Sd: LongInt; Var Hour24, Minute, Second: Word);
 
   TYPE DateTime = TDateTime;                          { Type correction }
   {$ENDIF}
-  
+
   {$IFDEF PPC_BPOS2}                                  { C'T PATCH TO BP CODE }
   USES DosTypes, DosProcs;                            { Standard unit }
 
@@ -453,25 +453,7 @@ END.
 
 {
  $Log$
- Revision 1.11  2002-10-12 19:39:00  hajny
-   * FPC/2 support
-
- Revision 1.10  2002/09/24 16:48:24  hajny
-   * fix for TDateTime clash
-
- Revision 1.9  2002/09/22 19:42:22  hajny
-   + FPC/2 support added
-
- Revision 1.8  2002/09/09 08:02:49  pierre
-  * avoid instabilities on win2000
-
- Revision 1.7  2002/09/07 15:06:38  peter
-   * old logs removed and tabs fixed
-
- Revision 1.6  2002/06/04 11:12:41  marco
-  * Renamefest
-
- Revision 1.5  2002/06/03 20:26:16  pierre
-  * use local time for windows
+ Revision 1.12  2004-11-06 17:08:48  peter
+   * drawing of tview merged from old fv code
 
 }

+ 2 - 8
fv/validate.pas

@@ -1059,13 +1059,7 @@ END.
 
 {
  $Log$
- Revision 1.8  2002-10-17 11:24:17  pierre
-  * Clean up the Load/Store routines so they are endian independent
-
- Revision 1.7  2002/09/09 08:14:48  pierre
-  * remove virtual modifer from store methods
-
- Revision 1.6  2002/09/07 15:06:38  peter
-   * old logs removed and tabs fixed
+ Revision 1.9  2004-11-06 17:08:48  peter
+   * drawing of tview merged from old fv code
 
 }

File diff suppressed because it is too large
+ 205 - 531
fv/views.pas


Some files were not shown because too many files changed in this diff