Wt::Ext::Splitter Class Reference
[Ext widgets]

A container widget with resize handles between its children. More...

#include <Wt/Ext/Splitter>

Inheritance diagram for Wt::Ext::Splitter:

Inheritance graph
[legend]

List of all members.

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
 Return the orientation.
void setHandleWidth (int width)
 Set the width of the resize handles (in pixels).
int handleWidth () const
 Return the width of the resize handles.
SplitterHandlehandle (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.


Detailed Description

A container widget with resize handles between its children.

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.


Member Function Documentation

void Wt::Ext::Splitter::setHandleWidth ( int  width  ) 

Set the width of the resize handles (in pixels).

The default width is 4 pixels.

See also:
handleWidth()

int Wt::Ext::Splitter::handleWidth (  )  const [inline]

Return the width of the resize handles.

The default width is 4 pixels.

See also:
setHandleWidth()

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.

See also:
insertBefore(WWidget *widget, WWidget *before);

Reimplemented from Wt::WContainerWidget.

void Wt::Ext::Splitter::insertBefore ( WWidget widget,
WWidget before 
) [virtual]

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.

See also:
insertWidget(int index, WWidget *widget);

Reimplemented from Wt::WContainerWidget.

const std::vector<WWidget *>& Wt::Ext::Splitter::children (  )  const [inline]

Returns contained widgets.

See also:
WContainerWidget::addWidget()

Reimplemented from Wt::WWebWidget.


Generated on Tue Sep 1 17:51:18 2009 for Wt by doxygen 1.5.6