]> git.vomp.tv Git - vompclient.git/blob - voptions.h
I18n
[vompclient.git] / voptions.h
1 /*
2     Copyright 2004-2005 Chris Tallon
3
4     This file is part of VOMP.
5
6     VOMP is free software; you can redistribute it and/or modify
7     it under the terms of the GNU General Public License as published by
8     the Free Software Foundation; either version 2 of the License, or
9     (at your option) any later version.
10
11     VOMP is distributed in the hope that it will be useful,
12     but WITHOUT ANY WARRANTY; without even the implied warranty of
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14     GNU General Public License for more details.
15
16     You should have received a copy of the GNU General Public License
17     along with VOMP; if not, write to the Free Software
18     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19 */
20
21 #ifndef VOPTIONS_H
22 #define VOPTIONS_H
23
24 #include "view.h"
25 #include "remote.h"
26 #include "viewman.h"
27 #include "vdr.h"
28 #include "colour.h"
29 #include "video.h"
30 #include "woptionbox.h"
31 #include "wsymbol.h"
32 #include "i18n.h"
33
34 #define NUM_OPTIONS 8
35 typedef struct
36 {
37   char *title;           // Name of the option
38   char *configSection;   // Which section of the config file
39   char *configParam;     // Parameter name in the config file
40   UINT optionCount;      // How many choices?
41   UINT defaultOption;    // Serial of the default choice (base 0)
42   char **options;  // Text for the options
43 } OPTIONDATA;
44
45 static char* options0[] = {"Old", "New"};
46 static char* options1[] = {"RGB+composite", "S-Video"};
47 static char* options2[] = {"4:3", "16:9"};
48 static char* options3[] = {"Chop sides", "Letterbox"};
49 static char* options4[] = {"On", "Off", "Last state"};
50 static char* options5[] = {"All", "FTA only"};
51 static char* options6[] = {"0", "5", "10", "15", "20", "25", "30", "35", "40", "45", "50", "55", "60", "65", "70", "75", "80", "85", "90", "95", "99"};
52 static char *i18nLanguages[] = { "English", "Test" };
53
54 const static OPTIONDATA optionData[NUM_OPTIONS] =
55 {
56   {"Remote control type",      "General", "Remote type",      2, 0, options0 },
57   {"Language",                 "General", "Language",         NUM_LANGUAGES, 0, i18nLanguages },
58   {"TV connection type",       "TV",      "Connection",       2, 0, options1 },
59   {"TV aspect ratio",          "TV",      "Aspect",           2, 0, options2 },
60   {"16:9 on 4:3 display mode", "TV",      "Widemode",         2, 0, options3 },
61   {"Power state after bootup", "General", "Power After Boot", 3, 0, options4 },
62   {"Display channels",         "General", "Channels",         2, 0, options5 },
63   {"VDR-Pri 0=OK !See forums!","General", "Live priority",    21, 0, options6 }
64 };
65
66 class VOptions : public View
67 {
68   public:
69     VOptions();
70     ~VOptions();
71
72     int handleCommand(int command);
73     void draw();
74
75   private:
76     void doSave();
77
78     const static UINT numOptions = NUM_OPTIONS;
79     UINT selectedOption;
80     WOptionBox optionBox[numOptions];
81     VDR* vdr;
82 };
83
84 #endif