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

CEGUI::ComponentArea Class Reference

Class that represents a target area for a widget or imagery component. More...

#include <CEGUIFalDimensions.h>

Collaboration diagram for CEGUI::ComponentArea:

Collaboration graph
[legend]
List of all members.

Public Member Functions

Rect getPixelRect (const Window &wnd) const
 Return a Rect describing the absolute pixel area represented by this ComponentArea.
Rect getPixelRect (const Window &wnd, const Rect &container) const
 Return a Rect describing the absolute pixel area represented by this ComponentArea.
void writeXMLToStream (OutStream &out_stream) const
 Writes an xml representation of this ComponentArea to out_stream.
bool isAreaFetchedFromProperty () const
 Return whether this ComponentArea fetches it's area via a property on the target window.
const StringgetAreaPropertySource () const
 Return the name of the property that will be used to determine the pixel area for this ComponentArea.
void setAreaPropertySource (const String &property)
 Set the name of the property that will be used to determine the pixel area for this ComponentArea.

Public Attributes

Dimension d_left
 Left edge of the area.
Dimension d_top
 Top edge of the area.
Dimension d_right_or_width
 Either the right edge or the width of the area.
Dimension d_bottom_or_height
 Either the bototm edge or the height of the area.

Detailed Description

Class that represents a target area for a widget or imagery component.

This is essentially a Rect built out of Dimension objects. Of note is that what would normally be the 'right' and 'bottom' edges may alternatively represent width and height depending upon what the assigned Dimension(s) represent.

Definition at line 589 of file CEGUIFalDimensions.h.


Member Function Documentation

const String & CEGUI::ComponentArea::getAreaPropertySource  )  const
 

Return the name of the property that will be used to determine the pixel area for this ComponentArea.

Returns:
String object holding the name of a Propery.

Definition at line 777 of file CEGUIFalDimensions.cpp.

Rect CEGUI::ComponentArea::getPixelRect const Window wnd,
const Rect container
const
 

Return a Rect describing the absolute pixel area represented by this ComponentArea.

Parameters:
wnd Window object to be used when calculating final pixel area.
container Rect object to be used as a base or container when converting relative dimensions.
Returns:
Rect object describing the pixels area represented by this ComponentArea when using wnd and container as a reference for calculating the final pixel dimensions.

Definition at line 717 of file CEGUIFalDimensions.cpp.

References CEGUI::URect::asAbsolute(), CEGUI::Rect::d_bottom, d_bottom_or_height, CEGUI::Rect::d_left, d_left, CEGUI::Rect::d_right, d_right_or_width, CEGUI::Rect::d_top, d_top, CEGUI::DT_BOTTOM_EDGE, CEGUI::DT_HEIGHT, CEGUI::DT_LEFT_EDGE, CEGUI::DT_RIGHT_EDGE, CEGUI::DT_TOP_EDGE, CEGUI::DT_WIDTH, CEGUI::DT_X_POSITION, CEGUI::DT_Y_POSITION, CEGUI::Window::getAbsoluteSize(), CEGUI::Dimension::getBaseDimension(), CEGUI::Dimension::getDimensionType(), CEGUI::PropertySet::getProperty(), CEGUI::BaseDim::getValue(), isAreaFetchedFromProperty(), CEGUI::Rect::setHeight(), CEGUI::Rect::setWidth(), and CEGUI::PropertyHelper::stringToURect().

Rect CEGUI::ComponentArea::getPixelRect const Window wnd  )  const
 

Return a Rect describing the absolute pixel area represented by this ComponentArea.

Parameters:
wnd Window object to be used when calculating final pixel area.
Returns:
Rect object describing the pixels area represented by this ComponentArea when using wnd as a reference for calculating the final pixel dimensions.

Definition at line 682 of file CEGUIFalDimensions.cpp.

References CEGUI::URect::asAbsolute(), CEGUI::Rect::d_bottom, d_bottom_or_height, CEGUI::Rect::d_left, d_left, CEGUI::Rect::d_right, d_right_or_width, CEGUI::Rect::d_top, d_top, CEGUI::DT_BOTTOM_EDGE, CEGUI::DT_HEIGHT, CEGUI::DT_LEFT_EDGE, CEGUI::DT_RIGHT_EDGE, CEGUI::DT_TOP_EDGE, CEGUI::DT_WIDTH, CEGUI::DT_X_POSITION, CEGUI::DT_Y_POSITION, CEGUI::Window::getAbsoluteSize(), CEGUI::Dimension::getBaseDimension(), CEGUI::Dimension::getDimensionType(), CEGUI::PropertySet::getProperty(), CEGUI::BaseDim::getValue(), isAreaFetchedFromProperty(), CEGUI::Rect::setHeight(), CEGUI::Rect::setWidth(), and CEGUI::PropertyHelper::stringToURect().

Referenced by CEGUI::WidgetComponent::layout(), and CEGUI::FalagardComponentBase::render().

bool CEGUI::ComponentArea::isAreaFetchedFromProperty  )  const
 

Return whether this ComponentArea fetches it's area via a property on the target window.

Returns:
  • true if the area comes via a Propery.
  • false if the area is defined explicitly via the Dimension fields.

Definition at line 772 of file CEGUIFalDimensions.cpp.

References CEGUI::String::empty().

Referenced by getPixelRect(), and writeXMLToStream().

void CEGUI::ComponentArea::setAreaPropertySource const String property  ) 
 

Set the name of the property that will be used to determine the pixel area for this ComponentArea.

Parameters:
property String object holding the name of a Propery. The property should access a URect type property.
Returns:
Nothing.

Definition at line 782 of file CEGUIFalDimensions.cpp.

Referenced by CEGUI::Falagard_xmlHandler::elementStart().

void CEGUI::ComponentArea::writeXMLToStream OutStream out_stream  )  const
 

Writes an xml representation of this ComponentArea to out_stream.

Parameters:
out_stream Stream where xml data should be output.
Returns:
Nothing.

Definition at line 752 of file CEGUIFalDimensions.cpp.

References d_bottom_or_height, d_left, d_right_or_width, d_top, isAreaFetchedFromProperty(), and CEGUI::Dimension::writeXMLToStream().

Referenced by CEGUI::WidgetComponent::writeXMLToStream(), CEGUI::TextComponent::writeXMLToStream(), CEGUI::NamedArea::writeXMLToStream(), CEGUI::ImageryComponent::writeXMLToStream(), and CEGUI::FrameComponent::writeXMLToStream().


Member Data Documentation

Dimension CEGUI::ComponentArea::d_bottom_or_height
 

Either the bototm edge or the height of the area.

Definition at line 668 of file CEGUIFalDimensions.h.

Referenced by getPixelRect(), and writeXMLToStream().

Dimension CEGUI::ComponentArea::d_left
 

Left edge of the area.

Definition at line 665 of file CEGUIFalDimensions.h.

Referenced by getPixelRect(), and writeXMLToStream().

Dimension CEGUI::ComponentArea::d_right_or_width
 

Either the right edge or the width of the area.

Definition at line 667 of file CEGUIFalDimensions.h.

Referenced by getPixelRect(), and writeXMLToStream().

Dimension CEGUI::ComponentArea::d_top
 

Top edge of the area.

Definition at line 666 of file CEGUIFalDimensions.h.

Referenced by getPixelRect(), and writeXMLToStream().


The documentation for this class was generated from the following files:
Generated on Wed Sep 7 10:10:04 2005 for Crazy Eddies GUI System by  doxygen 1.4.3