- Your Widget Set For OpenGL
Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | Related Pages

ufo::UBorderLayout Class Reference

A layout manager with one main widgets and (at most) 4 minor widgets in north, east, south or west position. More...

#include <uborderlayout.hpp>

Inheritance diagram for ufo::UBorderLayout:

ufo::ULayoutManager ufo::UObject ufo::UCollectable List of all members.

Public Member Functions

 UBorderLayout (int hgap=2, int vgap=2)
virtual void layoutContainer (const UWidget *parent)
virtual UDimension getPreferredLayoutSize (const UWidget *parent, const UDimension &maxSize) const

Static Public Attributes

const UStringCenter
const UStringNorth
const UStringSouth
const UStringEast
const UStringWest

Protected Member Functions

UWidgetgetChildWidgetAt (const UWidget *container, const UString *position) const

Detailed Description

A layout manager with one main widgets and (at most) 4 minor widgets in north, east, south or west position.

See also:
UWidget::add
The constraints object describes at which position the newly added child widget is located. Use UBorderLayout::Center (or NULL) for the centered main widget, UBorderLayout::North for the northern widget, UBorderLayout::South for the southern widget, UBorderLayout::East for the eastern widget, UBorderLayout::West for the western widget.

Author:
Johannes Schmidt


Constructor & Destructor Documentation

ufo::UBorderLayout::UBorderLayout int  hgap = 2,
int  vgap = 2
 

Creates a new border layout with a default horizontal and vertical gap between childs of 2 pixels.


Member Function Documentation

UWidget* ufo::UBorderLayout::getChildWidgetAt const UWidget container,
const UString position
const [protected]
 

Determines the child widget of the given container, which should be placed at the given position.

virtual UDimension ufo::UBorderLayout::getPreferredLayoutSize const UWidget parent,
const UDimension maxSize
const [virtual]
 

Returns:
The preferred size of the container using the given maximum dimension.

Implements ufo::ULayoutManager.

virtual void ufo::UBorderLayout::layoutContainer const UWidget parent  )  [virtual]
 

Relayouts all child widgets within the given container.

Implements ufo::ULayoutManager.


Member Data Documentation

const UString* ufo::UBorderLayout::Center [static]
 

Use this as constraint attribute for the centered child widget.

See also:
UWidget::add

const UString* ufo::UBorderLayout::East [static]
 

Use this as constraint attribute for the eastern child widget.

See also:
UWidget::add

const UString* ufo::UBorderLayout::North [static]
 

Use this as constraint attribute for the northern child widget.

See also:
UWidget::add

const UString* ufo::UBorderLayout::South [static]
 

Use this as constraint attribute for the southern child widget.

See also:
UWidget::add

const UString* ufo::UBorderLayout::West [static]
 

Use this as constraint attribute for the western child widget.

See also:
UWidget::add


The documentation for this class was generated from the following file:
The libUFO Project - written by Johannes Schmidt