Main Page | Class Hierarchy | Class List | File List | Class Members | Related Pages

CGUI Class Reference

Root GUI. More...

#include <GUI.h>

Inheritance diagram for CGUI:

CGUIElement CXMLResource CDoubleList< CGUIElement * > CResource CEntity List of all members.

Public Member Functions

 CGUI ()
virtual void Initialize ()
virtual bool PropertyChanging (const void *pvProperty, void *pvNewValue)
virtual void GetProperties (EPropList &PropList)
void SelectInvisible (bool bShow)
bool IsInvisibleSelectable ()
virtual int OnLMouseDown (UINT x, UINT y)
virtual int OnLMouseUp (UINT x, UINT y)
virtual int Create ()
virtual void Update ()
virtual void Draw ()
void SetActiveElement (CGUIElement *pElement)
CGUIElementGetActiveElement ()
virtual int LoadXML (TiXmlNode *pDataNode, CString strFilename)
virtual int SaveXML (TiXmlNode *pDataNode, CString strFilename)
virtual int PostMessage (CGUIElement *pSender, CGUIElement *pReceiver, eGUIMessage eMessage, DWORD lParam=0, DWORD wParam=0, UINT uiTimeoutMs=0)
virtual void ProcessMessages ()
virtual void ProcessMessage (tGUIMessage &Message)
tGUIMessageGetMessage (UINT uiMessageIndex)
UINT GetMessageCount ()
bool IsLocked ()
void Lock ()
void Unlock ()
virtual void Destroy ()
virtual bool IsOfType (eEntityType eType)

Protected Attributes

CGUIEventHandler m_EventHandler
CGUIElementm_pActiveElement
bool m_bMouseLock
bool m_bSelectInvisible

Detailed Description

Root GUI.

This class represents ROOT GUI Element that contains all of the controls. It handles basic commands, options & tuning and other various tasks.

Definition at line 638 of file GUI.h.


Constructor & Destructor Documentation

CGUI::CGUI  ) 
 

Destructor Definition at line 4 of file GUI.cpp.

References Initialize(), and CEntity::SetEntityType().


Member Function Documentation

int CGUI::Create  )  [virtual]
 

Method details:

Returns:
1 if widget is created sucsessfully, 0 otherwise
Definition at line 32 of file GUI.cpp.

void CGUI::Destroy  )  [virtual]
 

Method details: Destroys the GUI (Pre-destructor)

Reimplemented from CGUIElement.

Definition at line 135 of file GUI.cpp.

References CGUIElement::Destroy(), and m_EventHandler.

void CGUI::Draw  )  [virtual]
 

Method details: Draws the GUI

Reimplemented from CGUIElement.

Definition at line 110 of file GUI.cpp.

References CGUIElement::Draw().

CGUIElement * CGUI::GetActiveElement  ) 
 

Method details:

Returns:
Pointer to element that is active (NULL if none)
Definition at line 120 of file GUI.cpp.

References m_pActiveElement.

Referenced by CGUIButton::OnLMouseUp(), and CGUIElement::OnMouseMove().

tGUIMessage * CGUI::GetMessage UINT  uiMessageIndex  ) 
 

Method details:

Parameters:
uiMessageIndex Index to the message to be returned
Returns:
Pointer to message that is specified by (uiMessageIndex)
Definition at line 125 of file GUI.cpp.

References CGUIEventHandler::GetMessage(), and m_EventHandler.

Referenced by CGUIElement::ProcessMessages().

UINT CGUI::GetMessageCount  ) 
 

Method details:

Returns:
Number of messages
Definition at line 130 of file GUI.cpp.

References m_EventHandler.

Referenced by CGUIElement::ProcessMessages().

void CGUI::GetProperties EPropList &  PropList  )  [virtual]
 

Method details:

Parameters:
PropList - Const. reference to the property list

Reimplemented from CGUIElement.

Definition at line 179 of file GUI.cpp.

