Wt::WFitLayout Class Reference

A layout manager which spans a single widget to all available space. More...

#include <Wt/WFitLayout>

Inheritance diagram for Wt::WFitLayout:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 WFitLayout (WWidget *parent=0)
 Create a new fit layout.
virtual void addItem (WLayoutItem *)
 Add a layout item.
virtual void removeItem (WLayoutItem *)
 Remove a layout item (widget or nested layout).
virtual WLayoutItemitemAt (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.


Detailed Description

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.

Note:
This layout manager is applicable only to Ext::Container container widgets. If you wish to fit widgets within a container widgets, use a WBoxLayout instead (with a single child).

Member Function Documentation

void Wt::WFitLayout::addItem ( WLayoutItem item  )  [virtual]

Add 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.

See also:
removeItem(WLayoutItem *), addWidget(WWidget *)

Implements Wt::WLayout.

void Wt::WFitLayout::removeItem ( WLayoutItem item  )  [virtual]

Remove a layout item (widget or nested layout).

See also:
addItem(WLayoutItem *), removeWidget(WWidget *)

Implements Wt::WLayout.

WLayoutItem * Wt::WFitLayout::itemAt ( int  index  )  const [virtual]

Return the layout item at a specific index.

If there is no item at the index, 0 is returned.

See also:
indexOf(WLayoutItem *) const, count()

Implements Wt::WLayout.

int Wt::WFitLayout::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.

See also:
itemAt(int) const

Reimplemented from Wt::WLayout.

int Wt::WFitLayout::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.


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