Wt::WStackedWidget Class Reference

A container widget that stacks its widgets on top of each other. More...

#include <Wt/WStackedWidget>

Inheritance diagram for Wt::WStackedWidget:

Inheritance graph
[legend]

List of all members.

Public Slots

void setCurrentIndex (int index)
void setCurrentWidget (WWidget *widget)

Public Member Functions

 WStackedWidget (WContainerWidget *parent=0)
 Created a new WStackedWidget.
virtual void addWidget (WWidget *widget)
 Add a child widget to this container.
int count () const
 The number of widgets in the stack.
int currentIndex () const
 The index of the widget that is currently shown.
WWidgetcurrentWidget () const
 The widget that is currently shown.
int indexOf (WWidget *widget) const
 The index of the given widget.
void insertWidget (int index, WWidget *widget)
 Insert a widget at a given index.
virtual void removeWidget (WWidget *widget)
 Remove a child widget from this container.
WWidgetwidget (int index) const
 Get the widget at the specified index.


Detailed Description

A container widget that stacks its widgets on top of each other.

This is a container widgets which at all times has only one item visible. The widget accomplishes this using setHidden(bool) on the children.

With currentIndex() and setCurrentIndex(int index) you can get or set which widget needs to be visible.

WStackedWidget, like WContainerWidget, is by default not inline.


Member Function Documentation

void Wt::WStackedWidget::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::WStackedWidget::removeWidget ( WWidget widget  )  [virtual]

Remove a child widget from this container.

This removes the widget from this container, but does not delete the widget !

Reimplemented from Wt::WContainerWidget.

void Wt::WStackedWidget::setCurrentIndex ( int  index  )  [slot]

Set the widget at the given index to be shown.

void Wt::WStackedWidget::setCurrentWidget ( WWidget widget  )  [slot]

Set the given widget to be shown.


Generated on Fri Jul 25 17:56:38 2008 for Wt by doxygen 1.5.3