#include <pgdropdown.h>
Inheritance diagram for PG_DropDown:

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 std::string &style="DropDown") | |
| Construct a PG_DropDown object. | |
| ~PG_DropDown () | |
| void | LoadThemeStyle (const std::string &widgettype) |
| Load a style from the theme definition. | |
| void | AddItem (const std::string &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 PG_String & | GetText () |
| Get the current text string. | |
| void | SetText (const std::string &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. | |
| int | GetSelectedItemIndex () |
| Returns the index of the last selected 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. | |
| PG_Widget * | GetFirstInList () |
| void | AddChild (PG_Widget *child) |
| Add a clientwidget (which will be embedded into this widget). | |
Public Attributes | |
| SignalSelectItem | sigSelectItem |
| PG_LineEdit::SignalEditBegin | sigEditBegin |
| PG_LineEdit::SignalEditEnd | sigEditEnd |
| PG_LineEdit::SignalEditReturn | sigEditReturn |
Protected Member Functions | |
| void | eventShow () |
| overridable eventhandler called whenever the widget gets shown. | |
| void | eventHide () |
| overridable eventhandler called whenever the widget gets hidden. | |
| virtual 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) |
Protected Attributes | |
| PG_LineEdit * | my_EditBox |
| PG_Button * | my_DropButton |
| PG_ListBox * | my_DropList |
Classes | |
| class | SignalSelectItem |
| Signal type declaration. More... | |
Definition at line 55 of file pgdropdown.h.
|
|
Definition at line 65 of file pgdropdown.h. |
|
||||||||||||||||||||
|
Construct a PG_DropDown object.
Definition at line 37 of file pgdropdown.cpp. References PG_Signal1< P1, datatype >::connect(), handleButtonClick(), IDDROPDOWN_BOX, LoadThemeStyle(), my_DropButton, my_DropList, my_EditBox, PG_Rect::my_height, PG_Rect::my_width, PG_Rect::my_xpos, PG_Rect::my_ypos, PG_NULLSTR, PG_ScrollWidget::SetAutoResize(), PG_Widget::SetID(), PG_ScrollWidget::SetShiftOnRemove(), PG_Button::sigClick, PG_MessageObject::sigDelete, sigEditBegin, PG_LineEdit::sigEditBegin, sigEditEnd, PG_LineEdit::sigEditEnd, sigEditReturn, PG_LineEdit::sigEditReturn, and PG_ListBox::sigSelectItem. |
|
|
Definition at line 74 of file pgdropdown.cpp. References my_DropList. |
|
|
Add a clientwidget (which will be embedded into this widget).
Reimplemented from PG_Widget. Definition at line 84 of file pgdropdown.cpp. References PG_ListBox::AddChild(), PG_Widget::AddChild(), my_DropButton, my_DropList, and my_EditBox. |
|
||||||||||||||||
|
Add a new item to the dropdown box.
Reimplemented in DropDownSelector. Definition at line 94 of file pgdropdown.cpp. References PG_Widget::GetFont(), PG_FontEngine::GetTextSize(), and PG_String. Referenced by DropDownSelector::AddItem(), AddWeatherAreaDialog::AddWeatherAreaDialog(), AddWindChangeDialog::AddWindChangeDialog(), EditPlayerData::EditPlayerData(), PG_PropertyField_DropDown< StringType, iterator >::PG_PropertyField_DropDown(), PG_PropertyField_IntDropDown< IntType, iterator >::PG_PropertyField_IntDropDown(), and WeatherDialog::WeatherDialog(). |
|
|
Delete (destroy) all widgets from the drop down.
Definition at line 113 of file pgdropdown.cpp. References PG_ListBox::DeleteAll(), and my_DropList. |
|
|
overridable eventhandler called whenever the widget gets hidden.
Reimplemented from PG_Widget. Definition at line 123 of file pgdropdown.cpp. References PG_Widget::Hide(), and my_DropList. |
|
||||||||||||
|
Callback for the MoveWidget event.
Reimplemented from PG_Widget. Definition at line 177 of file pgdropdown.cpp. References PG_Widget::Hide(), PG_Widget::IsVisible(), and my_DropList. |
|
|
Definition at line 171 of file pgdropdown.cpp. |
|
|
overridable eventhandler called whenever the widget gets shown.
Reimplemented from PG_Widget. Definition at line 118 of file pgdropdown.cpp. References my_DropList, and PG_Widget::SetVisible(). |
|
||||||||||||
|
Callback for the SizeWidget event.
Reimplemented from PG_Widget. Definition at line 175 of file pgdropdown.cpp. |
|
|
Returns the set alignment rule of this list.
Definition at line 240 of file pgdropdown.cpp. References PG_ListBox::GetAlignment(), and my_DropList. |
|
|
Check if the widget is editable by the user.
Definition at line 159 of file pgdropdown.cpp. References PG_LineEdit::GetEditable(), and my_EditBox. |
|
|
Definition at line 244 of file pgdropdown.cpp. References PG_ScrollWidget::GetFirstInList(), and my_DropList. |
|
|
Returns the item indentation.
Definition at line 232 of file pgdropdown.cpp. References PG_ListBox::GetIndent(), and my_DropList. |
|
|
Returns the index of the last selected item.
Definition at line 227 of file pgdropdown.cpp. References PG_ListBox::GetSelectedIndex(), and my_DropList. Referenced by PG_PropertyField_IntDropDown< IntType, iterator >::Apply(), and DropDownSelector::itemSelected(). |
|
|
Get the current text string.
Reimplemented from PG_Widget. Definition at line 163 of file pgdropdown.cpp. References PG_Widget::GetText(), and my_EditBox. Referenced by PG_PropertyField_DropDown< StringType, iterator >::Apply(). |
|
|
Definition at line 128 of file pgdropdown.cpp. References PG_Application::GetScreenHeight(), PG_Application::GetScreenWidth(), PG_Widget::Hide(), IDDROPDOWN_BOX, PG_Widget::IsVisible(), PG_Widget::MoveWidget(), my_DropList, PG_Rect::my_height, PG_Rect::my_width, PG_Rect::my_xpos, PG_Rect::my_ypos, PG_MIN, and PG_Widget::Show(). Referenced by PG_DropDown(). |
|
|
Load a style from the theme definition.
Reimplemented from PG_Widget. Definition at line 78 of file pgdropdown.cpp. References PG_ScrollWidget::LoadThemeStyle(), PG_Button::LoadThemeStyle(), PG_LineEdit::LoadThemeStyle(), my_DropButton, my_DropList, and my_EditBox. Referenced by PG_DropDown(). |
|
||||||||||||
|
Process a native PG_ event.
Reimplemented from PG_Widget. Definition at line 195 of file pgdropdown.cpp. References PG_Widget::IsVisible(), my_DropList, and PG_Widget::ProcessEvent(). |
|
|
Remove all widgets from the drop down(without deletion).
Definition at line 108 of file pgdropdown.cpp. References my_DropList, and PG_ListBox::RemoveAll(). |
|
|
Select the first item.
Definition at line 206 of file pgdropdown.cpp. References my_DropList, and PG_ListBox::SelectFirstItem(). Referenced by DropDownSelector::AddItem(). |
|
|
Select the n-th item.
Definition at line 218 of file pgdropdown.cpp. References my_DropList, PG_ListBox::SelectFirstItem(), and PG_ListBox::SelectNextItem(). Referenced by EditPlayerData::EditPlayerData(), EventEditor::EventEditor(), ExchangeGraphics::ExchangeGraphics(), PG_PropertyField_DropDown< StringType, iterator >::PG_PropertyField_DropDown(), PG_PropertyField_IntDropDown< IntType, iterator >::PG_PropertyField_IntDropDown(), Maped_MainScreenWidget::playerChanged(), and PG_PropertyField_IntDropDown< IntType, iterator >::Reload(). |
|
|
Select the next item.
Definition at line 210 of file pgdropdown.cpp. References my_DropList, and PG_ListBox::SelectNextItem(). |
|
|
Select the previous item.
Definition at line 214 of file pgdropdown.cpp. References my_DropList, and PG_ListBox::SelectPrevItem(). |
|
|
Set the item's alignment.
Definition at line 236 of file pgdropdown.cpp. References my_DropList, and PG_ListBox::SetAlignment(). |
|
|
Set if the widget is editable by the user.
Definition at line 155 of file pgdropdown.cpp. References my_EditBox, and PG_LineEdit::SetEditable(). Referenced by DropDownSelector::DropDownSelector(), and SetDropDownAtts(). |
|
|
Set the item indentation.
Definition at line 151 of file pgdropdown.cpp. References my_DropList, and PG_ListBox::SetIndent(). Referenced by SetDropDownAtts(). |
|
|
Set the current text string.
Reimplemented from PG_Widget. Definition at line 167 of file pgdropdown.cpp. References my_EditBox, and PG_LineEdit::SetText(). Referenced by PG_PropertyField_DropDown< StringType, iterator >::Reload(). |
|
|
Definition at line 208 of file pgdropdown.h. Referenced by AddChild(), LoadThemeStyle(), and PG_DropDown(). |
|
|
Definition at line 210 of file pgdropdown.h. Referenced by AddChild(), DeleteAll(), eventHide(), eventMoveWidget(), eventShow(), GetAlignment(), GetFirstInList(), GetIndent(), GetSelectedItemIndex(), handleButtonClick(), LoadThemeStyle(), PG_DropDown(), ProcessEvent(), RemoveAll(), SelectFirstItem(), SelectItem(), SelectNextItem(), SelectPrevItem(), SetAlignment(), SetIndent(), and ~PG_DropDown(). |
|
|
Definition at line 206 of file pgdropdown.h. Referenced by AddChild(), GetEditable(), GetText(), LoadThemeStyle(), PG_DropDown(), SetEditable(), and SetText(). |
|
|
Definition at line 182 of file pgdropdown.h. Referenced by PG_DropDown(). |
|
|
Definition at line 183 of file pgdropdown.h. Referenced by PG_DropDown(). |
|
|
Definition at line 184 of file pgdropdown.h. Referenced by PG_DropDown(). |
|
|
Definition at line 180 of file pgdropdown.h. Referenced by DropDownSelector::DropDownSelector(). |
1.4.2