Debian Codegraph @

editor/AddScriptDialog.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
19 // AddScriptDialog.cpp : implementation file
20 //
21
22 #include "stdafx.h"
23 #include "editor.h"
24 #include "AddScriptDialog.h"
25
26 #ifdef _DEBUG
27 #define new DEBUG_NEW
28 #undef THIS_FILE
29 static char THIS_FILE[] = __FILE__;
30 #endif
31
32 /////////////////////////////////////////////////////////////////////////////
33 // CAddScriptDialog dialog
34
35 CAddScriptDialog::CAddScriptDialog(CWnd *pParent /*=NULL*/) : CDialog(CAddScriptDialog::IDD, pParent) {
36 //{{AFX_DATA_INIT(CAddScriptDialog)
37 m_Name = _T("");
38 m_TypeName = _T("");
39 //}}AFX_DATA_INIT
40 }
41
42 void CAddScriptDialog::DoDataExchange(CDataExchange *pDX) {
43 CDialog::DoDataExchange(pDX);
44 //{{AFX_DATA_MAP(CAddScriptDialog)
45 DDX_Text(pDX, IDC_EDITNAME, m_Name);
46 DDV_MaxChars(pDX, m_Name, 32);
47 DDX_CBString(pDX, IDC_TYPESEL, m_TypeName);
48 DDV_MaxChars(pDX, m_TypeName, 16);
49 //}}AFX_DATA_MAP
50 }
51
52 BEGIN_MESSAGE_MAP(CAddScriptDialog, CDialog)
53 //{{AFX_MSG_MAP(CAddScriptDialog)
54 //}}AFX_MSG_MAP
55 END_MESSAGE_MAP()
56
57 /////////////////////////////////////////////////////////////////////////////
58 // CAddScriptDialog message handlers
59
60 BOOL CAddScriptDialog::OnInitDialog() {
61 CDialog::OnInitDialog();
62
63 CComboBox *cbox = (CComboBox *)GetDlgItem(IDC_TYPESEL);
64
65 cbox->AddString("object");
66 cbox->AddString("trigger");
67 cbox->SelectString(-1, "object");
68
69 return TRUE; // return TRUE unless you set the focus to a control
70 // EXCEPTION: OCX Property Pages should return FALSE
71 }