win.textWindow - WIN

Class textWindow
Inherits from window.

The textWindow class provides a multi-line string label of the given size. The label string is wrapped to the control's width and the vertical scroll size is automatically set. Its colors are initialized from the theme but may be customized after creation. A textWindow fires no events.

To create a textWindow use it's new method:
local txt = win.textWindow:new (parent, id, x, y, width, height, label)


Properties

txtWnd__lines
table Holds the strings for each line in the control.

Methods

See also API Reference, WIN.

win.textWindow:calc_size

textWindow:calc_size ()

Configures line wrapping and updates scroll sizes.

Parameters
none


Returns
none


Remarks
The window is invalidated.


top


win.textWindow:constructor

txt textWindow:constructor (parent, id, x, y, width, height, label)

Constructs and returns the instantiated text window.

Parameters
parent window Parent window, typically a frame.
id number Numeric id value for text window.
x number Parent relative x position.
y number Parent relative y position.
width number Text window's width.
height number Text window's height.
label string Label text. May contain hard line breaks.

Returns
txt textWindow The instantiated text window.

Remarks


top


win.textWindow:draw

textWindow:draw (gdi, bounds)

Draws the text control window.

Parameters
gdi GDI GDI object to use for drawing.
bounds rect Invalidated area of the window.

Returns
none


Remarks
See window:draw.


top


win.textWindow:on_move

result textWindow:on_move ()

Recalculates line wrapping by calling textWindow:calc_size.

Parameters
none


Returns
result boolean Always false.

Remarks
See window:on_move.


top


win.textWindow:set_text

textWindow:set_text (text)

Calls the base implementation and recalculates line wrapping by calling calcSize.

Parameters
text string Label text.

Returns
none


Remarks
Invalidation is handled.

See window:set_text.


top


See also API Reference, WIN.