11 #include "games/controllers/ControllerTypes.h" 12 #include "listproviders/IListProvider.h" 57 const std::string& peripheralLocation,
65 std::unique_ptr<IListProvider>
Clone()
override;
66 bool Update(
bool forceRefresh)
override;
67 void Fetch(std::vector<CGUIListItemPtr>& items)
override;
68 bool OnClick(
const CGUIListItemPtr& item)
override {
return false; }
69 bool OnInfo(
const CGUIListItemPtr& item)
override {
return false; }
70 bool OnContextMenu(
const CGUIListItemPtr& item)
override {
return false; }
76 ControllerPtr GetControllerProfile()
const {
return m_controllerProfile; }
78 unsigned int GetPortCount()
const {
return m_portCount; }
79 void SetPortCount(
unsigned int portCount);
80 int GetPortIndex()
const {
return m_portIndex; }
81 void SetPortIndex(
int portIndex);
82 const std::string& GetPeripheralLocation()
const {
return m_peripheralLocation; }
83 void SetPeripheralLocation(
const std::string& peripheralLocation);
87 void InitializeItems();
92 unsigned int m_portCount{0};
94 std::string m_peripheralLocation;
97 const uint32_t m_alignment;
98 std::vector<std::shared_ptr<CGUIListItem>> m_items;
An interface for providing lists to UI containers.
Definition: IListProvider.h:22
Controller list provider for the IAgentList control in the Player Viewer (GameAgents) window...
Definition: GUIGameControllerProvider.h:40
void SetDefaultItem(int item, bool always) override
Set the default item to focus. For backwards compatibility.
Definition: GUIGameControllerProvider.h:71
bool AlwaysFocusDefaultItem() const override
Whether to always focus the default item.
Definition: GUIGameControllerProvider.h:73
bool OnInfo(const CGUIListItemPtr &item) override
Open the info dialog for an item provided by this IListProvider.
Definition: GUIGameControllerProvider.h:69
int GetDefaultItem() const override
The default item to focus.
Definition: GUIGameControllerProvider.h:72
bool OnContextMenu(const CGUIListItemPtr &item) override
Open the context menu for an item provided by this IListProvider.
Definition: GUIGameControllerProvider.h:70
bool OnClick(const CGUIListItemPtr &item) override
Click event on an item.
Definition: GUIGameControllerProvider.h:68
void Fetch(std::vector< CGUIListItemPtr > &items) override
Fetch the current list of items.
Definition: GUIGameControllerProvider.cpp:68
std::unique_ptr< IListProvider > Clone() override
Create an instance of the derived class. Allows for polymorphic copies.
Definition: GUIGameControllerProvider.cpp:56
Definition: AudioDecoder.h:18
std::shared_ptr< CController > ControllerPtr
Smart pointer to a game controller (CController)
Definition: ControllerTypes.h:25
CGUIGameControllerProvider(unsigned int portCount, int portIndex, const std::string &peripheralLocation, uint32_t alignment, int parentID)
Construct a game controller provider for the player's controller list in the Player Viewer dialog...
Definition: GUIGameControllerProvider.cpp:30
bool Update(bool forceRefresh) override
Update the list content.
Definition: GUIGameControllerProvider.cpp:61