Wt  3.3.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
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 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.
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,
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.

See also:
setCompact()

Adds a separator.

The toolbar automatically becomes non-compact.

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

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().

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().

 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator

Generated on Tue Mar 22 2016 for the C++ Web Toolkit (Wt) by doxygen 1.7.6.1