Class TCreateStraightLineScreenObjectTool

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TCreateStraightLineScreenObjectTool = class(TCustomCreateScreenObjectTool32)

Description

TCreateStraightLineScreenObjectTool is used to create a line TScreenObject in which the segments are aligned with the grid.

Hierarchy

Overview

Methods

Private procedure ContinueStraightLineScreenObject(X, Y: Integer; Shift: TShiftState);
Private procedure GetPointFromCursorPosition(var APoint: TPoint2D; X, Y: Integer; PreviousPoint: TPoint2D);
Protected procedure DrawOnBitMap32(Sender: TObject; Buffer: TBitmap32); override;
Protected function GetHint: string; override;
Protected function GetCursor: TCursor; 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

Methods

Private procedure ContinueStraightLineScreenObject(X, Y: Integer; Shift: TShiftState);

ContinueStraightLineScreenObject creates TCustomCreateScreenObjectTool.CurrentScreenObject if it does not exist. It adds a point based on X,Y to CurrentScreenObject. The point is added so that the last segment is aligned with the grid.

Private procedure GetPointFromCursorPosition(var APoint: TPoint2D; X, Y: Integer; PreviousPoint: TPoint2D);
 
Protected procedure DrawOnBitMap32(Sender: TObject; Buffer: TBitmap32); override;
 
Protected function GetHint: string; override;

Used to define Hint

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

MouseMove sets the cursor and shows what the TScreenObject would look like if the mouse button was clicked.

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

MouseUp checks that the cursor has moved from its previous position. If it has, it calls ContinueStraightLineScreenObject.


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