Crazy Eddies GUI System: CEGUI::LayoutContainer Class Reference

Crazy Eddies GUI System 0.7.6

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Attributes | Protected Types | Protected Member Functions | Protected Attributes
CEGUI::LayoutContainer Class Reference

An abstract base class providing common functionality and specifying the required interface for derived classes. More...

Inheritance diagram for CEGUI::LayoutContainer:
[legend]
Collaboration diagram for CEGUI::LayoutContainer:
[legend]

List of all members.

## Public Member Functions
| LayoutContainer (const String &type, const String &name)
| Constructor for Window base class.
virtual | ~LayoutContainer (void)
| Destructor for Window base class.
void | markNeedsLayouting ()
| marks this layout container for relayouting before drawing
bool | needsLayouting () const
| returns true if this layout container will be relayouted before drawing
virtual void | layout ()=0
| (re)layouts all windows inside this layout container immediately
virtual void | layoutIfNecessary ()
| (re)layouts all windows inside this layout container if it was marked necessary
virtual Rect | getUnclippedInnerRect_impl (void) const
virtual void | update (float elapsed)
## Static Public Attributes
static const String | EventNamespace
| Namespace for global events.
## Protected Types
typedef std::multimap< Window *, Event::Connection > | ConnectionTracker
## Protected Member Functions
virtual Rect | getClientChildWindowContentArea_impl () const
virtual bool | testClassName_impl (const String &class_name) const
size_t | getIdxOfChildWindow (Window *wnd) const
virtual void | addChild_impl (Window *wnd)
virtual void | removeChild_impl (Window *wnd)
virtual bool | handleChildSized (const EventArgs &e)
| Handler called when child window gets sized.
virtual bool | handleChildMarginChanged (const EventArgs &e)
| Handler called when child window changes margin(s)
virtual bool | handleChildAdded (const EventArgs &e)
| Handler called when child window gets added.
virtual bool | handleChildRemoved (const EventArgs &e)
| Handler called when child window gets removed.
virtual UVector2 | getOffsetForWindow (Window *window) const
| returns margin offset for given window
virtual UVector2 | getBoundingSizeForWindow (Window *window) const
| returns bounding size for window, including margins
## Protected Attributes
bool | d_needsLayouting
ConnectionTracker | d_eventConnections
| Tracks event connections we make.

## Detailed Description

An abstract base class providing common functionality and specifying the required interface for derived classes.

Layout Container provide means for automatic positioning based on sizes of it's child Windows. This is usefull for dynamic UIs.

## Constructor & Destructor Documentation

CEGUI::LayoutContainer::LayoutContainer | ( | const String & | type,
|  | const String & | name
| ) |  |

Constructor for Window base class.

Parameters:

  type | String object holding Window type (usually provided by WindowFactory).
  name | String object holding unique name for the Window.

## Member Function Documentation

virtual void CEGUI::LayoutContainer::addChild_impl | ( | Window * | wnd | ) | `[protected, virtual]`

Add given window to child list at an appropriate position.

Reimplemented from CEGUI::Window.

Reimplemented in CEGUI::GridLayoutContainer.

virtual Rect CEGUI::LayoutContainer::getClientChildWindowContentArea_impl | ( |  | ) | const`[protected, virtual]`

Default implementation of function to return client content area.

Reimplemented from CEGUI::Window.

virtual Rect CEGUI::LayoutContainer::getUnclippedInnerRect_impl | ( | void |  | ) | const`[virtual]`

Return a Rect object that describes, unclipped, the inner rectangle for this window. The inner rectangle is typically an area that excludes some frame or other rendering that should not be touched by subsequent rendering.

Returns:
  Rect object that describes, in unclipped screen pixel co-ordinates, the window object's inner rect area.

Note:
  This function is going to change from public visibility to pretected. All code accessing the area rects via external code should be using the regular getUnclippedInnerRect function.

Reimplemented from CEGUI::Window.

virtual bool CEGUI::LayoutContainer::handleChildAdded | ( | const EventArgs & | e | ) | `[protected, virtual]`

Handler called when child window gets added.

Parameters:

  e | WindowEventArgs object whose 'window' pointer field is set to the window that triggered the event. For this event the trigger window is the one that was added.

virtual bool CEGUI::LayoutContainer::handleChildMarginChanged | ( | const EventArgs & | e | ) | `[protected, virtual]`

Handler called when child window changes margin(s)

Parameters:

  e | WindowEventArgs object whose 'window' pointer field is set to the window that triggered the event. For this event the trigger window is the one that has had it's margin(s) changed.

virtual bool CEGUI::LayoutContainer::handleChildRemoved | ( | const EventArgs & | e | ) | `[protected, virtual]`

Handler called when child window gets removed.

Parameters:

  e | WindowEventArgs object whose 'window' pointer field is set to the window that triggered the event. For this event the trigger window is the one that was removed.

virtual bool CEGUI::LayoutContainer::handleChildSized | ( | const EventArgs & | e | ) | `[protected, virtual]`

Handler called when child window gets sized.

Parameters:

  e | WindowEventArgs object whose 'window' pointer field is set to the window that triggered the event. For this event the trigger window is the one that was sized.

virtual void CEGUI::LayoutContainer::removeChild_impl | ( | Window * | wnd | ) | `[protected, virtual]`

Remove given window from child list.

Reimplemented from CEGUI::Window.

Reimplemented in CEGUI::GridLayoutContainer.

virtual bool CEGUI::LayoutContainer::testClassName_impl | ( | const String & | class_name | ) | const`[inline, protected, virtual]`

Return whether this window was inherited from the given class name at some point in the inheritance hierarchy.

Parameters:

  class_name | The class name that is to be checked.

Returns:
  true if this window was inherited from class_name. false if not.

Reimplemented from CEGUI::Window.

Reimplemented in CEGUI::GridLayoutContainer, CEGUI::HorizontalLayoutContainer, CEGUI::SequentialLayoutContainer, and CEGUI::VerticalLayoutContainer.

References CEGUI::Window::testClassName_impl().

Referenced by CEGUI::VerticalLayoutContainer::testClassName_impl(), CEGUI::SequentialLayoutContainer::testClassName_impl(), CEGUI::HorizontalLayoutContainer::testClassName_impl(), and CEGUI::GridLayoutContainer::testClassName_impl().

virtual void CEGUI::LayoutContainer::update | ( | float | elapsed | ) | `[virtual]`

Cause window to update itself and any attached children. Client code does not need to call this method; to ensure full, and proper updates, call the injectTimePulse methodname method provided by the System class.

Note:
  The update order is such that 'this' window is updated prior to any child windows, this is so that child windows that access the parent in their update code get the correct updated state.

Parameters:

  elapsed | float value indicating the number of seconds passed since the last update.

Returns:
  Nothing.

Reimplemented from CEGUI::Window.