ui::layout::PopupLayout Class Reference

Inheritance diagram for ui::layout::PopupLayout:

Inheritance graph
[legend]
List of all members.

Detailed Description

Special layout manager for popups that are owned by other Components (such as a Menu). This calculates the preferredSize for the Component based on it's children and sets it, regardless of the parents bounds. This way we can make maximal use of the Component hierarchy, without specific hacks (except this one :).


Public Member Functions

void layoutContainer (Container *parent)
void addLayoutComponent (Component *comp, int constraint)
void removeLayoutComponent (Component *comp)
const util::Dimension preferredLayoutSize (const Container *parent) const


Member Function Documentation

void ui::layout::PopupLayout::layoutContainer Container parent  )  [virtual]
 

Does the layout for the given Container. this is done by setting the Containers first child (which should be the Popup) to it's preferred size.

Parameters:
parent Container to be laid out.

Reimplemented from ui::layout::LayoutManager.

void ui::layout::PopupLayout::addLayoutComponent Component comp,
int  constraint
[virtual]
 

Not used.

Parameters:
comp Component to add to the LayoutManager.
constraint Constraint to use.

Reimplemented from ui::layout::LayoutManager.

void ui::layout::PopupLayout::removeLayoutComponent Component comp  )  [virtual]
 

Not used.

Parameters:
comp the Component to be removed from the LayoutManager.

Reimplemented from ui::layout::LayoutManager.

const util::Dimension ui::layout::PopupLayout::preferredLayoutSize const Container parent  )  const [virtual]
 

Returns the preferredSize of this Container. It returns the parents bounds, just as getPreferredSize would do if we have no layout. Simple, effective.

Parameters:
container Container to calculate and return the preferredSize from.
Returns:
The preferred size for the given Container.

Reimplemented from ui::layout::LayoutManager.


Generated on Mon Jun 20 19:42:02 2005 for UI by doxygen 1.3.1 using KingsTools