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

CGUIWindow Class Reference

Window Control class. More...

#include <GUI.h>

Inheritance diagram for CGUIWindow:

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

Public Member Functions

virtual void Initialize ()
virtual int Create (CGUIElement *pParent, tRect WidgetRect, CGUIStatic *pStatusBar=NULL, CGUIStatic *pTitleBar=NULL, CGUIButton *pCloseButton=NULL, CGUIButton *pMinButton=NULL, CGUIButton *pMaxRestoreButton=NULL, CTexture *pTexture=NULL, CMaterial *pMaterial=NULL, bool bBorder=false)
virtual void ProcessMessage (tGUIMessage &Message)
virtual void Draw ()
virtual int LoadXML (TiXmlNode *pDataNode, CString strFilename)
virtual int SaveXML (TiXmlNode *pDataNode, CString strFilename)
virtual int Resize (tRect &NewRect)
void Minimize ()
void Restore ()
void Maximize ()
void Close ()
virtual bool IsOfType (eEntityType eType)

Public Attributes

int m_iWindowState

Detailed Description

Window Control class.

A window, by default, have a title bar, a status bar, and 3 buttons in title bar. It can be resized by using those buttons.

Definition at line 2147 of file GUI.h.


Member Function Documentation

void CGUIWindow::Close  ) 
 

Method details: Closes the window (makes it invisible)Definition at line 356 of file GUIWindow.cpp.

References CGUIElement::Hide(), and CGUIElement::HideSiblings().

Referenced by ProcessMessage().

int CGUIWindow::Create CGUIElement pParent,
tRect  WidgetRect,
CGUIStatic pStatusBar = NULL,
CGUIStatic pTitleBar = NULL,
CGUIButton pCloseButton = NULL,
CGUIButton pMinButton = NULL,
CGUIButton pMaxRestoreButton = NULL,
CTexture pTexture = NULL,
CMaterial pMaterial = NULL,
bool  bBorder = false
[virtual]
 

Method details:

Parameters:
pParent - Pointer to parent widget
WidgetRect - Rectangle for this widget
pStatusBar - Pointer to CGUIStatic-derived widget that is going to serve as a status bar
pTitleBar - Pointer to CGUIStatic-derived widget that is going to serve as a title bar
pCloseButton - Pointer to CGUIButton-derived widget that is going to serve as a close button for this window
pMinButton - Pointer to CGUIButton-derived widget that is going to serve as a Minimize button for this window
pMaxRestoreButton - Pointer to CGUIButton-derived widget that is going as a Maximize/Restore button for this window
pTexture - Pointer to texture
pMaterial - Pointer to material
bBorder - does this widget has a border?
Returns:
1 if sucessful, 0 if not
Definition at line 22 of file GUIWindow.cpp.

References CGUIElement::Create(), CGUIElement::GetChild(), CGUIElement::IsChild(), CDoubleList< T >::push_back(), CDoubleList< CGUIElement * >::push_back(), CGUIElement::RemoveChild(), CEntity::SetName(), CGUIElement::SetParent(), and CGUIElement::SetType().

void CGUIWindow::Draw  )  [virtual]
 

Method details: Draws the widget

Reimplemented from CGUIElement.

Definition at line 187 of file GUIWindow.cpp.

References CGUIElement::Draw(), CGUIElement::GetChild(), CGUIElement::HideSiblings(), CGUIElement::RemoveChild(), CGUIElement::ShowSiblings(), and CGUIElement::Visible().

void CGUIWindow::Initialize  )  [virtual]
 

Method details: Initializes GUI Border' variables

Reimplemented from CGUIElement.

Definition at line 14 of file GUIWindow.cpp.

References m_iWindowState, and CGUIElement::SetType().

bool CGUIWindow::IsOfType eEntityType  eType  )  [virtual]
 

Method details: This is an implementation of Custom RTTI

Reimplemented from CGUIElement.

Definition at line 427 of file GUIWindow.cpp.

References CGUIElement::IsOfType().

int CGUIWindow::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 95 of file GUIWindow.cpp.

References CGUIElement::GetChild(), CGUIElement::GetChildCount(), CEntity::GetID(), CEntity::GetName(), CSingleton< CGlobalLogger >::GetSingleton(), CGUIElement::GetType(), CGUIElement::LoadXML(), CGUIElement::RemoveChild(), CGUIElement::SetFlag(), CGUIElement::SetType(), and CLogger::Write().

void CGUIWindow::Maximize  ) 
 

Method details: Maximizes the window to the maximum size of the GUIDefinition at line 389 of file GUIWindow.cpp.

References CGUIElement::GetChild(), CGUIElement::GetGUI(), CGUIElement::GetRect(), m_iWindowState, Resize(), CGUIElement::SetFlag(), and CGUIElement::SetRect().

Referenced by ProcessMessage().

void CGUIWindow::Minimize  ) 
 

Method details: Minimizes the windowDefinition at line 404 of file GUIWindow.cpp.

References CGUIElement::GetChild(), CGUIElement::GetHeight(), CGUIElement::GetRect(), CGUIElement::Hide(), m_iWindowState, Resize(), CGUIElement::SetFlag(), and CGUIElement::SetHeight().

Referenced by ProcessMessage().

void CGUIWindow::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 300 of file GUIWindow.cpp.

References Close(), CGUIElement::GetChild(), CGUIElement::GetRect(), CGUIElement::GetType(), CGUIElement::IsChild(), m_iWindowState, Maximize(), Minimize(), tGUIMessage::pSender, Resize(), and Restore().

int CGUIWindow::Resize tRect &  NewRect  )  [virtual]
 

Method details:

Parameters:
NewRect - New rectangle for the widget
Returns:
Varied returns
See also:
GUI_Message_SizeX/Y/XY

Reimplemented from CGUIElement.

Definition at line 206 of file GUIWindow.cpp.

References CGUIElement::GetChild(), CGUIElement::GetChildCount(), CGUIElement::GetHeight(), CGUIElement::GetRect(), CGUIElement::GetType(), m_iWindowState, CGUIElement::RemoveChild(), CGUIElement::Resize(), CGUIElement::SetHeight(), CGUIElement::SetRect(), and CGUIElement::Visible().

Referenced by Maximize(), Minimize(), ProcessMessage(), and Restore().

void CGUIWindow::Restore  ) 
 

Method details: Restores the window to it's original sizeDefinition at line 362 of file GUIWindow.cpp.

References CGUIElement::GetChild(), CGUIElement::GetRect(), m_iWindowState, Resize(), CGUIElement::SetFlag(), CGUIElement::SetRect(), CGUIButton::SetState(), and CGUIElement::Show().

Referenced by ProcessMessage().

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

Method details:

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

Reimplemented from CGUIElement.

Definition at line 163 of file GUIWindow.cpp.

References CGUIElement::SaveXML(), and TiXmlNode::ToElement().


Member Data Documentation

int CGUIWindow::m_iWindowState
 

Window state

See also:
eWindowState
Definition at line 2236 of file GUI.h.

Referenced by Initialize(), Maximize(), Minimize(), ProcessMessage(), Resize(), and Restore().


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