Class TCustomSelectScreenObjectTool

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TCustomSelectScreenObjectTool = class abstract(TScreenObjectTool)

Description

TCustomSelectScreenObjectTool is the abstract ancestor of tools used to select and move TScreenObjects mainly by clicking on them.

See also
TLassoTool
TLassoTool is used to select TScreenObjects by enclosing them with a polygon.

Hierarchy

Overview

Fields

Private FMouseButtonIsDown: boolean;
Private FMovingScreenObjects: boolean;
Private FStartX: integer;
Private FStartY: integer;

Methods

Private procedure MoveScreenObjects(const X, Y: integer; Shift: TShiftState);
Private procedure DrawSelectionRectangle32(BitMap: TBitmap32);
Protected procedure GetOffset(const APoint: TPoint2D; out XOffset, YOffset: real); virtual;
Public procedure MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;
Public procedure MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); override;
Public procedure MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;

Description

Fields

Private FMouseButtonIsDown: boolean;

FMouseButtonIsDown is set to true while the mouse button is down.

Private FMovingScreenObjects: boolean;

FMovingScreenObjects is set to true when moving TScreenObjects.

Private FStartX: integer;

FStartX is the starting X-coordinate of the mouse. It is used when moving the selected TScreenObjects.

Private FStartY: integer;

FStartY is the starting Y-coordinate of the mouse. It is used when moving the selected TScreenObjects.

Methods

Private procedure MoveScreenObjects(const X, Y: integer; Shift: TShiftState);

MoveScreenObjects moves a TScreenObject based on X and Y.

Private procedure DrawSelectionRectangle32(BitMap: TBitmap32);

DrawSelectionRectangle32 draws a rectangle outline the area that will be used to select TScreenObjects when draging with the mouse.

Protected procedure GetOffset(const APoint: TPoint2D; out XOffset, YOffset: real); virtual;
 
Public procedure MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;

MouseDown responds to OnMouseDown events by initializing FStartX, FStartY, and FMouseButtonIsDown.

Public procedure MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); override;

MouseMove responds to OnMouseMove events. by updating FMovingScreenObjects.

Public procedure MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;

MouseUp responds to OnMouseUp events. by setting FMouseButtonIsDown to False.


Generated by PasDoc 0.12.1 on 2013-05-13 15:41:43