1 /*****************************************************************************
\r
2 * preferences.h: the "Preferences" dialog box
\r
3 *****************************************************************************
\r
4 * Copyright (C) 2002 VideoLAN
\r
6 * Authors: Olivier Teuliere <ipkiss@via.ecp.fr>
\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
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
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
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 <CheckLst.hpp>
\r
33 #include <ExtCtrls.hpp>
\r
35 //---------------------------------------------------------------------------
\r
36 class TGroupBoxPref : public TGroupBox
\r
39 __fastcall TGroupBoxPref( TComponent* Owner, module_config_t *p_config_arg );
\r
40 module_config_t *p_config;
\r
41 virtual void __fastcall UpdateChanges();
\r
42 TCheckListBox * __fastcall CreateCheckListBox( TWinControl *Parent,
\r
43 int Left, int Width, int Top, int Height );
\r
44 TButton * __fastcall CreateButton( TWinControl *Parent,
\r
45 int Left, int Width, int Top, int Height, AnsiString Caption );
\r
46 TCheckBox * __fastcall CreateCheckBox( TWinControl *Parent,
\r
47 int Left, int Width, int Top, int Height, AnsiString Caption );
\r
48 TLabel * __fastcall CreateLabel( TWinControl *Parent,
\r
49 int Left, int Width, int Top, int Height, AnsiString Caption,
\r
51 TEdit * __fastcall CreateEdit( TWinControl *Parent,
\r
52 int Left, int Width, int Top, int Height, AnsiString Text );
\r
53 TCSpinEdit * __fastcall CreateSpinEdit( TWinControl *Parent,
\r
54 int Left, int Width, int Top, int Height,
\r
55 long Min, long Max, long Value );
\r
57 //---------------------------------------------------------------------------
\r
58 class TGroupBoxPlugin : public TGroupBoxPref
\r
61 __fastcall TGroupBoxPlugin( TComponent* Owner, module_config_t *p_config );
\r
62 TCheckListBox *CheckListBox;
\r
63 TButton *ButtonConfig;
\r
66 module_t *ModuleSelected;
\r
67 void __fastcall UpdateChanges();
\r
68 void __fastcall CheckListBoxClick( TObject *Sender );
\r
69 void __fastcall CheckListBoxClickCheck( TObject *Sender );
\r
70 void __fastcall ButtonConfigClick( TObject *Sender );
\r
72 //---------------------------------------------------------------------------
\r
73 class TGroupBoxString : public TGroupBoxPref
\r
76 __fastcall TGroupBoxString( TComponent* Owner, module_config_t *p_config );
\r
79 void __fastcall UpdateChanges();
\r
81 //---------------------------------------------------------------------------
\r
82 class TGroupBoxInteger : public TGroupBoxPref
\r
85 __fastcall TGroupBoxInteger( TComponent* Owner, module_config_t *p_config );
\r
87 TCSpinEdit *SpinEdit;
\r
88 void __fastcall UpdateChanges();
\r
90 //---------------------------------------------------------------------------
\r
91 class TGroupBoxBool : public TGroupBoxPref
\r
94 __fastcall TGroupBoxBool( TComponent* Owner, module_config_t *p_config );
\r
96 TCheckBox *CheckBox;
\r
97 void __fastcall UpdateChanges();
\r
99 //---------------------------------------------------------------------------
\r
100 class TPreferencesDlg : public TForm
\r
102 __published: // IDE-managed Components
\r
103 TPageControl *PageControlPref;
\r
104 TButton *ButtonApply;
\r
105 TButton *ButtonSave;
\r
107 TButton *ButtonCancel;
\r
108 void __fastcall ButtonOkClick( TObject *Sender );
\r
109 void __fastcall ButtonApplyClick( TObject *Sender );
\r
110 void __fastcall ButtonSaveClick( TObject *Sender );
\r
111 void __fastcall ButtonCancelClick( TObject *Sender );
\r
112 void __fastcall FormClose( TObject *Sender, TCloseAction &Action );
\r
113 private: // User declarations
\r
114 public: // User declarations
\r
115 __fastcall TPreferencesDlg( TComponent* Owner );
\r
116 void __fastcall CreateConfigDialog( char *psz_module_name );
\r
117 void __fastcall SaveValue( module_config_t *p_config );
\r
119 //---------------------------------------------------------------------------
\r