Wt
3.2.0
|
A layout manager which spans a single widget to all available space. More...
#include <Wt/WFitLayout>
Public Member Functions | |
WFitLayout (WWidget *parent=0) | |
Creates a new fit layout. | |
virtual void | addItem (WLayoutItem *) |
Adds a layout item. | |
virtual void | removeItem (WLayoutItem *) |
Removes a layout item (widget or nested layout). | |
virtual WLayoutItem * | itemAt (int index) const |
Returns the layout item at a specific index. | |
virtual int | indexOf (WLayoutItem *item) const |
Returns the index of a given item. | |
virtual int | count () const |
Returns the number of items in this layout. |
A layout manager which spans a single widget to all available space.
This layout manager may manage only a single child widget, and sizes that widget so that it uses all space available in the parent.
void Wt::WFitLayout::addItem | ( | WLayoutItem * | item | ) | [virtual] |
Adds a layout item.
The item may be a widget or nested layout.
How the item is layed out with respect to siblings is implementation specific to the layout manager. In some cases, a layout manager will overload this method with extra arguments that specify layout options.
Implements Wt::WLayout.
int Wt::WFitLayout::count | ( | ) | const [virtual] |
Returns the number of items in this layout.
This may be a theoretical number, which is greater than the actual number of items. It can be used to iterate over the items in the layout, in conjunction with itemAt().
Implements Wt::WLayout.
int Wt::WFitLayout::indexOf | ( | WLayoutItem * | item | ) | const [virtual] |
Returns the index of a given item.
The default implementation loops over all items, and returns the index for which itemAt(index) equals item
.
Reimplemented from Wt::WLayout.
WLayoutItem * Wt::WFitLayout::itemAt | ( | int | index | ) | const [virtual] |
Returns the layout item at a specific index.
If there is no item at the index
, 0
is returned.
Implements Wt::WLayout.
void Wt::WFitLayout::removeItem | ( | WLayoutItem * | item | ) | [virtual] |
Removes a layout item (widget or nested layout).
Implements Wt::WLayout.