preferences_widgets.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * preferences_widgets.h : WinCE gui plugin for VLC
00003  *****************************************************************************
00004  * Copyright (C) 2000-2003 the VideoLAN team
00005  * $Id$
00006  *
00007  * Authors: Marodon Cedric <cedric_marodon@yahoo.fr>
00008  *          Gildas Bazin <gbazin@videolan.org>
00009  *
00010  * This program is free software; you can redistribute it and/or modify
00011  * it under the terms of the GNU General Public License as published by
00012  * the Free Software Foundation; either version 2 of the License, or
00013  * (at your option) any later version.
00014  *
00015  * This program is distributed in the hope that it will be useful,
00016  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018  * GNU General Public License for more details.
00019  *
00020  * You should have received a copy of the GNU General Public License
00021  * along with this program; if not, write to the Free Software
00022  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
00023  *****************************************************************************/
00024 
00025 class ConfigControl
00026 {
00027 public:
00028     ConfigControl( vlc_object_t *, module_config_t *, HWND, HINSTANCE );
00029     virtual ~ConfigControl();
00030 
00031     virtual int GetIntValue() {return 0;}
00032     virtual float GetFloatValue() {return 0;}
00033     virtual char *GetPszValue() {return GetName();}
00034     // FIXME returns name corresponding to parent
00035     // put the panel name corresponding to HWND into the constructor and make it private
00036 
00037     char *GetName();
00038     int GetType();
00039     bool IsAdvanced();
00040 
00041     void SetUpdateCallback( void (*)( void * ), void * );
00042 
00043 protected:
00044     /*wxBoxSizer *sizer;*/
00045     HWND label;
00046     vlc_object_t *p_this;
00047 
00048     void (*pf_update_callback)( void * );
00049     void *p_update_data;
00050 
00051     void OnUpdate( UINT );
00052 
00053 private:
00054     HWND parent;
00055 
00056     char *name;
00057     int i_type;
00058     bool b_advanced;
00059 };
00060 
00061 ConfigControl *CreateConfigControl( vlc_object_t *,
00062                                     module_config_t *, HWND, HINSTANCE,
00063                                     int * );
00064 
00065 class KeyConfigControl: public ConfigControl
00066 {
00067 public:
00068     KeyConfigControl( vlc_object_t *, module_config_t *, HWND,
00069                       HINSTANCE, int * );
00070     ~KeyConfigControl();
00071     virtual int GetIntValue();
00072 private:
00073     HWND alt;
00074     HWND alt_label;
00075     HWND ctrl;
00076     HWND ctrl_label;
00077     HWND shift;
00078     HWND shift_label;
00079     HWND combo;
00080 
00081     // Array of key descriptions, for the ComboBox
00082     static string *m_keysList;
00083 };
00084 
00085 class ModuleConfigControl: public ConfigControl
00086 {
00087 public:
00088     ModuleConfigControl( vlc_object_t *, module_config_t *, HWND,
00089                          HINSTANCE, int * );
00090     ~ModuleConfigControl();
00091     virtual char *GetPszValue();
00092 private:
00093     HWND combo;
00094 };
00095 
00096 class StringConfigControl: public ConfigControl
00097 {
00098 public:
00099     StringConfigControl( vlc_object_t *, module_config_t *, HWND,
00100                          HINSTANCE, int * );
00101     ~StringConfigControl();
00102     virtual char *GetPszValue();
00103 private:
00104     HWND textctrl;
00105 };
00106 
00107 class StringListConfigControl: public ConfigControl
00108 {
00109 public:
00110     StringListConfigControl( vlc_object_t *, module_config_t *, HWND,
00111                              HINSTANCE, int * );
00112     ~StringListConfigControl();
00113     virtual char *GetPszValue();
00114 private:
00115 };
00116 
00117 class FileConfigControl: public ConfigControl
00118 {
00119 public:
00120     FileConfigControl( vlc_object_t *, module_config_t *, HWND,
00121                        HINSTANCE, int * );
00122     ~FileConfigControl();
00123     void OnBrowse( UINT );
00124     virtual char *GetPszValue();
00125 private:
00126 };
00127 
00128 class IntegerConfigControl: public ConfigControl
00129 {
00130 public:
00131     IntegerConfigControl( vlc_object_t *, module_config_t *, HWND,
00132                           HINSTANCE, int * );
00133     ~IntegerConfigControl();
00134     virtual int GetIntValue();
00135 private:
00136 };
00137 
00138 class IntegerListConfigControl: public ConfigControl
00139 {
00140 public:
00141     IntegerListConfigControl( vlc_object_t *, module_config_t *, HWND,
00142                               HINSTANCE, int * );
00143     ~IntegerListConfigControl();
00144     virtual int GetIntValue();
00145 private:
00146 };
00147 
00148 class RangedIntConfigControl: public ConfigControl
00149 {
00150 public:
00151     RangedIntConfigControl( vlc_object_t *, module_config_t *, HWND,
00152                             HINSTANCE, int * );
00153     ~RangedIntConfigControl();
00154     virtual int GetIntValue();
00155 private:
00156 };
00157 
00158 class FloatConfigControl: public ConfigControl
00159 {
00160 public:
00161     FloatConfigControl( vlc_object_t *, module_config_t *, HWND,
00162                         HINSTANCE, int * );
00163     ~FloatConfigControl();
00164     virtual float GetFloatValue();
00165 private:
00166     HWND textctrl;
00167 };
00168 
00169 class BoolConfigControl: public ConfigControl
00170 {
00171 public:
00172     BoolConfigControl( vlc_object_t *, module_config_t *, HWND,
00173                        HINSTANCE, int * );
00174     ~BoolConfigControl();
00175     virtual int GetIntValue();
00176 private:
00177     HWND checkbox;
00178     HWND checkbox_label;
00179 };

Generated on Wed Mar 31 08:05:24 2010 for VLC by  doxygen 1.5.6