#include <Wt/Ext/Splitter>
Public Member Functions | |
Splitter (WContainerWidget *parent=0) | |
Create a new horizontal splitter. | |
Splitter (Orientation orientation, WContainerWidget *parent=0) | |
Create a new splitter with the given orientation. | |
void | setOrientation (Orientation orientation) |
Set the orientation. | |
Orientation | orientation () const |
Get the orientation. | |
void | setHandleWidth (int width) |
Set the width of the resize handles (in pixels). | |
int | handleWidth () const |
Get the width of the resize handles. | |
SplitterHandle * | handle (int index) const |
Returns the handle to the left (or above) the widget at the given index. | |
virtual void | addWidget (WWidget *widget) |
Add a child widget to this container. | |
virtual void | insertWidget (int index, WWidget *widget) |
insert a child widget in this container at given index. | |
virtual void | insertBefore (WWidget *widget, WWidget *before) |
insert a child widget in this container, before another widget. | |
const std::vector< WWidget * > & | children () const |
Returns contained widgets. |
Provides a container in which widgets are laid out either horizontally (side by side, Horizontal orientation), or vertically (Vertical orientation).
Widgets are separated by a SplitterHandle which the user may use to resize widgets. For this to work properly, you need to properly specify widths, and minimum- and maximum widths for the widgets:
Note: removing or adding widgets after initial render is not yet supported.
void Wt::Ext::Splitter::setHandleWidth | ( | int | width | ) |
Set the width of the resize handles (in pixels).
The default width is 4 pixels.
int Wt::Ext::Splitter::handleWidth | ( | ) | const [inline] |
SplitterHandle * Wt::Ext::Splitter::handle | ( | int | index | ) | const |
Returns the handle to the left (or above) the widget at the given index.
There is no handle to the left of the widget at index 0, and 0 will be returned.
void Wt::Ext::Splitter::addWidget | ( | WWidget * | widget | ) | [virtual] |
Add a child widget to this container.
This is equivalent to passing this container as the parent when constructing the child. The widget is appended to the list of children, and thus also layed-out at the end.
Reimplemented from Wt::WContainerWidget.
void Wt::Ext::Splitter::insertWidget | ( | int | index, | |
WWidget * | widget | |||
) | [virtual] |
insert a child widget in this container at given index.
The widget is inserted at the given index, and subsequent widgets are shifted.
Reimplemented from Wt::WContainerWidget.
insert a child widget in this container, before another widget.
The widget is inserted at the place of the before widget, and subsequent widgets are shifted.
Reimplemented from Wt::WContainerWidget.
const std::vector<WWidget *>& Wt::Ext::Splitter::children | ( | ) | const [inline] |
Returns contained widgets.
Reimplemented from Wt::WWebWidget.