Always include the boost-package. Otherwise it won't get searched on a second run.
[amule.git] / src / PrefsUnifiedDlg.h
blob0ad2df3174343a94788da4ace460b7f8ebaa115f
1 //
2 // This file is part of the aMule Project.
3 //
4 // Copyright (c) 2004-2011 aMule Team ( admin@amule.org / http://www.amule.org )
5 // Original author: Emilio Sandoz
6 //
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
9 // respective authors.
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
32 class Cfg_Base;
33 class CDirectoryTreeCtrl;
35 class wxWindow;
36 class wxChoice;
37 class wxButton;
38 class wxPanel;
39 class wxListCtrl;
41 class wxCommandEvent;
42 class wxListEvent;
43 class wxSpinEvent;
44 class wxScrollEvent;
45 class wxInitDialogEvent;
48 /**
49 * This class represents a dialog used to display preferences.
51 class PrefsUnifiedDlg : public wxDialog
53 public:
54 /**
55 * Constructor.
57 * @param parent The parent window.
59 * This constructor is a much more simple version of the wxDialog one,
60 * which only needs to know the parent of the dialog. Please note that
61 * it is private so that we can ensure that only one dialog has been
62 * created at one time.
64 PrefsUnifiedDlg(wxWindow* parent);
66 /**
67 * Updates the widgets with the values of the preference-variables.
69 bool TransferFromWindow();
70 /**
71 * Updates the prefernce-variables with the values of the widgets.
73 bool TransferToWindow();
76 protected:
77 /**
78 * Helper functions which checks if a Cfg has has changed.
80 bool CfgChanged(int id);
82 /**
83 * Helper functions which returns the Cfg assosiated with the specified id.
85 Cfg_Base* GetCfg(int id);
88 //! Pointer to the shared-files list
89 CDirectoryTreeCtrl* m_ShareSelector;
91 //! Pointer to the color-selector
92 wxChoice* m_choiceColor;
94 //! Pointer to the color-selection button
95 wxButton* m_buttonColor;
97 //! Pointer to the currently shown preference-page
98 wxPanel* m_CurrentPanel;
100 //! hide/show server tab
101 int m_IndexServerTab;
102 bool m_ServerTabVisible;
103 wxPanel* m_ServerWidget;
104 wxListCtrl* m_PrefsIcons;
105 void EnableServerTab(bool enable);
107 void OnOk(wxCommandEvent &event);
108 void OnCancel(wxCommandEvent &event);
109 void OnClose(wxCloseEvent &event);
111 void OnButtonBrowseApplication(wxCommandEvent &event);
112 void OnButtonDir(wxCommandEvent& event);
113 void OnButtonEditAddr(wxCommandEvent& event);
114 void OnButtonColorChange(wxCommandEvent &event);
115 void OnButtonIPFilterReload(wxCommandEvent &event);
116 void OnButtonIPFilterUpdate(wxCommandEvent &event);
117 void OnColorCategorySelected(wxCommandEvent &event);
118 void OnCheckBoxChange(wxCommandEvent &event);
119 void OnPrefsPageChange(wxListEvent& event);
120 void OnToolTipDelayChange(wxSpinEvent& event);
121 void OnScrollBarChange( wxScrollEvent& event );
122 void OnRateLimitChanged( wxSpinEvent& event );
123 void OnTCPClientPortChange(wxSpinEvent& event);
124 void OnUserEventSelected(wxListEvent& event);
125 void OnLanguageChoice(wxCommandEvent &event);
126 void CreateEventPanels(const int idx, const wxString& vars, wxWindow* parent);
128 void OnInitDialog( wxInitDialogEvent& evt );
130 DECLARE_EVENT_TABLE()
132 private:
133 bool m_verticalToolbar;
134 bool m_toolbarOrientationChanged;
137 #endif
138 // File_checked_for_headers