TabControl

Undocumented in source.

Constructors

this
this(string ID)
Undocumented in source.

Members

Functions

addTab
TabControl addTab(TabItem item, int index, bool enableCloseButton)

add new tab

addTab
TabControl addTab(string id, dstring label, string iconId, bool enableCloseButton)

add new tab by id and label string

addTab
TabControl addTab(string id, string labelResourceId, string iconId, bool enableCloseButton)

add new tab by id and label string resource id

layout
void layout(Rect rc)

Set widget rectangle to specified value and layout widget contents. (Step 2 of two phase layout).

measure
void measure(int parentWidth, int parentHeight)

Measure widget according to desired width and height constraints. (Step 1 of two phase layout).

onClick
bool onClick(Widget source)
Undocumented in source. Be warned that the author may not have intended to support it.
onDraw
void onDraw(DrawBuf buf)

Draw widget at its position to buffer

removeTab
TabControl removeTab(string id)

remove tab

selectTab
void selectTab(int index)
Undocumented in source. Be warned that the author may not have intended to support it.
sortedItems
TabItemWidget[] sortedItems()
Undocumented in source. Be warned that the author may not have intended to support it.
tab
TabItem tab(int index)

returns tab item by id (null if index out of range)

tab
TabItem tab(string id)

returns tab item by id (null if not found)

tabIndex
int tabIndex(string id)

get tab index by tab id (-1 if not found)

updateTabs
void updateTabs()
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

onTabChangedListener
void delegate(string newActiveTabId, string previousTabId) onTabChangedListener [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
onTabChangedListener
void delegate(string newActiveTabId, string previousTabId) onTabChangedListener [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
tabCount
int tabCount [@property getter]

returns tab count

Static functions

accessTimeComparator
bool accessTimeComparator(TabItemWidget a, TabItemWidget b)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

_enableCloseButton
bool _enableCloseButton;
Undocumented in source.
_items
TabItemList _items;
Undocumented in source.
_moreButton
ImageButton _moreButton;
Undocumented in source.
_onTabChanged
void delegate(string newActiveTabId, string previousTabId) _onTabChanged;
Undocumented in source.
_selectedTabId
string _selectedTabId;
Undocumented in source.
_sortedItems
TabItemWidget[] _sortedItems;
Undocumented in source.

Inherited Members

From WidgetGroup

_children
WidgetList _children;
Undocumented in source.
childCount
int childCount [@property getter]

returns number of children of this widget

child
Widget child(int index)

returns child by index

addChild
Widget addChild(Widget item)

adds child, returns added item

removeChild
Widget removeChild(int index)

removes child, returns removed item

removeChild
Widget removeChild(string ID)

removes child by ID, returns removed item

childIndex
int childIndex(Widget item)

returns index of widget in child list, -1 if passed widget is not a child of this widget

Meta