]> git.sesse.net Git - vlc/blob - modules/gui/win32/preferences.h
The win32 interface is preparing for the internationalization.
[vlc] / modules / gui / win32 / preferences.h
1 /*****************************************************************************\r
2  * preferences.h: the "Preferences" dialog box\r
3  *****************************************************************************\r
4  * Copyright (C) 2002 VideoLAN\r
5  *\r
6  * Authors: Olivier Teuliere <ipkiss@via.ecp.fr>\r
7  *\r
8  * This program is free software; you can redistribute it and/or modify\r
9  * it under the terms of the GNU General Public License as published by\r
10  * the Free Software Foundation; either version 2 of the License, or\r
11  * (at your option) any later version.\r
12  *\r
13  * This program is distributed in the hope that it will be useful,\r
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
16  * GNU General Public License for more details.\r
17  *\r
18  * You should have received a copy of the GNU General Public License\r
19  * along with this program; if not, write to the Free Software\r
20  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.\r
21  *****************************************************************************/\r
22 \r
23 #ifndef preferencesH\r
24 #define preferencesH\r
25 //---------------------------------------------------------------------------\r
26 #include <Classes.hpp>\r
27 #include <Controls.hpp>\r
28 #include <StdCtrls.hpp>\r
29 #include <Forms.hpp>\r
30 #include <Buttons.hpp>\r
31 #include <ComCtrls.hpp>\r
32 #include <ExtCtrls.hpp>\r
33 #include "CSPIN.h"\r
34 //---------------------------------------------------------------------------\r
35 class TGroupBoxPref : public TGroupBox\r
36 {\r
37 public:\r
38     __fastcall TGroupBoxPref( TComponent* Owner, module_config_t *p_config_arg );\r
39     module_config_t *p_config;\r
40     virtual void __fastcall UpdateChanges();\r
41     TListView * __fastcall CreateListView( TWinControl *Parent,\r
42             int Left, int Width, int Top, int Height, TViewStyle ViewStyle );\r
43     TButton * __fastcall CreateButton( TWinControl *Parent,\r
44             int Left, int Width, int Top, int Height, AnsiString Caption );\r
45     TCheckBox * __fastcall CreateCheckBox( TWinControl *Parent,\r
46             int Left, int Width, int Top, int Height, AnsiString Caption );\r
47     TLabel * __fastcall CreateLabel( TWinControl *Parent,\r
48             int Left, int Width, int Top, int Height, AnsiString Caption,\r
49             bool WordWrap );\r
50     TEdit * __fastcall CreateEdit( TWinControl *Parent,\r
51             int Left, int Width, int Top, int Height, AnsiString Text );\r
52     TCSpinEdit * __fastcall CreateSpinEdit( TWinControl *Parent,\r
53             int Left, int Width, int Top, int Height,\r
54             long Min, long Max, long Value );\r
55 };\r
56 //---------------------------------------------------------------------------\r
57 class TGroupBoxPlugin : public TGroupBoxPref\r
58 {\r
59 public:\r
60     __fastcall TGroupBoxPlugin( TComponent* Owner, module_config_t *p_config );\r
61     TListView *ListView;\r
62     TButton *ButtonConfig;\r
63     TButton *ButtonSelect;\r
64     TLabel *LabelDesc;\r
65     TLabel *LabelHint;\r
66     TLabel *LabelSelected;\r
67     TEdit *Edit;\r
68     module_t *ModuleSelected;\r
69     void __fastcall UpdateChanges();\r
70     void __fastcall ListViewSelectItem( TObject *Sender, TListItem *Item,\r
71                                         bool Selected );\r
72     void __fastcall ButtonSelectClick( TObject *Sender );\r
73     void __fastcall ButtonConfigClick( TObject *Sender );\r
74 };\r
75 //---------------------------------------------------------------------------\r
76 class TGroupBoxString : public TGroupBoxPref\r
77 {\r
78 public:\r
79     __fastcall TGroupBoxString( TComponent* Owner, module_config_t *p_config );\r
80     TLabel *LabelDesc;\r
81     TEdit *Edit;\r
82     void __fastcall UpdateChanges();\r
83 };\r
84 //---------------------------------------------------------------------------\r
85 class TGroupBoxInteger : public TGroupBoxPref\r
86 {\r
87 public:\r
88     __fastcall TGroupBoxInteger( TComponent* Owner, module_config_t *p_config );\r
89     TLabel *LabelDesc;\r
90     TCSpinEdit *SpinEdit;\r
91     void __fastcall UpdateChanges();\r
92 };\r
93 //---------------------------------------------------------------------------\r
94 class TGroupBoxBool : public TGroupBoxPref\r
95 {\r
96 public:\r
97     __fastcall TGroupBoxBool( TComponent* Owner, module_config_t *p_config );\r
98     TLabel *LabelDesc;\r
99     TCheckBox *CheckBox;\r
100     void __fastcall UpdateChanges();\r
101 };\r
102 //---------------------------------------------------------------------------\r
103 class TPreferencesDlg : public TForm\r
104 {\r
105 __published:    // IDE-managed Components\r
106     TPageControl *PageControlPref;\r
107     TButton *ButtonApply;\r
108     TButton *ButtonSave;\r
109     TButton *ButtonOK;\r
110     TButton *ButtonCancel;\r
111     void __fastcall FormShow( TObject *Sender );\r
112     void __fastcall FormHide( TObject *Sender );\r
113     void __fastcall ButtonOkClick( TObject *Sender );\r
114     void __fastcall ButtonApplyClick( TObject *Sender );\r
115     void __fastcall ButtonSaveClick( TObject *Sender );\r
116     void __fastcall ButtonCancelClick( TObject *Sender );\r
117     void __fastcall FormClose( TObject *Sender, TCloseAction &Action );\r
118 private:        // User declarations\r
119 public:         // User declarations\r
120     __fastcall TPreferencesDlg( TComponent* Owner );\r
121     void __fastcall CreateConfigDialog( char *psz_module_name );\r
122     void __fastcall SaveValue( module_config_t *p_config );\r
123 };\r
124 //---------------------------------------------------------------------------\r
125 #endif\r