CorsixTH Lua Documentation

TreeControl Class

A control (to be placed on a window) which allows the user to navigate a tree of items and select one item from it.

Declared on: line 416 of Lua/dialogs/tree_ctrl.lua.
Inheritance: TreeControl ยป Window
Subclasses: FilteredTreeControl

Method Index

Member Index

(*) only used in superclass methods
function TreeControl:TreeControl(root, x, y, width, height, col_bg, col_fg, y_offset, has_font)

Parameters:

NameTypeDescription
root TreeNode The single root node of the tree (use a `DummyRootNode` here if multiple root nodes are desired).
x integer The X-position, in pixels, where the control should start within its parent.
y integer The Y-position, in pixels, where the control should start within its parent.
width integer The width, in pixels, of the control.
height integer The height, in pixels, of the control.
col_bg table The background colour of the control - this should be a table with `red`, `green`, and `blue` fields, each an integer between 0 and 255.
col_fg table The colour used for the scrollbar and highlighted items.
y_offset ? ?
has_font ? ?

Declared on: line 420 of Lua/dialogs/tree_ctrl.lua.

function TreeControl:draw(canvas, x, y)

Parameters:

NameTypeDescription
canvas ? ?
x ? ?
y ? ?

Overrides: Window:draw.
Declared on: line 591 of Lua/dialogs/tree_ctrl.lua.

function TreeControl:drawExtraOnRow(canvas, node, x, y)

Override this function if a certain row should have certain text or additional flavour to it.

Parameters:

NameTypeDescription
canvas ? ?
node ? ?
x ? ?
y ? ?

Declared on: line 586 of Lua/dialogs/tree_ctrl.lua.

function TreeControl:hitTestTree(x, y)

Parameters:

NameTypeDescription
x ? ?
y ? ?

Declared on: line 481 of Lua/dialogs/tree_ctrl.lua.

function TreeControl:onMouseDown(button, x, y)

Parameters:

NameTypeDescription
button ? ?
x ? ?
y ? ?

Overrides: Window:onMouseDown.
Declared on: line 520 of Lua/dialogs/tree_ctrl.lua.

function TreeControl:onMouseMove(x, y)

Parameters:

NameTypeDescription
x ? ?
y ? ?

Overrides: Window:onMouseMove.
Declared on: line 507 of Lua/dialogs/tree_ctrl.lua.

function TreeControl:onMouseUp(button, x, y)

Parameters:

NameTypeDescription
button ? ?
x ? ?
y ? ?

Overrides: Window:onMouseUp.
Declared on: line 538 of Lua/dialogs/tree_ctrl.lua.

function TreeControl:setSelectCallback(callback)

Parameters:

NameTypeDescription
callback ? ?

Declared on: line 533 of Lua/dialogs/tree_ctrl.lua.

Page generated on Sat Feb 07, 2015 at 18:38:28 by LDocGen.