A class that represents a tool bar (or a menu bar). More...
#include <Wt/Ext/ToolBar>
Inherits Wt::Ext::Widget.
Inherited by Wt::Ext::PagingToolBar.
Public Member Functions | |
ToolBar (WContainerWidget *parent=0) | |
Create a new tool bar. | |
Button * | addButton (const WString &text) |
Add a button with given text. | |
Button * | addButton (const std::string &iconPath, const WString &text) |
Add a button with given icon and text. | |
template<class T , class V > | |
Button * | addButton (const WString &text, T *target, void(V::*method)()) |
Add a button with given text, and specify a slot method to be called when activated. | |
template<class T , class V > | |
Button * | addButton (const std::string &iconPath, const WString &text, T *target, void(V::*method)()) |
Add a button with given text and icon, and specify a slot method to be called when activated. | |
Button * | addButton (const WString &text, Menu *menu) |
Add a menu button, with given text. | |
Button * | addButton (const std::string &iconPath, const WString &text, Menu *menu) |
Add a menu button, with given icon and text. | |
void | add (Button *item) |
Add a button to the tool bar. | |
void | add (WWidget *item) |
Add a widget to the tool bar. | |
void | insert (int index, Button *item) |
Insert a button in the tool bar. | |
void | insert (int index, WWidget *item) |
Insert a widget in the tool bar. | |
void | addSeparator () |
Add a separator to the tool bar. | |
void | addStretch () |
Adds stretch to the tool bar. |
A class that represents a tool bar (or a menu bar).
A tool bar shows buttons (and other widgets). When using text-only buttons, the tool bar behaves like a top-level menu.
Example of a ToolBar
Button * Wt::Ext::ToolBar::addButton | ( | const std::string & | iconPath, | |
const WString & | text, | |||
T * | target, | |||
void(V::*)() | method | |||
) | [inline] |
Add a button with given text and icon, and specify a slot method to be called when activated.
The target and method are connected to the Button::activated() signal.
Button * Wt::Ext::ToolBar::addButton | ( | const WString & | text, | |
T * | target, | |||
void(V::*)() | method | |||
) | [inline] |
Add a button with given text, and specify a slot method to be called when activated.
The target and method are connected to the Button::activated() signal.
void Wt::Ext::ToolBar::addStretch | ( | ) |
Adds stretch to the tool bar.
This is an empty space that will stretch and push contents to the right of it away to the very right end.
void Wt::Ext::ToolBar::insert | ( | int | index, | |
WWidget * | item | |||
) |
Insert a widget in the tool bar.