# dlangui.widgets.tabs

DLANGUI library.
This module contains declaration of tabbed view controls.
TabItemWidget - single tab header in tab control TabWidget TabHost TabControl
Synopsis:

    import dlangui.widgets.tabs;

License:
Boost License 1.0
Authors:
Vadim Lopatin, coolreader.org@gmail.com

class TabItem;
  tab item metadata
class TabItemWidget: dlangui.widgets.layouts.HorizontalLayout;
  tab item widget - to show tab header
class TabItemList;
  tab item list helper class
  TabItem get(int index);
    get item by index
  TabItem get(string id);
    get item by id
  TabItemList add(TabItem item);
    append new item
  TabItemList insert(TabItem item, int index);
    insert new item to specified position
  TabItem remove(int index);
    remove item by index
  int indexById(string id);
    find tab index by id
class TabControl: dlangui.widgets.widget.WidgetGroup;
  tab header - tab labels, with optional More button
  Signal!TabHandler onTabChangedListener;
    signal of tab change (e.g. by clicking on tab header)
  const @property int tabCount();
    returns tab count
  TabItem tab(int index);
    returns tab item by id (null if index out of range)
  TabItem tab(string id);
    returns tab item by id (null if not found)
  int tabIndex(string id);
    get tab index by tab id (-1 if not found)
  TabControl removeTab(string id);
    remove tab
  TabControl addTab(TabItem item, int index = -1, bool enableCloseButton = false);
    add new tab
  TabControl addTab(string id, dstring label, string iconId = null, bool enableCloseButton = false);
    add new tab by id and label string
  TabControl addTab(string id, string labelResourceId, string iconId = null, bool enableCloseButton = false);
    add new tab by id and label string resource id
  void measure(int parentWidth, int parentHeight);
    Measure widget according to desired width and height constraints. (Step 1 of two phase layout).
  void layout(Rect rc);
    Set widget rectangle to specified value and layout widget contents. (Step 2 of two phase layout).
  void onDraw(DrawBuf buf);
    Draw widget at its position to buffer
class TabHost: dlangui.widgets.layouts.FrameLayout, dlangui.widgets.tabs.TabHandler;
  container for widgets controlled by TabControl
  @property TabControl tabControl();
    get currently set control widget
  @property TabHost tabControl(TabControl newWidget);
    set new control widget
  Signal!TabHandler onTabChangedListener;
    signal of tab change (e.g. by clicking on tab header)
  TabHost removeTab(string id);
    remove tab
  TabHost addTab(Widget widget, dstring label, string iconId = null, bool enableCloseButton = false);
    add new tab by id and label string
  TabHost addTab(Widget widget, string labelResourceId, string iconId = null, bool enableCloseButton = false);
    add new tab by id and label string resource id
  void selectTab(string ID);
    select tab
class TabWidget: dlangui.widgets.layouts.VerticalLayout, dlangui.widgets.tabs.TabHandler;
  compound widget - contains from TabControl widget (tabs header) and TabHost (content pages)
  Signal!TabHandler onTabChangedListener;
    signal of tab change (e.g. by clicking on tab header)
  TabWidget addTab(Widget widget, string labelResourceId, string iconId = null, bool enableCloseButton = false);
    add new tab by id and label string resource id
  TabWidget addTab(Widget widget, dstring label, string iconId = null, bool enableCloseButton = false);
    add new tab by id and label (raw value)
  TabWidget removeTab(string id);
    remove tab by id
  void selectTab(string ID);
    select tab
  TabItem tab(int index);
    returns tab item by id (null if index out of range)
  TabItem tab(string id);
    returns tab item by id (null if not found)
  int tabIndex(string id);
    get tab index by tab id (-1 if not found)

Page generated by Ddoc. Vadim Lopatin, 2014