Crazy Eddies GUI System: CEGUI::PropertyLinkDefinition Class Reference

Crazy Eddies GUI System 0.7.6

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

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

Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
CEGUI::PropertyLinkDefinition Class Reference

Class representing a property that links to another property defined on an attached child widget. More...

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

List of all members.

## Classes
struct | LinkTarget
| Internal struct used to keep track of targets. More...
## Public Member Functions
| PropertyLinkDefinition (const String &propertyName, const String &widgetNameSuffix, const String &targetProperty, const String &initialValue, bool redrawOnWrite, bool layoutOnWrite)
void | addLinkTarget (const String &widget, const String &property)
| add a new link target to property on widget (name suffix).
void | clearLinkTargets ()
| clear all link targets from this link definition.
String | get (const PropertyReceiver *receiver) const
| Return the current value of the Property as a String.
void | set (PropertyReceiver *receiver, const String &value)
| Sets the value of the property.
## Protected Types
typedef std::vector< LinkTarget > | LinkTargetCollection
| type used for the collection of targets.
## Protected Member Functions
void | writeXMLElementType (XMLSerializer &xml_stream) const
| Write out the text of the XML element type. Note that you should not write the opening '<' character, nor any other information such as attributes in this function. The writeExtraAttributes function can be used for writing attributes.
void | writeXMLAttributes (XMLSerializer &xml_stream) const
| Write out any xml attributes added in a sub-class. Note that you should not write the closing '/>' character sequence, nor any other information in this function. You should always call the base class implementation of this function when overriding.
const Window * | getTargetWindow (const PropertyReceiver *receiver) const
| return a pointer to the window containing the target property to be accessed.
Window * | getTargetWindow (PropertyReceiver *receiver)
const Window * | getTargetWindow (const PropertyReceiver *receiver, const String &name_suffix) const
| Return a pointer to the target window with the given suffix.
Window * | getTargetWindow (PropertyReceiver *receiver, const String &name_suffix)
| Return a pointer to the target window with the given suffix.
## Protected Attributes
LinkTargetCollection | d_targets
| collection of targets for this PropertyLinkDefinition.

## Detailed Description

Class representing a property that links to another property defined on an attached child widget.

## Member Function Documentation

String CEGUI::PropertyLinkDefinition::get | ( | const PropertyReceiver * | receiver | ) | const`[virtual]`

Return the current value of the Property as a String.

Parameters:

  receiver | Pointer to the target object.

Returns:
  String object containing a textual representation of the current value of the Property

Implements CEGUI::Property.

Window* CEGUI::PropertyLinkDefinition::getTargetWindow | ( | PropertyReceiver * | receiver | ) | `[protected]`

Deprecated:
  This will be removed in 0.8.x. Use the version taking a suffix string instead!

const Window* CEGUI::PropertyLinkDefinition::getTargetWindow | ( | const PropertyReceiver * | receiver | ) | const`[protected]`

return a pointer to the window containing the target property to be accessed.

Exceptions:

  UnknownObjectException | thrown if no such target window exists within the system.

Deprecated:
  This will be removed in 0.8.x. Use the version taking a suffix string instead!

void CEGUI::PropertyLinkDefinition::set | ( | PropertyReceiver * | receiver,
|  | const String & | value
| ) |  | `[virtual]`

Sets the value of the property.

Note:
  When overriding the set() member of PropertyDefinitionBase, you MUST call the base class implementation after you have set the property value (i.e. you must call PropertyDefinitionBase::set()).

Parameters:

  receiver | Pointer to the target object.
  value | A String object that contains a textual representation of the new value to assign to the Property.

Returns:
  Nothing.

Exceptions:

  InvalidRequestException | Thrown when the Property was unable to interpret the content of value.

Reimplemented from CEGUI::PropertyDefinitionBase.

void CEGUI::PropertyLinkDefinition::writeXMLAttributes | ( | XMLSerializer & | xml_stream | ) | const`[protected, virtual]`

Write out any xml attributes added in a sub-class. Note that you should not write the closing '/>' character sequence, nor any other information in this function. You should always call the base class implementation of this function when overriding.

Parameters:

  xml_stream | Stream where xml data should be output.

Reimplemented from CEGUI::PropertyDefinitionBase.

void CEGUI::PropertyLinkDefinition::writeXMLElementType | ( | XMLSerializer & | xml_stream | ) | const`[protected, virtual]`

Write out the text of the XML element type. Note that you should not write the opening '<' character, nor any other information such as attributes in this function. The writeExtraAttributes function can be used for writing attributes.

Parameters:

  xml_stream | Stream where xml data should be output.

Implements CEGUI::PropertyDefinitionBase.