OSDN Git Service

5f723ea5e1c4b35baa7a8895a7518168370040c4
[tortoisegit/TortoiseGitJp.git] / src / TortoiseProc / Settings / Settings.h
1 // TortoiseSVN - a Windows shell extension for easy version control\r
2 \r
3 // Copyright (C) 2003-2008 - TortoiseSVN\r
4 \r
5 // This program is free software; you can redistribute it and/or\r
6 // modify it under the terms of the GNU General Public License\r
7 // as published by the Free Software Foundation; either version 2\r
8 // of the License, or (at your option) any later version.\r
9 \r
10 // This program is distributed in the hope that it will be useful,\r
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of\r
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
13 // GNU General Public License for more details.\r
14 \r
15 // You should have received a copy of the GNU General Public License\r
16 // along with this program; if not, write to the Free Software Foundation,\r
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\r
18 //\r
19 #pragma once\r
20 \r
21 #include "SettingsPropPage.h"\r
22 #include "SetMainPage.h"\r
23 #include "SetProxyPage.h"\r
24 #include "SetOverlayPage.h"\r
25 #include "SettingsProgsDiff.h"\r
26 #include "SettingsProgsMerge.h"\r
27 #include "SettingsProgsUniDiff.h"\r
28 #include "SetOverlayIcons.h"\r
29 #include "SetLookAndFeelPage.h"\r
30 #include "SetDialogs.h"\r
31 #include "SettingsColors.h"\r
32 #include "SettingsColors2.h"\r
33 #include "SettingsColors3.h"\r
34 #include "SetMisc.h"\r
35 #include "SetLogCache.h"\r
36 #include "SettingsLogCaches.h"\r
37 #include "SetSavedDataPage.h"\r
38 #include "SetHooks.h"\r
39 #include "SetBugTraq.h"\r
40 #include "SettingsTBlame.h"\r
41 #include "SettingsRevisionGraph.h"\r
42 #include "TreePropSheet/TreePropSheet.h"\r
43 #include "SettingGitConfig.h"\r
44 #include "SettingGitRemote.h"\r
45 #include "SettingsBugtraqConfig.h"\r
46 \r
47 using namespace TreePropSheet;\r
48 \r
49 /**\r
50  * \ingroup TortoiseProc\r
51  * This is the container for all settings pages. A setting page is\r
52  * a class derived from CPropertyPage with an additional method called\r
53  * SaveData(). The SaveData() method is used by the dialog to save\r
54  * the settings the user has made - if that method is not called then\r
55  * it means that the changes are discarded! Each settings page has\r
56  * to make sure that no changes are saved outside that method.\r
57  */\r
58 class CSettings : public CTreePropSheet\r
59 {\r
60         DECLARE_DYNAMIC(CSettings)\r
61 private:\r
62         /**\r
63          * Adds all pages to this Settings-Dialog.\r
64          */\r
65         void AddPropPages();\r
66         /**\r
67          * Removes the pages and frees up memory.\r
68          */\r
69         void RemovePropPages();\r
70 \r
71 private:\r
72         CSetMainPage *                  m_pMainPage;\r
73         CSetProxyPage *                 m_pProxyPage;\r
74         CSetOverlayPage *               m_pOverlayPage;\r
75         CSetOverlayIcons *              m_pOverlaysPage;\r
76         CSettingsProgsDiff*             m_pProgsDiffPage;\r
77         CSettingsProgsMerge *   m_pProgsMergePage;\r
78         CSettingsProgsUniDiff * m_pProgsUniDiffPage;\r
79         CSetLookAndFeelPage *   m_pLookAndFeelPage;\r
80         CSetDialogs *                   m_pDialogsPage;\r
81     CSettingsRevisionGraph* m_pRevisionGraphPage;\r
82         CSettingsColors *               m_pColorsPage;\r
83     CSettingsColors2 *          m_pColorsPage2;\r
84     CSettingsColors3 *          m_pColorsPage3;\r
85         CSetMisc *                              m_pMiscPage;\r
86 //      CSetLogCache *                  m_pLogCachePage;\r
87 //    CSettingsLogCaches*     m_pLogCacheListPage;\r
88         CSetSavedDataPage *             m_pSavedPage;\r
89 //      CSetHooks *                             m_pHooksPage;\r
90         CSetBugTraq *                   m_pBugTraqPage;\r
91         CSettingsTBlame *               m_pTBlamePage;\r
92         CSettingGitConfig *             m_pGitConfig;\r
93         CSettingGitRemote *             m_pGitRemote;\r
94         CSettingsBugtraqConfig * m_pBugtraqConfig;\r
95 \r
96         HICON                                   m_hIcon;\r
97 public:\r
98         CSettings(UINT nIDCaption,CTGitPath *CmdPath=NULL, CWnd* pParentWnd = NULL, UINT iSelectPage = 0);\r
99         virtual ~CSettings();\r
100         CTGitPath m_CmdPath;\r
101         CString m_DefaultPage;\r
102         /**\r
103          * Calls the SaveData()-methods of each of the settings pages.\r
104          */\r
105         void HandleRestart();\r
106 protected:\r
107         DECLARE_MESSAGE_MAP()\r
108         virtual BOOL OnInitDialog();\r
109         afx_msg void OnPaint();\r
110         afx_msg HCURSOR OnQueryDragIcon();\r
111 };\r
112 \r
113 \r