3 * Config panel, used to specify parameters (for example clients, filesets... in restore)
5 * Nicolas Boichat, April 2004
10 Bacula® - The Network Backup Solution
12 Copyright (C) 2004-2006 Free Software Foundation Europe e.V.
14 The main author of Bacula is Kern Sibbald, with contributions from
15 many others, a complete list can be found in the file AUTHORS.
16 This program is Free Software; you can redistribute it and/or
17 modify it under the terms of version two of the GNU General Public
18 License as published by the Free Software Foundation plus additions
19 that are listed in the file LICENSE.
21 This program is distributed in the hope that it will be useful, but
22 WITHOUT ANY WARRANTY; without even the implied warranty of
23 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24 General Public License for more details.
26 You should have received a copy of the GNU General Public License
27 along with this program; if not, write to the Free Software
28 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
31 Bacula® is a registered trademark of John Walker.
32 The licensor of Bacula is the Free Software Foundation Europe
33 (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
34 Switzerland, email:ftf@fsfeurope.org.
37 #ifndef WXBCONFIGPANEL_H
38 #define WXBCONFIGPANEL_H
42 #include <wx/choice.h>
43 #include <wx/stattext.h>
44 #include <wx/textctrl.h>
46 #include <wx/dynarray.h>
54 class wxbConfigParam {
56 /* Create a new config parameter */
57 wxbConfigParam(wxString title, wxWindowID id, wxbConfigType type, wxString value);
58 wxbConfigParam(wxString title, wxWindowID id, wxbConfigType type, int n, wxString values[]);
61 void AddControl(wxWindow* parent, wxSizer* sizer);
64 void SetValue(wxString str);
67 void SetIndex(int ind);
70 void Add(wxString value);
87 wxStaticText* statictext;
90 WX_DECLARE_OBJARRAY(wxbConfigParam, wxbConfig);
92 class wxbConfigPanel : public wxPanel {
94 /* Creates a new config panel, config must be allocated with new */
95 wxbConfigPanel(wxWindow* parent, wxbConfig* config, wxString title, wxWindowID ok, wxWindowID cancel, wxWindowID apply = -1);
98 void SetRowString(const wxChar* title, wxString value);
99 wxString GetRowString(const wxChar* title);
100 int GetRowSelection(const wxChar* title);
101 void SetRowSelection(const wxChar* title, int ind);
103 void ClearRowChoices(const wxChar* title);
104 void AddRowChoice(const wxChar* title, wxString value);
106 /* If enable is true, enables apply button, and disables ok button */
107 void EnableApply(bool enable = true);
110 /* Keep the last index accessed, for optimization */
118 int FindRow(const wxChar* title);