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

CGUIListBox Class Reference

ListBox Control. More...

#include <GUI.h>

Inheritance diagram for CGUIListBox:

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

Public Member Functions

virtual void Initialize ()
virtual int Create (CGUIElement *pParent, tRect WidgetRect, CTexture *pTexture=NULL, CMaterial *pMaterial=NULL, bool bBorder=false, CGUIButton *pDefaultEntryBtn=NULL)
virtual bool PropertyChanging (const void *pvProperty, void *pvNewValue)
virtual void GetProperties (EPropList &PropList)
virtual void Draw ()
virtual int LoadXML (TiXmlNode *pDataNode, CString strFilename)
virtual int SaveXML (TiXmlNode *pDataNode, CString strFilename)
virtual int Resize (tRect &NewRect)
virtual void ProcessMessage (tGUIMessage &Message)
virtual void SetCurSel (int iSelection)
int GetCurSel ()
virtual CGUIElementInsertItem (CString &strItemText, UINT uiInsertAfter=0)
virtual bool IsOfType (eEntityType eType)

Detailed Description

ListBox Control.

This control represents a simple list box. NOTE: All of its entries MUST be CGUIButton (or CGUIButton-derived) widgets.

Definition at line 1666 of file GUI.h.


Member Function Documentation

int CGUIListBox::Create CGUIElement pParent,
tRect  WidgetRect,
CTexture pTexture = NULL,
CMaterial pMaterial = NULL,
bool  bBorder = false,
CGUIButton pDefaultEntryBtn = NULL
[virtual]
 

Method details:

Parameters:
pParent - Pointer to parent widget
WidgetRect - Rectangle for this widget
pFont - Pointer to CCustomFont derived font for the widget to draw the text
pTexture - Pointer to texture
pMaterial - Pointer to material
bBorder - does this widget has a border?
pDefaultEntryBtn - Pointer to the default DropList entry CGUIButton (or -derived) widget
Returns:
1 if sucessful, 0 if not
Definition at line 31 of file GUIListBox.cpp.

References CGUIElement::Create(), CGUIElement::GetChild(), CGUIElement::IsChild(), CDoubleList< CGUIElement * >::push_back(), CGUIElement::RemoveChild(), Resize(), and CGUIElement::SetParent().

void CGUIListBox::Draw  )  [virtual]
 

Method details: Draws the widget

Reimplemented from CGUIElement.

Definition at line 102 of file GUIListBox.cpp.

References CDoubleList< CGUIElement * >::begin(), CGUIElement::Draw(), CGUIElement::GetChild(), CDoubleList< CGUIElement * >::next(), CGUIElement::RemoveChild(), and CDoubleList< CGUIElement * >::set_ptr().

int CGUIListBox::GetCurSel  ) 
 

Method details:

Returns:
Index of current selection
Definition at line 265 of file GUIListBox.cpp.

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

Method details:

Parameters:
PropList - Const. reference to the property list

Reimplemented from CGUIElement.

Definition at line 320 of file GUIListBox.cpp.

References CDoubleList< CGUIElement * >::begin(), CGUIElement::GetProperties(), CGUIElement::GetType(), CDoubleList< CGUIElement * >::next(), and CDoubleList< CGUIElement * >::set_ptr().

void CGUIListBox::Initialize  )  [virtual]
 

Method details: Initializes ListBox' variables

Reimplemented from CGUIElement.

Definition at line 21 of file GUIListBox.cpp.

References CGUIElement::SetType().

CGUIElement * CGUIListBox::InsertItem CString &  strItemText,
UINT  uiInsertAfter = 0
[virtual]
 

Method details:

Parameters:
strItemText - Text for the new item entry
uiInsertAfter - Insert new entry after item specified by index this parameter
Definition at line 270 of file GUIListBox.cpp.

References CGUIButton::Create(), CGUIElement::GetRect(), CGUIButton::LoadXML(), CDoubleList< CGUIElement * >::push_back(), Resize(), and CGUIStatic::SetText().

Referenced by PropertyChanging().

bool CGUIListBox::IsOfType eEntityType  eType  )  [virtual]
 

Method details: This is an implementation of Custom RTTI

Reimplemented from CGUIElement.

Definition at line 292 of file GUIListBox.cpp.

References CGUIElement::IsOfType().

int CGUIListBox::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 50 of file GUIListBox.cpp.

References TiXmlElement::Attribute(), CEntity::GetID(), CEntity::GetName(), CSingleton< CGlobalLogger >::GetSingleton(), CGUIElement::LoadXML(), SetCurSel(), and CLogger::Write().

void CGUIListBox::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 118 of file GUIListBox.cpp.

References CGUIElement::GetChild(), CGUIElement::GetChildCount(), CGUIElement::GetRect(), CGUIElement::GetType(), CGUIElement::IsChild(), tGUIMessage::pSender, Resize(), and SetCurSel().

bool CGUIListBox::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 300 of file GUIListBox.cpp.

References InsertItem(), CGUIElement::PropertyChanging(), and SetCurSel().

int CGUIListBox::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 157 of file GUIListBox.cpp.

References CGUIElement::GetChild(), CGUIElement::GetChildCount(), CGUIStatic::GetFont(), CGUIStatic::GetLineCount(), CGUIStatic::GetLineLength(), CBitmapFont::GetQuadHeight(), CGUIElement::GetRect(), CGUIElement::GetType(), CGUIElement::Hide(), CGUIStatic::HideText(), CGUIElement::Resize(), CGUIElement::SetRect(), CGUIElement::Show(), and CGUIStatic::ShowText().

Referenced by Create(), InsertItem(), and ProcessMessage().

int CGUIListBox::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 76 of file GUIListBox.cpp.

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

void CGUIListBox::SetCurSel int  iSelection  )  [virtual]
 

Method details:

Parameters:
iSelection - Sets current drop list selection to the one specified by value (by index).
Definition at line 240 of file GUIListBox.cpp.

References CDoubleList< CGUIElement * >::begin(), CGUIElement::GetType(), CDoubleList< CGUIElement * >::next(), and CDoubleList< CGUIElement * >::set_ptr().

Referenced by LoadXML(), ProcessMessage(), and PropertyChanging().


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