#include <Wt/WDefaultLayout>
Public Member Functions | |
WDefaultLayout (WWidget *parent=0) | |
Create a new WDefaultLayout. | |
~WDefaultLayout () | |
Delete the layout. | |
virtual void | addItem (WLayoutItem *item) |
Add a layout item. | |
virtual void | removeItem (WLayoutItem *item) |
Remove a layout item (widget or nested layout). | |
virtual WLayoutItem * | itemAt (int index) const |
Return the layout item at a specific index. | |
virtual int | indexOf (WLayoutItem *item) const |
Return the index of a given item. | |
virtual int | count () const |
Return the number of items in this layout. |
The default layout does not attempt to resize any of the widgets, and puts all widgets vertically above each other.
Wt::WDefaultLayout::~WDefaultLayout | ( | ) |
Delete the layout.
Note: once assigned to a container, the container gets ownership, and so you should not delete the layout yourself.
void Wt::WDefaultLayout::addItem | ( | WLayoutItem * | item | ) | [virtual] |
Add a layout item.
The item may be a widget or nested layout, and is added below the last added item.
Implements Wt::WLayout.
void Wt::WDefaultLayout::removeItem | ( | WLayoutItem * | item | ) | [virtual] |
WLayoutItem * Wt::WDefaultLayout::itemAt | ( | int | index | ) | const [virtual] |
Return the layout item at a specific index.
If there is no item at the index
, 0
is returned.
Implements Wt::WLayout.
int Wt::WDefaultLayout::indexOf | ( | WLayoutItem * | item | ) | const [virtual] |
Return 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.
int Wt::WDefaultLayout::count | ( | ) | const [virtual] |
Return 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.