References CGUIElement::GetProperties(), and m_bSelectInvisible.

void CGUI::Initialize  )  [virtual]
 

Method details: Initializes GUI' variables

Reimplemented from CGUIElement.

Definition at line 15 of file GUI.cpp.

References m_bSelectInvisible, m_pActiveElement, CGUIElement::SetType(), and Unlock().

Referenced by CGUI().

bool CGUI::IsInvisibleSelectable  ) 
 

Method details:

Returns:
True OR False if user can select invisible widgets
Definition at line 192 of file GUI.cpp.

References m_bSelectInvisible.

Referenced by ProcessMessage().

bool CGUI::IsLocked  )  [inline]
 

Method details:

Returns:
True if mosue is locked, False otherwise
Definition at line 771 of file GUI.h.

References m_bMouseLock.

Referenced by CGUIElement::OnMouseMove(), and Update().

bool CGUI::IsOfType eEntityType  eType  )  [virtual]
 

Method details: This is an implementation of Custom RTTI

Reimplemented from CGUIElement.

Definition at line 216 of file GUI.cpp.

References CGUIElement::IsOfType().

int CGUI::LoadXML TiXmlNode pDataNode,
CString  strFilename
[virtual]
 

Method details:

Parameters:
pDataNode - Pointer to XML Node that holds data for this widget
strFilename - String containing filename where the data for the widget is stored

Reimplemented from CGUIElement.

Definition at line 38 of file GUI.cpp.

References CGUIElement::LoadXML().

void CGUI::Lock  )  [inline]
 

Method details: Locks the mouse inputDefinition at line 776 of file GUI.h.

References m_bMouseLock.

Referenced by CGUIElement::OnLMouseDown(), and OnLMouseDown().

int CGUI::OnLMouseDown UINT  x,
UINT  y
[virtual]
 

Method details:

Parameters:
x - X Location of the mouse when Left button has been held
y - Y Location of the mouse when Left button has been held
Returns:
1 if it has been processed by widget (or it's children), 0 if not

Reimplemented from CGUIElement.

Definition at line 197 of file GUI.cpp.

References Lock(), and CGUIElement::OnLMouseDown().

Referenced by Update().

int CGUI::OnLMouseUp UINT  x,
UINT  y
[virtual]
 

Method details:

Parameters:
x - X Location of the mouse when Left button has been released
y - Y Location of the mouse when Left button has been released
Returns:
1 if it has been processed by widget (or it's children), 0 if not

Reimplemented from CGUIElement.

Definition at line 206 of file GUI.cpp.

References CGUIElement::OnLMouseUp(), and SetActiveElement().

Referenced by Update().

int CGUI::PostMessage CGUIElement pSender,
CGUIElement pReceiver,
eGUIMessage  eMessage,
DWORD  lParam = 0,
DWORD  wParam = 0,
UINT  uiTimeoutMs = 0
[virtual]
 

Method details:

Parameters:
pSender Pointer to sender widget
pReceiver Pointer to receiver widget
eMessage Message to be sent
lParam Additional parameters (1)
wParam Additional parameters (2)
uiTimeoutMs Timeout for the message (in milliseconds)
Returns:
1 if sucessful, 0 if not
Definition at line 27 of file GUI.cpp.

References m_EventHandler, and CGUIEventHandler::PostMessage().

Referenced by CGUIElement::OnLMouseUp(), CGUIButton::OnLMouseUp(), CGUIElement::OnMove(), CGUIElement::Resize(), and CGUIScrollBar::SetCurPos().

void CGUI::ProcessMessage tGUIMessage Message  )  [virtual]
 

Method details:

Parameters:
Message Const. Reference to the message structure that is to be processed.

Reimplemented from CGUIElement.

Definition at line 141 of file GUI.cpp.

References IsInvisibleSelectable(), tGUIMessage::pSender, SetActiveElement(), and CGUIElement::Visible().

Referenced by ProcessMessages().

void CGUI::ProcessMessages  )  [virtual]
 

