Wt 3.1.10
Public Member Functions
Wt::Ext::ToolBar Class Reference

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

#include <Wt/Ext/ToolBar>

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

List of all members.

Public Member Functions

 ToolBar (WContainerWidget *parent=0)
 Create a new tool bar.
ButtonaddButton (const WString &text)
 Add a button with given text.
ButtonaddButton (const std::string &iconPath, const WString &text)
 Add a button with given icon and text.
template<class T , class V >
ButtonaddButton (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 >
ButtonaddButton (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.
ButtonaddButton (const WString &text, Menu *menu)
 Add a menu button, with given text.
ButtonaddButton (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.

ExtToolBar-1.png
Example of a ToolBar

Member Function Documentation

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.

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.

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

Generated on Wed Jul 27 2011 for the C++ Web Toolkit (Wt) by doxygen 1.7.4