Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

CUIStringListBox Class Reference

A List Box that can contain only strings. More...

#include <UIListBoxes.h>

Inheritance diagram for CUIStringListBox:

CUIListBox CUIWidgetGroup MUIWidget List of all members.

Public Types

enum  { KMaxStrings = 50 }

Public Member Functions

 CUIStringListBox (const CUIRect &aRectangle, const char *aTitle=NULL, MUIWidgetEvents *aObserver=NULL)
 Constructs the CUIStringListBox object.

virtual unsigned int GetItemsNumber ()
 Returns the number of items in the ListBox.

virtual unsigned int GetItemHeight (unsigned int aItemIndex)
 Returns the height of item with given index.

virtual void DrawItem (unsigned int aItemIndex, CUIRect &aRect)
 Draws specified item in a given rectangle.

bool AddString (const char *aString)
 Adds a new string the the CUIStringListBox. Returns true in case of success.

const char * GetString (unsigned int aIndex)
 Retrieves the string with given index.

void Clear ()
 Deletes all strings from the object.


Detailed Description

A List Box that can contain only strings.


Member Function Documentation

bool CUIStringListBox::AddString const char *  aString  ) 
 

Adds a new string the the CUIStringListBox. Returns true in case of success.

After the addition of a new string the CUIStringListBox will not be automatically redrawn

void CUIStringListBox::Clear  )  [virtual]
 

Deletes all strings from the object.

After the deletion of strings the CUIStringListBox will not be automatically redrawn

Reimplemented from CUIWidgetGroup.

virtual unsigned int CUIStringListBox::GetItemHeight unsigned int  aItemIndex  )  [virtual]
 

Returns the height of item with given index.

If KConstItemHeight is among the iOptions only GetItemHeight(0) is called by the CUIListBox. GetItemHeight( 0 ) is also called from the CalculateParameters() so the derived class must be ready to return a correct value even if the ListBox contains no items yet.

Implements CUIListBox.


The documentation for this class was generated from the following file:
Generated on Fri Jul 15 16:46:44 2005 for TomTom GO User Interface library by doxygen 1.3.5