27 #ifndef _CEGUIFalPropertyDefinition_h_ 28 #define _CEGUIFalPropertyDefinition_h_ 30 #include "CEGUI/falagard/FalagardPropertyBase.h" 31 #include "CEGUI/falagard/XMLHandler.h" 32 #include "CEGUI/Logger.h" 45 bool redrawOnWrite,
bool layoutOnWrite,
48 redrawOnWrite, layoutOnWrite,
49 fireEvent, eventNamespace),
71 typename Helper::safe_method_return_type
72 getNative_impl(
const PropertyReceiver* receiver)
const 74 const Window*
const wnd = static_cast<const Window*>(receiver);
85 return Helper::fromString(wnd->getUserString(d_userStringName));
87 CEGUI_CATCH (UnknownObjectException&)
89 Logger::getSingleton().logEvent(
90 "PropertyDefiniton::get: Defining new user string: " +
97 const_cast<Window*>(wnd)->
98 setUserString(d_userStringName, FalagardPropertyBase<T>::d_initialValue);
100 return Helper::fromString(FalagardPropertyBase<T>::d_initialValue);
105 void setNative_impl(PropertyReceiver* receiver,
typename Helper::pass_type value)
107 setWindowUserString(static_cast<Window*>(receiver), Helper::toString(value));
108 FalagardPropertyBase<T>::setNative_impl(receiver, value);
112 void setWindowUserString(Window* window,
const String& value)
const 114 window->setUserString(d_userStringName, value);
121 writeDefinitionXMLAdditionalAttributes(xml_stream);
124 void writeDefinitionXMLAdditionalAttributes(
XMLSerializer& xml_stream)
const 136 String d_userStringName;
static const String GenericDataType
Default or unspecified value for the "dataType" attribute.
Definition: falagard/XMLHandler.h:89
static const String HelpStringAttribute
Attribute name that stores a help string.
Definition: falagard/XMLHandler.h:179
static const String TypeAttribute
Attribute name that stores a type string.
Definition: falagard/XMLHandler.h:152
XMLSerializer & openTag(const String &name)
Start a new tag in the xml document.
void initialisePropertyReceiver(PropertyReceiver *receiver) const
function to allow initialisation of a PropertyReceiver.
Definition: PropertyDefinition.h:58
Main namespace for Crazy Eddie's GUI Library.
Definition: arch_overview.dox:1
static const String PropertyDefinitionElement
Tag name for property definition elements.
Definition: falagard/XMLHandler.h:129
XMLSerializer & attribute(const String &name, const String &value)
After an opening tag you can populate attribute list with this function.
Definition: PropertyDefinition.h:37
static const String PropertyDefinitionHelpDefaultValue
Default value for the "type" attribute of PropertyDefinition elements.
Definition: falagard/XMLHandler.h:83
void writeDefinitionXMLElementType(XMLSerializer &xml_stream) const
Write out the text of the XML element type. Note that you should not write the opening '<' character,...
Definition: PropertyDefinition.h:118
Dummy base class to ensure correct casting of receivers.
Definition: Property.h:45
Helper class used to convert various data types to and from the format expected in Property strings.
Definition: ForwardRefs.h:84
static const String UserStringNameSuffix
The PropertyDefinition's user string name suffix, which is appended to each #d_userStringName.
Definition: PropertyDefinitionBase.h:84
An abstract class that defines the interface to access object properties by name.
Definition: Property.h:60
Definition: FalagardPropertyBase.h:36
Class used to create XML Document.
Definition: XMLSerializer.h:85
String class used within the GUI system.
Definition: String.h:62