10 #include "tb_scroll_container.h"
11 #include "tb_select_item.h"
40 const TBStr & GetFilter()
const {
return m_filter; }
57 virtual long GetValue()
const {
return m_value; }
101 bool m_list_is_invalid;
102 bool m_scroll_to_current;
103 TBID m_header_lng_string_id;
163 #endif // TB_SELECT_H
TBSelectDropdown shows a button that opens a popup with a TBSelectList with items provided by a TBSel...
Definition: tb_select.h:111
virtual void OnItemRemoved(int index)
Called when the item at the given index has been removed.
Definition: tb_select.cpp:91
virtual void SetValue(long value)
The value is the selected item.
Definition: tb_select.cpp:202
TBGenericStringItemSource * GetDefaultSource()
Get the default item source for this widget.
Definition: tb_select.h:35
void SetHeaderString(const TBID &id)
Set the language string id for the header.
Definition: tb_select.cpp:115
void SetFilter(const TBStr &filter)
Set filter string so only matching items will be showed.
Definition: tb_select.cpp:107
virtual void OnItemChanged(int index)
Called when the item at the given index has changed in a way that should update the viewer...
Definition: tb_select.cpp:383
virtual void OnAllItemsRemoved()
Called when all items have been removed.
Definition: tb_select.cpp:101
void SelectItem(int index, bool selected)
Set the selected state of the item at the given index.
Definition: tb_select.cpp:225
virtual void SetValue(long value)
Set the selected item.
Definition: tb_select.cpp:387
TBMenuWindow * GetMenuIfOpen() const
Return the menu window if it's open, or nullptr.
Definition: tb_select.cpp:428
TBSkinImage is a widget showing a skin element, constrained in size to its skin.
Definition: tb_widgets_common.h:217
TBGenericStringItemSource is a item source list providing items of type TBGenericStringItem.
Definition: tb_select_item.h:236
virtual void OnSourceChanged()
Called when the source has changed or been unset by calling SetSource.
Definition: tb_select.cpp:57
TBGenericStringItemSource * GetDefaultSource()
Get the default item source for this widget.
Definition: tb_select.h:127
void ValidateList()
Make sure the list is reflecting the current items in the source.
Definition: tb_select.cpp:131
virtual void OnSourceChanged()
Called when the source has changed or been unset by calling SetSource.
Definition: tb_select.cpp:376
virtual void OnInflate(const INFLATE_INFO &info)
Called when this widget is inflated from resources, before any children have been inflated...
Definition: tb_widgets_reader.cpp:700
bool ChangeValue(SPECIAL_KEY key)
Change the value to a non disabled item that is visible with the current filter.
Definition: tb_select.cpp:320
TBID is a wrapper for a uint32_t to be used as ID.
Definition: tb_id.h:18
virtual void OnItemChanged(int index)
Called when the item at the given index has changed in a way that should update the viewer...
Definition: tb_select.cpp:62
virtual void OnProcessAfterChildren()
Callback for doing anything that might be needed before paint.
Definition: tb_select.cpp:265
virtual void OnProcess()
Callback for doing anything that might be needed before paint.
Definition: tb_select.cpp:260
virtual void OnItemAdded(int)
Called when the item at the given index has been added.
Definition: tb_select.h:151
void OpenWindow()
Open the window if the model has items.
Definition: tb_select.cpp:409
TBSelectItemViewer is the viewer for items provided by TBSelectItemSource.
Definition: tb_select_item.h:27
TBSelectList shows a scrollable list of items provided by a TBSelectItemSource.
Definition: tb_select.h:19
void ScrollToSelectedItem()
Scroll to the current selected item.
Definition: tb_select.cpp:241
TBWidgetSafePointer m_window_pointer
Points to the dropdown window if opened.
Definition: tb_select.h:158
virtual bool OnEvent(const TBWidgetEvent &ev)
Callback for handling events.
Definition: tb_select.cpp:433
TBScrollContainer * GetScrollContainer()
Return the scrollcontainer used in this list.
Definition: tb_select.h:81
INFLATE_INFO contains info passed to TBWidget::OnInflate during resource loading. ...
Definition: tb_widgets_reader.h:21
virtual void OnInflate(const INFLATE_INFO &info)
Called when this widget is inflated from resources, before any children have been inflated...
Definition: tb_widgets_reader.cpp:692
TBID GetSelectedItemID()
Get the ID of the selected item, or 0 if there is no item selected.
Definition: tb_select.cpp:402
virtual void OnItemAdded(int index)
Called when the item at the given index has been added.
Definition: tb_select.cpp:81
TBStr is a simple string class.
Definition: tb_str.h:62
virtual long GetValue() const
See TBWidget::SetValue.
Definition: tb_select.h:131
TBID GetSelectedItemID()
Get the ID of the selected item, or 0 if there is no item selected.
Definition: tb_select.cpp:218
virtual void OnSkinChanged()
Called when the background skin changes by calling SetSkinBg(), or when the skin has changed indirect...
Definition: tb_select.cpp:255
void CloseWindow()
Close the window if it is open.
Definition: tb_select.cpp:422
virtual bool OnEvent(const TBWidgetEvent &ev)
Callback for handling events.
Definition: tb_select.cpp:271
virtual void OnAllItemsRemoved()
Called when all items have been removed.
Definition: tb_select.h:153
virtual void OnItemRemoved(int)
Called when the item at the given index has been removed.
Definition: tb_select.h:152
TBLayout layouts its children along the given axis.
Definition: tb_layout.h:96
void InvalidateList()
Make the list update its items to reflect the items from the in the current source.
Definition: tb_select.cpp:123
virtual long GetValue() const
See TBWidget::SetValue.
Definition: tb_select.h:57