![]() |
Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
|
This setting interface allows GUI objects to call setting function functions without having to know the setting type. More...
#include <CGUISetting.h>


Public Member Functions | |
| NONCOPYABLE (IGUISetting) | |
| IGUISetting (const CStr &name, IGUIObject *owner) | |
| bool | FromString (const CStrW &value, const bool sendMessage) |
| Parses the given string and assigns to the setting value. More... | |
| bool | FromJSVal (const ScriptRequest &rq, JS::HandleValue value, const bool sendMessage) |
| Parses the given JS::Value using Script::FromJSVal and assigns it to the setting data. More... | |
| virtual void | ToJSVal (const ScriptRequest &rq, JS::MutableHandleValue value)=0 |
| Converts the setting data to a JS::Value using Script::ToJSVal. More... | |
Protected Member Functions | |
| IGUISetting (IGUISetting &&other) | |
| IGUISetting & | operator= (IGUISetting &&other)=delete |
| virtual | ~IGUISetting ()=default |
| virtual bool | DoFromString (const CStrW &value)=0 |
| virtual bool | DoFromJSVal (const ScriptRequest &rq, JS::HandleValue value)=0 |
| virtual void | OnSettingChange (const CStr &setting, bool sendMessage) |
| Triggers the IGUIObject logic when a setting changes. More... | |
| const CStr & | GetName () const |
| Return the name of the setting, from JS. More... | |
Protected Attributes | |
| IGUIObject & | m_Object |
| The object that stores this setting. More... | |
Private Attributes | |
| CStr | m_Name |
This setting interface allows GUI objects to call setting function functions without having to know the setting type.
This is fact is used for setting the value from a JS value or XML value (string) and when deleting the setting, when the type of the setting value is not known in advance.
| IGUISetting::IGUISetting | ( | const CStr & | name, |
| IGUIObject * | owner | ||
| ) |
|
protected |
|
protectedvirtualdefault |
|
protectedpure virtual |
Implemented in CGUISimpleSetting< T >, CGUISimpleSetting< CStr >, CGUISimpleSetting< float >, CGUISimpleSetting< CGUIString >, CGUISimpleSetting< CStrW >, CGUISimpleSetting< CGUISpriteInstance >, CGUISimpleSetting< CGUIColor >, CGUISimpleSetting< CGUIList >, CGUISimpleSetting< CGUISeries >, CGUISimpleSetting< bool >, CGUISimpleSetting< u32 >, CGUISimpleSetting< i32 >, CGUISimpleSetting< CVector2D >, CGUISimpleSetting< EVAlign >, CGUISimpleSetting< CGUISize >, CGUISimpleSetting< EAlign >, CGUIHotkey, and CGUIMouseEventMask.
|
protectedpure virtual |
Implemented in CGUISimpleSetting< T >, CGUISimpleSetting< CStr >, CGUISimpleSetting< float >, CGUISimpleSetting< CGUIString >, CGUISimpleSetting< CStrW >, CGUISimpleSetting< CGUISpriteInstance >, CGUISimpleSetting< CGUIColor >, CGUISimpleSetting< CGUIList >, CGUISimpleSetting< CGUISeries >, CGUISimpleSetting< bool >, CGUISimpleSetting< u32 >, CGUISimpleSetting< i32 >, CGUISimpleSetting< CVector2D >, CGUISimpleSetting< EVAlign >, CGUISimpleSetting< CGUISize >, CGUISimpleSetting< EAlign >, CGUIHotkey, and CGUIMouseEventMask.
| bool IGUISetting::FromJSVal | ( | const ScriptRequest & | rq, |
| JS::HandleValue | value, | ||
| const bool | sendMessage | ||
| ) |
Parses the given JS::Value using Script::FromJSVal and assigns it to the setting data.
Parses the given JS::Value using ScriptInterface::FromJSVal and assigns it to the setting data.
| bool IGUISetting::FromString | ( | const CStrW & | value, |
| const bool | sendMessage | ||
| ) |
Parses the given string and assigns to the setting value.
Used for parsing XML attributes.
|
inlineprotected |
Return the name of the setting, from JS.
| IGUISetting::NONCOPYABLE | ( | IGUISetting | ) |
|
protectedvirtual |
Triggers the IGUIObject logic when a setting changes.
This should be called by derived classes when something externally visible changes, unless overloaded to provide similar behaviour.
Reimplemented in CGUIHotkey.
|
protecteddelete |
|
pure virtual |
Converts the setting data to a JS::Value using Script::ToJSVal.
Implemented in CGUISimpleSetting< T >, CGUISimpleSetting< CStr >, CGUISimpleSetting< float >, CGUISimpleSetting< CGUIString >, CGUISimpleSetting< CStrW >, CGUISimpleSetting< CGUISpriteInstance >, CGUISimpleSetting< CGUIColor >, CGUISimpleSetting< CGUIList >, CGUISimpleSetting< CGUISeries >, CGUISimpleSetting< bool >, CGUISimpleSetting< u32 >, CGUISimpleSetting< i32 >, CGUISimpleSetting< CVector2D >, CGUISimpleSetting< EVAlign >, CGUISimpleSetting< CGUISize >, CGUISimpleSetting< EAlign >, and CGUIMouseEventMask.
|
private |
|
protected |
The object that stores this setting.