Add Ext menu config at setting dialog to set menu item to external
[TortoiseGit.git] / src / TortoiseProc / Settings / Settings.h
blob2c6b64246e34c8d52554408f1ee2c619e96985d8
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"
45 #include "SettingsBugtraqConfig.h"
46 #include "SetExtMenu.h"
48 using namespace TreePropSheet;
50 /**
51 * \ingroup TortoiseProc
52 * This is the container for all settings pages. A setting page is
53 * a class derived from CPropertyPage with an additional method called
54 * SaveData(). The SaveData() method is used by the dialog to save
55 * the settings the user has made - if that method is not called then
56 * it means that the changes are discarded! Each settings page has
57 * to make sure that no changes are saved outside that method.
59 class CSettings : public CTreePropSheet
61 DECLARE_DYNAMIC(CSettings)
62 private:
63 /**
64 * Adds all pages to this Settings-Dialog.
66 void AddPropPages();
67 /**
68 * Removes the pages and frees up memory.
70 void RemovePropPages();
72 private:
73 CSetMainPage * m_pMainPage;
74 CSetProxyPage * m_pProxyPage;
75 CSetOverlayPage * m_pOverlayPage;
76 CSetOverlayIcons * m_pOverlaysPage;
77 CSettingsProgsDiff* m_pProgsDiffPage;
78 CSettingsProgsMerge * m_pProgsMergePage;
79 CSettingsProgsUniDiff * m_pProgsUniDiffPage;
80 CSetLookAndFeelPage * m_pLookAndFeelPage;
81 CSetDialogs * m_pDialogsPage;
82 CSettingsRevisionGraph* m_pRevisionGraphPage;
83 CSettingsColors * m_pColorsPage;
84 CSettingsColors2 * m_pColorsPage2;
85 CSettingsColors3 * m_pColorsPage3;
86 CSetMisc * m_pMiscPage;
87 // CSetLogCache * m_pLogCachePage;
88 // CSettingsLogCaches* m_pLogCacheListPage;
89 CSetSavedDataPage * m_pSavedPage;
90 // CSetHooks * m_pHooksPage;
91 CSetBugTraq * m_pBugTraqPage;
92 CSettingsTBlame * m_pTBlamePage;
93 CSettingGitConfig * m_pGitConfig;
94 CSettingGitRemote * m_pGitRemote;
95 CSettingsBugtraqConfig * m_pBugtraqConfig;
97 CSetExtMenu * m_pExtMenu;
99 HICON m_hIcon;
100 public:
101 CSettings(UINT nIDCaption,CTGitPath *CmdPath=NULL, CWnd* pParentWnd = NULL, UINT iSelectPage = 0);
102 virtual ~CSettings();
103 CTGitPath m_CmdPath;
104 CString m_DefaultPage;
106 * Calls the SaveData()-methods of each of the settings pages.
108 void HandleRestart();
109 protected:
110 DECLARE_MESSAGE_MAP()
111 virtual BOOL OnInitDialog();
112 afx_msg void OnPaint();
113 afx_msg HCURSOR OnQueryDragIcon();