class
GUIListBox
List box GUI element which when active opens a drop down selection with provided elements.
Public
Methods
staticGetGuiTypeName
Returns type name of the GUI element used for finding GUI element styles.
IsMultiselect
Checks whether the listbox supports multiple selected elements at once.
SelectElement
Makes the element with the specified index selected.
DeselectElement
Deselect element the element with the specified index.
Only relevant for multi-select list boxes.
GetSelectedElementIndex
Returns the index of the currently selected element.
If the list box allows multi-select, returns the index of the first selected element, or ~0u if none is selected.
GetElementStates
Returns states of all element in the list box (enabled or disabled).
SetElementStates
Sets states for all list box elements.
Only valid for multi-select list boxes. Number of states must match number of list box elements.
staticCreate
Creates a new GUI element.
- contents
- Structure describing the contents of the GUI element to create.
- styleClass
- Style class that will be used for determining GUI element visuals from the current style sheet. If no class is provided, default style is determined based on GUI element type.
- options
- Additional options that control GUI element size and position. This will override options set in the style sheet.
Fields
OnSelectionToggled
Triggered whenever user selects or deselects an element in the list box.
Returned index maps to the element in the elements array that the list box was initialized with.
Internal
Constructors
GUIListBox
Methods
GetStyleSheetElement
Returns the name of the GUI element type to be used for style lookup in the style sheet.
Protected
Methods
~GUIListBox
Private
Methods
GetContentBounds
Similar to GetAbsoluteContentBounds(), except the bounds are relative to the parent GUI element rather than the parent widget.
UpdateRenderElements
Recreates the internal render elements.
Must be called before GetRenderElementVertexAndIndexData/FillBuffer if element is dirty. Marks the element as non dirty.
DoOnMouseEvent
Called when a mouse event is received on any GUI element the mouse is interacting with.
Return true if you have processed the event and don't want other elements to process it.
DoOnCommandEvent
Called when a command event is triggered.
Return true if you have processed the event and don't want other elements to process it.
GetArrowCachedContentBoundsInElementSpace
Returns the area in which the arrow box will be placed, relative to the GUI element.
GetArrowCachedContentSize
Returns the width/height of the arrow box.
ElementSelected
Triggered when user clicks on an element.
OpenListBox
Opens the list box drop down menu.
CloseListBox
Closes the list box drop down menu.
OnListBoxClosed
Called when the list box drop down menu is closed by external influence.
UpdateContents
Updates visible contents depending on selected element(s).