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