]> git.sesse.net Git - vlc/blob - modules/gui/wince/preferences_widgets.h
09a5c7abf95b6e084fa546eb2ce4d0c4604cfa2c
[vlc] / modules / gui / wince / preferences_widgets.h
1 /*****************************************************************************
2  * preferences_widgets.h : WinCE gui plugin for VLC
3  *****************************************************************************
4  * Copyright (C) 2000-2003 the VideoLAN team
5  * $Id$
6  *
7  * Authors: Marodon Cedric <cedric_marodon@yahoo.fr>
8  *          Gildas Bazin <gbazin@videolan.org>
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23  *****************************************************************************/
24
25 class ConfigControl
26 {
27 public:
28     ConfigControl( vlc_object_t *, module_config_t *, HWND, HINSTANCE );
29     virtual ~ConfigControl();
30
31     virtual int GetIntValue() {return 0;}
32     virtual float GetFloatValue() {return 0;}
33     virtual char *GetPszValue() {return GetName();} // faux retourne nom associé à parent
34         // mettre dans constructeur et dans private le nom du panel associé à HWND
35
36     char *GetName();
37     int GetType();
38     vlc_bool_t IsAdvanced();
39
40     void SetUpdateCallback( void (*)( void * ), void * );
41
42 protected:
43     /*wxBoxSizer *sizer;*/
44     HWND label;
45     vlc_object_t *p_this;
46
47     void (*pf_update_callback)( void * );
48     void *p_update_data;
49
50     void OnUpdate( UINT );
51
52 private:
53     HWND parent;
54
55     char *name;
56     int i_type;
57     vlc_bool_t b_advanced;
58 };
59
60 ConfigControl *CreateConfigControl( vlc_object_t *,
61                                     module_config_t *, HWND, HINSTANCE,
62                                     int * );
63
64 class KeyConfigControl: public ConfigControl
65 {
66 public:
67     KeyConfigControl( vlc_object_t *, module_config_t *, HWND,
68                       HINSTANCE, int * );
69     ~KeyConfigControl();
70     virtual int GetIntValue();
71 private:
72     HWND alt;
73     HWND alt_label;
74     HWND ctrl;
75     HWND ctrl_label;
76     HWND shift;
77     HWND shift_label;
78     HWND combo;
79
80     // Array of key descriptions, for the ComboBox
81     static string *m_keysList;
82 };
83
84 class ModuleConfigControl: public ConfigControl
85 {
86 public:
87     ModuleConfigControl( vlc_object_t *, module_config_t *, HWND,
88                          HINSTANCE, int * );
89     ~ModuleConfigControl();
90     virtual char *GetPszValue();
91 private:
92     HWND combo;
93 };
94
95 class StringConfigControl: public ConfigControl
96 {
97 public:
98     StringConfigControl( vlc_object_t *, module_config_t *, HWND,
99                          HINSTANCE, int * );
100     ~StringConfigControl();
101     virtual char *GetPszValue();
102 private:
103     HWND textctrl;
104 };
105
106 class StringListConfigControl: public ConfigControl
107 {
108 public:
109     StringListConfigControl( vlc_object_t *, module_config_t *, HWND,
110                              HINSTANCE, int * );
111     ~StringListConfigControl();
112     virtual char *GetPszValue();
113 private:
114 };
115
116 class FileConfigControl: public ConfigControl
117 {
118 public:
119     FileConfigControl( vlc_object_t *, module_config_t *, HWND,
120                        HINSTANCE, int * );
121     ~FileConfigControl();
122     void OnBrowse( UINT );
123     virtual char *GetPszValue();
124 private:
125 };
126
127 class IntegerConfigControl: public ConfigControl
128 {
129 public:
130     IntegerConfigControl( vlc_object_t *, module_config_t *, HWND,
131                           HINSTANCE, int * );
132     ~IntegerConfigControl();
133     virtual int GetIntValue();
134 private:
135 };
136
137 class IntegerListConfigControl: public ConfigControl
138 {
139 public:
140     IntegerListConfigControl( vlc_object_t *, module_config_t *, HWND,
141                               HINSTANCE, int * );
142     ~IntegerListConfigControl();
143     virtual int GetIntValue();
144 private:
145 };
146
147 class RangedIntConfigControl: public ConfigControl
148 {
149 public:
150     RangedIntConfigControl( vlc_object_t *, module_config_t *, HWND,
151                             HINSTANCE, int * );
152     ~RangedIntConfigControl();
153     virtual int GetIntValue();
154 private:
155 };
156
157 class FloatConfigControl: public ConfigControl
158 {
159 public:
160     FloatConfigControl( vlc_object_t *, module_config_t *, HWND,
161                         HINSTANCE, int * );
162     ~FloatConfigControl();
163     virtual float GetFloatValue();
164 private:
165     HWND textctrl;
166 };
167
168 class BoolConfigControl: public ConfigControl
169 {
170 public:
171     BoolConfigControl( vlc_object_t *, module_config_t *, HWND,
172                        HINSTANCE, int * );
173     ~BoolConfigControl();
174     virtual int GetIntValue();
175 private:
176     HWND checkbox;
177     HWND checkbox_label;
178 };