Debian Codegraph @

editor/MainFrm.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/MainFrm.h $
21 * $Revision: 1.1.1.1 $
22 * $Date: 2003-08-26 03:57:38 $
23 * $Author: kevinb $
24 *
25 * The Editor Main Frame Window
26 *
27 * $Log: not supported by cvs2svn $
28 *
29 * 59 8/18/99 11:29a Matt
30 * Added shortcuts for next vertex and add vert to face.
31 *
32 * 58 8/17/99 4:09p Matt
33 * Added some accelerator keys, and a function to copy face light
34 * multiples.
35 *
36 * 57 5/08/99 1:39a Matt
37 * Added a function to delete all objects of a certain type, and support
38 * for placing and attaching groups to the terrain.
39 *
40 * 56 4/29/99 11:51p Matt
41 * Improved viewer move functions.
42 *
43 * 55 4/16/99 3:54p Nate
44 * Added Viewer Properties Dialog
45 *
46 * 54 4/12/99 12:50p Matt
47 * Added function to dump goal text to a file.
48 *
49 * 53 4/05/99 10:54a Matt
50 * Added auto-waypoint system
51 *
52 * 52 3/18/99 8:41p Jeff
53 * created orphan hunter dialog
54 *
55 * 51 2/22/99 11:39p Matt
56 * Deleted debris editor menu item, since it' no longer needed.
57 *
58 * 50 2/21/99 4:20p Matt
59 * Added SoundSource objects (and reformatted parts of the object header
60 * files).
61 *
62 * 49 2/05/99 1:29p Matt
63 * Added a function to show the viewer's forward vector. (Also checked
64 * select-object-by-number to use common code to print out the selected
65 * object info.)
66 *
67 * 48 2/03/99 1:58a Matt
68 * Added a system to show all pages locked.
69 *
70 * 47 2/01/99 11:36p Matt
71 * Added menu functions to select an object by number and move the viewer
72 * to the current object.
73 *
74 * 46 1/11/99 3:34p Jeff
75 * added checks for when going editor->game to see if scripts are out of
76 * date, if so give the option of breaking out. Add some options to mass
77 * script compiler, along with a toolbar shortcut.
78 *
79 * 45 1/08/99 2:56p Samir
80 * Ripped out OSIRIS1.
81 *
82 * 44 12/23/98 4:01p Nate
83 * Added code create Dallas as a modeless dialog
84 *
85 * 43 12/11/98 6:48p Nate
86 * Added support for starting D.A.L.L.A.S. from the main menu
87 *
88 * 42 12/11/98 5:50p Jeff
89 * implemented and added changes regarding Level&Scripting manage system
90 * and compiler interface
91 *
92 * 41 12/01/98 11:17p Matt
93 * Added menu option to disable drawing objects in the wireframe view
94 *
95 * 40 10/06/98 12:39p Nate
96 * Added TableFileFilter menu option.
97 *
98 * 39 10/04/98 1:25p Matt
99 *
100 * 38 9/09/98 12:48p Samir
101 * added script localizer.
102 *
103 * 37 9/03/98 5:29p Matt
104 * Added code to fix cracks in levels.
105 *
106 * 36 9/02/98 2:55p Jeff
107 * initial creation of briefing editor
108 *
109 * 35 8/27/98 6:42p Chris
110 * Added the goal keypad and the start of the matcen keypad
111 *
112 * 34 8/20/98 12:35p Matt
113 * Added nice editing for ambient sound patterns
114 *
115 * 33 8/10/98 12:14p Nate
116 * Added Table File Edit dialog.
117 *
118 * 32 5/01/98 3:57p Matt
119 * Added function to place a camera in the center of the current face.
120 *
121 * 31 4/21/98 2:40p Matt
122 * Added option to show level stats
123 *
124 * 30 4/14/98 7:50p Matt
125 * Added system to keep info for each level
126 *
127 * 29 3/27/98 6:05p Samir
128 * Added key handler for main frame.
129 *
130 * 28 1/30/98 6:07p Matt
131 * Added code and menu items to deal with camera objects
132 *
133 * 27 1/29/98 2:15p Samir
134 * Implemented ObjectListModeless and Toolbar button.
135 *
136 * 26 1/21/98 1:08p Matt
137 * Made SetViewMode() not take new_viewer parm, since it's not needed
138 * after my revamp of the editor view system.
139 *
140 * 25 1/21/98 12:25p Matt
141 * Added needed include
142 *
143 * 24 10/22/97 4:30p Chris
144 * We can now slew between the mine and the terrain
145 *
146 * 23 9/23/97 10:38a Jason
147 * Took out OnTerrain
148 *
149 * 22 9/17/97 12:58p Samir
150 * Got rid of Curve Keypad.
151 *
152 * 21 9/14/97 9:47p Matt
153 * Made CEditorView a friend class
154 *
155 * 20 9/09/97 12:23p Samir
156 * Added a menu item to go to level properties dialog.
157 *
158 * 19 9/02/97 6:41p Matt
159 * Added code for group paste
160 *
161 * 18 8/29/97 2:49p Samir
162 * Nuked SegmentKeypad.
163 *
164 * 17 8/15/97 6:32p Samir
165 * Added ScriptWizard!
166 *
167 * 16 8/12/97 5:47p Matt
168 * Added menu items to edit debris, clutter, & buildings
169 * Increased number of items in objpage dropdown box
170 *
171 * 15 8/11/97 1:53p Matt
172 * Ripped out robot & powerup pages, and added generic page
173 *
174 * 14 8/08/97 3:17p Matt
175 * Added testing calls to new generic page dialog
176 *
177 * 13 7/29/97 2:19p Jason
178 * added filepage editor to mainframe
179 *
180 * 12 7/29/97 2:11p Jeff
181 * Added compile on exit for Osiris
182 *
183 * 11 7/28/97 5:33p Matt
184 * Added function to change the view mode
185 *
186 * 10 7/26/97 8:48p Jeff
187 * fixed up calls to script editor. Added DefaultExternalEditor global
188 * variable
189 *
190 * 9 7/25/97 6:16p Samir
191 * Fixed the tile-cascade switching/default madness.
192 *
193 * 8 7/24/97 3:00p Matt
194 * Save/load game & editor settings from/to the registry, and added code
195 * to display current keypad.
196 *
197 * 7 7/18/97 5:17p Jeff
198 *
199 * 6 7/16/97 5:20p Jason
200 * implemented selection of moons with mouse click
201 *
202 * 51 6/27/97 7:21p Matt
203 * Added function to move player 0 to current segment
204 *
205 * 50 6/27/97 12:20p Samir
206 * Added room keypad dialog.
207 *
208 * 49 6/18/97 11:57a Jason
209 * added terrain functions for mark
210 *
211 * 48 6/11/97 11:03a Jason
212 * added reorder pages menu item
213 *
214 * 47 6/05/97 3:37p Samir
215 * Added megacell keypad.
216 *
217 * 46 6/05/97 2:52p Jason
218 * added megacell functions
219 *
220 * 45 6/03/97 4:55p Mark
221 *
222 * 44 5/13/97 4:38p Samir
223 * Added OnIdle function
224 *
225 * 43 5/05/97 3:37p Matt
226 *
227 * 42 4/17/97 4:03p Samir
228 * Apply Tmap 1 and Tmap2 implemented, but no Tmap2 rendering is occurring
229 * yet.
230 *
231 * 41 4/16/97 6:11p Matt
232 * Added code to divide a segment into two
233 *
234 * 40 4/08/97 10:42a Jason
235 * implemented path following interface
236 *
237 * 39 4/04/97 3:15p Samir
238 * Added paths keypad, removed player keypad since it's joined with object
239 * keypad.
240 *
241 * 38 4/03/97 1:20p Jason
242 * changes to get the sound page system playing
243 *
244 * 37 4/02/97 10:56a Matt
245 * Changed "Other" menu to "Object", and removed obsolete set-player-start
246 * option
247 *
248 * 36 3/28/97 12:20p Jason
249 * added terrain dialog stuff, plus bitmap memory indicator
250 *
251 * 35 3/26/97 4:37p Samir
252 * Splash screen up and running.
253 *
254 * 34 3/21/97 12:30p Samir
255 * Added more keypad functionality and NET pane.
256 *
257 * 33 3/20/97 5:01p Matt
258 * Removed obsolete select-from-box code
259 *
260 * 32 3/20/97 11:55a Jason
261 * changes for terrain editing/drawing
262 *
263 * 31 3/17/97 1:32p Matt
264 * Took out redundant and unneeded handlers for View menu items.
265 *
266 * 30 3/14/97 6:53p Samir
267 * Took out unused functions and added delete segment function.
268 *
269 * 29 3/14/97 12:50p Samir
270 * Added marked segment pane
271 *
272 * 28 3/13/97 7:02p Samir
273 * Added current segment:side pane.
274 *
275 * 27 3/12/97 3:25p Matt
276 * Added funcs for cut, copy, paste, & delete, and to save and load
277 * groups.
278 *
279 * 26 3/05/97 11:49a Samir
280 * Added doorway and terrain keypad tabs.
281 *
282 * 25 2/28/97 6:40p Matt
283 * Call code to call box selection code
284 *
285 * 24 2/28/97 4:00p Matt
286 * Added code to handle the list of selected segments
287 *
288 * 23 2/28/97 2:37p Mark
289 *
290 * 22 2/28/97 11:09a Samir
291 * Fixed Play in 640x480 menu item.
292 *
293 * 21 2/27/97 5:29p Mark
294 *
295 * 20 2/26/97 3:35p Mark
296 *
297 * 19 2/20/97 5:10p Samir
298 * Added Tmap1 and Tmap2 apply accels. Tmap1 works by doing a CTRL-1.
299 *
300 * 18 2/20/97 9:57a Matt
301 * Added Add Segment
302 *
303 * 17 2/19/97 2:15p Samir
304 * Added keypad info.
305 *
306 * 16 2/18/97 7:04p Samir
307 * Added print status bar message functions
308 *
309 * 15 2/12/97 2:33p Samir
310 * Added hog dialog.
311 *
312 * 14 2/06/97 2:46p Jason
313 * added import bitmap function
314 *
315 * 13 2/05/97 12:16p Samir
316 * Added menu item for preferences.
317 *
318 * 12 2/04/97 5:18p Samir
319 * Added Leaving editor... option in File Menu
320 *
321 * 11 1/23/97 4:35p Samir
322 * Added floating keypad toggle and support
323 *
324 * 10 1/21/97 12:45p Samir
325 * Toggle to get rid of keypad
326 *
327 * $NoKeywords: $
328 */
329
330 #ifndef M_MAINFRM_H
331 #define M_MAINFRM_H
332
333 #include "stdafx.h"
334
335 class CTextureDialog;
336 class CObjectDialog;
337 class CLightingDialog;
338 class CPathPadDialog;
339 class CTriggerDialog;
340 class CDoorwayDialog;
341 class CRoomKeypadDialog;
342 class CFloatingKeypadDialog;
343 class CKeypadDialog;
344 class CTerrainDialog;
345 class CMegacellKeypad;
346 class CD3Splash;
347 class CObjectListModeless;
348 class CEditorDoc;
349 class levelkeypad;
350 class matcenkeypad;
351
352 class CMainFrame : public CFrameWnd {
353 protected: // create from serialization only
354 CMainFrame();
355 DECLARE_DYNCREATE(CMainFrame)
356
357 // Attributes
358 public:
359 // Operations
360 public:
361 // Overrides
362 // ClassWizard generated virtual function overrides
363 //{{AFX_VIRTUAL(CMainFrame)
364 public:
365 virtual BOOL PreCreateWindow(CREATESTRUCT &cs);
366 virtual void ActivateFrame(int nCmdShow = -1);
367
368 protected:
369 virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
370 virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT *pResult);
371 virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext *pContext);
372 //}}AFX_VIRTUAL
373
374 public:
375 void DockKeypad(BOOL dock);
376 void SetStatusMessage(char *str);
377 void OnIdle();
378
379 // Implementation
380 public:
381 virtual ~CMainFrame();
382 #ifdef _DEBUG
383 virtual void AssertValid() const;
384 virtual void Dump(CDumpContext &dc) const;
385 #endif
386
387 protected: // control bar embedded members
388 CStatusBar m_wndStatusBar;
389 CToolBar m_wndToolBar;
390 CDialogBar m_wndKeypadBar;
391
392 // Generated message map functions
393 protected:
394 //{{AFX_MSG(CMainFrame)
395 afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
396 afx_msg void OnDestroy();
397 afx_msg void OnToolsWorldTextures();
398 afx_msg void OnSize(UINT nType, int cx, int cy);
399 afx_msg void OnToolsWorldWeapons();
400 afx_msg void OnToolsWorldObjectsDoor();
401 afx_msg void OnToolsWorldObjectsLights();
402 afx_msg void OnToolsWorldObjectsPlayer();
403 afx_msg void OnToolsWorldObjectsPowerups();
404 afx_msg void OnToolsWorldObjectsRobots();
405 afx_msg void OnSubeditorsFont();
406 afx_msg void OnActivateApp(BOOL bActive, HTASK hTask);
407 afx_msg void OnFilePlayin640x480();
408 afx_msg void OnUpdateViewKeypadToggle(CCmdUI *pCmdUI);
409 afx_msg void OnViewKeypadToggle();
410 afx_msg void OnFileLeaveEditor();
411 afx_msg void OnFilePreferences();
412 afx_msg void OnImportBitmap();
413 afx_msg void OnSubeditorsHogmaker();
414 afx_msg void OnNumpad0();
415 afx_msg void OnNumpad1();
416 afx_msg void OnNumpad2();
417 afx_msg void OnNumpad3();
418 afx_msg void OnNumpad4();
419 afx_msg void OnNumpad5();
420 afx_msg void OnNumpad6();
421 afx_msg void OnNumpad7();
422 afx_msg void OnNumpad8();
423 afx_msg void OnNumpad9();
424 afx_msg void OnNumpaddel();
425 afx_msg void OnNumpadminus();
426 afx_msg void OnNumpadadd();
427 afx_msg void OnViewCenterOnMine();
428 afx_msg void OnViewMoveCameraToSelectedRoom();
429 afx_msg void OnViewCenterOnCube();
430 afx_msg void OnViewCenterOnObject();
431 afx_msg void OnGroupCreateGroup();
432 afx_msg void OnGroupLoadGroup();
433 afx_msg void OnGroupMirrorGroup();
434 afx_msg void OnGroupSaveGroup();
435 afx_msg void OnEditAddSelect();
436 afx_msg void OnEditClearSelected();
437 afx_msg void OnEditRemoveSelect();
438 afx_msg void OnEditSelectAttached();
439 afx_msg void OnEditSaveScrap();
440 afx_msg void OnEditLoadScrap();
441 afx_msg void OnEditCopy();
442 afx_msg void OnEditCut();
443 afx_msg void OnEditDelete();
444 afx_msg void OnSegSidePane(CCmdUI *pCmdUI);
445 afx_msg void OnNetPane(CCmdUI *pCmdUI);
446 afx_msg void OnBMMemPane(CCmdUI *pCmdUI);
447 afx_msg void OnEnginePane(CCmdUI *pCmdUI);
448 afx_msg void OnViewerPane(CCmdUI *pCmdUI);
449 afx_msg void OnNumpadDiv();
450 afx_msg void OnNumpadEnter();
451 afx_msg void OnNumpadLock();
452 afx_msg void OnNumpadMul();
453 afx_msg void OnObjectDeleteObject();
454 afx_msg void OnObjectPlaceObject();
455 afx_msg void OnToolsWorldObjectsSound();
456 afx_msg void OnTestTest1();
457 afx_msg void OnTestTest2();
458 afx_msg void OnTestTest3();
459 afx_msg BOOL OnHelpInfo(HELPINFO *pHelpInfo);
460 afx_msg void OnEditorsMegacells();
461 afx_msg void OnReorderPages();
462 afx_msg void OnFileImportRoom();
463 afx_msg void OnObjectMovePlayer();
464 afx_msg void OnRoomView();
465 afx_msg void OnTerrainView();
466 afx_msg void OnMineView();
467 afx_msg void OnUpdateMineView(CCmdUI *pCmdUI);
468 afx_msg void OnUpdateRoomView(CCmdUI *pCmdUI);
469 afx_msg void OnUpdateTerrainView(CCmdUI *pCmdUI);
470 afx_msg void OnViewNewviewer();
471 afx_msg void OnViewNextviewer();
472 afx_msg void OnViewDeleteviewer();
473 afx_msg void OnD3help();
474 afx_msg void OnHotspotTga();
475 afx_msg void OnEditorsFiles();
476 afx_msg void OnToolsWorldObjectsClutter();
477 afx_msg void OnToolsWorldObjectsBuildings();
478 afx_msg void OnEditPlace();
479 afx_msg void OnEditAttach();
480 afx_msg void OnUpdateEditAttach(CCmdUI *pCmdUI);
481 afx_msg void OnUpdateEditSaveScrap(CCmdUI *pCmdUI);
482 afx_msg void OnFileLevelProps();
483 afx_msg void OnObjbutton();
484 afx_msg void OnUpdateObjbutton(CCmdUI *pCmdUI);
485 afx_msg void OnNcDestroy();
486 afx_msg void OnObjectSetCameraFromViewer();
487 afx_msg void OnObjectPlaceCameraAtViewer();
488 afx_msg void OnObjectSetViewerFromCamera();
489 afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
490 afx_msg void OnFileLevelInfo();
491 afx_msg void OnFileStats();
492 afx_msg void OnFileVerifyLevel();
493 afx_msg void OnObjectPlaceCameraAtCurrentFace();
494 afx_msg void OnSubEditorsTableFileEdit();
495 afx_msg void OnEditorsAmbientSounds();
496 afx_msg void OnBriefingEditor();
497 afx_msg void OnScriptLevelInterface();
498 afx_msg void OnFileFixCracks();
499 afx_msg void OnViewResetViewRadius();
500 afx_msg void OnSubeditorsTablefilefilter();
501 afx_msg void OnViewShowObjectsInWireframeView();
502 afx_msg void OnUpdateViewShowObjectsInWireframeView(CCmdUI *pCmdUI);
503 afx_msg void OnEditorsDallas();
504 afx_msg void OnUpdateOsiriscompile(CCmdUI *pCmdUI);
505 afx_msg void OnOsiriscompile();
506 afx_msg void OnViewMoveCameraToCurrentObject();
507 afx_msg void OnObjectSelectByNumber();
508 afx_msg void OnShowAllCheckedOut();
509 afx_msg void OnViewShowViewerForwardVector();
510 afx_msg void OnObjectPlaceSoundSourceAtViewer();
511 afx_msg void OnOrphanhunter();
512 afx_msg void OnObjectPlaceWaypointAtViewer();
513 afx_msg void OnFileSaveGoalText();
514 afx_msg void OnViewViewprop();
515 afx_msg void OnUpdateViewViewprop(CCmdUI *pCmdUI);
516 afx_msg void OnViewMoveCameraToSelectedFace();
517 afx_msg void OnEditPlaceTerrain();
518 afx_msg void OnAccelCopyLightMultiple();
519 afx_msg void OnAccelSlidedown();
520 afx_msg void OnAccelSlideleft();
521 afx_msg void OnAccelSlideright();
522 afx_msg void OnAccelSlideup();
523 afx_msg void OnAccelNextVertex();
524 //}}AFX_MSG
525 DECLARE_MESSAGE_MAP()
526
527 private:
528 void InitKeypadDialog(); // Initialized the keypad tab dialog
529 void DoKeypadTabNotify(NMHDR *nmhdr);
530 void ShowCurrentKeypad();
531 void ResizeKeypad();
532
533 void InitGraphicsSystem();
534 void DisplaySplashScreen();
535 void RemoveSplashScreen();
536
537 private:
538 CFloatingKeypadDialog *m_FloatingKeypadDialog;
539
540 CD3Splash *m_D3Splash; // splash screen dialog
541
542 CKeypadDialog *m_KeypadTabDialog; // modeless dialog in tab control
543 CTextureDialog *m_TextureDialog;
544 CObjectDialog *m_ObjectDialog;
545 CLightingDialog *m_LightingDialog;
546 CPathPadDialog *m_PathPadDialog;
547 CTriggerDialog *m_TriggerDialog;
548 CDoorwayDialog *m_DoorwayDialog;
549 CTerrainDialog *m_TerrainDialog;
550 CMegacellKeypad *m_MegacellKeypad;
551 CRoomKeypadDialog *m_RoomDialog;
552 levelkeypad *m_LevelDialog;
553 matcenkeypad *m_MatcenDialog;
554
555 CObjectListModeless *m_ObjModeless;
556
557 CTabCtrl *m_KeypadTabCtrl;
558
559 BOOL m_ViewActivated;
560
561 friend class CTextureGrWnd;
562 friend class CEditorView;
563 friend class CEditorDoc;
564 };
565
566 /////////////////////////////////////////////////////////////////////////////
567
568 // Set the editor view mode
569 void SetViewMode(int view_mode);
570
571 #endif