Skip to content
Andrew Kvapil edited this page Nov 15, 2015 · 3 revisions

IHasText Interface

The IHasText interface targets subclasses of Sheet that draw plain colour, word-wrapped, and aligned text.

Variables

text

IHasText.text - string

The text shown by the object.

Methods

autoHeight()

This method is chainable.

IHasText:autoHeight()

Sets the height of the object to the minimum required to show all the text content at the current width.

setText()

IHasText:setText( string text )

Sets the text of the object.

wrapText()

IHasText:wrapText( bool ignoreHeight = false )

Word-wraps the text, ignoring the height limit if ignoreHeight is true.

drawText()

IHasText:drawText( string state )

Draws the text to the canvas of the object, using style options defined with the state given (i.e. default, pressed, etc).

Clone this wiki locally