Gamedev Framework (gf)
0.3.0
A C++11 framework for 2D games
|
Context for an immediate mode graphical interface. More...
#include <gf/UI.h>
Public Member Functions | |
UI (Font &font, unsigned characterSize=DefaultCharacterSize) | |
Constructor. More... | |
~UI () | |
Destructor. More... | |
UI (const UI &)=delete | |
Deleted copy constructor. More... | |
UI & | operator= (const UI &)=delete |
Deleted copy assignment. More... | |
UI (UI &&other) | |
Move constructor. More... | |
UI & | operator= (UI &&other) |
Move assignment. More... | |
void | processEvent (const Event &event) |
Update the internal state with an event. More... | |
virtual void | draw (RenderTarget &target, RenderStates states) override |
Draw the object to a render target. More... | |
Window | |
bool | begin (const std::string &title, const RectF &bounds, UIWindowFlags flags=None) |
Create a window. More... | |
void | end () |
Finish a window. More... | |
Layout | |
void | layoutRowDynamic (float height, int cols) |
Dynamic row with fixed column layout. More... | |
void | layoutRowStatic (float height, int itemWidth, int cols) |
Static row with fixed column layout. More... | |
void | layoutRowBegin (UILayout format, float height, int cols) |
Start an immediate mode custom column layout. More... | |
void | layoutRowPush (float width) |
Specify the width of the next column. More... | |
void | layoutRowEnd () |
Finish an immediate mode custom column layout. More... | |
void | layoutRow (UILayout format, float height, ArrayRef< float > ratio) |
Array-based custom column layout. More... | |
void | separator (float height) |
An empty separator. More... | |
Layout: Group | |
bool | groupBegin (const std::string &title, UIWindowFlags flags=None) |
Start a group. More... | |
void | groupEnd () |
Finish a group. More... | |
bool | groupScrolledBegin (UIScroll &scroll, const std::string &title, UIWindowFlags flags=None) |
Start a scrolled group. More... | |
void | groupScrolledEnd () |
Finish a scrolled group. More... | |
Layout: Tree | |
bool | treePush (UITree type, const std::string &title, UICollapse &state) |
Start a tree layout. More... | |
void | treePop () |
Finish a tree layout. More... | |
Widgets: Labels | |
void | label (StringRef title, UIAlignment align=UIAlignment::Left) |
A simple label with text. More... | |
void | labelColored (const Color4f &color, StringRef title, UIAlignment align=UIAlignment::Left) |
A label with colored text. More... | |
void | labelWrap (StringRef title) |
A simple label that can wrap. More... | |
void | labelWrapColored (const Color4f &color, StringRef title) |
A label with colored text that can wrap. More... | |
Widgets: Buttons | |
void | buttonSetBehavior (UIButtonBehavior behavior) |
Change the behavior of buttons. More... | |
bool | buttonPushBehavior (UIButtonBehavior behavior) |
Push a new behavior of buttons. More... | |
bool | buttonPopBehavior () |
Pop the previous behavior of buttons. More... | |
bool | buttonLabel (StringRef title) |
A button with a centered label. More... | |
bool | buttonColor (const Color4f &color) |
A button with a color. More... | |
bool | buttonSymbol (UISymbol symbol) |
A button with a symbol. More... | |
bool | buttonSymbolLabel (UISymbol symbol, StringRef title, UIAlignment align=UIAlignment::Left) |
A button with a symbol and a centered label. More... | |
Widgets: Checkbox | |
bool | checkbox (StringRef title, bool &active) |
A checkbox with a title. More... | |
bool | checkboxFlags (StringRef title, unsigned &flags, unsigned value) |
A checkbox with a title for flags. More... | |
Widgets: Radio | |
bool | option (StringRef title, bool active) |
A radio button without state. More... | |
bool | radio (StringRef title, bool &active) |
A radio button with a reference state. More... | |
Widgets: Selectable | |
bool | selectableLabel (StringRef title, UIAlignment align, bool &value) |
A selectable label. More... | |
Widgets: Slider | |
bool | sliderFloat (float min, float &val, float max, float step) |
A slider for a float value. More... | |
bool | sliderInt (int min, int &val, int max, int step) |
A slider for an int value. More... | |
Widgets: Progressbar | |
bool | progress (std::size_t ¤t, std::size_t max, UIProgress modifyable=UIProgress::Modifyable) |
A progress bar. More... | |
Widgets: Color picker | |
bool | colorPicker (Color4f &color) |
A color picker. More... | |
Widgets: Property | |
void | propertyInt (const std::string &name, int min, int &val, int max, int step, float incPerPixel) |
A property for an integer. More... | |
void | propertyFloat (const std::string &name, float min, float &val, float max, float step, float incPerPixel) |
A property for a float. More... | |
void | propertyDouble (const std::string &name, double min, double &val, double max, double step, float incPerPixel) |
A property for a double. More... | |
Popups | |
bool | popupBegin (UIPopup type, const std::string &title, UIWindowFlags flags, const RectF &bounds) |
Start a popup window. More... | |
void | popupClose () |
Close a popup window. More... | |
void | popupEnd () |
Finish a popup window. More... | |
Combo box | |
void | combobox (const std::vector< std::string > &items, int &selected, int itemHeight, Vector2f size) |
A simple combo box with a list of item. More... | |
void | comboboxSeparator (const std::string &itemsSeparatedBySeparator, char separator, int &selected, int itemHeight, Vector2f size) |
A simple combo box with a string and a separator. More... | |
bool | comboBeginLabel (StringRef selected, Vector2f size) |
Start a combo box with a label. More... | |
bool | comboBeginColor (const Color4f &color, Vector2f size) |
Start a combo box with a color. More... | |
bool | comboBeginSymbol (UISymbol symbol, Vector2f size) |
Start a combo box with a symbol. More... | |
bool | comboBeginSymbolLabel (UISymbol symbol, StringRef selected, Vector2f size) |
Start a combo box with a symbol and a label. More... | |
bool | comboItemLabel (StringRef title, UIAlignment align=UIAlignment::Left) |
A label inside the combo box. More... | |
bool | comboItemSymbolLabel (UISymbol symbol, StringRef title, UIAlignment align=UIAlignment::Left) |
A symbol and a label inside the combo box. More... | |
void | comboClose () |
Close a combo box. More... | |
void | comboEnd () |
Finish a combo box. More... | |
Contextual | |
bool | contextualBegin (UIWindowFlags flags, Vector2f size, const RectF &triggerBounds) |
Start a contextual window. More... | |
bool | contextualItemLabel (StringRef title, UIAlignment align=UIAlignment::Left) |
A label inside the contextual window. More... | |
bool | contextualItemSymbolLabel (UISymbol symbol, StringRef title, UIAlignment align=UIAlignment::Left) |
A symbol and a label inside the contextual window. More... | |
void | contextualClose () |
Close the contextual window. More... | |
void | contextualEnd () |
Finish the contextual window. More... | |
Tooltip | |
void | tooltip (const std::string &text) |
A simple tooltip with a text. More... | |
bool | tooltipBegin (float width) |
Start a tooltip. More... | |
void | tooltipEnd () |
Finish a tooltip. More... | |
Menu | |
void | menubarBegin () |
Start a menu bar. More... | |
void | menubarEnd () |
Finish a menu bar. More... | |
bool | menuBeginLabel (StringRef title, UIAlignment align, Vector2f size) |
Start a menu with a label. More... | |
bool | menuBeginSymbol (const std::string &id, UISymbol symbol, Vector2f size) |
Start a menu with a symbol. More... | |
bool | menuBeginSymbolLabel (UISymbol symbol, StringRef title, UIAlignment align, Vector2f size) |
Start a menu with a symbol and a label. More... | |
bool | menuItemLabel (StringRef title, UIAlignment align=UIAlignment::Left) |
A label inside the menu. More... | |
bool | menuItemSymbolLabel (UISymbol symbol, StringRef title, UIAlignment align=UIAlignment::Left) |
A symbol and a label inside the menu. More... | |
void | menuClose () |
Close a menu. More... | |
void | menuEnd () |
Finish a menu. More... | |
Utilities | |
RectF | getWidgetBounds () |
Get the current widget bounds. More... | |
bool | isWidgetHovered () |
Check if the widget is hovered by the mouse. More... | |
Style | |
void | setPredefinedStyle (UIPredefinedStyle style) |
Set a predefined style for all the windows and the widgets. More... | |
Public Member Functions inherited from gf::Drawable | |
virtual | ~Drawable () |
Virtual desctructor. More... | |
Static Public Attributes | |
static constexpr unsigned | DefaultCharacterSize = 13 |
The default size for the font. More... | |
Context for an immediate mode graphical interface.
When building a graphical interfaces, you have basically two choices: either the retained mode where you build a hierarchy of widgets, or the immediate mode where widgets are built from function calls. Choosing the best mode between these two may be controversial. gf offers an immediate mode graphical interface through this class.
The immediate mode graphical interface (or imgui) of gf is based on Nuklear, a C library with the same purpose. gf does not provide (yet?) all the features of Nuklear, but a fair amount of the main features. Nuklear is totally abstracted in gf so you won't see any interface from Nuklear and you won't be able to interact directly with Nuklear. If you need a feature that is not implemented yet, just ask.
This imgui library can be used to create tools for the game developpers. It's easy and quick to build a functional interface with an imgui library. You can see some examples in gf itself. You can also use this library to build in-game interfaces, even if it's not its primary purpose. If your game is heavily based on a graphical interface, it may be a good option.
An instance of gf::UI is a context for all the windows that will be created. You must provide a font and a character size that will be used in the interface. Generally, you create the instance of gf::UI at the beginning of your application and then you use this instance throughout your application.
By default, the character size is 13.
The imgui needs to know the input events that occurred in the frame time. So when polling the events in your main loop, you must pass the events to the context so that it can be updated and take the good decision. For example, if you press on a button, the mouse event will be transmitted and the library will know that you pressed a button and act accordingly.
Then, you have to create a window. The window has a title that may appear in the titlebar. It also identifies the window so two windows must have two different titles. The window also has bounds, i.e. a position and a size, that indicates where to put the window in the screen. There is no automatic placement of windows. Finally, the window can have many properties (see gf::UIWindow) that modify the interaction with the window. They are defined at the window creation.
For each begin(), you have to call end() to finish the window. You can create as many windows as you want as long as they have different titles.
Before drawing any widget, you have to define a layout. Think of it as a sort of specification for how to organize the following widgets. There are three types of layouts: rows, groups, trees.
Rows are the most common type of layout. The row layout is very flexible.
A row can be either static (it does not adapt to the width of the window) of dynamic (it adapts to the width of the window). It can be fixed (all columns have the same width) or custom (columns' widths are specified, either relatively or absolutely), and in the latter case the specification can be global or in immediate mode. Here is a summary of the functions to use in each case:
A tree is a tree-like layout. It can be collapsed to hide its content except its title. There are two types of trees: tabs and nodes (see gf::UITree). A tab tree is generally put at the root of the tree, it is represented with a border around the title. A node tree is generally the son of a tab tree or another node tree. It is represented without any border.
In both cases, you need a variable of type gf::UICollapse to handle the current state of the tree: minimized or maximized.
A group is a kind of window inside a window. It can have a title, a border and a scrollbar. However, a group needs to be put in a row. See groupBegin() and groupEnd().
The library offers common kinds of widgets:
Widgets often manipulate a reference to a user-provided variable that represents the state of the widget. This way, you can pass directly your model variables to the graphical interface without duplicating the data. Some widgets return a boolean that indicates a state change. For example, a button returns true if it has been pressed.
The library also offers common graphical interface elements:
Many of these elements have a begin/end API. The end part must be called if the begin part succeeded, i.e. returned true. Some elements offer a simplified version without begin/end for common cases.
gf::UI::UI | ( | Font & | font, |
unsigned | characterSize = DefaultCharacterSize |
||
) |
Constructor.
font | The font used in the interface |
characterSize | The size of the font used in the interface |
gf::UI::~UI | ( | ) |
Destructor.
|
delete |
Deleted copy constructor.
gf::UI::UI | ( | UI && | other | ) |
Move constructor.
bool gf::UI::begin | ( | const std::string & | title, |
const RectF & | bounds, | ||
UIWindowFlags | flags = None |
||
) |
Create a window.
title | The title of the window |
bounds | The area of the window |
flags | The properties of the window |
bool gf::UI::buttonColor | ( | const Color4f & | color | ) |
A button with a color.
color | The color of the button |
bool gf::UI::buttonLabel | ( | StringRef | title | ) |
A button with a centered label.
title | The title of the button |
bool gf::UI::buttonPopBehavior | ( | ) |
Pop the previous behavior of buttons.
bool gf::UI::buttonPushBehavior | ( | UIButtonBehavior | behavior | ) |
Push a new behavior of buttons.
behavior | The new behavior of buttons |
void gf::UI::buttonSetBehavior | ( | UIButtonBehavior | behavior | ) |
Change the behavior of buttons.
behavior | The new behavior of buttons |
bool gf::UI::buttonSymbol | ( | UISymbol | symbol | ) |
A button with a symbol.
symbol | A symbol |
bool gf::UI::buttonSymbolLabel | ( | UISymbol | symbol, |
StringRef | title, | ||
UIAlignment | align = UIAlignment::Left |
||
) |
A button with a symbol and a centered label.
symbol | A symbol |
title | The title of the button |
align | The alignment of the symbol |
bool gf::UI::checkbox | ( | StringRef | title, |
bool & | active | ||
) |
A checkbox with a title.
title | The title of the checkbox |
active | A reference to a boolean that indicates the state of the checkbox |
bool gf::UI::checkboxFlags | ( | StringRef | title, |
unsigned & | flags, | ||
unsigned | value | ||
) |
A checkbox with a title for flags.
title | The title of the checkbox |
flags | A reference to the state of flags |
value | The flag value for this checkbox |
bool gf::UI::colorPicker | ( | Color4f & | color | ) |
A color picker.
color | A reference to the state of the color picker, i.e. the current color |
Start a combo box with a color.
color | The color that appears in the combo box |
size | The size of the combo box |
Start a combo box with a label.
selected | The selected item that appears in the combo box |
size | The size of the combo box |
Start a combo box with a symbol.
symbol | The symbol that appears in the combo box |
size | The size of the combo box |
Start a combo box with a symbol and a label.
symbol | The symbol that appears in the combo box |
selected | The selected item that appears in the combo box |
size | The size of the combo box |
void gf::UI::combobox | ( | const std::vector< std::string > & | items, |
int & | selected, | ||
int | itemHeight, | ||
Vector2f | size | ||
) |
A simple combo box with a list of item.
items | The list of items in the combo box |
selected | A reference to the selected item in the combo box |
itemHeight | The height of the items in the list |
size | The size of the combo box |
void gf::UI::comboboxSeparator | ( | const std::string & | itemsSeparatedBySeparator, |
char | separator, | ||
int & | selected, | ||
int | itemHeight, | ||
Vector2f | size | ||
) |
A simple combo box with a string and a separator.
itemsSeparatedBySeparator | A string with all the items separated by a separator |
separator | The separator used in the string |
selected | A reference to the selected item in the combo box |
itemHeight | The height of the items in the list |
size | The size of the combo box |
void gf::UI::comboClose | ( | ) |
Close a combo box.
void gf::UI::comboEnd | ( | ) |
Finish a combo box.
bool gf::UI::comboItemLabel | ( | StringRef | title, |
UIAlignment | align = UIAlignment::Left |
||
) |
A label inside the combo box.
title | The title of the label |
align | The alignment of the text in the label |
bool gf::UI::comboItemSymbolLabel | ( | UISymbol | symbol, |
StringRef | title, | ||
UIAlignment | align = UIAlignment::Left |
||
) |
A symbol and a label inside the combo box.
symbol | The symbol of the item |
title | The title of the label |
align | The alignment of the text in the label |
bool gf::UI::contextualBegin | ( | UIWindowFlags | flags, |
Vector2f | size, | ||
const RectF & | triggerBounds | ||
) |
Start a contextual window.
flags | The properties of the contextual window |
size | The size of the contextual window |
triggerBounds | The bounds when the contextual should appear |
void gf::UI::contextualClose | ( | ) |
Close the contextual window.
void gf::UI::contextualEnd | ( | ) |
Finish the contextual window.
bool gf::UI::contextualItemLabel | ( | StringRef | title, |
UIAlignment | align = UIAlignment::Left |
||
) |
A label inside the contextual window.
title | The title of the label |
align | The alignment of the text in the label |
bool gf::UI::contextualItemSymbolLabel | ( | UISymbol | symbol, |
StringRef | title, | ||
UIAlignment | align = UIAlignment::Left |
||
) |
A symbol and a label inside the contextual window.
symbol | The symbol of the item |
title | The title of the label |
align | The alignment of the text in the label |
|
overridevirtual |
Draw the object to a render target.
This is a pure virtual function that has to be implemented by the derived class to define how the drawable should be drawn.
target | Render target to draw to |
states | Current render states |
Implements gf::Drawable.
void gf::UI::end | ( | ) |
RectF gf::UI::getWidgetBounds | ( | ) |
Get the current widget bounds.
bool gf::UI::groupBegin | ( | const std::string & | title, |
UIWindowFlags | flags = None |
||
) |
Start a group.
The only allowed flags are UIWindow::Title, UIWindow::Border, UIWindow::NoScrollbar.
title | The title of the group |
flags | The properties of the group |
void gf::UI::groupEnd | ( | ) |
Finish a group.
bool gf::UI::groupScrolledBegin | ( | UIScroll & | scroll, |
const std::string & | title, | ||
UIWindowFlags | flags = None |
||
) |
Start a scrolled group.
The only allowed flags are UIWindow::Title, UIWindow::Border, UIWindow::NoScrollbar.
scroll | A state for representing the scroll |
title | The title of the group |
flags | The properties of the group |
void gf::UI::groupScrolledEnd | ( | ) |
Finish a scrolled group.
bool gf::UI::isWidgetHovered | ( | ) |
Check if the widget is hovered by the mouse.
You must do this check just after the layout specification
void gf::UI::label | ( | StringRef | title, |
UIAlignment | align = UIAlignment::Left |
||
) |
A simple label with text.
title | The title of the label |
align | The alignment of the text in the label |
void gf::UI::labelColored | ( | const Color4f & | color, |
StringRef | title, | ||
UIAlignment | align = UIAlignment::Left |
||
) |
A label with colored text.
color | The color of the text |
title | The title of the label |
align | The alignment of the text in the label |
void gf::UI::labelWrap | ( | StringRef | title | ) |
A label with colored text that can wrap.
color | The color of the text |
title | The title of the label |
Array-based custom column layout.
format | The format of the row: static or dynamic |
height | The height of the row |
ratio | A reference to an array of ratios for the columns |
void gf::UI::layoutRowBegin | ( | UILayout | format, |
float | height, | ||
int | cols | ||
) |
Start an immediate mode custom column layout.
format | The format of the row: static or dynamic |
height | The height of the row |
cols | The number of columns in the row |
void gf::UI::layoutRowDynamic | ( | float | height, |
int | cols | ||
) |
Dynamic row with fixed column layout.
height | The height of the row |
cols | The number of columns in the row |
void gf::UI::layoutRowEnd | ( | ) |
Finish an immediate mode custom column layout.
void gf::UI::layoutRowPush | ( | float | width | ) |
Specify the width of the next column.
width | The width of the next column |
void gf::UI::layoutRowStatic | ( | float | height, |
int | itemWidth, | ||
int | cols | ||
) |
Static row with fixed column layout.
height | The height of the row |
itemWidth | The width of each item in the row |
cols | The number of columns in the row |
void gf::UI::menubarBegin | ( | ) |
Start a menu bar.
void gf::UI::menubarEnd | ( | ) |
Finish a menu bar.
bool gf::UI::menuBeginLabel | ( | StringRef | title, |
UIAlignment | align, | ||
Vector2f | size | ||
) |
Start a menu with a label.
title | The title of the label |
align | The alignment of the text in the label |
size | The size of the menu |
Start a menu with a symbol.
id | A unique identifier for the menu |
symbol | A symbol for the menu |
size | The size of the menu |
bool gf::UI::menuBeginSymbolLabel | ( | UISymbol | symbol, |
StringRef | title, | ||
UIAlignment | align, | ||
Vector2f | size | ||
) |
Start a menu with a symbol and a label.
symbol | A symbol for the menu |
title | The title of the label |
align | The alignment of the text in the label |
size | The size of the menu |
void gf::UI::menuClose | ( | ) |
Close a menu.
void gf::UI::menuEnd | ( | ) |
Finish a menu.
bool gf::UI::menuItemLabel | ( | StringRef | title, |
UIAlignment | align = UIAlignment::Left |
||
) |
A label inside the menu.
title | The title of the label |
align | The alignment of the text in the label |
bool gf::UI::menuItemSymbolLabel | ( | UISymbol | symbol, |
StringRef | title, | ||
UIAlignment | align = UIAlignment::Left |
||
) |
A symbol and a label inside the menu.
symbol | The symbol of the item |
title | The title of the label |
align | The alignment of the text in the label |
bool gf::UI::option | ( | StringRef | title, |
bool | active | ||
) |
A radio button without state.
title | The title of the radio button |
active | A boolean that indicates if the radio is chosen |
bool gf::UI::popupBegin | ( | UIPopup | type, |
const std::string & | title, | ||
UIWindowFlags | flags, | ||
const RectF & | bounds | ||
) |
Start a popup window.
type | The type of popup (static or dynamic) |
title | The title of the popup |
flags | The properties of the popup window |
bounds | The area of the popup window |
void gf::UI::popupClose | ( | ) |
Close a popup window.
void gf::UI::popupEnd | ( | ) |
Finish a popup window.
void gf::UI::processEvent | ( | const Event & | event | ) |
Update the internal state with an event.
This function must be called for every event that occur in a frame.
event | An event |
bool gf::UI::progress | ( | std::size_t & | current, |
std::size_t | max, | ||
UIProgress | modifyable = UIProgress::Modifyable |
||
) |
A progress bar.
current | A reference to the state of the progress bar |
max | The maximum of the progress bar (the minimum is zero) |
modifyable | A property to indicate if the progress bar can be modified by the user or not |
void gf::UI::propertyDouble | ( | const std::string & | name, |
double | min, | ||
double & | val, | ||
double | max, | ||
double | step, | ||
float | incPerPixel | ||
) |
A property for a double.
name | The name of the property |
min | The minimum for the value |
val | A reference to the value |
max | The maximum for the value |
step | A step when changing the value |
incPerPixel | A step when modifying the value with the mouse |
void gf::UI::propertyFloat | ( | const std::string & | name, |
float | min, | ||
float & | val, | ||
float | max, | ||
float | step, | ||
float | incPerPixel | ||
) |
A property for a float.
name | The name of the property |
min | The minimum for the value |
val | A reference to the value |
max | The maximum for the value |
step | A step when changing the value |
incPerPixel | A step when modifying the value with the mouse |
void gf::UI::propertyInt | ( | const std::string & | name, |
int | min, | ||
int & | val, | ||
int | max, | ||
int | step, | ||
float | incPerPixel | ||
) |
A property for an integer.
name | The name of the property |
min | The minimum for the value |
val | A reference to the value |
max | The maximum for the value |
step | A step when changing the value |
incPerPixel | A step when modifying the value with the mouse |
bool gf::UI::radio | ( | StringRef | title, |
bool & | active | ||
) |
A radio button with a reference state.
title | The title of the radio button |
active | A reference to the state of the radio |
bool gf::UI::selectableLabel | ( | StringRef | title, |
UIAlignment | align, | ||
bool & | value | ||
) |
A selectable label.
title | The title of the label |
align | The alignment of the text in the label |
value | A reference to the state of the selection |
void gf::UI::separator | ( | float | height | ) |
An empty separator.
This function creates an empty row so you have to specify a new row.
height | The height of the row |
void gf::UI::setPredefinedStyle | ( | UIPredefinedStyle | style | ) |
Set a predefined style for all the windows and the widgets.
style | The predefined style |
bool gf::UI::sliderFloat | ( | float | min, |
float & | val, | ||
float | max, | ||
float | step | ||
) |
A slider for a float value.
min | The minimum for the value |
val | A reference to the value |
max | The maximum for the value |
step | A step when changing the value |
bool gf::UI::sliderInt | ( | int | min, |
int & | val, | ||
int | max, | ||
int | step | ||
) |
A slider for an int value.
min | The minimum for the value |
val | A reference to the value |
max | The maximum for the value |
step | A step when changing the value |
void gf::UI::tooltip | ( | const std::string & | text | ) |
A simple tooltip with a text.
text | The text of the tooltip |
bool gf::UI::tooltipBegin | ( | float | width | ) |
Start a tooltip.
width | The with of the tooltip |
void gf::UI::tooltipEnd | ( | ) |
Finish a tooltip.
void gf::UI::treePop | ( | ) |
Finish a tree layout.
bool gf::UI::treePush | ( | UITree | type, |
const std::string & | title, | ||
UICollapse & | state | ||
) |
Start a tree layout.
type | The type of tree: tab or node |
title | The title of the tree |
state | The collapse state |
|
static |
The default size for the font.