Fixed issue #1507: Submodule Diff Dialog should show dirty state only on working...
[TortoiseGit.git] / src / TortoiseMerge / Settings.h
blob7d0920d354e07c2fb3d4bd029564109813be4199
1 // TortoiseMerge - a Diff/Patch program
3 // Copyright (C) 2006 - Stefan Kueng
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 class CSetMainPage;
22 class CSetColorPage;
24 /**
25 * \ingroup TortoiseMerge
26 * This is the container for all settings pages. A setting page is
27 * a class derived from CPropertyPage with an additional method called
28 * SaveData(). The SaveData() method is used by the dialog to save
29 * the settings the user has made - if that method is not called then
30 * it means that the changes are discarded! Each settings page has
31 * to make sure that no changes are saved outside that method.
34 class CSettings : public CPropertySheet
36 DECLARE_DYNAMIC(CSettings)
37 private:
38 /**
39 * Adds all pages to this Settings-Dialog.
41 void AddPropPages();
42 /**
43 * Removes the pages and frees up memory.
45 void RemovePropPages();
47 private:
48 CSetMainPage * m_pMainPage;
49 CSetColorPage * m_pColorPage;
51 public:
52 CSettings(UINT nIDCaption, CWnd* pParentWnd = NULL, UINT iSelectPage = 0);
53 CSettings(LPCTSTR pszCaption, CWnd* pParentWnd = NULL, UINT iSelectPage = 0);
54 virtual ~CSettings();
56 /**
57 * Calls the SaveData()-methods of each of the settings pages.
59 void SaveData();
61 BOOL IsReloadNeeded() const;
62 protected:
63 DECLARE_MESSAGE_MAP()
64 virtual BOOL OnInitDialog();