Wt: Wt::Ext::ToolBar Class Reference

Wt 3.3.0

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Hierarchy
- Class Members

Public Member Functions
Wt::Ext::ToolBar Class Reference
Ext widgets (Wt::Ext, deprecated)

A class that represents a tool bar (or a menu bar). More...

`#include <Wt/Ext/ToolBar>`

Inheritance diagram for Wt::Ext::ToolBar:
[legend]

List of all members.

## 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.

## Detailed Description

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

## Member Function Documentation

template<class T , class V >

Button * Wt::Ext::ToolBar::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.

The target and method are connected to the Button::activated() signal.

template<class T , class V >

Button * Wt::Ext::ToolBar::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.

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.

Note:
  A widget can ony be inserted before initial rendering.

All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator