diff options
Diffstat (limited to 'browserGrid.h')
-rw-r--r-- | browserGrid.h | 139 |
1 files changed, 81 insertions, 58 deletions
diff --git a/browserGrid.h b/browserGrid.h index 12b35f8..19cd501 100644 --- a/browserGrid.h +++ b/browserGrid.h @@ -11,76 +11,99 @@ //#include "viewHeader.h" #include <libskindesignerapi/osdelements.h> -class cDummyElement : public cGridElement -{ +class cDummyElement : public cGridElement { private: - std::string m_title; + std::string m_title; public: - cDummyElement(std::string title); - cDummyElement(); - virtual std::string GetTitle(); - virtual void AddTokens(std::shared_ptr<skindesignerapi::cOsdElement> grid, bool clear = true, std::function<void(cGridElement*)> OnCached = NULL); + cDummyElement(std::string title); + + cDummyElement(); + + virtual std::string GetTitle(); + + virtual void AddTokens(std::shared_ptr<skindesignerapi::cOsdElement> grid, bool clear = true, + std::function<void(cGridElement *)> OnCached = NULL); }; -class cServerElement : public cGridElement -{ +class cServerElement : public cGridElement { private: - plexclient::PlexServer* m_pServer; - std::string m_sStartPath; - std::string m_sStartName; + plexclient::PlexServer *m_pServer; + std::string m_sStartPath; + std::string m_sStartName; public: - cServerElement(plexclient::PlexServer* server, std::string startPath, std::string startName); - virtual std::string GetTitle(); - virtual void AddTokens(std::shared_ptr<skindesignerapi::cOsdElement> grid, bool clear = true, std::function<void(cGridElement*)> OnCached = NULL); - std::string StartPath() { return m_sStartPath; } - plexclient::PlexServer* Server() { return m_pServer; } + cServerElement(plexclient::PlexServer *server, std::string startPath, std::string startName); + + virtual std::string GetTitle(); + + virtual void AddTokens(std::shared_ptr<skindesignerapi::cOsdElement> grid, bool clear = true, + std::function<void(cGridElement *)> OnCached = NULL); + + std::string StartPath() { return m_sStartPath; } + + plexclient::PlexServer *Server() { return m_pServer; } }; -class cBrowserGrid : public cViewGridNavigator -{ +class cBrowserGrid : public cViewGridNavigator { private: - //std::shared_ptr<cViewHeader> m_pViewHeader; - std::shared_ptr<skindesignerapi::cViewElement> m_pHeader; - std::shared_ptr<skindesignerapi::cViewElement> m_pBackground; - std::shared_ptr<skindesignerapi::cViewElement> m_pfooter; - std::shared_ptr<skindesignerapi::cViewElement> m_pInfopane; - std::shared_ptr<skindesignerapi::cViewElement> m_pScrollbar; - std::shared_ptr<skindesignerapi::cViewElement> m_pWatch; - int m_lastsecond; - int m_viewEntryIndex; - bool m_redrawBackground; - - bool m_bServersAreRoot; - std::vector<cServerElement> m_vServerElements; - std::shared_ptr<plexclient::MediaContainer> m_pContainer; - std::shared_ptr<plexclient::Plexservice> m_pService; - cDummyElement m_Dummy; - - void ProcessData(); - void SetServerElements(); - void DrawFooter(); - void DrawBackground(); - void DrawInfopane(); - void DrawScrollbar(); + //std::shared_ptr<cViewHeader> m_pViewHeader; + std::shared_ptr<skindesignerapi::cViewElement> m_pHeader; + std::shared_ptr<skindesignerapi::cViewElement> m_pBackground; + std::shared_ptr<skindesignerapi::cViewElement> m_pfooter; + std::shared_ptr<skindesignerapi::cViewElement> m_pInfopane; + std::shared_ptr<skindesignerapi::cViewElement> m_pScrollbar; + std::shared_ptr<skindesignerapi::cViewElement> m_pWatch; + int m_lastsecond; + int m_viewEntryIndex; + bool m_redrawBackground; + + bool m_bServersAreRoot; + std::vector<cServerElement> m_vServerElements; + std::shared_ptr<plexclient::MediaContainer> m_pContainer; + std::shared_ptr<plexclient::Plexservice> m_pService; + cDummyElement m_Dummy; + + void ProcessData(); + + void SetServerElements(); + + void DrawFooter(); + + void DrawBackground(); + + void DrawInfopane(); + + void DrawScrollbar(); public: - cBrowserGrid(std::shared_ptr<skindesignerapi::cOsdView> rootView); - ~cBrowserGrid(); - //cBrowserGrid(skindesignerapi::cViewGrid* viewGrid, std::shared_ptr<plexclient::Plexservice> service); - std::shared_ptr<plexclient::MediaContainer> MediaContainer() { return m_pContainer; } - - void DrawGrid(); - void SwitchGrid(int index); - void SwitchView(ViewMode mode = Config::GetInstance().DefaultViewMode); - void NextViewMode(); - virtual eOSState NavigateSelect(); - virtual eOSState NavigateBack(); - void NextTab(); - void PrevTab(); - bool DrawTime(); - virtual void Flush(); - virtual void Clear(); + cBrowserGrid(std::shared_ptr<skindesignerapi::cOsdView> rootView); + + ~cBrowserGrid(); + + //cBrowserGrid(skindesignerapi::cViewGrid* viewGrid, std::shared_ptr<plexclient::Plexservice> service); + std::shared_ptr<plexclient::MediaContainer> MediaContainer() { return m_pContainer; } + + void DrawGrid(); + + void SwitchGrid(int index); + + void SwitchView(ViewMode mode = Config::GetInstance().DefaultViewMode); + + void NextViewMode(); + + virtual eOSState NavigateSelect(); + + virtual eOSState NavigateBack(); + + void NextTab(); + + void PrevTab(); + + bool DrawTime(); + + virtual void Flush(); + + virtual void Clear(); }; #endif // CBROWSERGRID_H |