]> git.vomp.tv Git - vompclient.git/blob - voptions.h
New options code, enable radio, other stuff for dongle 15
[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
33 #define NUM_OPTIONS 7
34 typedef struct
35 {
36   char *title;           // Name of the option
37   char *configSection;   // Which section of the config file
38   char *configParam;     // Parameter name in the config file
39   UINT optionCount;      // How many choices?
40   UINT defaultOption;    // Serial of the default choice (base 0)
41   const char **options;  // Text for the options
42 } OPTIONDATA;
43
44 const static char* options0[] = {"Old", "New"};
45 const static char* options1[] = {"RGB+composite", "S-Video"};
46 const static char* options2[] = {"4:3", "16:9"};
47 const static char* options3[] = {"Chop sides", "Letterbox"};
48 const static char* options4[] = {"On", "Off", "Last state"};
49 const static char* options5[] = {"All", "FTA only"};
50 const static char* options6[] = {"0", "5", "10", "15", "20", "25", "30", "35", "40", "45", "50", "55", "60", "65", "70", "75", "80", "85", "90", "95", "99"};
51
52 const static OPTIONDATA optionData[NUM_OPTIONS] =
53 {
54   {"Remote control type",      "General", "Remote type",      2, 0, options0 },
55   {"TV connection type",       "TV",      "Connection",       2, 0, options1 },
56   {"TV aspect ratio",          "TV",      "Aspect",           2, 0, options2 },
57   {"16:9 on 4:3 display mode", "TV",      "Widemode",         2, 0, options3 },
58   {"Power state after bootup", "General", "Power After Boot", 3, 0, options4 },
59   {"Display channels",         "General", "Channels",         2, 0, options5 },
60   {"VDR-Pri 0=OK !See forums!","General", "Live priority",    21, 0, options6 }
61 };
62
63 class VOptions : public View
64 {
65   public:
66     VOptions();
67     ~VOptions();
68
69     int handleCommand(int command);
70     void draw();
71
72   private:
73     void doSave();
74
75     const static UINT numOptions = NUM_OPTIONS;
76     UINT selectedOption;
77     WOptionBox optionBox[numOptions];
78     VDR* vdr;
79 };
80
81 #endif