Debian Codegraph @

editor/DallasGenericPromptDlg.cpp

raw symbols SCIP
1 /*
2 * Descent 3
3 * Copyright (C) 2024 Parallax Software
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
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.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18 --- HISTORICAL COMMENTS FOLLOW ---
19
20 * $Logfile: /DescentIII/Main/editor/DallasGenericPromptDlg.cpp $
21 * $Revision: 1.1.1.1 $
22 * $Date: 2003-08-26 03:57:37 $
23 * $Author: kevinb $
24 *
25 * This is the header for the DALLAS generic prompt dialog
26 *
27 * $Log: not supported by cvs2svn $
28 *
29 * 2 12/13/98 6:08p Nate
30 * Initial version
31 *
32 * $NoKeywords: $
33 */
34
35 // DallasGenericPromptDlg.cpp : implementation file
36 //
37
38 #include "stdafx.h"
39 #include "editor.h"
40 #include "DallasGenericPromptDlg.h"
41
42 #ifdef _DEBUG
43 #define new DEBUG_NEW
44 #undef THIS_FILE
45 static char THIS_FILE[] = __FILE__;
46 #endif
47
48 /////////////////////////////////////////////////////////////////////////////
49 // CDallasGenericPromptDlg dialog
50
51 CDallasGenericPromptDlg::CDallasGenericPromptDlg(CWnd *pParent /*=NULL*/)
52 : CDialog(CDallasGenericPromptDlg::IDD, pParent) {
53 //{{AFX_DATA_INIT(CDallasGenericPromptDlg)
54 // NOTE: the ClassWizard will add member initialization here
55 //}}AFX_DATA_INIT
56 m_DialogTitle = "";
57 m_PromptText = "";
58 m_PromptData = "";
59 m_MaxDataLength = 10;
60 }
61
62 void CDallasGenericPromptDlg::DoDataExchange(CDataExchange *pDX) {
63 CDialog::DoDataExchange(pDX);
64 //{{AFX_DATA_MAP(CDallasGenericPromptDlg)
65 DDX_Control(pDX, IDC_GENERIC_DATA_EDIT, m_GenericDataEdit);
66 DDX_Control(pDX, IDC_GENERIC_PROMPT_STATIC, m_GenericPromptStatic);
67 //}}AFX_DATA_MAP
68 }
69
70 BEGIN_MESSAGE_MAP(CDallasGenericPromptDlg, CDialog)
71 //{{AFX_MSG_MAP(CDallasGenericPromptDlg)
72 //}}AFX_MSG_MAP
73 END_MESSAGE_MAP()
74
75 /////////////////////////////////////////////////////////////////////////////
76 // CDallasGenericPromptDlg message handlers
77
78 BOOL CDallasGenericPromptDlg::OnInitDialog() {
79 CDialog::OnInitDialog();
80
81 // TODO: Add extra initialization here
82 if (!m_DialogTitle.IsEmpty())
83 SetWindowText(m_DialogTitle.GetBuffer(0));
84
85 if (!m_PromptText.IsEmpty())
86 m_GenericPromptStatic.SetWindowText(m_PromptText.GetBuffer(0));
87
88 m_GenericDataEdit.SetLimitText(m_MaxDataLength);
89 if (!m_PromptData.IsEmpty())
90 m_GenericDataEdit.SetWindowText(m_PromptData.GetBuffer(0));
91 m_GenericDataEdit.SetSel(0, -1);
92
93 return TRUE; // return TRUE unless you set the focus to a control
94 // EXCEPTION: OCX Property Pages should return FALSE
95 }
96
97 void CDallasGenericPromptDlg::OnOK() {
98 // TODO: Add extra validation here
99 m_GenericDataEdit.GetWindowText(m_PromptData);
100
101 CDialog::OnOK();
102 }