|
0 A.D. | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
CInternalCGUIAccessorBase | +--GUIin GUIutil.h
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
Inner Classes, Typedefs, and Enums | |
typedef |
GUI::arg
|
typedef |
GUI::void_Object_pFunction
|
Field Summary | |
static template PS_RESULT PS_RESULT |
GetSettingPointer
|
static PS_RESULT |
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 This is just a wrapper so that we can type the object name and not input the actual pointer. |
Method Summary | |
private 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. |
static CColor |
FallBackColor( const CColor& prim, const CColor& sec )
Same principle as FallBackSprite |
static CGUISpriteInstance& |
FallBackSprite( CGUISpriteInstance& prim, 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. |
static PS_RESULT |
GetSetting( const CGUI& GUIinstance, const CStr& Object, const CStr& Setting, T& Value )
Retrieves a setting by settings name and object name |
static PS_RESULT |
GetSetting( const IGUIObject* pObject, const CStr& Setting, T& Value )
Retrieves a setting by name from object pointer |
static PS_RESULT |
GetSettingPointer( const IGUIObject* pObject, const CStr& Setting, T*& Value )
|
static bool |
ParseColor( const CStr& Value, CColor& tOutput, float DefaultAlpha )
|
static bool |
ParseString( const CStr& Value, T& tOutput )
Sets a value by setting and object name using a real datatype as input. |
private static void |
RecurseObject( int RR, IGUIObject* pObject, void_Object_pFunction_argRefT pFunc, T& Argument )
Argument is reference. |
private static void |
RecurseObject( int RR, IGUIObject* pObject, GUI::void_Object_pFunction pFunc )
With no argument. |
private 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. |
static PS_RESULT |
SetSetting( IGUIObject* pObject, const CStr& Setting, const T& Value, const bool& SkipMessage = false )
Sets a value by name using a real datatype as input. |
Methods inherited from class CInternalCGUIAccessorBase |
GetObjectPointer, GetObjectPointer, QueryResetting, HandleMessage |
Field Detail |
static template PS_RESULT PS_RESULT GetSettingPointer;
public static PS_RESULT SetSetting( CGUI& GUIinstance, const CStr& Object, const CStr& Setting, const T& Value, const bool& SkipMessage = false );
GUI
- GUI Object, reference since we'll be changing values
Object
- Object name
Setting
- Setting by name
Value
- Sets value to this, note type T!Method Detail |
private static bool CheckIfRestricted( int RR, IGUIObject* pObject );
RR
- What kind of restriction, for instance hidden or disabled
pObject
- Objectpublic static CColor FallBackColor( const CColor& prim, const CColor& sec );
prim
- Primary color that should be used
sec
- Secondary color if Primary should failFallBackSprite
public static CGUISpriteInstance& FallBackSprite( CGUISpriteInstance& prim, CGUISpriteInstance& sec );
prim
- Primary sprite that should be used
sec
- Secondary sprite if Primary should failpublic static PS_RESULT GetSetting( const CGUI& GUIinstance, const CStr& Object, const CStr& Setting, T& Value );
GUI
- GUI Object const ref
Object
- Object name
Setting
- Setting by name
Value
- Stores value here, note type T!public static PS_RESULT GetSetting( const IGUIObject* pObject, const CStr& Setting, T& Value );
pObject
- Object pointer
Setting
- Setting by name
Value
- Stores value here, note type T!public static PS_RESULT GetSettingPointer( const IGUIObject* pObject, const CStr& Setting, T*& Value );
public static bool ParseColor( const CStr& Value, CColor& tOutput, float DefaultAlpha );
public static bool ParseString( const CStr& Value, T& tOutput );
Value
- The value in string form, like "0 0 100% 100%"
tOutput
- Parsed value of type T_mem_ParseString()
private static void RecurseObject( int RR, IGUIObject* pObject, void_Object_pFunction_argRefT pFunc, T& Argument );
RecurseObject()
private static void RecurseObject( int RR, IGUIObject* pObject, GUI::void_Object_pFunction pFunc );
RecurseObject()
private static void RecurseObject( int RR, IGUIObject* pObject, void_Object_pFunction_argT pFunc, const T& Argument );
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 TPS_RESULT
- Depends on what pFunc might throw. PS_RESULT is standard.
Itself doesn't throw anything.public static PS_RESULT SetSetting( IGUIObject* pObject, const CStr& Setting, const T& Value, const bool& SkipMessage = false );
pObject
- Object pointer
Setting
- Setting by name
Value
- Sets value to this, note type T!
SkipMessage
- Does not send a GUIM_SETTINGS_UPDATED if true
|
0 A.D.
Generated on September 04, 2007 at 18:13 CppDoc v2.4.0 |
|||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |