Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
|
An interface for providing lists to UI containers. More...
#include <IListProvider.h>
Public Member Functions | |
IListProvider (int parentID) | |
IListProvider (const IListProvider &other)=default | |
virtual | ~IListProvider ()=default |
virtual std::unique_ptr< IListProvider > | Clone ()=0 |
Create an instance of the derived class. Allows for polymorphic copies. | |
virtual bool | Update (bool forceRefresh)=0 |
Update the list content. | |
virtual void | Fetch (std::vector< std::shared_ptr< CGUIListItem > > &items)=0 |
Fetch the current list of items. | |
virtual bool | IsUpdating () const |
Check whether the list provider is updating content. | |
virtual void | Reset () |
Reset the current list of items. Derived classes may choose to ignore this. | |
virtual void | FreeResources (bool immediately) |
Free all GUI resources allocated by the items. | |
virtual bool | OnClick (const std::shared_ptr< CGUIListItem > &item)=0 |
Click event on an item. | |
virtual bool | OnPlay (const std::shared_ptr< CGUIListItem > &item) |
Play event on an item. | |
virtual bool | OnInfo (const std::shared_ptr< CGUIListItem > &item)=0 |
Open the info dialog for an item provided by this IListProvider. | |
virtual bool | OnContextMenu (const std::shared_ptr< CGUIListItem > &item)=0 |
Open the context menu for an item provided by this IListProvider. | |
virtual void | SetDefaultItem (int item, bool always) |
Set the default item to focus. For backwards compatibility. | |
virtual int | GetDefaultItem () const |
The default item to focus. | |
virtual bool | AlwaysFocusDefaultItem () const |
Whether to always focus the default item. | |
Static Public Member Functions | |
static std::unique_ptr< IListProvider > | Create (const TiXmlNode *parent, int parentID) |
Factory to create list providers. | |
static std::unique_ptr< IListProvider > | CreateSingle (const TiXmlNode *content, int parentID) |
Factory to create list providers. Cannot create a multi-provider. | |
Protected Attributes | |
int | m_parentID |
An interface for providing lists to UI containers.
|
inlineexplicit |
|
explicitdefault |
|
virtualdefault |
|
inlinevirtual |
Whether to always focus the default item.
Reimplemented in CStaticListProvider, and KODI::GAME::CGUIGameControllerProvider.
|
pure virtual |
Create an instance of the derived class. Allows for polymorphic copies.
Implemented in CDirectoryProvider, CMultiProvider, CStaticListProvider, and KODI::GAME::CGUIGameControllerProvider.
|
static |
Factory to create list providers.
parent | a parent TiXmlNode for the container. |
parentID | id of parent window for context. |
|
static |
Factory to create list providers. Cannot create a multi-provider.
content | the TiXmlNode for the content to create. |
parentID | id of parent window for context. |
|
pure virtual |
Fetch the current list of items.
items | [out] the list to be filled. |
Implemented in CDirectoryProvider, CMultiProvider, CStaticListProvider, and KODI::GAME::CGUIGameControllerProvider.
Free all GUI resources allocated by the items.
immediately | true to free resources immediately, free resources async later otherwise. |
Reimplemented in CDirectoryProvider.
|
inlinevirtual |
The default item to focus.
Reimplemented in CStaticListProvider, and KODI::GAME::CGUIGameControllerProvider.
|
inlinevirtual |
Check whether the list provider is updating content.
Reimplemented in CDirectoryProvider, and CMultiProvider.
|
pure virtual |
Click event on an item.
item | the item that was clicked. |
Implemented in CDirectoryProvider, CMultiProvider, CStaticListProvider, and KODI::GAME::CGUIGameControllerProvider.
|
pure virtual |
Open the context menu for an item provided by this IListProvider.
item | the item that was clicked. |
Implemented in CDirectoryProvider, CMultiProvider, CStaticListProvider, and KODI::GAME::CGUIGameControllerProvider.
|
pure virtual |
Open the info dialog for an item provided by this IListProvider.
item | the item that was clicked. |
Implemented in CDirectoryProvider, CMultiProvider, CStaticListProvider, and KODI::GAME::CGUIGameControllerProvider.
|
inlinevirtual |
Play event on an item.
item | the item to play. |
Reimplemented in CDirectoryProvider.
|
inlinevirtual |
Reset the current list of items. Derived classes may choose to ignore this.
Reimplemented in CDirectoryProvider, and CMultiProvider.
Set the default item to focus. For backwards compatibility.
item | the item to focus. |
always | whether this item should always be used on first focus. |
Reimplemented in CStaticListProvider, and KODI::GAME::CGUIGameControllerProvider.
Update the list content.
Implemented in CDirectoryProvider, CMultiProvider, CStaticListProvider, and KODI::GAME::CGUIGameControllerProvider.
|
protected |