Class TSelectScreenObjectTool

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TSelectScreenObjectTool = class(TCustomSelectScreenObjectTool)

Description

TSelectScreenObjectTool is used to select and move one or more TScreenObjects.

Points can be selected in either of two ways. 1. The user clicks on a TScreenObject. 2. The user drags with the mouse button down to select a group of TScreenObject that are completely inside the selection rectangle.

Hierarchy

Overview

Fields

Private FDoubleClicked: boolean;
Private FShouldDrawSelectionRectangle: boolean;
Private FMaxX: double;
Private FMinX: double;
Private FMaxY: double;
Private FMinY: double;

Methods

Protected function ScreenObjectInside(AScreenObject: TScreenObject): boolean; override;
Protected procedure DrawOnBitMap32(Sender: TObject; Buffer: TBitmap32); override;
Protected function GetHint: string; override;
Public procedure Activate; override;
Public procedure DoubleClick(Sender: TObject); override;
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;

Properties

Public property ShouldDrawSelectionRectangle: boolean read FShouldDrawSelectionRectangle write FShouldDrawSelectionRectangle;

Description

Fields

Private FDoubleClicked: boolean;

FDoubleClicked is set to True when the user double-clicks.

Private FShouldDrawSelectionRectangle: boolean;

FShouldDrawSelectionRectangle indicates that the selection rectangle should be drawn.

Private FMaxX: double;
 
Private FMinX: double;
 
Private FMaxY: double;
 
Private FMinY: double;
 

Methods

Protected function ScreenObjectInside(AScreenObject: TScreenObject): boolean; override;
 
Protected procedure DrawOnBitMap32(Sender: TObject; Buffer: TBitmap32); override;
 
Protected function GetHint: string; override;

Used to define Hint

Public procedure Activate; override;

Activate sets FShouldDrawSelectionRectangle to True.

Public procedure DoubleClick(Sender: TObject); override;

DoubleClick responds to OnDoubleClick events by setting FDoubleClicked to true.

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

MouseDown responds to OnMouseDown events by initializing FMovingScreenObjects and TCustomSelectScreenObjectTool.

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

MouseMove responds to OnMouseMove events by redrawing the selection rectangle.

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

MouseUp responds to OnMouseUp events by either selecting or moving TScreenObjects.

Properties

Public property ShouldDrawSelectionRectangle: boolean read FShouldDrawSelectionRectangle write FShouldDrawSelectionRectangle;

ShouldDrawSelectionRectangle indicates that the selection rectangle should be drawn.


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