ToggleCheckListΒΆ

class ToggleCheckList

This class is a simple CheckList that only toggles items between the checked state and the default state

Widgets create with this class contain a State field that maps the item name to the true/false boolean. For instance: local    list = ToggleCheckList.create ("flipflop", parent)
list.Items = { "One""Two""Three" }

-- ... later in code
if list.State.One then
    print ("One is checked")
end

Hierarchy

class ToggleCheckList < class CheckList < class Window

Members

Constructors:

ToggleCheckList list create ( ) Create a ToggleCheckList widget


Inherited from class CheckList

Constructors:

CheckList list create ( ) Create a CheckList widget

Methods:

nil createitemwindow ( ) Init the item window
nil fill ( ) Fill the widget with all lines
{string} items getitems ( ) Callback for when the widget needs the list of items
number state getitemstate ( ) Callback for when the widget needs the state of an item of the list.
nil itemclicked ( ) Callback for when the an item of the list was clicked.
nil update ( ) Update the list state
nil updateitemwindow ( ) Update the item window


Inherited from class Window

Methods:

nil destroy ( ) Destroy the window and all its children windows
nil setx ( number x , number parentpivot , number pivot ) Set the X window placement
nil sety ( number y , number parentpivot , number pivot ) Set the Y window placement
nil setw ( number w , number parentmul , number childadd , number childmul ) Set the window width
nil seth ( number h , number parentmul , number childadd , number childmul ) Set the window height
nil getx ( ) Get the window X coordinate in the parent space
nil gety ( ) Get the window Y coordinate in the parent space
nil getw ( ) Get the window width
nil geth ( ) Get the window height
nil hide ( ) Hide the window
nil show ( ) Show the window
nil disable ( ) Disable the window
nil enable ( ) Enable the window
nil addtracker ( table tracker ) Add a tracker to this window. A tracker receives notification when the tracked window is invalidated or destroyed. A tracker may implement onTrackedDestroyed and onTrackedInvalidated to get notifications on such events
nil removetracker ( table tracker ) Remove a tracker of this window.
nil setcolor ( ui.color color ) Change the window color, see also ui.color function
nil getparent ( string|nil parentclass ) Get the first parent window of given class (immediate parent if no class is provided)
nil settopmost ( ) Set the window as top most in children order
nil getchild ( string|number name ) Get a child window
Window container getcontainer ( ) Get the main container of a window
nil settitle ( string name ) Change the window title
nil setfocus ( ) Set the focus to the window
nil getroot ( ) Return the root window of this window

Documentation