Overview   Project   Class   Tree   Deprecated   Index 
0 A.D.
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

gui
Class CList

IGUIScrollBarOwner, IGUITextOwner
   |
   +--CList

   in CList.h
   in CList.cpp
Direct Known Subclasses:
CDropDown

class CList
extends IGUIScrollBarOwner, IGUITextOwner

Create a list of elements, where one can be selected by the user. The control will use a pre-processed text-object for each element, which will be managed by the IGUITextOwner structure. A scroll-bar will appear when needed. This will be achieve with the IGUIScrollBarOwner structure.


Field Summary
protected std::vector< float > m_ItemsYPositions
          List of each element's relative y position.
 
Constructor Summary
CList()
          
virtual ~CList()
          
 
Method Summary
 virtual void AddItem( const CStr& str )
          Adds an item last to the list.
protected virtual void Draw()
          Draws the List box
protected void DrawList( const int& selected, const CStr& _sprite, const CStr& _sprite_selected, const CStr& _textcolor )
          
protected virtual CRect GetListRect() const
          
protected virtual bool HandleAdditionalChildren( const XMBElement& child, CXeromyces* pFile )
          Handle the tag.
protected virtual void HandleMessage( const SGUIMessage& Message )
          Handle Messages
protected virtual InReaction ManuallyHandleEvent( const SDL_Event_* ev )
          Handle events manually to catch keyboard inputting.
 virtual void ResetStates()
          
protected virtual void SelectFirstElement()
          
protected virtual void SelectLastElement()
          
protected virtual void SelectNextElement()
          Easy select elements functions
protected virtual void SelectPrevElement()
          
protected void SetupText()
          Sets up text, should be called every time changes has been made that can change the visual.
protected void UpdateAutoScroll()
          
   
Methods inherited from IGUIScrollBarOwner
ResetStates, AddScrollBar, GetScrollBarStyle, HandleMessage, Draw
   
Methods inherited from IGUITextOwner
AddText, HandleMessage, Draw, CalculateTextPosition
 

Field Detail

m_ItemsYPositions

protected std::vector< float > m_ItemsYPositions;
List of each element's relative y position. Will be one larger than m_Items, because it will end with the bottom of the last element. First element will always be zero, but still stored for easy handling.


Constructor Detail

CList

public CList();

~CList

public virtual ~CList();


Method Detail

AddItem

public virtual void AddItem( const CStr& str );
Adds an item last to the list.

Draw

protected virtual void Draw();
Draws the List box

DrawList

protected void DrawList( const int& selected, const CStr& _sprite, const CStr& _sprite_selected, const CStr& _textcolor );

GetListRect

protected virtual CRect GetListRect() const;

HandleAdditionalChildren

protected virtual bool HandleAdditionalChildren( const XMBElement& child, CXeromyces* pFile );
Handle the tag.

HandleMessage

protected virtual void HandleMessage( const SGUIMessage& Message );
Handle Messages
Parameters:
Message - GUI Message

ManuallyHandleEvent

protected virtual InReaction ManuallyHandleEvent( const SDL_Event_* ev );
Handle events manually to catch keyboard inputting.

ResetStates

public virtual void ResetStates();

SelectFirstElement

protected virtual void SelectFirstElement();

SelectLastElement

protected virtual void SelectLastElement();

SelectNextElement

protected virtual void SelectNextElement();
Easy select elements functions

SelectPrevElement

protected virtual void SelectPrevElement();

SetupText

protected void SetupText();
Sets up text, should be called every time changes has been made that can change the visual.

UpdateAutoScroll

protected void UpdateAutoScroll();

 Overview   Project   Class   Tree   Deprecated   Index 
0 A.D.
Generated on September 04, 2007 at 18:13
CppDoc v2.4.0
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD