CorsixTH Lua Documentation

TreeNode Class

Iterface for items within a UI tree control

Declared on: line 21 of Lua/dialogs/tree_ctrl.lua.
Subclasses: DummyRootNode, FileTreeNode

Method Index

Member Index

function TreeNode:contract()

Make the children of the item invisible

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

function TreeNode:expand()

Make the children of the item visible

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

function TreeNode:getChildByIndex(idx)

Get a child of the item.

Parameters:

NameTypeDescription
idx integer An integer between 1 and getChildCount() (inclusive).

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

function TreeNode:getChildCount()

Get the number of childrem which the item has

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

function TreeNode:getControl()

Get the tree control within which the item is displayed

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

function TreeNode:getHighlightColour(canvas)

Get the background colour for when the item is highlighted

Parameters:

NameTypeDescription
canvas ? ?

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

function TreeNode:getIndexOfChild(child)

Given a child of the item, determine which index it is

Parameters:

NameTypeDescription
child TreeNode A value returned from getChildByIndex()

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

function TreeNode:getLabel()

Get the text to be displayed for the item

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

function TreeNode:getLevel()

Get the depth from the root item to this item.

The root item has level 0, its direct children have level 1, etc.

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

function TreeNode:getNextVisible()

Get the next item in the on-screen display order

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

function TreeNode:getParent()

Get the item's parent, if it has one

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

function TreeNode:getPrevVisible()

Get the previous item in the on-screen display order

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

function TreeNode:getSelectColour(canvas)

Get the background colour for when the item is selected

Parameters:

NameTypeDescription
canvas ? ?

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

function TreeNode:hasChildren()

Query if the item has any children at all.

The simple way of doing this is checking if getChildCount() is non-zero, but often this can be implemented in a more efficient manner.

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

function TreeNode:isExpanded()

Query whether the item's children are visible

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

function TreeNode:numVisibleDescendants()

The number of visible items in the set of this item and all its descendants

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

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