1 /////////////////////////////////////////////////////////////////////////////
3 // This program is free software; you can redistribute it and/or modify
4 // it under the terms of the GNU General Public License as published by
5 // the Free Software Foundation; either version 2 of the License, or
6 // (at your option) any later version.
8 // This program is distributed in the hope that it will be useful, but
9 // WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // General Public License for more details.
13 // You should have received a copy of the GNU General Public License
14 // along with this program; if not, write to the Free Software
15 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
16 /////////////////////////////////////////////////////////////////////////////
18 * @file SaveClosingDlg.h
20 * @brief Declaration file for SaveClosingDlg dialog
24 #include "TrDialogs.h"
25 #include "CMoveConstraint.h"
26 #include "UnicodeString.h"
28 /////////////////////////////////////////////////////////////////////////////
29 // SaveClosingDlg dialog
32 * @brief Dialog asking if user wants to save modified left and/or right
35 * The dialog has separate frames for both files and unneeded frame and
36 * controls inside it are disabled. Asked file(s) are selected using
37 * DoAskFor() function.
39 class SaveClosingDlg : public CTrDialog
41 DECLARE_DYNAMIC(SaveClosingDlg)
45 /** @brief Choices for modified files: save/discard changes. */
46 enum SAVECLOSING_CHOICE
48 SAVECLOSING_SAVE = 0, /**< Save changes */
49 SAVECLOSING_DISCARD, /**< Discard changes */
52 explicit SaveClosingDlg(CWnd* pParent = NULL); // standard constructor
53 void DoAskFor(bool bLeft = false, bool bMiddle = false, bool bRight = false);
56 //{{AFX_DATA(SaveClosingDlg)
57 enum { IDD = IDD_SAVECLOSING };
58 String m_sLeftFile; /**< Path to left-file to save. */
59 String m_sMiddleFile; /**< Path to middle-file to save. */
60 String m_sRightFile; /**< Path to right-side file to save. */
61 int m_leftSave; /**< User's choice for left-side save. */
62 int m_middleSave; /**< User's choice for middle-side save. */
63 int m_rightSave; /**< User's choice for righ-side save. */
64 bool m_bDisableCancel; /**< Should we disable Cancel-button? */
68 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
70 // Generated message map functions
71 //{{AFX_MSG(SaveClosingDlg)
72 afx_msg BOOL OnInitDialog();
73 afx_msg void OnDiscardAll();
77 // Implementation data
79 prdlg::CMoveConstraint m_constraint; /**< Resizes dialog controls when dialog resized */
80 bool m_bAskForLeft; /**< Is left file modified? */
81 bool m_bAskForMiddle; /**< Is middle file modified? */
82 bool m_bAskForRight; /**< Is right file modified? */