| Class TCalFormDrag (unit Calmuniv) |
TComponent
| Constructors |
constructor Create(AOwner: TComponent);GDI objects used for drawing the resize boxes
| Functions |
procedure InverseRect;
procedure Loaded;
procedure StartHollowDrag;
procedure HandleMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure HandleMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
procedure HandleMouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);| Properties |
property AllowMove : Boolean
property AllowSize : Boolean
property DragWidth : Integer
property Hollow : Boolean
property MaxHeight : Integer
property MaxWidth : Integer
property MinHeight : Integer
property MinWidth : Integer
property DragState : TCalFormDragState| Events |
| Variables |
FAllowMove : Boolean;
FAllowSize : Boolean;
FDragState : TCalFormDragState;
FDragWidth : Integer;
FHollow : Boolean;
FMaxHeight : Integer;
FMaxWidth : Integer;
FMinHeight : Integer;
FMinWidth : Integer;
FMouseDown : TMouseEvent;
FMouseMove : TMouseMoveEvent;
FMouseUp : TMouseEvent;
FormRect : TRect;
FPaint : TNotifyEvent;
FResize : TNotifyEvent;
xofs : Integer;
yofs : Integer;| Constructors |
constructor Create(AOwner: TComponent);Public declarations
GDI objects used for drawing the resize boxes
| Functions |
procedure InverseRect;Obtain and draw the initial rectangle
procedure Loaded;Protected declarations
procedure StartHollowDrag;...and make the form call our handlers instead
procedure HandleMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);case
procedure HandleMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);Draws an inverse rectangle on the screen device context, the coordinates specified by FormRect. The rectangle is two pixels thick but it is faster to draw two thin ones than to use a thick pen
procedure HandleMouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);trigger form's original OnMouseDown event
| Properties |
property AllowMove : Boolean
property AllowSize : Boolean
property DragWidth : IntegerPublished declarations
property Hollow : Boolean
property MaxHeight : Integer
property MaxWidth : Integer
property MinHeight : Integer
property MinWidth : Integer
property DragState : TCalFormDragState| Events |
| Variables |
FAllowMove : Boolean;
FAllowSize : Boolean;
FDragState : TCalFormDragState;
FDragWidth : Integer;
FHollow : Boolean;
FMaxHeight : Integer;
FMaxWidth : Integer;
FMinHeight : Integer;
FMinWidth : Integer;
FMouseDown : TMouseEvent;
FMouseMove : TMouseMoveEvent;Private declarations
FMouseUp : TMouseEvent;
FormRect : TRect;
FPaint : TNotifyEvent;
FResize : TNotifyEvent;
xofs : Integer;
yofs : Integer;