Class TCustomCreateScreenObjectTool

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TCustomCreateScreenObjectTool = class(TCustomInteractiveTool)

Description

TCustomCreateScreenObjectTool is an abstract base class for TCustomInteractiveTools for creating TScreenObjects.

Hierarchy

Overview

Fields

Protected FCurrentScreenObject: TScreenObject;
Protected FCurrentUndo: TCustomUndo;
Protected FDoubleClicked: boolean;
Protected FPriorCursorX: integer;
Protected FPriorCursorY: integer;

Methods

Protected function CanAddPoint: boolean;
Protected procedure DrawModifiedCurrentScreenObject;
Protected procedure SetDefaultElevationFormulas;
Public destructor Destroy; override;
Public procedure DoubleClick(Sender: TObject); override;
Public procedure Draw(const Sender: TObject; const Direction: TViewDirection); override;
Public procedure FinishScreenObjects;
Public procedure MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;

Properties

Protected property CurrentUndo: TCustomUndo read FCurrentUndo;
Public property CurrentScreenObject: TScreenObject read FCurrentScreenObject write FCurrentScreenObject;

Description

Fields

Protected FCurrentScreenObject: TScreenObject;

FCurrentScreenObject: TScreenObject; See CurrentScreenObject.

Protected FCurrentUndo: TCustomUndo;

FCurrentUndo: TCustomUndo; See CurrentUndo.

Protected FDoubleClicked: boolean;

FDoubleClicked: boolean; FDoubleClicked is set to true in DoubleClick and is used in MouseUp to indicate when the TScreenObject has been completed.

Protected FPriorCursorX: integer;

FPriorCursorX: integer; FPriorCursorX is set to the X-coordinate of the cursor in MouseUp. In some descendants it is tested for identity with the current X-coordinate of the cursor before being set and action is taken if the location is different.

Protected FPriorCursorY: integer;

FPriorCursorY: integer; FPriorCursorY is set to the Y-coordinate of the cursor in MouseUp. In some descendants it is tested for identity with the current X-coordinate of the cursor before being set and action is taken if the location is different.

Methods

Protected function CanAddPoint: boolean;

CanAddPoint returns true if the mouse is over the correct view to add a point to CurrentScreenObject.

Protected procedure DrawModifiedCurrentScreenObject;

DrawModifiedCurrentScreenObject is used in descendants during MouseMove to draw what the current object would look like if the mouse button were depressed.

Protected procedure SetDefaultElevationFormulas;

SetDefaultElevationFormulas is used to set the default values for the elevation formulas when creating a TScreenObject.

Public destructor Destroy; override;
 
Public procedure DoubleClick(Sender: TObject); override;

DoubleClick responds to Double-Click events to set FDoubleClicked to True. FDoubleClicked is used in MouseUp to indicate when the TScreenObject has been completed.

Public procedure Draw(const Sender: TObject; const Direction: TViewDirection); override;

Draw is used in MouseMove. It calls DrawModifiedCurrentScreenObject to draw what the current object would look like if the mouse button were depressed.

Public procedure FinishScreenObjects;

FinishScreenObjects shows the form that allows the user to specify the properties of the new TScreenObject.

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

MouseUp checks if FDoubleClicked is True. if so, it calls FinishScreenObjects. It also sets FPriorCursorX and FPriorCursorY.

Properties

Protected property CurrentUndo: TCustomUndo read FCurrentUndo;

CurrentUndo is used to undo or redo the creation of the TScreenObject.

Public property CurrentScreenObject: TScreenObject read FCurrentScreenObject write FCurrentScreenObject;

CurrentScreenObject is the TScreenObject that is being created.


Generated by PasDoc 0.10.0 on 2006-10-31 09:56:39