Crazy Eddie's GUI System  0.8.4
CEGUI::ScrolledContainer Class Reference

Helper container window class which is used in the implementation of the ScrollablePane widget class. More...

+ Inheritance diagram for CEGUI::ScrolledContainer:
+ Collaboration diagram for CEGUI::ScrolledContainer:

List of all members.

Public Member Functions

 ScrolledContainer (const String &type, const String &name)
 Constructor for ScrolledContainer objects.
 ~ScrolledContainer (void)
 Destructor for ScrolledContainer objects.
bool isContentPaneAutoSized (void) const
 Return whether the content pane is auto sized.
void setContentPaneAutoSized (bool setting)
 Set whether the content pane should be auto-sized.
const RectfgetContentArea (void) const
 Return the current content pane area for the ScrolledContainer.
void setContentArea (const Rectf &area)
 Set the current content pane area for the ScrolledContainer.
Rectf getChildExtentsArea (void) const
 Return the current extents of the attached content.
virtual const CachedRectf & getClientChildContentArea () const
 Return a Rect that is used by client child elements as content area.
virtual const CachedRectf & getNonClientChildContentArea () const
 Return a Rect that is used by client child elements as content area.
virtual void notifyScreenAreaChanged (bool recursive)
 Inform the window, and optionally all children, that screen area rectangles have changed.

Static Public Attributes

static const String WidgetTypeName
 Type name for ScrolledContainer.
static const String EventNamespace
 Namespace for global events.
static const String EventContentChanged
static const String EventAutoSizeSettingChanged

Protected Types

typedef std::multimap< Window
*, Event::Connection
ConnectionTracker
 type definition for collection used to track event connections.

Protected Member Functions

virtual Rectf getUnclippedInnerRect_impl (bool skipAllPixelAlignment) const
 Default implementation of function to return Element's inner rect area.
Rectf getClientChildContentArea_impl (bool skipAllPixelAlignment) const
virtual void onContentChanged (WindowEventArgs &e)
 Notification method called whenever the content size may have changed.
virtual void onAutoSizeSettingChanged (WindowEventArgs &e)
 Notification method called whenever the setting that controls whether the content pane is automatically sized is changed.
bool handleChildSized (const EventArgs &e)
 handles notifications about child windows being moved.
bool handleChildMoved (const EventArgs &e)
 handles notifications about child windows being sized.
void drawSelf (const RenderingContext &)
 Perform the actual rendering for this Window.
Rectf getInnerRectClipper_impl () const
 Default implementation of function to return Window inner clipper area.
void setArea_impl (const UVector2 &pos, const USize &size, bool topLeftSizing=false, bool fireEvents=true)
Rectf getHitTestRect_impl () const
 Default implementation of function to return Window hit-test area.
void onChildAdded (ElementEventArgs &e)
 Handler called when a child window is added to this window.
void onChildRemoved (ElementEventArgs &e)
 Handler called when a child window is removed from this window.
void onParentSized (ElementEventArgs &e)
 Handler called when this window's parent window has been resized. If this window is the root / GUI Sheet window, this call will be made when the display size changes.

Protected Attributes

ConnectionTracker d_eventConnections
 Tracks event connections we make.
Rectf d_contentArea
 Holds extents of the content pane.
bool d_autosizePane
 true if the pane auto-sizes itself.
CachedRectf d_clientChildContentArea

Detailed Description

Helper container window class which is used in the implementation of the ScrollablePane widget class.


Member Function Documentation

void CEGUI::ScrolledContainer::drawSelf ( const RenderingContext ctx) [inline, protected, virtual]

Perform the actual rendering for this Window.

Parameters:
ctxRenderingContext holding the details of the RenderingSurface to be used for the Window rendering operations.
Returns:
Nothing

Reimplemented from CEGUI::Window.

Return the current extents of the attached content.

Returns:
Rect object that describes the pixel extents of the attached child windows. This is effectively the smallest bounding box that could contain all the attached windows.
virtual const CachedRectf& CEGUI::ScrolledContainer::getClientChildContentArea ( ) const [virtual]

Return a Rect that is used by client child elements as content area.

Client content area is used for relative sizing, positioning and clipping of child elements that are client (their NonClient property is "false").

See also:
Element::getChildContentArea

Reimplemented from CEGUI::Element.

