Wt  3.3.0
Public Member Functions
Wt::WToolBar Class Reference

A toolbar. More...

#include <Wt/WToolBar>

Inheritance diagram for Wt::WToolBar:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 WToolBar (WContainerWidget *parent=0)
 Constructor.
void addButton (WPushButton *button)
 Adds a button.
void addButton (WSplitButton *button)
 Adds a split button.
void addSeparator ()
 Adds a separator.
int count () const
 Returns the number of buttons.
WWidgetwidget (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.

Detailed Description

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.


Member Function Documentation

void Wt::WToolBar::addButton ( WSplitButton button)

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.

See also:
setCompact()
void Wt::WToolBar::addSeparator ( )

Adds a separator.

The toolbar automatically becomes non-compact.

See also:
setCompact()
int Wt::WToolBar::count ( ) const

Returns the number of buttons.

See also:
widget()
bool Wt::WToolBar::isCompact ( ) const

Returns whether the toolbar was rendered compact.

See also:
setCompact()
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().

WWidget * Wt::WToolBar::widget ( int  index) const

Returns a button.

The returned button is a WPushButton or WSplitButton.

 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator

Generated on Mon Apr 8 2013 for the C++ Web Toolkit (Wt) by doxygen 1.7.5.1