|
static PSRETURN | GetSettingPointer (const IGUIObject *pObject, const CStr &Setting, T *&Value) |
|
static PSRETURN | GetSetting (const IGUIObject *pObject, const CStr &Setting, T &Value) |
| Retrieves a setting by name from object pointer. More...
|
|
static PSRETURN | SetSetting (IGUIObject *pObject, const CStr &Setting, const T &Value, const bool &SkipMessage=false) |
| Sets a value by name using a real datatype as input. More...
|
|
static PSRETURN | GetSetting (const CGUI &GUIinstance, const CStr &Object, const CStr &Setting, T &Value) |
| Retrieves a setting by settings name and object name. More...
|
|
static PSRETURN | SetSetting (CGUI &GUIinstance, const CStr &Object, const CStr &Setting, const T &Value, const bool &SkipMessage=false) |
| Sets a value by setting and object name using a real datatype as input. More...
|
|
static const CGUISpriteInstance & | FallBackSprite (const CGUISpriteInstance &prim, const CGUISpriteInstance &sec) |
| This will return the value of the first sprite if it's not null, if it is null, it will return the value of the second sprite, if that one is null, then null it is. More...
|
|
static CColor | FallBackColor (const CColor &prim, const CColor &sec) |
| Same principle as FallBackSprite. More...
|
|
static bool | ParseString (const CStrW &Value, T &tOutput) |
| Sets a value by setting and object name using a real datatype as input. More...
|
|
static bool | ParseColor (const CStrW &Value, CColor &tOutput, float DefaultAlpha) |
|
|
static void | RecurseObject (int RR, IGUIObject *pObject, void_Object_pFunction_argT pFunc, const T &Argument) |
| If you want to call a IGUIObject-function on not just an object, but also on ALL of their children you want to use this recursion system. More...
|
|
static void | RecurseObject (int RR, IGUIObject *pObject, void_Object_pFunction_argRefT pFunc, T &Argument) |
| Argument is reference. More...
|
|
static void | RecurseObject (int RR, IGUIObject *pObject, void_Object_pFunction pFunc) |
| With no argument. More...
|
|
static bool | CheckIfRestricted (int RR, IGUIObject *pObject) |
| Checks restrictions for the iteration, for instance if you tell the recursor to avoid all hidden objects, it will, and this function checks a certain object's restriction values. More...
|
|
template<typename T = int>
class GUI< T >
Includes static functions that needs one template argument.
int is only to please functions that doesn't even use T and are only within this class because it's convenient
Definition at line 103 of file GUIutil.h.
template<typename T = int>
static bool GUI< T >::CheckIfRestricted |
( |
int |
RR, |
|
|
IGUIObject * |
pObject |
|
) |
| |
|
inlinestaticprivate |
Checks restrictions for the iteration, for instance if you tell the recursor to avoid all hidden objects, it will, and this function checks a certain object's restriction values.
- Parameters
-
RR | What kind of restriction, for instance hidden or disabled |
pObject | Object |
- Returns
- true if restricted
Definition at line 341 of file GUIutil.h.
template<typename T = int>
If you want to call a IGUIObject-function on not just an object, but also on ALL of their children you want to use this recursion system.
It recurses an object calling a function on itself and all children (and so forth).
Restrictions:
You can also set restrictions, so that if the recursion reaches an objects with certain setup, it just doesn't call the function on the object, nor it's children for that matter. i.e. it cuts that object off from the recursion tree. What setups that can cause restrictions are hardcoded and specific. Check out the defines GUIRR_* for all different setups.
Error reports are either logged or thrown out of RecurseObject. Always use it with try/catch!
- Parameters
-
RR | Recurse Restrictions, set to 0 if no restrictions |
pObject | Top object, this is where the iteration starts |
pFunc | Function to recurse |
Argument | Argument for pFunc of type T |
- Exceptions
-
PSERROR | Depends on what pFunc might throw. PSERROR is standard. Itself doesn't throw anything. |
Definition at line 274 of file GUIutil.h.