ComboBox

Simple combo box widget based on a popup button.

Constructors

this
this(Widget parent)

Create an empty combo box

this
this(Widget parent, string[] items)

Create a new combo box with the given items

this
this(Widget parent, string[] items, string[] itemsShort)

Create a new combo box with the given items, providing both short and long descriptive labels for each item

Members

Functions

callback
void delegate(int) callback()

The callback to execute for this ComboBox.

callback
void callback(void delegate(int) callback)

Sets the callback to execute for this ComboBox.

items
void items(string[] items, string[] itemsShort)

Sets the items for this ComboBox, providing both short and long descriptive lables for each item.

items
void items(string[] i)

Sets the items for this ComboBox.

items
auto items()

The items associated with this ComboBox.

itemsShort
auto itemsShort()

The short descriptions associated with this ComboBox.

scrollEvent
bool scrollEvent(Vector2i p, Vector2f rel)

Handles mouse scrolling events for this ComboBox.

selectedIndex
int selectedIndex()

The current index this ComboBox has selected.

selectedIndex
void selectedIndex(int idx)

Sets the current index this ComboBox has selected.

Variables

mCallback
void delegate(int) mCallback;

The callback for this ComboBox.

mItems
Array!string mItems;

The items associated with this ComboBox.

mItemsShort
Array!string mItemsShort;

The short descriptions of items associated with this ComboBox.

mSelectedIndex
int mSelectedIndex;

The current index this ComboBox has selected.

Inherited Members

From PopupButton

chevronIcon
void chevronIcon(int icon)
Undocumented in source. Be warned that the author may not have intended to support it.
chevronIcon
dchar chevronIcon()
Undocumented in source. Be warned that the author may not have intended to support it.
side
void side(Popup.Side popupSide)
Undocumented in source.
side
Popup.Side side()
Undocumented in source. Be warned that the author may not have intended to support it.
popup
Popup popup()
Undocumented in source. Be warned that the author may not have intended to support it.
popup
auto popup()
Undocumented in source. Be warned that the author may not have intended to support it.
draw
void draw(NanoContext ctx)
Undocumented in source. Be warned that the author may not have intended to support it.
preferredSize
Vector2i preferredSize(NanoContext ctx)
Undocumented in source. Be warned that the author may not have intended to support it.
performLayout
void performLayout(NanoContext ctx)
Undocumented in source. Be warned that the author may not have intended to support it.
mPopup
Popup mPopup;
Undocumented in source.
mChevronIcon
dchar mChevronIcon;
Undocumented in source.

Meta