Pyrogenesis  13997
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Macros | Functions | Variables
GUIutil.cpp File Reference
#include "precompiled.h"
#include "GUI.h"
#include "GUIManager.h"
#include "maths/Matrix3D.h"
#include "ps/Parser.h"
#include "ps/CLogger.h"
#include "GUItypes.h"

Go to the source code of this file.

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)
 
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

Definition at line 417 of file GUIutil.cpp.

#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:140
#define T(string_literal)
Definition: secure_crt.cpp:70
#define DEBUG_DISPLAY_ERROR(description)
Definition: debug.h:197

Definition at line 413 of file GUIutil.cpp.

#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:344
Base settings, all objects possess these settings in their m_BaseSettings Instructions can be found i...
Definition: IGUIObject.h:140
u32 PSRETURN
Definition: Errors.h:75
#define T(string_literal)
Definition: secure_crt.cpp:70
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:366
static PSRETURN GetSettingPointer(const IGUIObject *pObject, const CStr &Setting, T *&Value)
Definition: GUIutil.cpp:317

Definition at line 413 of file GUIutil.cpp.

Function Documentation

template<>
bool __ParseString< bool > ( const CStrW &  Value,
bool &  Output 
)

Definition at line 34 of file GUIutil.cpp.

template<>
bool __ParseString< CClientArea > ( const CStrW &  Value,
CClientArea Output 
)

Definition at line 90 of file GUIutil.cpp.

template<>
bool __ParseString< CColor > ( const CStrW &  Value,
CColor Output 
)

Definition at line 109 of file GUIutil.cpp.

template<>
bool __ParseString< CGUIList > ( const CStrW &  Value,
CGUIList Output 
)

Definition at line 245 of file GUIutil.cpp.

template<>
bool __ParseString< CGUISpriteInstance > ( const CStrW &  Value,
CGUISpriteInstance Output 
)

Definition at line 238 of file GUIutil.cpp.

template<>
bool __ParseString< CGUIString > ( const CStrW &  Value,
CGUIString Output 
)

Definition at line 212 of file GUIutil.cpp.

template<>
bool __ParseString< CPos > ( const CStrW &  Value,
CPos Output 
)

Definition at line 156 of file GUIutil.cpp.

template<>
bool __ParseString< CRect > ( const CStrW &  Value,
CRect Output 
)

Definition at line 62 of file GUIutil.cpp.

template<>
bool __ParseString< CSize > ( const CStrW &  Value,
CSize Output 
)

Definition at line 120 of file GUIutil.cpp.

template<>
bool __ParseString< CStr > ( const CStrW &  Value,
CStr &  Output 
)

Definition at line 221 of file GUIutil.cpp.

template<>
bool __ParseString< CStrW > ( const CStrW &  Value,
CStrW &  Output 
)

Definition at line 229 of file GUIutil.cpp.

template<>
bool __ParseString< EAlign > ( const CStrW &  Value,
EAlign Output 
)

Definition at line 178 of file GUIutil.cpp.

template<>
bool __ParseString< EVAlign > ( const CStrW &  Value,
EVAlign Output 
)

Definition at line 195 of file GUIutil.cpp.

template<>
bool __ParseString< float > ( const CStrW &  Value,
float &  Output 
)

Definition at line 55 of file GUIutil.cpp.

template<>
bool __ParseString< int > ( const CStrW &  Value,
int &  Output 
)

Definition at line 48 of file GUIutil.cpp.

CMatrix3D GetDefaultGuiMatrix ( )

Definition at line 253 of file GUIutil.cpp.

template<typename T >
bool IsBoolTrue ( const T )

Definition at line 355 of file GUIutil.cpp.

template<>
bool IsBoolTrue< bool > ( const bool &  v)

Definition at line 360 of file GUIutil.cpp.

Variable Documentation

int g_xres

Definition at line 58 of file Config.cpp.

int g_yres

Definition at line 58 of file Config.cpp.