Changeset View
Changeset View
Standalone View
Standalone View
source/gui/GUIutil.h
Show All 36 Lines | |||||
#include "GUIbase.h" | #include "GUIbase.h" | ||||
#include "IGUIObject.h" | #include "IGUIObject.h" | ||||
class CClientArea; | class CClientArea; | ||||
class CGUIString; | class CGUIString; | ||||
class CMatrix3D; | class CMatrix3D; | ||||
template <typename T> | template <typename T> | ||||
bool __ParseString(const CStrW& Value, T& tOutput); | bool __ParseString(const CGUI* guiPage, const CStrW& Value, T& tOutput); | ||||
// Model-view-projection matrix with (0,0) in top-left of screen | // Model-view-projection matrix with (0,0) in top-left of screen | ||||
CMatrix3D GetDefaultGuiMatrix(); | CMatrix3D GetDefaultGuiMatrix(); | ||||
struct SGUIMessage; | struct SGUIMessage; | ||||
/** | /** | ||||
* Base class to only the class GUI. This superclass is | * Base class to only the class GUI. This superclass is | ||||
▲ Show 20 Lines • Show All 150 Lines • ▼ Show 20 Lines | public: | ||||
* works the magic. | * works the magic. | ||||
* | * | ||||
* @param Value The value in string form, like "0 0 100% 100%" | * @param Value The value in string form, like "0 0 100% 100%" | ||||
* @param tOutput Parsed value of type T | * @param tOutput Parsed value of type T | ||||
* @return True at success. | * @return True at success. | ||||
* | * | ||||
* @see __ParseString() | * @see __ParseString() | ||||
*/ | */ | ||||
static bool ParseString(const CStrW& Value, T& tOutput) | static bool ParseString(const CGUI* guiPage, const CStrW& Value, T& tOutput) | ||||
{ | { | ||||
return __ParseString<T>(Value, tOutput); | return __ParseString<T>(guiPage, Value, tOutput); | ||||
} | } | ||||
static bool ParseColor(const CStrW& Value, CColor& tOutput, int DefaultAlpha); | static bool ParseColor(const CGUI* guiPage, const CStrW& Value, CColor& tOutput, int DefaultAlpha); | ||||
private: | private: | ||||
// templated typedef of function pointer | // templated typedef of function pointer | ||||
typedef void (IGUIObject::*void_Object_pFunction_argT)(const T& arg); | typedef void (IGUIObject::*void_Object_pFunction_argT)(const T& arg); | ||||
typedef void (IGUIObject::*void_Object_pFunction_argRefT)(T& arg); | typedef void (IGUIObject::*void_Object_pFunction_argRefT)(T& arg); | ||||
typedef void (IGUIObject::*void_Object_pFunction)(); | typedef void (IGUIObject::*void_Object_pFunction)(); | ||||
typedef void (IGUIObject::*void_Object_pFunction_argTJS)(const T& arg, JS::HandleValueArray paramData); | typedef void (IGUIObject::*void_Object_pFunction_argTJS)(const T& arg, JS::HandleValueArray paramData); | ||||
▲ Show 20 Lines • Show All 136 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator