Crazy Eddies GUI System  0.7.7
Public Member Functions | Protected Member Functions | Protected Attributes
CEGUI::PropertyDefinitionBase Class Reference

common base class used for types representing a new property to be available on all widgets that use the WidgetLook that the property definition is a part of. More...

+ Inheritance diagram for CEGUI::PropertyDefinitionBase:
+ Collaboration diagram for CEGUI::PropertyDefinitionBase:

List of all members.

Public Member Functions

 PropertyDefinitionBase (const String &name, const String &help, const String &initialValue, bool redrawOnWrite, bool layoutOnWrite)
void set (PropertyReceiver *receiver, const String &value)
 Sets the value of the property.
virtual void writeXMLToStream (XMLSerializer &xml_stream) const
 Writes an xml representation of the PropertyDefinitionBase based object to out_stream.
- Public Member Functions inherited from CEGUI::Property
 Property (const String &name, const String &help, const String &defaultValue="", bool writesXML=true)
 Creates a new Property object.
virtual ~Property (void)
 Destructor for Property objects.
const StringgetHelp (void) const
 Return a String that describes the purpose and usage of this Property.
const StringgetName (void) const
 Return a the name of this Property.
virtual String get (const PropertyReceiver *receiver) const =0
 Return the current value of the Property as a String.
virtual bool isDefault (const PropertyReceiver *receiver) const
 Returns whether the property is at it's default value.
virtual String getDefault (const PropertyReceiver *receiver) const
 Returns the default value of the Property as a String.
virtual void writeXMLToStream (const PropertyReceiver *receiver, XMLSerializer &xml_stream) const
 Writes out an XML representation of this class to the given stream.
virtual void initialisePropertyReceiver (PropertyReceiver *receiver) const
 function to allow initialisation of a PropertyReceiver.

Protected Member Functions

virtual void writeXMLElementType (XMLSerializer &xml_stream) const =0
 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.
virtual 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.

Protected Attributes

bool d_writeCausesRedraw
bool d_writeCausesLayout
- Protected Attributes inherited from CEGUI::Property
String d_name
 String that stores the Property name.
String d_help
 String that stores the Property help text.
String d_default
 String that stores the Property default value string.
bool d_writeXML
 Specifies whether writeXMLToStream should do anything for this property.

Detailed Description

common base class used for types representing a new property to be available on all widgets that use the WidgetLook that the property definition is a part of.


Member Function Documentation

void CEGUI::PropertyDefinitionBase::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:
receiverPointer to the target object.
valueA String object that contains a textual representation of the new value to assign to the Property.
Returns:
Nothing.
Exceptions:
InvalidRequestExceptionThrown when the Property was unable to interpret the content of value.

Implements CEGUI::Property.

Reimplemented in CEGUI::PropertyLinkDefinition, and CEGUI::PropertyDefinition.

virtual void CEGUI::PropertyDefinitionBase::writeXMLAttributes ( XMLSerializer xml_stream) const
protectedvirtual

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_streamStream where xml data should be output.

Reimplemented in CEGUI::PropertyLinkDefinition.

virtual void CEGUI::PropertyDefinitionBase::writeXMLElementType ( XMLSerializer xml_stream) const
protectedpure 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_streamStream where xml data should be output.

Implemented in CEGUI::PropertyLinkDefinition, and CEGUI::PropertyDefinition.

virtual void CEGUI::PropertyDefinitionBase::writeXMLToStream ( XMLSerializer xml_stream) const
virtual

Writes an xml representation of the PropertyDefinitionBase based object to out_stream.

Parameters:
xml_streamStream where xml data should be output.
Returns:
Nothing.