Hasty Badger
Small UI library (a branch of Turbo Badger)
 All Classes Namespaces Functions Variables Enumerations Enumerator Friends Groups Pages
tb::TBGenericStringItemSource Class Reference

TBGenericStringItemSource is a item source list providing items of type TBGenericStringItem. More...

#include <tb_select_item.h>

Inheritance diagram for tb::TBGenericStringItemSource:
tb::TBSelectItemSourceList< TBGenericStringItem > tb::TBSelectItemSource tb::TBTypedObject

Public Member Functions

 TBOBJECT_SUBCLASS (TBGenericStringItemSource, TBSelectItemSourceList< TBGenericStringItem >)
 
- Public Member Functions inherited from tb::TBSelectItemSourceList< TBGenericStringItem >
 TBOBJECT_SUBCLASS (TBSelectItemSourceList, TBSelectItemSource)
 
virtual const TBStrGetItemString (int index) const
 Get the string of a item. More...
 
virtual TBSelectItemSourceGetItemSubSource (int index)
 Get the source to be used if this item should open a sub menu. More...
 
virtual TBID GetItemImage (int index) const
 Get the skin image to be painted before the text for this item. More...
 
virtual TBID GetItemID (int index) const
 Get the id of the item. More...
 
virtual int GetNumItems () const
 Get the number of items.
 
virtual TBWidgetCreateItemWidget (int index, TBSelectItemViewer *viewer)
 Create the item representation widget(s). More...
 
bool AddItem (TBGenericStringItem *item, int index)
 Add a new item at the given index. More...
 
bool AddItem (TBGenericStringItem *item)
 Add a new item last. More...
 
TBGenericStringItemGetItem (int index)
 Get the item at the given index. More...
 
const TBGenericStringItemGetItem (int index) const
 Get the item at the given index. More...
 
TBGenericStringItemFindItemByID (TBID id)
 Get the item at the given index. More...
 
const TBGenericStringItemFindItemByID (TBID id) const
 Get the item at the given index. More...
 
void DeleteItem (int index)
 Delete the item at the given index. More...
 
void DeleteAllItems ()
 Delete all items. More...
 
- Public Member Functions inherited from tb::TBSelectItemSource
 TBOBJECT_SUBCLASS (TBSelectItemSource, TBTypedObject)
 
virtual bool Filter (int index, const TBStr &filter)
 Return true if an item matches the given filter text. More...
 
virtual int FindIDIndex (TBID id) const
 Get the index of the first item having this id or -1 if not found.
 
void SetSort (TB_SORT sort)
 Set sort type. More...
 
TB_SORT GetSort () const
 
void InvokeItemChanged (int index, TBSelectItemViewer *exclude_viewer=nullptr)
 Invoke OnItemChanged on all open viewers for this source. More...
 
void InvokeItemAdded (int index)
 
void InvokeItemRemoved (int index)
 
void InvokeAllItemsRemoved ()
 
- Public Member Functions inherited from tb::TBTypedObject
virtual bool IsOfTypeId (const TB_TYPE_ID type_id) const
 Returns true if the class or the base class matches the type id.
 
template<class T >
T * SafeCastTo () const
 Returns this object as the given type or nullptr if it's not that type. More...
 
template<class T >
bool IsOfType () const
 Return true if this object can safely be casted to the given type. More...
 
virtual const char * GetClassName () const
 Get the classname of the object. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from tb::TBTypedObject
template<class T >
static TB_TYPE_ID GetTypeId ()
 A static template method that returns a unique id for each type. More...
 

Detailed Description

TBGenericStringItemSource is a item source list providing items of type TBGenericStringItem.


The documentation for this class was generated from the following file: