TextBox

class Communicator.Markup.Shape.TextBox()

This object encapsulates a text and rectangle object into one entity. Sizing of the box and positioning of the string is handled by the system. This class consists of two portions which control the look and feel of the markup. The text portion controls the styling of the text, while the box portion controls the styling of the outer rectangle.

Constructors

constructor()

Creates a new TextBox Markup Shape.

Methods

getBoxPortion()

getPadding()

getPosition()

getTextPortion()

getTextString()

setPadding()

setPosition()

setTextString()


Constructors

constructor

Communicator.Markup.Shape.TextBox.constructor(position, text)

Creates a new TextBox Markup Shape.

Arguments
  • position (Communicator.Point2()) –

  • text ({  }()) –

Return type

Communicator.Markup.Shape.TextBox

Methods

getBoxPortion

Communicator.Markup.Shape.TextBox.getBoxPortion()

Gets the Box portion of the TextBox. Use the methods on this object to modify the appearance of the rectangle around the text string

Return type

Communicator.Markup.Shape.RectangleBase

Returns

the rectangle markup object.

getPadding

Communicator.Markup.Shape.TextBox.getPadding()

Gets the Pixel distance between the text and outer rectangle

Return type

number

Returns

the padding value.

getPosition

Communicator.Markup.Shape.TextBox.getPosition()

Gets the position in screen space of the top-left corner of the TextBox rectangle

Return type

Communicator.Point2

Returns

the TextBox position

getTextPortion

Communicator.Markup.Shape.TextBox.getTextPortion()

Gets the Text portion of the TextBox. Use the methods on this object to modify the appearance of the text string

Return type

Communicator.Markup.Shape.TextMarkupBase

Returns

the text markup object

getTextString

Communicator.Markup.Shape.TextBox.getTextString()

Gets the text string for this box

Return type

string

Returns

the text string

setPadding

Communicator.Markup.Shape.TextBox.setPadding(padding)

Sets the Pixel distance between the text and outer rectangle

Arguments
  • padding (number()) – the padding value.

Return type

void

setPosition

Communicator.Markup.Shape.TextBox.setPosition(position)

Sets the position in screen space of the top-left corner of the TextBox rectangle

Arguments
  • position (Communicator.Point2()) – the TextBox position

Return type

void

setTextString

Communicator.Markup.Shape.TextBox.setTextString(text)

Sets the text string for this box

Arguments
  • text (string()) – the text string

Return type

void