Class TCreateRectangleScreenObjectTool

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TCreateRectangleScreenObjectTool = class(TCustomCreateScreenObjectTool32)

Description

TCreateRectangleScreenObjectTool creates a TScreenObject that is shaped like a rectangle aligned with the grid.

Hierarchy

Overview

Methods

Private procedure ContinueRectangle(X, Y: Integer; Shift: TShiftState);
Private procedure GetRemaingPointsOnRectangleCorners (FirstCorner, ThirdCorner: TPoint2D; var SecondCorner, FourthCorner: TPoint2D);
Protected procedure DrawOnBitMap32(Sender: TObject; Buffer: TBitmap32); override;
Protected function GetCursor: TCursor; override;
Public function GetHint: string; 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 ContinueRectangle(X, Y: Integer; Shift: TShiftState);

If TCustomCreateScreenObjectTool.CurrentScreenObject does not exist, ContinueRectangle creates it and adds a point at X,Y. If it does already exist, ContinueRectangle adds additional points to create a TScreenObject shaped like a rectangle with the point at X,Y at the opposite corner from the first point and with the sides aligned with the grid.

Private procedure GetRemaingPointsOnRectangleCorners (FirstCorner, ThirdCorner: TPoint2D; var SecondCorner, FourthCorner: TPoint2D);
 
Protected procedure DrawOnBitMap32(Sender: TObject; Buffer: TBitmap32); override;
 
Protected function GetCursor: TCursor; override;
 
Public function GetHint: string; override;

Used to define Hint

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

MouseMove sets the cursor and shows what the rectangle would look if the mouse button were clicked.

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

MouseUp calls ContinueRectangle.


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