ListBox

Undocumented in source.

Constructors

this
this(Type type, float x, float y, int width, int height)
Undocumented in source.
this
this(Type type, vec2 position, Size!int size)
Undocumented in source.

Members

Aliases

OnItemSelected
alias OnItemSelected = void delegate(ListBoxItem item)
Undocumented in source.

Enums

Type
enum Type
Undocumented in source.

Functions

addColumn
void addColumn(wstring columnText, int width)

Adds column

addItem
ListBox addItem(string itemText, uint itemId)

Adds item

addItem
ListBox addItem(wstring itemText, uint itemId)
Undocumented in source. Be warned that the author may not have intended to support it.
addSubItem
ListBox addSubItem(wstring itemText)

Adds text sub item

addSubItem
ListBox addSubItem(Control control)

Adds control sub item

addSubItem
ListBox addSubItem(Control[] controls)
Undocumented in source. Be warned that the author may not have intended to support it.
draw
void draw(float deltaTime)

Renders the listbox

getItem
ListBoxItem getItem(uint index)

Returns item by index

getItems
ListBoxItem[] getItems(uint index)

Returns items by row index

initialize
void initialize()
Undocumented in source. Be warned that the author may not have intended to support it.
onMouseClick
void onMouseClick(MouseButton mouseButton, vec2 mousePosition)

Event called on mouse button click

onMouseLeave
void onMouseLeave()

Event called when mouse leaves control's rect

onMouseMove
void onMouseMove(vec2 mousePosition)

Event called when mouse enters in control's rect

onMouseUp
void onMouseUp(MouseButton mouseButton)

Event called on mouse button release

onScroll
void onScroll(ScrollBar.ScrollDirection direction, float scrollBarPosition)
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

onItemSelectedEvent
OnItemSelected onItemSelectedEvent [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
selectedIndex
int selectedIndex [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
selectedItem
Control selectedItem [@property getter]

Properties

Variables

m_onItemSelectedEvent
OnItemSelected m_onItemSelectedEvent;
Undocumented in source.

Inherited Members

From Container

m_controls
Control[] m_controls;

Children list

m_focusedControl
Control m_focusedControl;

Current focused child

m_controlUnderMouse
Control m_controlUnderMouse;
Undocumented in source.
m_tooltip
Tooltip m_tooltip;

Current selected control tooltip

m_autoResize
bool m_autoResize;

Container should be resized if a child control is bigger ?

m_verticalScrollBar
ScrollBar m_verticalScrollBar;
m_horizontalScrollBar
ScrollBar m_horizontalScrollBar;
Undocumented in source.
update
void update(float deltaTime)
Undocumented in source. Be warned that the author may not have intended to support it.
draw
void draw(float deltaTime)

Draws the container with children

onMouseClick
void onMouseClick(MouseButton mouseButton, vec2 mousePosition)

Event called on mouse button click

onMouseUp
void onMouseUp(MouseButton mouseButton)

Event called on mouse button release

onMouseMove
void onMouseMove(vec2 position)

Event called when mouse enters in control's rect

onMouseLeave
void onMouseLeave()

Event called when mouse leaves control's rect

onText
void onText(int key)

Event called on character input

onKey
void onKey(int key)

Event called on key input

addChild
void addChild(Control control)

Adds child control

getControl
T getControl(uint id)

Returns child control by id

initialize
void initialize()

Initializes control

reSize
void reSize()

Resize the container if a child control is bigger

updateChildPosition
void updateChildPosition(Control childControl)

Updates child control position using dock property

remove
void remove(Control toRemove)

Removes a control from control list

focusControl
void focusControl(Control control)

Gives focus to a control

unfocusControl
void unfocusControl(Control control)

Removes focus from a control

opacity
ubyte opacity [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
realPosition
const(vec2) realPosition [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
realPosition
vec2 realPosition [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
controls
Control[] controls [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
focusedControl
Control focusedControl [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
controlUnderMouse
Control controlUnderMouse [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
tooltip
Tooltip tooltip [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
ControlGetter
template ControlGetter(string controlClass)
Undocumented in source.

From IScrollable

onScroll
void onScroll(ScrollBar.ScrollDirection direction, float scrollBarPosition)
Undocumented in source.

Meta