Wt::WBorderLayout Class Reference

A layout manager which divides the container region in five regions. More...

#include <WBorderLayout>

Inheritance diagram for Wt::WBorderLayout:

Inheritance graph
[legend]

List of all members.

Public Types

enum  Position {
  North, East, South, West,
  Center
}
 Enumeration of possible positions in the layout. More...

Public Member Functions

 WBorderLayout (WWidget *parent=0)
 Create a new border layout.
 ~WBorderLayout ()
 Remove a border layout.
virtual void addItem (WLayoutItem *item)
 Add a layout item.
virtual void removeItem (WLayoutItem *item)
 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.
void addWidget (WWidget *widget, Position position)
 Add a widget to the given position.
void add (WLayoutItem *item, Position position)
 Add a layout item to the given position.
Position position (WLayoutItem *item) const
 Return the position at which the given layout item is set.


Detailed Description

A layout manager which divides the container region in five regions.

The five regions are composed of:

     ------------------------------------
     |              North               |
     ------------------------------------
     |      |                    |      |
     | West |       Center       | East |
     |      |                    |      |
     ------------------------------------
     |              South               |
     ------------------------------------
 

Each region may hold no more than one widget, and for all but the Center region, the widget is optional.

Widgets in the North and South regions need to have their height defined, and widgets in the West ad East regions their width. The Center widget takes all available remaining space.


Member Enumeration Documentation

enum Wt::WBorderLayout::Position

Enumeration of possible positions in the layout.

Enumerator:
North  North (top).
East  East (left).
South  South (bottom).
West  West (right).
Center  Center.


Member Function Documentation

void Wt::WBorderLayout::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::WBorderLayout::removeItem ( WLayoutItem item  )  [virtual]

Remove a layout item (widget or nested layout).

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

Implements Wt::WLayout.

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

Return the layout item at a specific index.

See also:
indexOf(WLayoutItem *)

Implements Wt::WLayout.

int Wt::WBorderLayout::indexOf ( WLayoutItem item  )  const [virtual]

Return the index of a given item.

See also:
itemAt(int)

Implements Wt::WLayout.

void Wt::WBorderLayout::addWidget ( WWidget widget,
Position  position 
)

Add a widget to the given position.

Only one widget per position is supported.

See also:
addWidget(WLayoutItem *, Position)

void Wt::WBorderLayout::add ( WLayoutItem item,
Position  position 
)

Add a layout item to the given position.

Only one widget per position is supported.


The documentation for this class was generated from the following files:
Generated on Mon Apr 14 15:15:01 2008 for Wt by doxygen 1.5.3