


listbox screenshot
Public Member Functions | |
| PG_ListBox (PG_Widget *parent, const PG_Rect &r=PG_Rect::null, const char *style="ListBox") | |
| ~PG_ListBox () | |
| void | SetMultiSelect (bool multi=true) |
| bool | GetMultiSelect () |
| PG_ListBoxBaseItem * | GetSelectedItem () |
| void | SelectItem (PG_ListBoxBaseItem *item, bool select=true) |
| void | SelectFirstItem () |
| void | SelectNextItem () |
| void | SelectPrevItem () |
| void | RemoveAll () |
| Remove all widgets from the list (without deletion). | |
| void | DeleteAll () |
| Delete (destroy) all widgets in the list. | |
| void | SetIndent (Uint16 indent) |
| Set the item indentation. | |
| Uint16 | GetIndent () |
| Returns the item indentation. | |
| void | SetAlignment (PG_Label::TextAlign style) |
| Set the alignment for all items. | |
| PG_Label::TextAlign | GetAlignment () |
| Returns the set alignment rule of this list. | |
| int | GetSelectedIndex () |
| Returns the index of the last selected item. | |
| void | GetSelectedItems (std::vector< PG_ListBoxBaseItem * > &items) |
| void | AddChild (PG_Widget *child) |
| Add a clientwidget (which will be embedded into this widget). | |
Public Attributes | |
| SignalSelectItem | sigSelectItem |
Protected Member Functions | |
| virtual bool | eventSelectItem (PG_ListBoxBaseItem *item) |
| bool | eventMouseButtonUp (const SDL_MouseButtonEvent *button) |
| Overridable Eventhandler for a SDL_MouseButtonEvent message. | |
| bool | eventMouseButtonDown (const SDL_MouseButtonEvent *button) |
| Overridable Eventhandler for a SDL_MouseButtonEvent message. | |
| bool | eventMouseMotion (const SDL_MouseMotionEvent *motion) |
| Overridable Eventhandler for a SDL_MouseMotionEvent message. | |
|
||||||||||||||||
|
|
|
|
|
|
|
Add a clientwidget (which will be embedded into this widget).
Reimplemented from PG_WidgetList. |
|
|
Delete (destroy) all widgets in the list.
Reimplemented from PG_ScrollWidget. |
|
|
Overridable Eventhandler for a SDL_MouseButtonEvent message. This handler is called when a mouse button is pressed. The default implementation returns 'false' which indicates that this message is not processed by this object.
Reimplemented from PG_MessageObject. |
|
|
Overridable Eventhandler for a SDL_MouseButtonEvent message. This handler is called when a mouse button is released. The default implementation returns 'false' which indicates that this message is not processed by this object.
Reimplemented from PG_MessageObject. |
|
|
Overridable Eventhandler for a SDL_MouseMotionEvent message. This handler is called when mouse movement is detected. The default implementation returns 'false' which indicates that this message is not processed by this object.
Reimplemented from PG_MessageObject. |
|
|
|
|
|
Returns the set alignment rule of this list.
|
|
|
Returns the item indentation.
|
|
|
|
|
|
Returns the index of the last selected item.
|
|
|
|
|
|
|
|
|
Remove all widgets from the list (without deletion).
Reimplemented from PG_ScrollWidget. |
|
|
|
|
||||||||||||
|
|
|
|
|
|
|
|
|
|
Set the alignment for all items.
|
|
|
Set the item indentation.
|
|
|
|
|
|
|