Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

ONE::gui::LayoutManager Class Reference

Inheritance diagram for ONE::gui::LayoutManager:

Inheritance graph
[legend]
List of all members.

Detailed Description

lays out Component s in containers

Layout managers set the component's position and size according to the manager's rules, the component's preferred size and the associated LayoutConstraint s.

Author:
Daniel Seibert


Public Member Functions

virtual void add (Component *comp, const LayoutConstraint *cons)=0
 adds a component to be laid out later
virtual void layout (Widget *obj, const Bounds &inner)=0
 lays out the given object
virtual Size preferredLayoutSize (const Widget *obj) const =0
 calculates the preferred size for the given object
virtual void remove (Component *comp)=0
 removes a component
virtual ~LayoutManager ()


Constructor & Destructor Documentation

virtual ONE::gui::LayoutManager::~LayoutManager  )  [inline, virtual]
 


Member Function Documentation

virtual void ONE::gui::LayoutManager::add Component comp,
const LayoutConstraint cons
[pure virtual]
 

adds a component to be laid out later

The components are only modified when LayoutManager::layout is called.

Parameters:
comp the component
cons a constraint object which helps the layout manager determine the component's placement

Implemented in ONE::gui::AlignedLayout, ONE::gui::DeckLayout, ONE::gui::GridLayout, ONE::gui::StackLayout, ONE::gui::ViewportLayout, and ONE::gui::WindowLayout.

virtual void ONE::gui::LayoutManager::layout Widget obj,
const Bounds inner
[pure virtual]
 

lays out the given object

This function will rearrange and resize obj 's content to fit inside inner according to this LayoutManager 's layout strategy.

Parameters:
obj the object that will be laid out
inner obj 's inner bounds

Implemented in ONE::gui::AlignedLayout, ONE::gui::DeckLayout, ONE::gui::GridLayout, ONE::gui::StackLayout, ONE::gui::ViewportLayout, and ONE::gui::WindowLayout.

virtual Size ONE::gui::LayoutManager::preferredLayoutSize const Widget obj  )  const [pure virtual]
 

calculates the preferred size for the given object

The size is calculated based on this layout manager's layout strategy and the content's preferred sizes. Note, hovever, that this function does not check for the presence of a border around obj.

Parameters:
obj the target of the operation
Returns:
the optimal size for obj

Implemented in ONE::gui::AlignedLayout, ONE::gui::DeckLayout, ONE::gui::GridLayout, ONE::gui::StackLayout, ONE::gui::ViewportLayout, and ONE::gui::WindowLayout.

virtual void ONE::gui::LayoutManager::remove Component comp  )  [pure virtual]
 

removes a component

Parameters:
comp the component

Implemented in ONE::gui::AlignedLayout, ONE::gui::DeckLayout, ONE::gui::GridLayout, ONE::gui::StackLayout, ONE::gui::ViewportLayout, and ONE::gui::WindowLayout.


Generated on Wed Sep 7 19:03:18 2005 for ONEngine by  doxygen 1.4.3