Return the current content pane area for the ScrolledContainer.

Returns:
Rect object that details the current pixel extents of the content pane represented by this ScrolledContainer.
virtual const CachedRectf& CEGUI::ScrolledContainer::getNonClientChildContentArea ( ) const [virtual]

Return a Rect that is used by client child elements as content area.

Client content area is used for relative sizing, positioning and clipping of child elements that are non-client (their NonClient property is "true").

See also:
Element::getChildContentArea

Reimplemented from CEGUI::Element.

Return whether the content pane is auto sized.

Returns:
  • true to indicate the content pane will automatically resize itself.
  • false to indicate the content pane will not automatically resize itself.
virtual void CEGUI::ScrolledContainer::notifyScreenAreaChanged ( bool  recursive) [virtual]

Inform the window, and optionally all children, that screen area rectangles have changed.

Parameters:
recursive
  • true to recursively call notifyScreenAreaChanged on attached child Window objects.
  • false to just process this Window.

Reimplemented from CEGUI::Window.

virtual void CEGUI::ScrolledContainer::onAutoSizeSettingChanged ( WindowEventArgs e) [protected, virtual]

Notification method called whenever the setting that controls whether the content pane is automatically sized is changed.

Parameters:
eWindowEventArgs object.
Returns:
Nothing.
void CEGUI::ScrolledContainer::onChildAdded ( ElementEventArgs e) [protected, virtual]

Handler called when a child window is added to this window.

Parameters:
eWindowEventArgs object whose 'window' pointer field is set to the window that has been added.

Reimplemented from CEGUI::Window.

void CEGUI::ScrolledContainer::onChildRemoved ( ElementEventArgs e) [protected, virtual]

Handler called when a child window is removed from this window.

Parameters:
eWindowEventArgs object whose 'window' pointer field is set the window that has been removed.

Reimplemented from CEGUI::Window.

virtual void CEGUI::ScrolledContainer::onContentChanged ( WindowEventArgs e) [protected, virtual]

Notification method called whenever the content size may have changed.

Parameters:
eWindowEventArgs object.
Returns:
Nothing.
void CEGUI::ScrolledContainer::onParentSized ( ElementEventArgs e) [protected, virtual]

Handler called when this window's parent window has been resized. If this window is the root / GUI Sheet window, this call will be made when the display size changes.

Parameters:
eWindowEventArgs object whose 'window' pointer field is set the the window that caused the event; this is typically either this window's parent window, or NULL to indicate the screen size has changed.

Reimplemented from CEGUI::Window.

void CEGUI::ScrolledContainer::setArea_impl ( const UVector2 pos,
const USize size,
bool  topLeftSizing = false,
bool  fireEvents = true 
) [protected, virtual]

Implementation method to modify element area while correctly applying min / max size processing, and firing any appropriate events.

Note:
This is the implementation function for setting size and position. In order to simplify area management, from this point on, all modifications to element size and position (area rect) should come through here.
Parameters:
posUVector2 object describing the new area position.
sizeUSize object describing the new area size.
topLeftSizing
  • true to indicate the the operation is a sizing operation on the top and/or left edges of the area, and so element movement should be inhibited if size is at max or min.
  • false to indicate the operation is not a strict sizing operation on the top and/or left edges and that the element position may change as required
fireEvents
  • true if events should be fired as normal.
  • false to inhibit firing of events (required, for example, if you need to call this from the onSize/onMove handlers).

Reimplemented from CEGUI::Window.

Set the current content pane area for the ScrolledContainer.

Note:
If the ScrolledContainer is configured to auto-size the content pane this call will have no effect.
Parameters:
areaRect object that details the pixel extents to use for the content pane represented by this ScrolledContainer.
Returns:
Nothing.

Set whether the content pane should be auto-sized.

Parameters:
setting
  • true to indicate the content pane should automatically resize itself.
  • false to indicate the content pane should not automatically resize itself.
Returns:
Nothing.

Member Data Documentation

Event fired when the autosize setting changes. Handlers are passed a const WindowEventArgs reference with WindowEventArgs::window set to the ScrolledContainer whose auto size setting has been changed.

Event fired whenever some child changes. Handlers are passed a const WindowEventArgs reference with WindowEventArgs::window set to the ScrolledContainer for which a child window has changed.

 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends