2 Bacula® - The Network Backup Solution
4 Copyright (C) 2004-2008 Free Software Foundation Europe e.V.
6 The main author of Bacula is Kern Sibbald, with contributions from
7 many others, a complete list can be found in the file AUTHORS.
8 This program is Free Software; you can redistribute it and/or
9 modify it under the terms of version two of the GNU General Public
10 License as published by the Free Software Foundation and included
13 This program is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
23 Bacula® is a registered trademark of Kern Sibbald.
24 The licensor of Bacula is the Free Software Foundation Europe
25 (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
26 Switzerland, email:ftf@fsfeurope.org.
30 * Config panel, used to specify parameters (for example clients, filesets... in restore)
32 * Nicolas Boichat, April 2004
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);
88 wxStaticText* statictext;
91 WX_DECLARE_OBJARRAY(wxbConfigParam, wxbConfig);
93 class wxbConfigPanel : public wxPanel {
95 /* Creates a new config panel, config must be allocated with new */
96 wxbConfigPanel(wxWindow* parent, wxbConfig* config, wxString title, wxWindowID ok, wxWindowID cancel, wxWindowID apply = -1);
99 void SetRowString(const wxChar* title, wxString value);
100 wxString GetRowString(const wxChar* title);
101 int GetRowSelection(const wxChar* title);
102 void SetRowSelection(const wxChar* title, int ind);
104 void ClearRowChoices(const wxChar* title);
105 void AddRowChoice(const wxChar* title, wxString value);
106 int GetRowCount(const wxChar* title);
108 /* If enable is true, enables apply button, and disables ok button */
109 void EnableApply(bool enable = true);
112 /* Keep the last index accessed, for optimization */
120 int FindRow(const wxChar* title);