Debian Codegraph @

editor/ScriptEditorDlg.h

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/ScriptEditorDlg.h $
21 * $Revision: 1.1.1.1 $
22 * $Date: 2003-08-26 03:57:38 $
23 * $Author: kevinb $
24 *
25 * The script editor dialog.
26 *
27 * $Log: not supported by cvs2svn $
28 *
29 * 9 8/29/97 2:21p Samir
30 * Add some rich edit functionality.
31 *
32 * $NoKeywords: $
33 */
34
35 #if !defined(AFX_SCRIPTEDITORDLG_H__940F1B41_FF57_11D0_8901_0020A90CB6F2__INCLUDED_)
36 #define AFX_SCRIPTEDITORDLG_H__940F1B41_FF57_11D0_8901_0020A90CB6F2__INCLUDED_
37
38 #if _MSC_VER >= 1000
39 #pragma once
40 #endif // _MSC_VER >= 1000
41 // ScriptEditorDlg.h : header file
42 //
43
44 #include "d3x.h"
45
46 /////////////////////////////////////////////////////////////////////////////
47 // CScriptEditorDlg dialog
48
49 #ifndef _SCRIPTEDITOR_H_
50 #define _SCRIPTEDITOR_H_
51
52 extern char Default_external_editor[256];
53
54 class CScriptEditorDlg : public CDialog {
55 // Construction
56 public:
57 CScriptEditorDlg(CWnd *pParent = NULL); // standard constructor
58 void SetScript(char *script, tD3XProgram *d3x);
59 void SetExternalEditor(char *external);
60 char *GetScript(void);
61 int GetScriptLength(void);
62 void InitFindReplace(BOOL bFind);
63 bool FindNext(char *w);
64 void ReplaceSelected(char *replace_word);
65 void ReplaceAll(char *find_word, char *replace_word);
66 void ReplaceCurrent(char *replace_word);
67 void SetCurrentIndex(int index);
68 bool CheckWord(int index, char *text, char *w);
69 void SetSelection(int index, int length);
70 void RemoveAllSelections();
71 void AdjustExternalName();
72 void ExportScript(char *file);
73 void ImportScript(char *file);
74 bool m_FindMatchCase;
75
76 CFindReplaceDialog *m_pdlgFindReplace;
77 CString m_LastWord;
78 CString m_ExternalEditor;
79 tD3XProgram *m_Program;
80
81 // Dialog Data
82 //{{AFX_DATA(CScriptEditorDlg)
83 enum { IDD = IDD_SCRIPTEDITOR };
84 CString m_sScript;
85 //}}AFX_DATA
86
87 // Overrides
88 // ClassWizard generated virtual function overrides
89 //{{AFX_VIRTUAL(CScriptEditorDlg)
90 protected:
91 virtual void DoDataExchange(CDataExchange *pDX); // DDX/DDV support
92 //}}AFX_VIRTUAL
93
94 // Implementation
95 protected:
96 // Generated message map functions
97 //{{AFX_MSG(CScriptEditorDlg)
98 virtual void OnOK();
99 virtual void OnCancel();
100 afx_msg void OnSetExternalViewer();
101 afx_msg void OnUseExternal();
102 virtual BOOL OnInitDialog();
103 afx_msg void OnScripteditorExport();
104 afx_msg void OnScripteditorImport();
105 afx_msg void OnScriptCompile();
106 afx_msg void OnOsirisCompileScript();
107 afx_msg void OnOsirisCopy();
108 afx_msg void OnOsirisCut();
109 afx_msg void OnOsirisExportScript();
110 afx_msg void OnOsirisFind();
111 afx_msg void OnOsirisFindAndReplace();
112 afx_msg void OnOsirisImportScript();
113 afx_msg void OnOsirisPaste();
114 afx_msg void OnOsirisSaveExit();
115 afx_msg void OnOsirisSetExternal();
116 afx_msg void OnOsirisUseExternal();
117 afx_msg void OnUpdateOsirisPaste(CCmdUI *pCmdUI);
118 //}}AFX_MSG
119 afx_msg LONG OnFindReplace(WPARAM wParam, LPARAM lParam);
120 DECLARE_MESSAGE_MAP()
121
122 private:
123 CRichEditCtrl m_RichEdit;
124 };
125 #endif
126 //{{AFX_INSERT_LOCATION}}
127 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
128
129 #endif // !defined(AFX_SCRIPTEDITORDLG_H__940F1B41_FF57_11D0_8901_0020A90CB6F2__INCLUDED_)