#include <CUI.h>
Inheritance diagram for CListBox::
Public Methods | |
CListBox (int x, int y, int cols, int rows, Callback callback) | |
Constructor. More... | |
~CListBox () | |
virtual int | update (CInputEvent *e) |
Update method - Recieves a CInputEvent, returns 1 if redraw is needed, 0 if not. More... | |
virtual void | draw (CGfxScreen *S) |
Draw method - The widget should draw itslelf to the passed CGfxScreen. More... | |
void | insertItem (string caption) |
string | getItem (int pos) |
string | getCurItem () |
void | clear () |
virtual int | getMin () |
Returns minimum value of the scroll region. More... | |
virtual int | getMax () |
Returns maximum value of the scroll region. More... | |
virtual int | getPos () |
Returns current position in the scroll region. More... | |
virtual void | setPos (int pos) |
Sets the current item/line to be selected. More... | |
virtual void | scrollUp () |
Scrolls up one. More... | |
virtual void | scrollDown () |
Scrolls down one. More... | |
Public Attributes | |
list< string > | m_list |
Callback | m_callback |
int | m_liststart |
int | m_curpos |
Listbox widget for displaying a bunch of items
|
Constructor.
|
|
|
|
|
|
Draw method - The widget should draw itslelf to the passed CGfxScreen. This will be called when the screen is being redrawn. The widget should draw itself using its m_x and m_y members as a starting co-ordinate. The drawing should be all on the passed CGfxScreen or the front lcd screen with libdj.TextScreen Reimplemented from CWidget. |
|
|
|
|
|
Returns maximum value of the scroll region.
Reimplemented from CScrollable. |
|
Returns minimum value of the scroll region.
Reimplemented from CScrollable. |
|
Returns current position in the scroll region.
Reimplemented from CScrollable. |
|
|
|
Scrolls down one.
Reimplemented from CScrollable. |
|
Scrolls up one.
Reimplemented from CScrollable. |
|
Sets the current item/line to be selected.
Reimplemented from CScrollable. |
|
Update method - Recieves a CInputEvent, returns 1 if redraw is needed, 0 if not. All keyboard and mouse (stylus) events are sent to this function. If the widget wants to trap the events, it can, and must return 1 if the screen needs to be redrawn and 0 if it does not (ie nothing happened or the action did not change the screen) Reimplemented from CWidget. |
|
|
|
|
|
|
|
|