#ifndef CBROWSERGRID_H #define CBROWSERGRID_H #include #include #include #include "Plexservice.h" #include "plexgdm.h" #include "PlexServer.h" #include "viewGridNavigator.h" //#include "viewHeader.h" #include class cDummyElement : public cGridElement { private: std::string m_title; public: cDummyElement(std::string title); cDummyElement(); virtual std::string GetTitle(); virtual void AddTokens(std::shared_ptr grid, bool clear = true, std::function OnCached = NULL); }; class cServerElement : public cGridElement { private: 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 grid, bool clear = true, std::function OnCached = NULL); std::string StartPath() { return m_sStartPath; } plexclient::PlexServer* Server() { return m_pServer; } }; class cBrowserGrid : public cViewGridNavigator { private: //std::shared_ptr m_pViewHeader; std::shared_ptr m_pHeader; std::shared_ptr m_pBackground; std::shared_ptr m_pfooter; std::shared_ptr m_pInfopane; std::shared_ptr m_pScrollbar; std::shared_ptr m_pWatch; int m_lastsecond; int m_viewEntryIndex; bool m_redrawBackground; bool m_bServersAreRoot; std::vector m_vServerElements; std::shared_ptr m_pContainer; std::shared_ptr m_pService; cDummyElement m_Dummy; void ProcessData(); void SetServerElements(); void DrawFooter(); void DrawBackground(); void DrawInfopane(); void DrawScrollbar(); public: cBrowserGrid(std::shared_ptr rootView); ~cBrowserGrid(); //cBrowserGrid(skindesignerapi::cViewGrid* viewGrid, std::shared_ptr service); std::shared_ptr 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