home *** CD-ROM | disk | FTP | other *** search
- {*
- * TvScroll.pas
- *
- * Enhancements to create scrolling Turbo Vision dialog and windows boxes.
- *
- * Copyright 1992 by Richard W. Hansen
- *
- *}
-
- {****************************************************************************}
- {* REVISION HISTORY *}
- {* *}
- {* Date Who What *}
- {* ======================================================================== *}
- {* 07/07/92 RWH Added the SizeLimits and ChangeBounds methods. *}
- {* *}
- {****************************************************************************}
-
- Unit TvScroll;
-
- INTERFACE
-
- {$I TVDEFS.INC}
-
- USES
- {$IFDEF TVSCROLL}
- TvConst,
- {$ENDIF}
- Objects, Dialogs, Drivers, Views;
-
-
- {$IFNDEF TVSCROLL}
- CONST
- gfGrowXYRel = $80; { XY coordinates relative to scroll bars }
- cmDragView = 3000; { enable this command for keyboard drag and resize }
- {$ENDIF}
-
-
- TYPE
- PScrollView = ^TScrollView;
- TScrollView = Object(TView)
- Constructor Init(var Bounds : TRect);
- Procedure HandleEvent(var Event : TEvent); Virtual;
- Procedure SetState(AState: Word; Enable: Boolean); Virtual;
- end;
-
-
- PScrollInputLine = ^TScrollInputLine;
- TScrollInputLine = Object(TInputLine)
- Constructor Init(var Bounds : TRect; AMaxLen : Integer);
- Function GetPalette: PPalette; Virtual;
- end;
-
-
- PScrollGroup = ^TScrollGroup;
- TScrollGroup = Object(TGroup)
- VScrollBar : PScrollBar;
- HScrollBar : PScrollBar;
- OldPos : TPoint;
-
- Constructor Init(var Bounds : TRect;
- AHScrollBar : PScrollBar;
- AVScrollBar : PScrollBar);
- Procedure HandleEvent(var Event : TEvent); Virtual;
- end;
-
-
- PScrollWindow = ^TScrollWindow;
- TScrollWindow = Object(TWindow)
- Limit : TPoint;
- VScrollBar : PScrollBar;
- HScrollBar : PScrollBar;
- Interior : PScrollGroup;
-
- Constructor Init(var Bounds : TRect; ATitle: String; ANumber: Word);
- Procedure SetLimit(X, Y: Integer);
- Procedure InsertToScroll(P : PView);
- Procedure SizeLimits(var Min, Max : TPoint); Virtual;
- Procedure ChangeBounds(var Bounds : TRect); Virtual;
- end;
-
-
- PScrollDialog = ^TScrollDialog;
- TScrollDialog = Object(TDialog)
- Limit : TPoint;
- VScrollBar : PScrollBar;
- HScrollBar : PScrollBar;
- Interior : PScrollGroup;
-
- Constructor Init(var Bounds : TRect; ATitle: String);
- Procedure SetLimit(X, Y: Integer);
- Procedure InsertToScroll(P : PView);
- Procedure SizeLimits(var Min, Max : TPoint); Virtual;
- Procedure ChangeBounds(var Bounds : TRect); Virtual;
- end;
-
-
-