GPText

Unit : GPShapesUnit
Association : GPTextAsn
Inherits from : GPShape

Description

Text that can be drawn on a GPDrawingArea. The text is saved as a single string.

Public Interface

CONSTRUCTOR Init(initText: string);
Initializes GPText with given text at location (0, 0).

CONSTRUCTOR InitWithCoords (initText: string; x,y:integer);
Initializes GPText with given text at set coordinates.

CONSTRUCTOR InitWithPoint (initText: string; pt: GPPoint);
Initializes GPText with a location.

DESTRUCTOR Destroy; VIRTUAL;
Destroys a GPText.

PROCEDURE SetString (newText: string);
Modifies the GPText's string.

FUNCTION GetString: string;
Returns the GPText's string.

FUNCTION GetX: integer;
Returns the value of the x coordinate.

PROCEDURE SetX (x: integer);
Sets the value of the x coordinate to x.

FUNCTION GetY: integer;
Returns the value of the y coordinate.

PROCEDURE SetY (y: integer);
Sets the value of the y coordinate to y.

PROCEDURE SetCoords (x, y: integer);
Sets the values of the x and y coordinates to the corresponding parameters.

PROCEDURE GetCoords (VAR x, y: integer);
Returns the value of the x coordinate in the first parameter and gets the value of the y coordinate and puts it in the second parameter.

PROCEDURE Copy: GPShapeAsn; VIRTUAL;
Produce a copy of the GPText.

PROCEDURE CopyAsGPText: GPTextAsn;
Produce a copy of the GPText.

FUNCTION Equal(other : GPText): Boolean;
Returns TRUE if the coordinates of other are the same as this instance's.

Subclasses

None

Please report any problems with GP or the documentation to GP Support .


GP Home Page GP Documentation
Loring Holden