]> git.vomp.tv Git - vompclient.git/blob - voptions.h
Add video PTS to demuxer and do some tidying
[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 #include "vwelcome.h"
34
35 #define NUM_OPTIONS 8
36 typedef struct
37 {
38   char *title;           // Name of the option
39   char *configSection;   // Which section of the config file
40   char *configParam;     // Parameter name in the config file
41   UINT optionCount;      // How many choices?
42   UINT defaultOption;    // Serial of the default choice (base 0)
43   const char * const * options;  // Text for the options
44 } OPTIONDATA;
45
46 static const char* options0[] = {"Old", "New"};
47 static const char* options1[] = {"RGB+composite", "S-Video"};
48 static const char* options2[] = {"4:3", "16:9"};
49 static const char* options3[] = {"Chop sides", "Letterbox"};
50 static const char* options4[] = {"On", "Off", "Last state"};
51 static const char* options5[] = {"All", "FTA only"};
52 static const char* options6[] = {"0", "5", "10", "15", "20", "25", "30", "35", "40", "45", "50", "55", "60", "65", "70", "75", "80", "85", "90", "95", "99"};
53
54 const static OPTIONDATA optionData[NUM_OPTIONS] =
55 {
56   {"Remote control type",      "General", "Remote type",      2, 0, options0 },
57   {"Language",                 "General", "Language",         I18n::NumLanguages, 0, I18n::Languages },
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 VWelcome;
67
68 class VOptions : public View
69 {
70   public:
71     VOptions(VWelcome* tvwelcome);
72     ~VOptions();
73
74     int handleCommand(int command);
75     void draw();
76
77   private:
78     void doSave();
79
80     const static UINT numOptions = NUM_OPTIONS;
81     UINT selectedOption;
82     WOptionBox optionBox[numOptions];
83     VDR* vdr;
84     int* optionsAtStart;
85     ViewMan* viewman;
86     VWelcome* vwelcome;
87 };
88
89 #endif
90