Motoko::ListBox Class Reference

Class that represents a generic list box. More...

#include <ListBox.h>

Inheritance diagram for Motoko::ListBox:

Motoko::Box Motoko::ITextControl Motoko::Control List of all members.

Public Member Functions

 ListBox ()
 ListBox (const char *name, SDL_Rect rect, ControlBackStyle backstyle, Uint32 backcolor, const char *text, CRM32Pro_CFont *font, ControlSkin *appearance=NULL, SDL_Surface *picture=NULL, SDL_Surface *mousepointer=NULL, AlignmentStyle alignment=Left, bool transparency=false, Uint32 selcolor=0x00000000, bool multisel=false, bool enable=true, bool visible=true)
 ListBox (const ListBox &obj)
virtual ListBoxoperator= (const ListBox &obj)
 ~ListBox ()
virtual void Draw (void)
 This function draw the control.
virtual bool Update (SDL_Event &event)
 This function update the control.
virtual ListBoxCopyFrom (const ListBox &obj)
 This function copies obj in the actual object.
virtual void UpdateRects (void)
 This function update the rects in the actual object.
bool AddListItem (string text)
 Add an item in the list.
bool AddListItem (string text, Uint32 color)
 Add an item in the list.
void DelListItem (int i)
 Erase an item in the list.
void ClearListItems (void)
 Erase all the items in the list.
ListBoxItemGetListItem (int i)
 Get an item of the list.
bool GetMultiSelect (void)
 Get if the control is multiselect.
list< int > * GetSelectedItems (void)
 Get the selected items of the list.
Uint32 GetSelColor (void)
 Get the color of selection of the list.
VScrollBarGetVBar (void)
 Get the VBar of the control.
virtual void SetListItem (int i, ListBoxItem *val)
 Set an item of the list.
virtual void SetListItem (int i, string text, Uint32 color)
 Set an item of the list.
virtual void SetListItem (int i, string text)
 Set an item of the list.
virtual void SetMultiSelect (bool val)
 Set if the control is multiselect.
virtual void SetNoSelectedItems (void)
 Set no selected items of the list.
virtual void SetSelColor (Uint32 val)
 Set the color of selection of the list.
virtual void SetText (const char *val)
 Set the text of the control.
virtual void AddText (const char *val)
 Add text to the control.
virtual void SetText (char val)
 Set the text of the control.
virtual void AddText (char val)
 Add text to the control.
virtual void SetName (const char *val)
 Set the name of the control.
virtual void SetBackStyle (ControlBackStyle val)
 Set the back style of the control.
virtual void SetBackColor (Uint32 box, Uint32 scrolls)
 Set the back color of the control.
void SetAppearance (ControlSkin *box, ControlSkin *vscroll, ControlSkin *button)
 Set the appearance of the control.
virtual void SetBackColor (Uint32 val)
 Set the back color of the control.
void SetAppearance (ControlSkin *val)
 Set the appearance of the control.

Protected Member Functions

int GetItemPressed (Uint16 x, Uint16 y)
 This function get the item pressed in the control with the mouse.
void UpdateValues (void)
 This function update the values of the scrollbars.
void DrawList (void)
 This function draw the items of the control.

Detailed Description

Class that represents a generic list box.


Constructor & Destructor Documentation

Motoko::ListBox::ListBox (  ) 

ListBox constructor.

Motoko::ListBox::ListBox ( const char *  name,
SDL_Rect  rect,
ControlBackStyle  backstyle,
Uint32  backcolor,
const char *  text,
CRM32Pro_CFont *  font,
ControlSkin appearance = NULL,
SDL_Surface *  picture = NULL,
SDL_Surface *  mousepointer = NULL,
AlignmentStyle  alignment = Left,
bool  transparency = false,
Uint32  selcolor = 0x00000000,
bool  multisel = false,
bool  enable = true,
bool  visible = true 
)

ListBox constructor.

Motoko::ListBox::ListBox ( const ListBox obj  ) 

ListBox copy constructor.

Motoko::ListBox::~ListBox (  ) 

ListBox destructor.


Member Function Documentation

ListBox & Motoko::ListBox::CopyFrom ( const ListBox obj  )  [virtual]

This function copies obj in the actual object.

Parameters:
obj Object to copy.
Returns:
A reference to the actual object.

ListBox & Motoko::ListBox::operator= ( const ListBox obj  )  [virtual]

ListBox operator =.


The documentation for this class was generated from the following files:
Generated on Mon Jul 17 18:33:50 2006 for Motoko by  doxygen 1.4.7