Pyrogenesis
trunk
|
Dummy object used primarily for the root object or objects of type 'empty'. More...
#include <IGUIObject.h>
Public Member Functions | |
virtual void | Draw () |
Draws the object. More... | |
virtual bool | MouseOver () |
Checks if mouse is hovering this object. More... | |
Public Member Functions inherited from IGUIObject | |
IGUIObject () | |
virtual | ~IGUIObject () |
virtual bool | MouseOverIcon () |
Test if mouse position is over an icon. More... | |
const CStr & | GetName () const |
Get object name, name is unique. More... | |
void | SetName (const CStr &Name) |
Get object name. More... | |
CStr | GetPresentableName () const |
void | AddToPointersMap (map_pObjects &ObjectMap) |
Adds object and its children to the map, it's name being the first part, and the second being itself. More... | |
void | AddChild (IGUIObject *pChild) |
Notice nothing will be returned or thrown if the child hasn't been inputted into the GUI yet. More... | |
vector_pObjects::iterator | begin () |
vector_pObjects::iterator | end () |
bool | SettingExists (const CStr &Setting) const |
Checks if settings exists, only available for derived classes that has this set up, that's why the base class just returns false. More... | |
virtual void | UpdateCachedSize () |
All sizes are relative to resolution, and the calculation is not wanted in real time, therefore it is cached, update the cached size with this function. More... | |
PSRETURN | SetSetting (const CStr &Setting, const CStrW &Value, const bool &SkipMessage=false) |
Set a setting by string, regardless of what type it is. More... | |
PSRETURN | GetSettingType (const CStr &Setting, EGUISettingType &Type) const |
Retrieves the type of a named setting. More... | |
void | RegisterScriptHandler (const CStr &Action, const CStr &Code, CGUI *pGUI) |
Set the script handler for a particular object-specific action. More... | |
JSObject * | GetJSObject () |
Retrieves the JSObject representing this GUI object. More... | |
virtual void | HandleMessage (SGUIMessage &Message) |
This function is called with different messages for instance when the mouse enters the object. More... | |
CGUI * | GetGUI () |
const CGUI * | GetGUI () const |
void | SetFocus () |
Take focus! More... | |
Additional Inherited Members | |
Public Attributes inherited from IGUIObject | |
std::map< CStr, SGUISetting > | m_Settings |
Settings pool, all an object's settings are located here If a derived object has got more settings that the base settings, it's because they have a new version of the function SetupSettings(). More... | |
Protected Member Functions inherited from IGUIObject | |
void | AddSetting (const EGUISettingType &Type, const CStr &Name) |
Add a setting to m_Settings. More... | |
virtual void | Destroy () |
Calls Destroy on all children, and deallocates all memory. More... | |
virtual InReaction | ManuallyHandleEvent (const SDL_Event_ *ev) |
Some objects need to handle the SDL_Event_ manually. More... | |
void | LoadStyle (CGUI &GUIinstance, const CStr &StyleName) |
Loads a style. More... | |
void | LoadStyle (const SGUIStyle &Style) |
Loads a style. More... | |
virtual float | GetBufferedZ () const |
Returns not the Z value, but the actual buffered Z value, i.e. More... | |
void | SetGUI (CGUI *const &pGUI) |
void | SetParent (IGUIObject *pParent) |
Set parent of this object. More... | |
virtual void | ResetStates () |
Reset internal state of this object. More... | |
bool | IsFocused () const |
Check if object is focused. More... | |
IGUIObject * | GetParent () const |
NOTE! This will not just return m_pParent, when that is need use it! There is one exception to it, when the parent is the top-node (the object that isn't a real object), this will return NULL, so that the top-node's children are seemingly parentless. More... | |
CPos | GetMousePos () const |
Get Mouse from CGUI. More... | |
virtual bool | HandleAdditionalChildren (const XMBElement &child, CXeromyces *pFile) |
Handle additional children to the <object>-tag. More... | |
InReaction | SendEvent (EGUIMessageType type, const CStr &EventName) |
Send event to this GUI object (HandleMessage and ScriptEvent) More... | |
void | ScriptEvent (const CStr &Action) |
Execute the script for a particular action. More... | |
void | ScriptEvent (const CStr &Action, JS::HandleValue Argument) |
Execute the script for a particular action. More... | |
void | SetScriptHandler (const CStr &Action, JS::HandleObject Function) |
void | UpdateMouseOver (IGUIObject *const &pMouseOver) |
Inputes the object that is currently hovered, this function updates this object accordingly (i.e. More... | |
Protected Attributes inherited from IGUIObject | |
CRect | m_CachedActualSize |
Cached size, real size m_Size is actually dependent on resolution and can have different real outcomes, this is the real outcome cached to avoid slow calculations in real time. More... | |
CStr | m_Name |
vector_pObjects | m_Children |
IGUIObject * | m_pParent |
double | m_LastClickTime [6] |
bool | m_MouseHovering |
This is an array of true or false, each element is associated with a string representing a setting. More... | |
Dummy object used primarily for the root object or objects of type 'empty'.
|
inlinevirtual |
Draws the object.
PSERROR | if any. But this will mostlikely be very rare since if an object is drawn unsuccessfully it'll probably only output in the Error log, and not disrupt the whole GUI drawing. |
Implements IGUIObject.
|
inlinevirtual |
Checks if mouse is hovering this object.
The mouse position is cached in CGUI.
This function checks if the mouse is hovering the rectangle that the base setting "size" makes. Although it is virtual, so one could derive an object from CButton, which changes only this to checking the circle that "size" makes.
Reimplemented from IGUIObject.