28 #ifndef _CEGUIFalPropertyDefinition_h_
29 #define _CEGUIFalPropertyDefinition_h_
31 #include "CEGUI/falagard/FalagardPropertyBase.h"
32 #include "CEGUI/Logger.h"
45 bool redrawOnWrite,
bool layoutOnWrite,
48 redrawOnWrite, layoutOnWrite,
49 fireEvent, eventNamespace),
50 d_userStringName(name +
"_fal_auto_prop__")
60 setWindowUserString(static_cast<Window*>(receiver), this->
d_default);
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, TypedProperty<T>::d_default);
100 return Helper::fromString(TypedProperty<T>::d_default);
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);
120 xml_stream.
openTag(
"PropertyDefinition");