Basically a PG_LineEdit widget but with a button to show a dropdown list with predefined entries.
Public Types | |
enum | { IDDROPDOWN_BOX = PG_WIDGETID_INTERNAL + 11 } |
Public Member Functions | |
PG_DropDown (PG_Widget *parent, const PG_Rect &r=PG_Rect::null, int id=-1, const char *style="DropDown") | |
Construct a PG_DropDown object. | |
~PG_DropDown () | |
void | LoadThemeStyle (const char *widgettype) |
Load a style from the theme definition. | |
void | AddItem (const char *text, void *userdata=NULL, Uint16 height=0) |
Add a new item to the dropdown box. | |
void | RemoveAll () |
Remove all widgets from the drop down(without deletion). | |
void | DeleteAll () |
Delete (destroy) all widgets from the drop down. | |
void | SetIndent (Uint16 indent) |
Set the item indentation. | |
Uint16 | GetIndent () |
Returns the item indentation. | |
void | SetEditable (bool edit) |
Set if the widget is editable by the user. | |
bool | GetEditable () |
Check if the widget is editable by the user. | |
const char * | GetText () |
Get the current text string. | |
void | SetText (const char *new_text) |
Set the current text string. | |
bool | ProcessEvent (const SDL_Event *event, bool bModal) |
Process a native PG_ event. | |
void | SelectFirstItem () |
Select the first item. | |
void | SelectNextItem () |
Select the next item. | |
void | SelectPrevItem () |
Select the previous item. | |
void | SelectItem (const int n) |
Select the n-th item. | |
void | SetAlignment (PG_Label::TextAlign style) |
Set the item's alignment. | |
PG_Label::TextAlign | GetAlignment () |
Returns the set alignment rule of this list. | |
void | AddChild (PG_Widget *child) |
Add a clientwidget (which will be embedded into this widget). | |
Public Attributes | |
SignalSelectItem | sigSelectItem |
Protected Member Functions | |
void | eventShow () |
overridable eventhandler called whenever the widget gets shown. | |
void | eventHide () |
overridable eventhandler called whenever the widget gets hidden. | |
bool | handleButtonClick (PG_Button *button) |
void | eventSizeWidget (Uint16 w, Uint16 h) |
Callback for the SizeWidget event. | |
void | eventMoveWidget (int x, int y) |
Callback for the MoveWidget event. | |
virtual bool | eventSelectItem (PG_ListBoxBaseItem *item) |
bool | select_handler (PG_ListBoxBaseItem *item) |
Protected Attributes | |
PG_LineEdit * | my_EditBox |
PG_Button * | my_DropButton |
PG_ListBox * | my_DropList |
|
|
|
Construct a PG_DropDown object.
|
|
|
|
Add a clientwidget (which will be embedded into this widget).
Reimplemented from PG_Widget. |
|
Add a new item to the dropdown box.
|
|
Delete (destroy) all widgets from the drop down.
|
|
overridable eventhandler called whenever the widget gets hidden.
Reimplemented from PG_Widget. |
|
Callback for the MoveWidget event.
Reimplemented from PG_Widget. |
|
|
|
overridable eventhandler called whenever the widget gets shown.
Reimplemented from PG_Widget. |
|
Callback for the SizeWidget event.
Reimplemented from PG_Widget. |
|
Returns the set alignment rule of this list.
|
|
Check if the widget is editable by the user.
|
|
Returns the item indentation.
|
|
Get the current text string.
Reimplemented from PG_Widget. |
|
|
|
Load a style from the theme definition.
Reimplemented from PG_Widget. |
|
Process a native PG_ event.
Reimplemented from PG_Widget. |
|
Remove all widgets from the drop down(without deletion).
|
|
|
|
Select the first item.
|
|
Select the n-th item.
|
|
Select the next item.
|
|
Select the previous item.
|
|
Set the item's alignment.
|
|
Set if the widget is editable by the user.
|
|
Set the item indentation.
|
|
Set the current text string.
Reimplemented from PG_Widget. |
|
|
|
|
|
|
|
|