]> git.sesse.net Git - vlc/blob - plugins/win32/preferences.h
* Added a win32 interface plugin, developed with Borland C++ Builder.
[vlc] / plugins / 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 //---------------------------------------------------------------------------\r
34 class TGroupBoxPref : public TGroupBox\r
35 {\r
36 public:\r
37     __fastcall TGroupBoxPref( TComponent* Owner, module_config_t *p_config_arg );\r
38     module_config_t *p_config;\r
39     TListView * __fastcall CreateListView( TWinControl *Parent,\r
40             int Left, int Width, int Top, int Height, TViewStyle ViewStyle );\r
41     TButton * __fastcall CreateButton( TWinControl *Parent,\r
42             int Left, int Width, int Top, int Height, AnsiString Caption );\r
43     TCheckBox * __fastcall CreateCheckBox( TWinControl *Parent,\r
44             int Left, int Width, int Top, int Height, AnsiString Caption );\r
45     TLabel * __fastcall CreateLabel( TWinControl *Parent,\r
46             int Left, int Width, int Top, int Height, AnsiString Caption,\r
47             bool WordWrap );\r
48     TEdit * __fastcall CreateEdit( TWinControl *Parent,\r
49             int Left, int Width, int Top, int Height, AnsiString Text );\r
50     TUpDown * __fastcall CreateUpDown( TWinControl *Parent,\r
51             int Min, int Max, int Position, bool Thousands );\r
52 };\r
53 //---------------------------------------------------------------------------\r
54 class TGroupBoxPlugin : public TGroupBoxPref\r
55 {\r
56 public:\r
57     __fastcall TGroupBoxPlugin( TComponent* Owner, module_config_t *p_config );\r
58     TListView *ListView;\r
59     TButton *ButtonConfig;\r
60     TButton *ButtonSelect;\r
61     TLabel *LabelDesc;\r
62     TLabel *LabelHint;\r
63     TLabel *LabelSelected;\r
64     TEdit *Edit;\r
65     module_t *ModuleSelected;\r
66     void __fastcall ListViewSelectItem( TObject *Sender, TListItem *Item,\r
67                                         bool Selected );\r
68     void __fastcall ButtonSelectClick( TObject *Sender );\r
69     void __fastcall ButtonConfigClick( TObject *Sender );\r
70     void __fastcall EditChange( TObject *Sender );\r
71 };\r
72 //---------------------------------------------------------------------------\r
73 class TGroupBoxString : public TGroupBoxPref\r
74 {\r
75 public:\r
76     __fastcall TGroupBoxString( TComponent* Owner, module_config_t *p_config );\r
77     TLabel *LabelDesc;\r
78     TEdit *Edit;\r
79     void __fastcall EditChange( TObject *Sender );\r
80 };\r
81 //---------------------------------------------------------------------------\r
82 class TGroupBoxInteger : public TGroupBoxPref\r
83 {\r
84 public:\r
85     __fastcall TGroupBoxInteger( TComponent* Owner, module_config_t *p_config );\r
86     TLabel *LabelDesc;\r
87     TEdit *Edit;\r
88     TUpDown *UpDown;\r
89     void __fastcall EditChange( TObject *Sender );\r
90 };\r
91 //---------------------------------------------------------------------------\r
92 class TGroupBoxBool : public TGroupBoxPref\r
93 {\r
94 public:\r
95     __fastcall TGroupBoxBool( TComponent* Owner, module_config_t *p_config );\r
96     TLabel *LabelDesc;\r
97     TCheckBox *CheckBox;\r
98     void __fastcall CheckBoxClick( TObject *Sender );\r
99 };\r
100 //---------------------------------------------------------------------------\r
101 class TPreferencesDlg : public TForm\r
102 {\r
103 __published:    // IDE-managed Components\r
104     TPageControl *PageControlPref;\r
105     TButton *ButtonApply;\r
106     TButton *ButtonSave;\r
107     TButton *ButtonOK;\r
108     TButton *ButtonCancel;\r
109     void __fastcall FormShow( TObject *Sender );\r
110     void __fastcall FormHide( TObject *Sender );\r
111     void __fastcall ButtonOkClick( TObject *Sender );\r
112     void __fastcall ButtonApplyClick( TObject *Sender );\r
113     void __fastcall ButtonSaveClick( TObject *Sender );\r
114     void __fastcall ButtonCancelClick( TObject *Sender );\r
115     void __fastcall FormClose( TObject *Sender, TCloseAction &Action );\r
116 private:        // User declarations\r
117 public:         // User declarations\r
118     __fastcall TPreferencesDlg( TComponent* Owner );\r
119     void __fastcall CreateConfigDialog( char *psz_module_name );\r
120     void __fastcall SaveValue( module_config_t *p_config );\r
121 };\r
122 //---------------------------------------------------------------------------\r
123 #endif\r