1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * @file SaveClosingDlg.h
5 * @brief Declaration file for SaveClosingDlg dialog
10 #include "CMoveConstraint.h"
11 #include "UnicodeString.h"
13 /////////////////////////////////////////////////////////////////////////////
14 // SaveClosingDlg dialog
17 * @brief Dialog asking if user wants to save modified left and/or right
20 * The dialog has separate frames for both files and unneeded frame and
21 * controls inside it are disabled. Asked file(s) are selected using
22 * DoAskFor() function.
24 class SaveClosingDlg : public CTrDialog
26 DECLARE_DYNAMIC(SaveClosingDlg)
30 /** @brief Choices for modified files: save/discard changes. */
31 enum SAVECLOSING_CHOICE
33 SAVECLOSING_SAVE = 0, /**< Save changes */
34 SAVECLOSING_DISCARD, /**< Discard changes */
37 explicit SaveClosingDlg(CWnd* pParent = nullptr); // standard constructor
38 void DoAskFor(bool bLeft = false, bool bMiddle = false, bool bRight = false);
41 //{{AFX_DATA(SaveClosingDlg)
42 enum { IDD = IDD_SAVECLOSING };
43 String m_sLeftFile; /**< Path to left-file to save. */
44 String m_sMiddleFile; /**< Path to middle-file to save. */
45 String m_sRightFile; /**< Path to right-side file to save. */
46 int m_leftSave; /**< User's choice for left-side save. */
47 int m_middleSave; /**< User's choice for middle-side save. */
48 int m_rightSave; /**< User's choice for righ-side save. */
49 bool m_bDisableCancel; /**< Should we disable Cancel-button? */
53 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
55 // Generated message map functions
56 //{{AFX_MSG(SaveClosingDlg)
57 afx_msg BOOL OnInitDialog() override;
58 afx_msg void OnDiscardAll();
62 // Implementation data
64 prdlg::CMoveConstraint m_constraint; /**< Resizes dialog controls when dialog resized */
65 bool m_bAskForLeft; /**< Is left file modified? */
66 bool m_bAskForMiddle; /**< Is middle file modified? */
67 bool m_bAskForRight; /**< Is right file modified? */