home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / TVTOOL.ZIP / TVSCROLL.INT < prev    next >
Encoding:
Text File  |  1992-10-08  |  3.0 KB  |  98 lines

  1. {*
  2. *   TvScroll.pas
  3. *
  4. *   Enhancements to create scrolling Turbo Vision dialog and windows boxes.
  5. *
  6. *   Copyright 1992 by Richard W. Hansen
  7. *
  8. *}
  9.  
  10. {****************************************************************************}
  11. {*   REVISION HISTORY                                                       *}
  12. {*                                                                          *}
  13. {*  Date     Who  What                                                      *}
  14. {* ======================================================================== *}
  15. {* 07/07/92  RWH  Added the SizeLimits and ChangeBounds methods.            *}
  16. {*                                                                          *}
  17. {****************************************************************************}
  18.  
  19. Unit TvScroll;
  20.  
  21. INTERFACE
  22.  
  23. {$I TVDEFS.INC}
  24.  
  25. USES
  26.   {$IFDEF TVSCROLL}
  27.   TvConst,
  28.   {$ENDIF}
  29.   Objects, Dialogs, Drivers, Views;
  30.  
  31.  
  32. {$IFNDEF TVSCROLL}
  33. CONST
  34.   gfGrowXYRel = $80;      { XY coordinates relative to scroll bars }
  35.   cmDragView  = 3000;     { enable this command for keyboard drag and resize }
  36. {$ENDIF}
  37.  
  38.  
  39. TYPE
  40.   PScrollView = ^TScrollView;
  41.   TScrollView = Object(TView)
  42.     Constructor Init(var Bounds : TRect);
  43.     Procedure   HandleEvent(var Event : TEvent);                    Virtual;
  44.     Procedure   SetState(AState: Word; Enable: Boolean);            Virtual;
  45.   end;
  46.  
  47.  
  48.   PScrollInputLine  = ^TScrollInputLine;
  49.   TScrollInputLine  = Object(TInputLine)
  50.     Constructor Init(var Bounds : TRect; AMaxLen : Integer);
  51.     Function    GetPalette: PPalette;                               Virtual;
  52.   end;
  53.  
  54.  
  55.   PScrollGroup = ^TScrollGroup;
  56.   TScrollGroup = Object(TGroup)
  57.     VScrollBar  : PScrollBar;
  58.     HScrollBar  : PScrollBar;
  59.     OldPos      : TPoint;
  60.  
  61.     Constructor Init(var Bounds      : TRect;
  62.                          AHScrollBar : PScrollBar;
  63.                          AVScrollBar : PScrollBar);
  64.     Procedure   HandleEvent(var Event : TEvent);                    Virtual;
  65.   end;
  66.  
  67.  
  68.   PScrollWindow = ^TScrollWindow;
  69.   TScrollWindow = Object(TWindow)
  70.     Limit      : TPoint;
  71.     VScrollBar : PScrollBar;
  72.     HScrollBar : PScrollBar;
  73.     Interior   : PScrollGroup;
  74.  
  75.     Constructor Init(var Bounds : TRect; ATitle: String; ANumber: Word);
  76.     Procedure   SetLimit(X, Y: Integer);
  77.     Procedure   InsertToScroll(P : PView);
  78.     Procedure   SizeLimits(var Min, Max : TPoint);                  Virtual;
  79.     Procedure   ChangeBounds(var Bounds : TRect);                   Virtual;
  80.   end;
  81.  
  82.  
  83.   PScrollDialog = ^TScrollDialog;
  84.   TScrollDialog = Object(TDialog)
  85.     Limit      : TPoint;
  86.     VScrollBar : PScrollBar;
  87.     HScrollBar : PScrollBar;
  88.     Interior   : PScrollGroup;
  89.  
  90.     Constructor Init(var Bounds : TRect; ATitle: String);
  91.     Procedure   SetLimit(X, Y: Integer);
  92.     Procedure   InsertToScroll(P : PView);
  93.     Procedure   SizeLimits(var Min, Max : TPoint);                  Virtual;
  94.     Procedure   ChangeBounds(var Bounds : TRect);                   Virtual;
  95.   end;
  96.  
  97.  
  98.