summaryrefslogtreecommitdiff
path: root/xml/display.h
blob: 30531e060852c6f1bb3a5b62423627843b777efa (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
#ifndef VDR_TEXT2SKIN_DISPLAY_H 
#define VDR_TEXT2SKIN_DISPLAY_H 

#include "xml/object.h"
#include <string>
#include <map>

class cxSkin;

class cxDisplay {
	friend bool xStartElem(const std::string &name, std::map<std::string,std::string> &attrs);
	friend bool xEndElem(const std::string &name);

public:
	enum eType {
		channelInfo,
		channelSmall,
		volume,
		audioTracks,
		message,
		replayInfo,
		replaySmall,
		menu,
#define __COUNT_DISPLAY__ (menu + 1)
	};

private:
	cxSkin   *mSkin;
	eType     mType;
	txWindow  mWindows[MAXOSDAREAS];
	int       mNumWindows;
	int       mNumMarquees;
	cxObjects mObjects;
	cxRefresh mRefreshDefault;

public:
	cxDisplay(cxSkin *Parent);

	static const std::string &GetType(eType Type);
	bool ParseType(const std::string &Text);

	eType            Type(void)       const { return mType; }
	const txWindow  *Windows(void)    const { return mWindows; }
	int              NumWindows(void) const { return mNumWindows; }
	cxSkin          *Skin(void)       const { return mSkin; }

	uint             Objects(void)    const { return mObjects.size(); }
	cxObject        *GetObject(int n) const { return mObjects[n]; }
};

class cxDisplays: public std::map<cxDisplay::eType,cxDisplay*> {
public:
	cxDisplays(void);
	~cxDisplays();
};

#endif // VDR_TEXT2SKIN_DISPLAY_H