OSDN Git Service

Fix untranslated strings
[winmerge-jp/winmerge-jp.git] / Src / SaveClosingDlg.h
1 /////////////////////////////////////////////////////////////////////////////
2 //    License (GPLv2+):
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.
7 //
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.
12 //
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 /////////////////////////////////////////////////////////////////////////////
17 /**
18  * @file  SaveClosingDlg.h
19  *
20  * @brief Declaration file for SaveClosingDlg dialog
21  */
22 #pragma once
23
24 #include "TrDialogs.h"
25 #include "CMoveConstraint.h"
26 #include "UnicodeString.h"
27
28 /////////////////////////////////////////////////////////////////////////////
29 // SaveClosingDlg dialog
30
31 /**
32  * @brief Dialog asking if user wants to save modified left and/or right
33  * files.
34  *
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.
38  */
39 class SaveClosingDlg : public CTrDialog
40 {
41         DECLARE_DYNAMIC(SaveClosingDlg)
42
43 public:
44
45         /** @brief Choices for modified files: save/discard changes. */
46         enum SAVECLOSING_CHOICE
47         {
48                 SAVECLOSING_SAVE = 0, /**< Save changes */
49                 SAVECLOSING_DISCARD,  /**< Discard changes */
50         };
51
52         explicit SaveClosingDlg(CWnd* pParent = NULL);   // standard constructor
53         void DoAskFor(bool bLeft = false, bool bMiddle = false, bool bRight = false);
54
55 // Dialog Data
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? */
65         //}}AFX_DATA
66
67 protected:
68         virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
69
70         // Generated message map functions
71         //{{AFX_MSG(SaveClosingDlg)
72         afx_msg BOOL OnInitDialog();
73         afx_msg void OnDiscardAll();
74         //}}AFX_MSG
75         DECLARE_MESSAGE_MAP()
76
77 // Implementation data
78 private:
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? */
83 };