A toolbar. More...
#include <Wt/WToolBar>

Public Member Functions | |
| WToolBar (WContainerWidget *parent=0) | |
| Constructor. | |
| void | setOrientation (Orientation orientation) |
| Set vertical or horizontal orientation. | |
| void | addButton (WPushButton *button, AlignmentFlag alignmentFlag=AlignLeft) |
| Adds a button. | |
| void | addButton (WSplitButton *button, AlignmentFlag alignmentFlag=AlignLeft) |
| Adds a split button. | |
| void | addWidget (WWidget *widget, AlignmentFlag alignmentFlag=AlignLeft) |
| Adds a widget. | |
| void | addSeparator () |
| Adds a separator. | |
| int | count () const |
| Returns the number of buttons. | |
| WWidget * | widget (int index) const |
| Returns a button. | |
| void | setCompact (bool compact) |
| Sets the toolbar to be rendered compact. | |
| bool | isCompact () const |
| Returns whether the toolbar was rendered compact. | |
A toolbar.
By default, a toolbar is rendered as "compact" leaving no margin between buttons. By adding a separator or a split button, the toolbar also supports separation between buttons.
| void Wt::WToolBar::addButton | ( | WSplitButton * | button, |
| AlignmentFlag | alignmentFlag = AlignLeft |
||
| ) |
Adds a split button.
When adding a split button, the toolbar automatically becomes non-compact, since otherwise the split button functionality cannot be distinguished from other buttons.
| void Wt::WToolBar::addSeparator | ( | ) |
| void Wt::WToolBar::addWidget | ( | WWidget * | widget, |
| AlignmentFlag | alignmentFlag = AlignLeft |
||
| ) |
Adds a widget.
The toolbar automatically becomes non-compact.
| int Wt::WToolBar::count | ( | ) | const |
Returns the number of buttons.
| bool Wt::WToolBar::isCompact | ( | ) | const |
Returns whether the toolbar was rendered compact.
| void Wt::WToolBar::setCompact | ( | bool | compact | ) |
Sets the toolbar to be rendered compact.
The default value is true, but setCompact(true) is called automatically when calling addButton(WSplitButton *) or addSeparator().
| void Wt::WToolBar::setOrientation | ( | Orientation | orientation | ) |
Set vertical or horizontal orientation.
Use bootstrap btn-group-vertical style for vertical orientation.
| WWidget * Wt::WToolBar::widget | ( | int | index | ) | const |
Returns a button.
The returned widget is a WPushButton or WSplitButton added by addButton() or a widget added by addWidget().
1.7.6.1