summaryrefslogtreecommitdiff
path: root/plexSdOsd.h
blob: bacf3dc94e7c4e66f14c5e4cd894eab7ca7be40a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#ifndef CPLEXSDOSD_H
#define CPLEXSDOSD_H

#include <vdr/osdbase.h>

#include <iostream>
#include <string>
#include <vector>
#include <iterator>
#include <algorithm>
#include <memory>

#include "Config.h"
#include "Plexservice.h"

#include "plexgdm.h"
#include "hlsPlayerControl.h"

#include "browserGrid.h"
#include  <libskindesignerapi/osdelements.h>
#include  <libskindesignerapi/skindesignerosdbase.h>

enum eViews {
	viRootView,
	viDetailView
};

enum eViewElementsRoot {
	verBackground,
	verHeader,
	verFooter,
	verInfopane,
	verWatch,
	verMessage,
	verScrollbar
};

enum eViewGrids {
	vgCover,
	vgDetail,
	vgList
};

enum eViewElementsDetail {
    vedBackground,
    vedHeader,
    vedFooter
};

class cPlexSdOsd : public skindesignerapi::cSkindesignerOsdObject
{	
private:	
	std::shared_ptr<cBrowserGrid> m_pBrowserGrid;
	std::shared_ptr<skindesignerapi::cViewElement> m_pMessage;
	bool m_messageDisplayed;

	std::shared_ptr<skindesignerapi::cOsdView> m_pRootView;
	
	void Flush();
	//void SwitchGrid(ePlexMenuTab currentTab);
	void DrawBackground();
	void DrawFooter();
	void DrawMessage(std::string message);
	
public:
	cPlexSdOsd();
	~cPlexSdOsd();
	virtual void Show(void);
  	virtual eOSState ProcessKey(eKeys Key);
	
	bool SdSupport();
	static cMutex RedrawMutex;
};

#endif // CPLEXSDOSD_H