Pyrogenesis  trunk
Macros | Functions | Variables
GUIutil.cpp File Reference
#include "precompiled.h"
#include "GUI.h"
#include "GUIManager.h"
#include "maths/Matrix3D.h"
#include "ps/CLogger.h"
#include "ps/GameSetup/Config.h"
#include "GUItypes.h"
Include dependency graph for GUIutil.cpp:

Macros

#define TYPE(T)
 
#define TYPE(T)
 
#define GUITYPE_IGNORE_CGUISpriteInstance
 

Functions

template<>
bool __ParseString< bool > (const CStrW &Value, bool &Output)
 
template<>
bool __ParseString< int > (const CStrW &Value, int &Output)
 
template<>
bool __ParseString< float > (const CStrW &Value, float &Output)
 
template<>
bool __ParseString< CRect > (const CStrW &Value, CRect &Output)
 
template<>
bool __ParseString< CClientArea > (const CStrW &Value, CClientArea &Output)
 
template<>
bool __ParseString< CColor > (const CStrW &Value, CColor &Output)
 
template<>
bool __ParseString< CSize > (const CStrW &Value, CSize &Output)
 
template<>
bool __ParseString< CPos > (const CStrW &Value, CPos &Output)
 
template<>
bool __ParseString< EAlign > (const CStrW &Value, EAlign &Output)
 
template<>
bool __ParseString< EVAlign > (const CStrW &Value, EVAlign &Output)
 
template<>
bool __ParseString< CGUIString > (const CStrW &Value, CGUIString &Output)
 
template<>
bool __ParseString< CStr > (const CStrW &Value, CStr &Output)
 
template<>
bool __ParseString< CStrW > (const CStrW &Value, CStrW &Output)
 
template<>
bool __ParseString< CGUISpriteInstance > (const CStrW &Value, CGUISpriteInstance &Output)
 
template<>
bool __ParseString< CGUIList > (const CStrW &Value, CGUIList &Output)
 
template<>
bool __ParseString< CGUISeries > (const CStrW &Value, CGUISeries &Output)
 
CMatrix3D GetDefaultGuiMatrix ()
 
template<typename T >
bool IsBoolTrue (const T &)
 
template<>
bool IsBoolTrue< bool > (const bool &v)
 

Variables

int g_xres
 
int g_yres
 

Macro Definition Documentation

#define GUITYPE_IGNORE_CGUISpriteInstance
#define TYPE (   T)
Value:
template<> void CheckType<T>(const IGUIObject* obj, const CStr& setting) { \
std::map<CStr, SGUISetting>::const_iterator it = obj->m_Settings.find(setting); \
if (it == obj->m_Settings.end() || it->second.m_Type != GUIST_##T) \
{ \
/* Abort now, to avoid corrupting everything by invalidly \
casting pointers */ \
DEBUG_DISPLAY_ERROR(L"FATAL ERROR: Inconsistent types in GUI"); \
} \
}
Base settings, all objects possess these settings in their m_BaseSettings Instructions can be found i...
Definition: IGUIObject.h:117
#define T(string_literal)
Definition: secure_crt.cpp:76
#define DEBUG_DISPLAY_ERROR(description)
Definition: debug.h:197
#define TYPE (   T)
Value:
template PSRETURN GUI<T>::GetSettingPointer(const IGUIObject* pObject, const CStr& Setting, T*& Value); \
template PSRETURN GUI<T>::GetSetting(const IGUIObject* pObject, const CStr& Setting, T& Value); \
template PSRETURN GUI<T>::SetSetting(IGUIObject* pObject, const CStr& Setting, const T& Value, const bool& SkipMessage);
static PSRETURN GetSetting(const IGUIObject *pObject, const CStr &Setting, T &Value)
Retrieves a setting by name from object pointer.
Definition: GUIutil.cpp:352
Base settings, all objects possess these settings in their m_BaseSettings Instructions can be found i...
Definition: IGUIObject.h:117
Config::Value_type Value
Definition: json_spirit_value.h:181
u32 PSRETURN
Definition: Errors.h:75
#define T(string_literal)
Definition: secure_crt.cpp:76
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.
Definition: GUIutil.cpp:374
static PSRETURN GetSettingPointer(const IGUIObject *pObject, const CStr &Setting, T *&Value)
Definition: GUIutil.cpp:325

Function Documentation

template<>
bool __ParseString< bool > ( const CStrW &  Value,
bool &  Output 
)
template<>
bool __ParseString< CClientArea > ( const CStrW &  Value,
CClientArea Output 
)
template<>
bool __ParseString< CColor > ( const CStrW &  Value,
CColor Output 
)
template<>
bool __ParseString< CGUIList > ( const CStrW &  Value,
CGUIList Output 
)
template<>
bool __ParseString< CGUISeries > ( const CStrW &  Value,
CGUISeries Output 
)
template<>
bool __ParseString< CGUISpriteInstance > ( const CStrW &  Value,
CGUISpriteInstance Output 
)
template<>
bool __ParseString< CGUIString > ( const CStrW &  Value,
CGUIString Output 
)
template<>
bool __ParseString< CPos > ( const CStrW &  Value,
CPos Output 
)
template<>
bool __ParseString< CRect > ( const CStrW &  Value,
CRect Output 
)
template<>
bool __ParseString< CSize > ( const CStrW &  Value,
CSize Output 
)
template<>
bool __ParseString< CStr > ( const CStrW &  Value,
CStr &  Output 
)
template<>
bool __ParseString< CStrW > ( const CStrW &  Value,
CStrW &  Output 
)
template<>
bool __ParseString< EAlign > ( const CStrW &  Value,
EAlign Output 
)
template<>
bool __ParseString< EVAlign > ( const CStrW &  Value,
EVAlign Output 
)
template<>
bool __ParseString< float > ( const CStrW &  Value,
float &  Output 
)
template<>
bool __ParseString< int > ( const CStrW &  Value,
int &  Output 
)
CMatrix3D GetDefaultGuiMatrix ( )
template<typename T >
bool IsBoolTrue ( const T )
template<>
bool IsBoolTrue< bool > ( const bool &  v)

Variable Documentation

int g_xres
int g_yres