blob: fb389500ca8abeeab3b1bc67e161b925e6245116 (
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
|
/*
* $Id: skin.c,v 1.1 2004/12/19 22:03:28 lordjaxom Exp $
*/
#include "xml/skin.h"
#include <vdr/tools.h>
#include <vdr/config.h>
const std::string ScreenBases[] = { "relative", "absolute" };
cxSkin::cxSkin(const std::string &Name):
mName(Name) {
}
void cxSkin::SetBase(eScreenBase Base) {
mBase = Base;
switch (mBase) {
case relative:
mBaseOffset = txPoint(Setup.OSDLeft, Setup.OSDTop);
mBaseSize = txSize(Setup.OSDWidth, Setup.OSDHeight);
break;
case absolute:
mBaseOffset = txPoint(0, 0);
mBaseSize = txSize(720, 576); //XXX
break;
default:
break;
}
}
bool cxSkin::ParseBase(const std::string &Text) {
int i;
for (i = 0; i < (int)__COUNT_BASE__; ++i) {
if (ScreenBases[i] == Text)
break;
}
if (i < (int)__COUNT_BASE__) {
SetBase((eScreenBase)i);
return true;
}
return false;
}
|