~ubuntu-branches/debian/wheezy/vlc/wheezy

« back to all changes in this revision

Viewing changes to modules/gui/wxwindows/preferences_widgets.h

Tags: upstream-0.7.2.final
ImportĀ upstreamĀ versionĀ 0.7.2.final

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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 $
 
6
 *
 
7
 * Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
 
8
 *
 
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.
 
13
 *
 
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.
 
18
 *
 
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
 *****************************************************************************/
 
23
 
 
24
class ConfigControl: public wxPanel
 
25
{
 
26
public:
 
27
    ConfigControl( vlc_object_t *, module_config_t *, wxWindow * );
 
28
    ~ConfigControl();
 
29
    wxSizer *Sizer();
 
30
 
 
31
    virtual int GetIntValue() {return 0;}
 
32
    virtual float GetFloatValue() {return 0;}
 
33
    virtual wxString GetPszValue() {return wxString();}
 
34
 
 
35
    wxString GetName();
 
36
    int GetType();
 
37
    vlc_bool_t IsAdvanced();
 
38
 
 
39
    void SetUpdateCallback( void (*)( void * ), void * );
 
40
 
 
41
protected:
 
42
    wxBoxSizer *sizer;
 
43
    wxStaticText *label;
 
44
    vlc_object_t *p_this;
 
45
 
 
46
    void (*pf_update_callback)( void * );
 
47
    void *p_update_data;
 
48
 
 
49
    void OnUpdate( wxCommandEvent& );
 
50
 
 
51
private:
 
52
    wxString name;
 
53
    int i_type;
 
54
    vlc_bool_t b_advanced;
 
55
};
 
56
 
 
57
ConfigControl *CreateConfigControl( vlc_object_t *,
 
58
                                    module_config_t *, wxWindow * );
 
59
 
 
60
class KeyConfigControl: public ConfigControl
 
61
{
 
62
public:
 
63
    KeyConfigControl( vlc_object_t *, module_config_t *, wxWindow * );
 
64
    ~KeyConfigControl();
 
65
    virtual int GetIntValue();
 
66
private:
 
67
    wxCheckBox *alt;
 
68
    wxCheckBox *ctrl;
 
69
    wxCheckBox *shift;
 
70
    wxComboBox *combo;
 
71
    // Array of key descriptions, for the ComboBox
 
72
    static wxString *m_keysList;
 
73
};
 
74
 
 
75
class ModuleConfigControl: public ConfigControl
 
76
{
 
77
public:
 
78
    ModuleConfigControl( vlc_object_t *, module_config_t *, wxWindow * );
 
79
    ~ModuleConfigControl();
 
80
    virtual wxString GetPszValue();
 
81
private:
 
82
    wxComboBox *combo;
 
83
};
 
84
 
 
85
class StringConfigControl: public ConfigControl
 
86
{
 
87
public:
 
88
    StringConfigControl( vlc_object_t *, module_config_t *, wxWindow * );
 
89
    ~StringConfigControl();
 
90
    virtual wxString GetPszValue();
 
91
private:
 
92
    wxTextCtrl *textctrl;
 
93
 
 
94
    DECLARE_EVENT_TABLE()
 
95
};
 
96
 
 
97
class StringListConfigControl: public ConfigControl
 
98
{
 
99
public:
 
100
    StringListConfigControl( vlc_object_t *, module_config_t *, wxWindow * );
 
101
    ~StringListConfigControl();
 
102
    virtual wxString GetPszValue();
 
103
private:
 
104
    wxComboBox *combo;
 
105
    char *psz_default_value;
 
106
    void UpdateCombo( module_config_t *p_item );
 
107
 
 
108
    void OnAction( wxCommandEvent& );
 
109
 
 
110
    DECLARE_EVENT_TABLE()
 
111
};
 
112
 
 
113
class FileConfigControl: public ConfigControl
 
114
{
 
115
public:
 
116
    FileConfigControl( vlc_object_t *, module_config_t *, wxWindow * );
 
117
    ~FileConfigControl();
 
118
    void OnBrowse( wxCommandEvent& );
 
119
    virtual wxString GetPszValue();
 
120
private:
 
121
    wxTextCtrl *textctrl;
 
122
    wxButton *browse;
 
123
    bool directory;
 
124
 
 
125
    DECLARE_EVENT_TABLE()
 
126
};
 
127
 
 
128
class IntegerConfigControl: public ConfigControl
 
129
{
 
130
public:
 
131
    IntegerConfigControl( vlc_object_t *, module_config_t *, wxWindow * );
 
132
    ~IntegerConfigControl();
 
133
    virtual int GetIntValue();
 
134
private:
 
135
    wxSpinCtrl *spin;
 
136
 
 
137
    DECLARE_EVENT_TABLE()
 
138
};
 
139
 
 
140
class IntegerListConfigControl: public ConfigControl
 
141
{
 
142
public:
 
143
    IntegerListConfigControl( vlc_object_t *, module_config_t *, wxWindow * );
 
144
    ~IntegerListConfigControl();
 
145
    virtual int GetIntValue();
 
146
private:
 
147
    wxComboBox *combo;
 
148
    void UpdateCombo( module_config_t *p_item );
 
149
 
 
150
    void OnAction( wxCommandEvent& );
 
151
 
 
152
    DECLARE_EVENT_TABLE()
 
153
};
 
154
 
 
155
class RangedIntConfigControl: public ConfigControl
 
156
{
 
157
public:
 
158
    RangedIntConfigControl( vlc_object_t *, module_config_t *, wxWindow * );
 
159
    ~RangedIntConfigControl();
 
160
    virtual int GetIntValue();
 
161
private:
 
162
    wxSlider *slider;
 
163
 
 
164
    DECLARE_EVENT_TABLE()
 
165
};
 
166
 
 
167
class FloatConfigControl: public ConfigControl
 
168
{
 
169
public:
 
170
    FloatConfigControl( vlc_object_t *, module_config_t *, wxWindow * );
 
171
    ~FloatConfigControl();
 
172
    virtual float GetFloatValue();
 
173
private:
 
174
    wxTextCtrl *textctrl;
 
175
 
 
176
    DECLARE_EVENT_TABLE()
 
177
};
 
178
 
 
179
class BoolConfigControl: public ConfigControl
 
180
{
 
181
public:
 
182
    BoolConfigControl( vlc_object_t *, module_config_t *, wxWindow * );
 
183
    ~BoolConfigControl();
 
184
    virtual int GetIntValue();
 
185
private:
 
186
    wxCheckBox *checkbox;
 
187
 
 
188
    DECLARE_EVENT_TABLE()
 
189
};