Crazy Eddies GUI System: CEGUI::ComponentArea 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 | Public Attributes
CEGUI::ComponentArea Class Reference

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

Collaboration diagram for CEGUI::ComponentArea:
[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 (XMLSerializer &xml_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 String & | getAreaPropertySource () 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.

## 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.

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.

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.

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.

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.

void CEGUI::ComponentArea::writeXMLToStream | ( | XMLSerializer & | xml_stream | ) | const

Writes an xml representation of this ComponentArea to out_stream.

Parameters:

  xml_stream | Stream where xml data should be output.

Returns:
  Nothing.