Method details: Processes messages from the GUI Event Handler

Reimplemented from CGUIElement.

Definition at line 157 of file GUI.cpp.

References CDoubleList< CGUIElement * >::begin(), CGUIEventHandler::GetMessage(), m_EventHandler, CDoubleList< CGUIElement * >::next(), ProcessMessage(), CGUIElement::ProcessMessages(), and CDoubleList< CGUIElement * >::set_ptr().

Referenced by Update().

bool CGUI::PropertyChanging const void *  pvProperty,
void *  pvNewValue
[virtual]
 

Method details:

Parameters:
pvProperty - Pointer to the property
pvNewValue - Pointer to the new value

Reimplemented from CGUIElement.

Definition at line 172 of file GUI.cpp.

References CGUIElement::PropertyChanging().

int CGUI::SaveXML TiXmlNode pDataNode,
CString  strFilename
[virtual]
 

Method details:

Parameters:
pDataNode - Pointer to XML Node that will be the parent hold the data for this element
strFilename - String containing filename where the data for the widget is stored

Reimplemented from CGUIElement.

Definition at line 52 of file GUI.cpp.

References TiXmlNode::InsertEndChild(), TiXmlDocument::SaveFile(), CGUIElement::SaveXML(), and TiXmlNode::ToElement().

void CGUI::SelectInvisible bool  bShow  ) 
 

Method details:

Parameters:
bShow - Set the flag. If it's true, invisible widgets are gonig to be selectable, otherwise not
Definition at line 187 of file GUI.cpp.

References m_bSelectInvisible.

void CGUI::SetActiveElement CGUIElement pElement  ) 
 

Method details:

Parameters:
pElement - Pointer to element that is to be set as active (selected)
Definition at line 115 of file GUI.cpp.

References m_pActiveElement.

Referenced by CGUIElement::OnLMouseDown(), OnLMouseUp(), and ProcessMessage().

void CGUI::Unlock  )  [inline]
 

Method details: Unlocks the mouse inputDefinition at line 781 of file GUI.h.

References m_bMouseLock.

Referenced by Initialize(), and Update().

void CGUI::Update  )  [virtual]
 

Method details: Internal updates for GUIDefinition at line 84 of file GUI.cpp.

References CGUIEventHandler::Flush(), CMouse::GetCursorPos(), CInputEngine::GetMouse(), CMouse::GetPrevCursorPos(), CSingleton< CInputEngine >::GetSingleton(), CMouse::IsButtonDown(), CMouse::IsButtonUp(), IsLocked(), m_EventHandler, OnLMouseDown(), OnLMouseUp(), CGUIElement::OnMouseMove(), ProcessMessages(), Unlock(), tVERTEX2d::x, and tVERTEX2d::y.


Member Data Documentation

bool CGUI::m_bMouseLock [protected]
 

Is mouse locked? Definition at line 798 of file GUI.h.

Referenced by IsLocked(), Lock(), and Unlock().

bool CGUI::m_bSelectInvisible [protected]
 

Should we select invisible widgets? Definition at line 799 of file GUI.h.

Referenced by GetProperties(), Initialize(), IsInvisibleSelectable(), and SelectInvisible().

CGUIEventHandler CGUI::m_EventHandler [protected]
 

Root GUI Event Handler Definition at line 796 of file GUI.h.

Referenced by Destroy(), GetMessage(), GetMessageCount(), PostMessage(), ProcessMessages(), and Update().

CGUIElement* CGUI::m_pActiveElement [protected]
 

Current active element Definition at line 797 of file GUI.h.

Referenced by GetActiveElement(), Initialize(), and SetActiveElement().


The documentation for this class was generated from the following files:
Generated on Sun Jul 17 21:34:29 2005 for OpenGL GUI by doxygen 1.3.8