#include <pglistbox.h>
Inheritance diagram for PG_ListBox:

Public Member Functions | |
| PG_ListBox (PG_Widget *parent, const PG_Rect &r=PG_Rect::null, const std::string &style="ListBox") | |
| ~PG_ListBox () | |
| void | SetMultiSelect (bool multi=true) |
| bool | GetMultiSelect () |
| PG_ListBoxBaseItem * | GetSelectedItem () |
| void | SelectItem (PG_ListBoxBaseItem *item, bool select=true, bool fireEvent=true) |
| void | SelectFirstItem (bool fireEvent=true) |
| void | SelectNextItem (bool fireEvent=true) |
| void | SelectPrevItem (bool fireEvent=true) |
| 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. | |
Friends | |
| class | PG_ListBoxBaseItem |
Classes | |
| class | SignalSelectItem |
| Signal type declaration. More... | |
listbox screenshot
Definition at line 49 of file pglistbox.h.
|
||||||||||||||||
|
Definition at line 36 of file pglistbox.cpp. References PG_ScrollWidget::EnableScrollBar(), PG_ScrollBar::HORIZONTAL, PG_PropStr::ListBox, and PG_ThemeWidget::LoadThemeStyle(). |
|
|
Definition at line 45 of file pglistbox.cpp. |
|
|
Add a clientwidget (which will be embedded into this widget).
Reimplemented from PG_WidgetList. Definition at line 47 of file pglistbox.cpp. References PG_WidgetList::AddChild(), PG_Widget::GetChildList(), PG_Rect::Height(), PG_ScrollWidget::my_scrollarea, PG_Widget::SetID(), PG_Widget::SizeWidget(), and PG_Rect::Width(). Referenced by PG_DropDown::AddChild(). |
|
|
Delete (destroy) all widgets in the list.
Reimplemented from PG_ScrollWidget. Definition at line 118 of file pglistbox.cpp. References PG_ScrollArea::DeleteAll(), PG_ScrollWidget::my_scrollarea, PG_ScrollArea::ScrollTo(), and PG_Widget::Update(). Referenced by PG_DropDown::DeleteAll(), and SelectFromMap::updateList(). |
|
|
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_ScrollWidget. Definition at line 104 of file pglistbox.cpp. |
|
|
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. Definition at line 100 of file pglistbox.cpp. |
|
|
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. Definition at line 108 of file pglistbox.cpp. |
|
|
Definition at line 96 of file pglistbox.cpp. Referenced by SelectItem(). |
|
|
Returns the set alignment rule of this list.
Definition at line 213 of file pglistbox.cpp. Referenced by PG_DropDown::GetAlignment(). |
|
|
Returns the item indentation.
Definition at line 195 of file pglistbox.cpp. Referenced by PG_DropDown::GetIndent(). |
|
|
Definition at line 63 of file pglistbox.cpp. |
|
|
Returns the index of the last selected item.
Definition at line 177 of file pglistbox.cpp. Referenced by ImportBI3MapDialog::getImportTable(), and PG_DropDown::GetSelectedItemIndex(). |
|
|
Definition at line 126 of file pglistbox.cpp. |
|
|
Definition at line 181 of file pglistbox.cpp. References PG_RectList::first(), PG_Widget::GetChildList(), PG_ListBoxBaseItem::IsSelected(), PG_ScrollWidget::my_scrollarea, and PG_Rect::next(). |
|
|
Remove all widgets from the list (without deletion).
Reimplemented from PG_ScrollWidget. Definition at line 112 of file pglistbox.cpp. References PG_ScrollWidget::my_scrollarea, and PG_ScrollArea::RemoveAll(). Referenced by PG_DropDown::RemoveAll(). |
|
|
Definition at line 144 of file pglistbox.cpp. References PG_WidgetList::FindWidget(), and PG_ListBoxBaseItem::Select(). Referenced by PG_DropDown::SelectFirstItem(), and PG_DropDown::SelectItem(). |
|
||||||||||||||||
|
Definition at line 67 of file pglistbox.cpp. References eventSelectItem(), PG_Widget::GetID(), PG_ListBoxBaseItem::Select(), sigSelectItem, and PG_Widget::Update(). Referenced by ListBoxImageItem< SelectionType >::eventMouseButtonUp(). |
|
|
Definition at line 155 of file pglistbox.cpp. References PG_WidgetList::FindWidget(), and PG_ListBoxBaseItem::Select(). Referenced by PG_DropDown::SelectItem(), and PG_DropDown::SelectNextItem(). |
|
|
Definition at line 166 of file pglistbox.cpp. References PG_WidgetList::FindWidget(), and PG_ListBoxBaseItem::Select(). Referenced by PG_DropDown::SelectPrevItem(). |
|
|
Set the alignment for all items.
Definition at line 199 of file pglistbox.cpp. References PG_RectList::first(), PG_Widget::GetChildList(), PG_ScrollWidget::my_scrollarea, PG_Rect::next(), and PG_Widget::Update(). Referenced by PG_DropDown::SetAlignment(). |
|
|
Set the item indentation.
Definition at line 130 of file pglistbox.cpp. References PG_RectList::first(), PG_Widget::GetChildList(), PG_ScrollWidget::my_scrollarea, PG_Rect::next(), PG_Label::SetIndent(), and PG_Widget::Update(). Referenced by PG_DropDown::SetIndent(). |
|
|
Definition at line 59 of file pglistbox.cpp. Referenced by EventAreasDialog::EventAreasDialog(), EventWindChangesDialog::EventWindChangesDialog(), MultiListBox::MultiListBox(), and NewStringChooser::NewStringChooser(). |
|
|
Definition at line 143 of file pglistbox.h. |
|
|
Definition at line 127 of file pglistbox.h. Referenced by NewStringChooser::NewStringChooser(), PG_DropDown::PG_DropDown(), SelectFromMap::SelectFromMap(), and SelectItem(). |
1.4.2