2 // This file is part of the aMule Project.
4 // Copyright (c) 2004-2008 aMule Team ( admin@amule.org / http://www.amule.org )
5 // Original author: Emilio Sandoz
7 // Any parts of this program derived from the xMule, lMule or eMule project,
8 // or contributed by third-party developers are copyrighted by their
11 // This program is free software; you can redistribute it and/or modify
12 // it under the terms of the GNU General Public License as published by
13 // the Free Software Foundation; either version 2 of the License, or
14 // (at your option) any later version.
16 // This program is distributed in the hope that it will be useful,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 // GNU General Public License for more details.
21 // You should have received a copy of the GNU General Public License
22 // along with this program; if not, write to the Free Software
23 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
26 #ifndef __PrefsUnifiedDlg_H__
27 #define __PrefsUnifiedDlg_H__
29 #include <wx/dialog.h> // Needed for wxDialog
33 class CDirectoryTreeCtrl
;
44 class wxInitDialogEvent
;
48 * This class represents a dialog used to display preferences.
50 class PrefsUnifiedDlg
: public wxDialog
56 * @param parent The parent window.
58 * This constructor is a much more simple version of the wxDialog one,
59 * which only needs to know the parent of the dialog. Please note that
60 * it is private so that we can ensure that only one dialog has been
61 * created at one time.
63 PrefsUnifiedDlg(wxWindow
* parent
);
66 * Updates the widgets with the values of the preference-variables.
68 bool TransferFromWindow();
70 * Updates the prefernce-variables with the values of the widgets.
72 bool TransferToWindow();
77 * Helper functions which checks if a Cfg has has changed.
79 bool CfgChanged(int id
);
82 * Helper functions which returns the Cfg assosiated with the specified id.
84 Cfg_Base
* GetCfg(int id
);
87 //! Pointer to the shared-files list
88 CDirectoryTreeCtrl
* m_ShareSelector
;
90 //! Pointer to the color-selector
91 wxChoice
* m_choiceColor
;
93 //! Pointer to the color-selection button
94 wxButton
* m_buttonColor
;
96 //! Pointer to the currently shown preference-page
97 wxPanel
* m_CurrentPanel
;
100 void OnOk(wxCommandEvent
&event
);
101 void OnCancel(wxCommandEvent
&event
);
102 void OnClose(wxCloseEvent
&event
);
104 void OnButtonBrowseApplication(wxCommandEvent
&event
);
105 void OnButtonDir(wxCommandEvent
& event
);
106 void OnButtonEditAddr(wxCommandEvent
& event
);
107 void OnButtonColorChange(wxCommandEvent
&event
);
108 void OnButtonIPFilterReload(wxCommandEvent
&event
);
109 void OnButtonIPFilterUpdate(wxCommandEvent
&event
);
110 void OnColorCategorySelected(wxCommandEvent
&event
);
111 void OnCheckBoxChange(wxCommandEvent
&event
);
112 void OnBrowserChange(wxCommandEvent
&event
);
113 void OnPrefsPageChange(wxListEvent
& event
);
114 void OnToolTipDelayChange(wxSpinEvent
& event
);
115 void OnScrollBarChange( wxScrollEvent
& event
);
116 void OnRateLimitChanged( wxSpinEvent
& event
);
117 void OnTCPClientPortChange(wxSpinEvent
& event
);
118 void OnUserEventSelected(wxListEvent
& event
);
119 void CreateEventPanels(const int idx
, const wxString
& vars
, wxWindow
* parent
);
121 void OnInitDialog( wxInitDialogEvent
& evt
);
123 DECLARE_EVENT_TABLE()
127 // File_checked_for_headers