43 #include <boost/unordered_set.hpp> 88 CGUI(
const shared_ptr<ScriptRuntime>& runtime);
107 void SendEventToAll(
const CStr& EventName);
136 void DrawText(
SGUIText& Text,
const CColor& DefaultColor,
const CPos& pos,
const float& z,
const CRect& clipping);
160 void LoadXmlFile(
const VfsPath& Filename, boost::unordered_set<VfsPath>&
Paths);
168 bool ObjectExists(
const CStr& Name)
const;
178 IGUIObject* FindObjectByName(
const CStr& Name)
const;
200 void AddObjectType(
const CStr& str, ConstructObjectFunction pFunc) { m_ObjectTypes[str] = pFunc; }
211 void UpdateResolution();
230 SGUIText GenerateText(
const CGUIString& Text,
const CStrW& Font,
const float& Width,
const float& BufferZone,
const IGUIObject* pObject = NULL);
236 bool IconExists(
const CStr& str)
const {
return (m_Icons.count(str) != 0); }
247 bool GetPreDefinedColor(
const CStr& name,
CColor& Output)
const;
263 void UpdateObjects();
420 void Xeromyces_ReadObject(
XMBElement Element,
CXeromyces* pFile,
IGUIObject* pParent, std::vector<std::pair<CStr, CStr> >& NameSubst, boost::unordered_set<VfsPath>& Paths,
u32 nesting_depth);
428 void Xeromyces_ReadRepeat(
XMBElement Element,
CXeromyces* pFile,
IGUIObject* pParent, std::vector<std::pair<CStr, CStr> >& NameSubst, boost::unordered_set<VfsPath>& Paths,
u32 nesting_depth);
441 void Xeromyces_ReadScript(
XMBElement Element,
CXeromyces* pFile, boost::unordered_set<VfsPath>& Paths);
647 #endif // INCLUDED_CGUI #define NONCOPYABLE(className)
Indicates that a class is noncopyable (usually due to const or reference members, or because the clas...
Definition: code_annotation.h:217
std::map< CStr, CColor > m_PreDefinedColors
This is a bank of custom colors, it is simply a look up table that will return a color object when so...
Definition: CGUI.h:576
Definition: CGUISprite.h:44
Base class to only the class GUI.
Definition: GUIutil.h:59
std::map< CStr, CStrW > m_SettingsDefaults
Definition: CGUI.h:54
IGUIObject * m_FocusedObject
Focused object! Say an input box that is selected.
Definition: CGUI.h:595
GUITooltip m_Tooltip
Definition: CGUI.h:568
bool IconExists(const CStr &str) const
Check if an icon exists.
Definition: CGUI.h:236
Definition: XeroXMB.h:160
Base settings, all objects possess these settings in their m_BaseSettings Instructions can be found i...
Definition: IGUIObject.h:117
std::map< CStr, std::vector< IGUIObject * > > m_HotkeyObjects
Map from hotkey names to objects that listen to the hotkey.
Definition: CGUI.h:628
The main object that represents a whole GUI page.
Definition: CGUI.h:75
ERROR_TYPE(GUI, JSOpenFailed)
Includes static functions that needs one template argument.
Definition: GUIutil.h:89
unsigned int m_MouseButtons
Indicates which buttons are pressed (bit 0 = LMB, bit 1 = RMB, bit 2 = MMB)
Definition: CGUI.h:565
CPos m_MousePos
don't want to pass this around with the ChooseMouseOverAndClosest broadcast - we'd need to pack this ...
Definition: CGUI.h:559
uint32_t u32
Definition: types.h:39
IGUIObject * GetFocusedObject()
Get Focused Object.
Definition: CGUI.h:288
jsval GetGlobalObject()
Definition: CGUI.h:250
std::map< CStr, SGUIStyle > m_Styles
Definition: CGUI.h:638
shared_ptr< ScriptInterface > GetScriptInterface()
Definition: CGUI.h:249
void AddObjectType(const CStr &str, ConstructObjectFunction pFunc)
The GUI needs to have all object types inputted and their constructors.
Definition: CGUI.h:200
int m_InternalNameNumber
Number of object that has been given name automatically.
Definition: CGUI.h:612
std::map< CStr, SGUIIcon > m_Icons
Definition: CGUI.h:644
Made to represent screen positions and delta values.
Definition: Shapes.h:169
std::map< CStr, IGUIObject * > map_pObjects
Definition: GUIbase.h:139
The GUI sprite, is actually several real sprites (images) like a collage.
Definition: CGUISprite.h:135
IGUIObject * m_BaseObject
Base Object, all its children are considered parentless because this is not a real object per se...
Definition: CGUI.h:588
map_pObjects m_pAllObjects
Just pointers for fast name access, each object is really constructed within its parent for easy recu...
Definition: CGUI.h:604
Definition: Xeromyces.h:42
Definition: GUIbase.h:144
Wrapper class for OS paths used by the game.
Definition: Paths.h:27
Definition: Decompose.h:22
std::map< CStr, CGUISprite * > m_Sprites
Definition: CGUI.h:635
shared_ptr< ScriptInterface > m_ScriptInterface
Definition: CGUI.h:552
const double SELECT_DBLCLICK_RATE
Definition: CGUI.cpp:63
void Draw(DrawCalls &Calls, float Z)
Definition: GUIRenderer.cpp:345
Definition: CGUISprite.h:158
std::map< CStr, SGUIScrollBarStyle > m_ScrollBarStyles
Definition: CGUI.h:641
std::map< CStr, ConstructObjectFunction > m_ObjectTypes
Function pointers to functions that constructs IGUIObjects by name...
Definition: CGUI.h:619
Contains a list of values for new defaults to objects.
Definition: CGUI.h:52
String class, substitute for CStr, but that parses the tags and builds up a list of all text that wil...
Definition: GUItext.h:169
SGUIIcon GetIcon(const CStr &str) const
Get Icon (a copy, can never be changed)
Definition: CGUI.h:241
An SGUIText object is a parsed string, divided into text-rendering components.
Definition: GUItext.h:55
Rectangle class used for screen rectangles.
Definition: Shapes.h:73