1
/*****************************************************************************
2
* preferences_widgets.h : wxWindows plugin for vlc
3
*****************************************************************************
4
* Copyright (C) 2000-2003 VideoLAN
5
* $Id: preferences_widgets.h 7322 2004-04-12 00:06:59Z gbazin $
7
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
9
* This program is free software; you can redistribute it and/or modify
10
* it under the terms of the GNU General Public License as published by
11
* the Free Software Foundation; either version 2 of the License, or
12
* (at your option) any later version.
14
* This program is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
* GNU General Public License for more details.
19
* You should have received a copy of the GNU General Public License
20
* along with this program; if not, write to the Free Software
21
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
22
*****************************************************************************/
24
class ConfigControl: public wxPanel
27
ConfigControl( vlc_object_t *, module_config_t *, wxWindow * );
31
virtual int GetIntValue() {return 0;}
32
virtual float GetFloatValue() {return 0;}
33
virtual wxString GetPszValue() {return wxString();}
37
vlc_bool_t IsAdvanced();
39
void SetUpdateCallback( void (*)( void * ), void * );
46
void (*pf_update_callback)( void * );
49
void OnUpdate( wxCommandEvent& );
54
vlc_bool_t b_advanced;
57
ConfigControl *CreateConfigControl( vlc_object_t *,
58
module_config_t *, wxWindow * );
60
class KeyConfigControl: public ConfigControl
63
KeyConfigControl( vlc_object_t *, module_config_t *, wxWindow * );
65
virtual int GetIntValue();
71
// Array of key descriptions, for the ComboBox
72
static wxString *m_keysList;
75
class ModuleConfigControl: public ConfigControl
78
ModuleConfigControl( vlc_object_t *, module_config_t *, wxWindow * );
79
~ModuleConfigControl();
80
virtual wxString GetPszValue();
85
class StringConfigControl: public ConfigControl
88
StringConfigControl( vlc_object_t *, module_config_t *, wxWindow * );
89
~StringConfigControl();
90
virtual wxString GetPszValue();
97
class StringListConfigControl: public ConfigControl
100
StringListConfigControl( vlc_object_t *, module_config_t *, wxWindow * );
101
~StringListConfigControl();
102
virtual wxString GetPszValue();
105
char *psz_default_value;
106
void UpdateCombo( module_config_t *p_item );
108
void OnAction( wxCommandEvent& );
110
DECLARE_EVENT_TABLE()
113
class FileConfigControl: public ConfigControl
116
FileConfigControl( vlc_object_t *, module_config_t *, wxWindow * );
117
~FileConfigControl();
118
void OnBrowse( wxCommandEvent& );
119
virtual wxString GetPszValue();
121
wxTextCtrl *textctrl;
125
DECLARE_EVENT_TABLE()
128
class IntegerConfigControl: public ConfigControl
131
IntegerConfigControl( vlc_object_t *, module_config_t *, wxWindow * );
132
~IntegerConfigControl();
133
virtual int GetIntValue();
137
DECLARE_EVENT_TABLE()
140
class IntegerListConfigControl: public ConfigControl
143
IntegerListConfigControl( vlc_object_t *, module_config_t *, wxWindow * );
144
~IntegerListConfigControl();
145
virtual int GetIntValue();
148
void UpdateCombo( module_config_t *p_item );
150
void OnAction( wxCommandEvent& );
152
DECLARE_EVENT_TABLE()
155
class RangedIntConfigControl: public ConfigControl
158
RangedIntConfigControl( vlc_object_t *, module_config_t *, wxWindow * );
159
~RangedIntConfigControl();
160
virtual int GetIntValue();
164
DECLARE_EVENT_TABLE()
167
class FloatConfigControl: public ConfigControl
170
FloatConfigControl( vlc_object_t *, module_config_t *, wxWindow * );
171
~FloatConfigControl();
172
virtual float GetFloatValue();
174
wxTextCtrl *textctrl;
176
DECLARE_EVENT_TABLE()
179
class BoolConfigControl: public ConfigControl
182
BoolConfigControl( vlc_object_t *, module_config_t *, wxWindow * );
183
~BoolConfigControl();
184
virtual int GetIntValue();
186
wxCheckBox *checkbox;
188
DECLARE_EVENT_TABLE()