#include <ListBox.h>
Inheritance diagram for Motoko::ListBox:
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 ListBox & | operator= (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 ListBox & | CopyFrom (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. | |
ListBoxItem * | GetListItem (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. | |
VScrollBar * | GetVBar (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. |
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 | ( | ) |
ListBox destructor.
This function copies obj in the actual object.
obj | Object to copy. |