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:

Inheritance graph
[legend]
Collaboration diagram for CEGUI::ScrolledContainer:

Collaboration graph
[legend]

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 RectgetContentArea (void) const
 Return the current content pane area for the ScrolledContainer.
void setContentArea (const Rect &area)
 Set the current content pane area for the ScrolledContainer.
Rect getChildExtentsArea (void) const
 Return the current extents of the attached content.
Rect getUnclippedInnerRect_impl (void) const
 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.

Static Public Attributes

static const String WidgetTypeName
 Type name for ScrolledContainer.
static const String EventNamespace
 Namespace for global events.
static const String EventContentChanged
 Event fired whenever some child changes.
static const String EventAutoSizeSettingChanged
 Event fired when the autosize setting changes.

Protected Types

typedef std::multimap< Window
*, Event::Connection
ConnectionTracker

Protected Member Functions

virtual bool testClassName_impl (const String &class_name) const
 Return whether this window was inherited from the given class name at some point in the inheritance hierarchy.
void drawSelf (float z)
 Perform the actual rendering for this Window.
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)
 Method which receives notifications about child windows being moved.
bool handleChildMoved (const EventArgs &e)
 Method which receives notifications about child windows being sized.
void onChildAdded (WindowEventArgs &e)
 Handler called when a child window is added to this window.
void onChildRemoved (WindowEventArgs &e)
 Handler called when a child window is removed from this window.
void onParentSized (WindowEventArgs &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.
Rect d_contentArea
 Holds extents of the content pane.
bool d_autosizePane
 true if the pane auto-sizes itself.


Detailed Description

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

Member Function Documentation

void CEGUI::ScrolledContainer::drawSelf ( float  z  )  [inline, protected, virtual]

Perform the actual rendering for this Window.

Parameters:
z float value specifying the base Z co-ordinate that should be used when rendering
Returns:
Nothing

Reimplemented from CEGUI::Window.

Rect CEGUI::ScrolledContainer::getChildExtentsArea ( void   )  const

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.

References CEGUI::URect::asAbsolute(), CEGUI::Window::d_pixelSize, CEGUI::Window::getArea(), CEGUI::Window::getChildAtIdx(), and CEGUI::Window::getChildCount().

Referenced by onContentChanged().

const Rect & CEGUI::ScrolledContainer::getContentArea ( void   )  const

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.

References d_contentArea.

Referenced by CEGUI::ScrollablePane::getContentPaneArea().

Rect CEGUI::ScrolledContainer::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.

Reimplemented from CEGUI::Window.

References CEGUI::Window::d_parent, CEGUI::Renderer::getRect(), CEGUI::System::getRenderer(), CEGUI::System::getSingleton(), and CEGUI::Window::getUnclippedInnerRect_impl().

bool CEGUI::ScrolledContainer::isContentPaneAutoSized ( void   )  const

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.

References d_autosizePane.

Referenced by CEGUI::ScrollablePane::isContentPaneAutoSized().

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:
e WindowEventArgs object.
Returns:
Nothing.

References d_autosizePane, EventAutoSizeSettingChanged, EventNamespace, CEGUI::EventSet::fireEvent(), and onContentChanged().

Referenced by setContentPaneAutoSized().

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

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

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

Reimplemented from CEGUI::Window.

References d_eventConnections, CEGUI::Window::EventMoved, CEGUI::Window::EventSized, handleChildMoved(), handleChildSized(), onContentChanged(), CEGUI::EventSet::subscribeEvent(), and CEGUI::WindowEventArgs::window.

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

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

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

Reimplemented from CEGUI::Window.

References d_eventConnections, onContentChanged(), and CEGUI::WindowEventArgs::window.

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

Notification method called whenever the content size may have changed.

Parameters:
e WindowEventArgs object.
Returns:
Nothing.

References d_autosizePane, d_contentArea, EventContentChanged, EventNamespace, CEGUI::EventSet::fireEvent(), and getChildExtentsArea().

Referenced by handleChildMoved(), handleChildSized(), onAutoSizeSettingChanged(), onChildAdded(), onChildRemoved(), onParentSized(), and setContentArea().

void CEGUI::ScrolledContainer::onParentSized ( WindowEventArgs 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:
e WindowEventArgs 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.

References onContentChanged().

void CEGUI::ScrolledContainer::setContentArea ( const Rect area  ) 

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:
area Rect object that details the pixel extents to use for the content pane represented by this ScrolledContainer.
Returns:
Nothing.

References d_autosizePane, d_contentArea, and onContentChanged().

Referenced by CEGUI::ScrollablePane::setContentPaneArea().

void CEGUI::ScrolledContainer::setContentPaneAutoSized ( bool  setting  ) 

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.

References d_autosizePane, and onAutoSizeSettingChanged().

Referenced by CEGUI::ScrollablePane::setContentPaneAutoSized().

virtual bool CEGUI::ScrolledContainer::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.

References CEGUI::Window::testClassName_impl().


Generated on Thu Nov 27 20:34:38 2008 for Crazy Eddies GUI System by  doxygen 1.5.7.1