]> git.sesse.net Git - vlc/blob - modules/gui/wince/preferences_widgets.h
update module LIST file.
[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();}
34     // FIXME returns name corresponding to parent
35     // put the panel name corresponding to HWND into the constructor and make it private
36
37     char *GetName();
38     int GetType();
39     vlc_bool_t IsAdvanced();
40
41     void SetUpdateCallback( void (*)( void * ), void * );
42
43 protected:
44     /*wxBoxSizer *sizer;*/
45     HWND label;
46     vlc_object_t *p_this;
47
48     void (*pf_update_callback)( void * );
49     void *p_update_data;
50
51     void OnUpdate( UINT );
52
53 private:
54     HWND parent;
55
56     char *name;
57     int i_type;
58     vlc_bool_t b_advanced;
59 };
60
61 ConfigControl *CreateConfigControl( vlc_object_t *,
62                                     module_config_t *, HWND, HINSTANCE,
63                                     int * );
64
65 class KeyConfigControl: public ConfigControl
66 {
67 public:
68     KeyConfigControl( vlc_object_t *, module_config_t *, HWND,
69                       HINSTANCE, int * );
70     ~KeyConfigControl();
71     virtual int GetIntValue();
72 private:
73     HWND alt;
74     HWND alt_label;
75     HWND ctrl;
76     HWND ctrl_label;
77     HWND shift;
78     HWND shift_label;
79     HWND combo;
80
81     // Array of key descriptions, for the ComboBox
82     static string *m_keysList;
83 };
84
85 class ModuleConfigControl: public ConfigControl
86 {
87 public:
88     ModuleConfigControl( vlc_object_t *, module_config_t *, HWND,
89                          HINSTANCE, int * );
90     ~ModuleConfigControl();
91     virtual char *GetPszValue();
92 private:
93     HWND combo;
94 };
95
96 class StringConfigControl: public ConfigControl
97 {
98 public:
99     StringConfigControl( vlc_object_t *, module_config_t *, HWND,
100                          HINSTANCE, int * );
101     ~StringConfigControl();
102     virtual char *GetPszValue();
103 private:
104     HWND textctrl;
105 };
106
107 class StringListConfigControl: public ConfigControl
108 {
109 public:
110     StringListConfigControl( vlc_object_t *, module_config_t *, HWND,
111                              HINSTANCE, int * );
112     ~StringListConfigControl();
113     virtual char *GetPszValue();
114 private:
115 };
116
117 class FileConfigControl: public ConfigControl
118 {
119 public:
120     FileConfigControl( vlc_object_t *, module_config_t *, HWND,
121                        HINSTANCE, int * );
122     ~FileConfigControl();
123     void OnBrowse( UINT );
124     virtual char *GetPszValue();
125 private:
126 };
127
128 class IntegerConfigControl: public ConfigControl
129 {
130 public:
131     IntegerConfigControl( vlc_object_t *, module_config_t *, HWND,
132                           HINSTANCE, int * );
133     ~IntegerConfigControl();
134     virtual int GetIntValue();
135 private:
136 };
137
138 class IntegerListConfigControl: public ConfigControl
139 {
140 public:
141     IntegerListConfigControl( vlc_object_t *, module_config_t *, HWND,
142                               HINSTANCE, int * );
143     ~IntegerListConfigControl();
144     virtual int GetIntValue();
145 private:
146 };
147
148 class RangedIntConfigControl: public ConfigControl
149 {
150 public:
151     RangedIntConfigControl( vlc_object_t *, module_config_t *, HWND,
152                             HINSTANCE, int * );
153     ~RangedIntConfigControl();
154     virtual int GetIntValue();
155 private:
156 };
157
158 class FloatConfigControl: public ConfigControl
159 {
160 public:
161     FloatConfigControl( vlc_object_t *, module_config_t *, HWND,
162                         HINSTANCE, int * );
163     ~FloatConfigControl();
164     virtual float GetFloatValue();
165 private:
166     HWND textctrl;
167 };
168
169 class BoolConfigControl: public ConfigControl
170 {
171 public:
172     BoolConfigControl( vlc_object_t *, module_config_t *, HWND,
173                        HINSTANCE, int * );
174     ~BoolConfigControl();
175     virtual int GetIntValue();
176 private:
177     HWND checkbox;
178     HWND checkbox_label;
179 };