Class TCalFormDrag (unit Calmuniv) |
Inherits from
TComponent
constructor Create(AOwner: TComponent);
- Public declarations
GDI objects used for drawing the resize boxes
procedure InverseRect;
Obtain and draw the initial rectangle
procedure Loaded;
Protected declarations
procedure StartHollowDrag;
.
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.
procedure HandleMouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
trigger form's original OnMouseDown event
property AllowMove : Boolean
property AllowSize : Boolean
property DragWidth : Integer
Published declarations
property Hollow : Boolean
property MaxHeight : Integer
property MaxWidth : Integer
property MinHeight : Integer
property MinWidth : Integer
property DragState : TCalFormDragState
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;
constructor Create(AOwner: TComponent);
Public declarations
GDI objects used for drawing the resize boxes
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
property AllowMove : Boolean
property AllowSize : Boolean
property DragWidth : Integer
Published declarations
property Hollow : Boolean
property MaxHeight : Integer
property MaxWidth : Integer
property MinHeight : Integer
property MinWidth : Integer
property DragState : TCalFormDragState
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;