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

CEGUI::PropertyDefinition Class Reference

class representing a new property to be available on all widgets that use the WidgetLook that this PropertyDefinition is defiend for. More...

#include <CEGUIFalPropertyDefinition.h>

Inheritance diagram for CEGUI::PropertyDefinition:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PropertyDefinition (const String &name, const String &initialValue, bool redrawOnWrite, bool layoutOnWrite)
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.
void writeXMLToStream (OutStream &out_stream) const
 Writes an xml representation of this PropertyDefinition to out_stream.
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 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.
void writeXMLToStream (const PropertyReceiver *receiver, OutStream &out_stream) const
 Writes out an XML representation of this class to the given stream.

Protected Attributes

String d_userStringName
bool d_writeCausesRedraw
bool d_writeCausesLayout
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

class representing a new property to be available on all widgets that use the WidgetLook that this PropertyDefinition is defiend for.

Definition at line 37 of file CEGUIFalPropertyDefinition.h.


Constructor & Destructor Documentation

CEGUI::PropertyDefinition::PropertyDefinition const String name,
const String initialValue,
bool  redrawOnWrite,
bool  layoutOnWrite
 

Definition at line 31 of file CEGUIFalPropertyDefinition.cpp.


Member Function Documentation

String CEGUI::PropertyDefinition::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.

Definition at line 40 of file CEGUIFalPropertyDefinition.cpp.

References d_userStringName.

String CEGUI::Property::getDefault const PropertyReceiver receiver  )  const [virtual, inherited]
 

Returns the default value of the Property as a String.

Parameters:
receiver Pointer to the target object.
Returns:
String object containing a textual representation of the default value for this property.

Reimplemented in CEGUI::WindowProperties::AbsoluteMaxSize, CEGUI::TabControlProperties::TabHeight, CEGUI::TabControlProperties::AbsoluteTabHeight, CEGUI::TabControlProperties::TabTextPadding, and CEGUI::TabControlProperties::RelativeTabTextPadding.

Definition at line 43 of file CEGUIProperty.cpp.

References CEGUI::Property::d_default.

const String& CEGUI::Property::getHelp void   )  const [inline, inherited]
 

Return a String that describes the purpose and usage of this Property.

Returns:
String that contains the help text

Definition at line 100 of file CEGUIProperty.h.

const String& CEGUI::Property::getName void   )  const [inline, inherited]
 

Return a the name of this Property.

Returns:
String containing the name of the Property

Definition at line 110 of file CEGUIProperty.h.

Referenced by CEGUI::PropertySet::addProperty(), CEGUI::Falagard_xmlHandler::elementStart(), and CEGUI::MultiColumnListProperties::RowCount::set().

bool CEGUI::Property::isDefault const PropertyReceiver receiver  )  const [virtual, inherited]
 

Returns whether the property is at it's default value.

Parameters:
receiver Pointer to the target object.
Returns:
  • true if the property has it's default value.
  • false if the property has been modified from it's default value.

Reimplemented in CEGUI::WindowProperties::AbsoluteMaxSize, CEGUI::WindowProperties::Font, CEGUI::WindowProperties::MouseCursorImage, CEGUI::WindowProperties::Disabled, CEGUI::WindowProperties::Visible, CEGUI::TabControlProperties::TabHeight, CEGUI::TabControlProperties::AbsoluteTabHeight, CEGUI::TabControlProperties::TabTextPadding, and CEGUI::TabControlProperties::RelativeTabTextPadding.

Definition at line 35 of file CEGUIProperty.cpp.

References CEGUI::Property::d_default, and CEGUI::Property::get().

void CEGUI::PropertyDefinition::set PropertyReceiver receiver,
const String value
[virtual]
 

Sets the value of the property.

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.

Implements CEGUI::Property.

Definition at line 45 of file CEGUIFalPropertyDefinition.cpp.

References d_userStringName, d_writeCausesLayout, and d_writeCausesRedraw.

void CEGUI::Property::writeXMLToStream const PropertyReceiver receiver,
OutStream out_stream
const [inherited]
 

Writes out an XML representation of this class to the given stream.

Note:
This would normally have been implemented via XMLGenerator base class, but in this case we require the target PropertyReceiver in order to obtain the property value.

Definition at line 48 of file CEGUIProperty.cpp.

References CEGUI::String::c_str(), CEGUI::Property::d_name, CEGUI::Property::d_writeXML, and CEGUI::Property::get().

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

Writes an xml representation of this PropertyDefinition to out_stream.

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

Definition at line 56 of file CEGUIFalPropertyDefinition.cpp.

References CEGUI::Property::d_default, CEGUI::Property::d_name, d_writeCausesLayout, d_writeCausesRedraw, and CEGUI::String::empty().


Member Data Documentation

String CEGUI::Property::d_default [protected, inherited]
 

String that stores the Property default value string.

Definition at line 184 of file CEGUIProperty.h.

Referenced by CEGUI::Property::getDefault(), CEGUI::Property::isDefault(), and writeXMLToStream().

String CEGUI::Property::d_help [protected, inherited]
 

String that stores the Property help text.

Definition at line 183 of file CEGUIProperty.h.

String CEGUI::Property::d_name [protected, inherited]
 

String that stores the Property name.

Definition at line 182 of file CEGUIProperty.h.

Referenced by CEGUI::Property::writeXMLToStream(), and writeXMLToStream().

String CEGUI::PropertyDefinition::d_userStringName [protected]
 

Definition at line 59 of file CEGUIFalPropertyDefinition.h.

Referenced by get(), and set().

bool CEGUI::PropertyDefinition::d_writeCausesLayout [protected]
 

Definition at line 61 of file CEGUIFalPropertyDefinition.h.

Referenced by set(), and writeXMLToStream().

bool CEGUI::PropertyDefinition::d_writeCausesRedraw [protected]
 

Definition at line 60 of file CEGUIFalPropertyDefinition.h.

Referenced by set(), and writeXMLToStream().

bool CEGUI::Property::d_writeXML [protected, inherited]
 

Specifies whether writeXMLToStream should do anything for this property.

Definition at line 185 of file CEGUIProperty.h.

Referenced by CEGUI::Property::writeXMLToStream().


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