2 * Copyright (C) Volition, Inc. 1999. All rights reserved.
4 * All source code herein is the property of Volition, Inc. You may not sell
5 * or otherwise commercially exploit the source or things you created based on
10 * $Logfile: /Freespace2/code/FRED2/BriefingEditorDlg.h $
15 * Briefing editor dialog box class.
18 * Revision 1.2 2002/06/09 04:41:12 relnev
19 * added copyright header
21 * Revision 1.1.1.1 2002/05/03 03:28:11 root
25 * 3 5/20/99 1:46p Andsager
26 * Add briefing view copy and paste between stages
28 * 2 10/07/98 6:28p Dave
29 * Initial checkin. Renamed all relevant stuff to be Fred2 instead of
30 * Fred. Globalized mission and campaign file extensions. Removed Silent
31 * Threat specific code.
33 * 1 10/07/98 3:01p Dave
35 * 1 10/07/98 3:00p Dave
37 * 24 4/20/98 4:40p Hoffoss
38 * Added a button to 4 editors to play the chosen wave file.
40 * 23 4/07/98 4:51p Dave
41 * (Hoffoss) Fixed a boat load of bugs caused by the new change to
42 * multiple briefings. Allender's code changed to support this in the
43 * briefing editor wasn't quite correct.
45 * 22 4/06/98 5:37p Hoffoss
46 * Added sexp tree support to briefings in Fred.
48 * 21 2/18/98 6:45p Hoffoss
49 * Added support for lines between icons in briefings for Fred.
51 * 20 2/09/98 9:25p Allender
52 * team v team support. multiple pools and breifings
54 * 19 2/04/98 4:32p Allender
55 * support for multiple briefings and debriefings. Changes to mission
56 * type (now a bitfield). Bitfield defs for multiplayer modes
58 * 18 11/04/97 4:33p Hoffoss
59 * Made saving keep the current briefing state intact.
61 * 17 10/19/97 11:32p Hoffoss
62 * Added support for briefing cuts in Fred.
64 * 16 9/30/97 5:56p Hoffoss
65 * Added music selection combo boxes to Fred.
67 * 15 8/19/97 10:15a Hoffoss
68 * Made escape close briefing window through normal channels.
70 * 14 8/14/97 6:37p Hoffoss
71 * Added briefing icon id support to Fred.
73 * 13 8/07/97 3:45p Hoffoss
74 * Added in several requested features to the briefing editor.
76 * 12 8/06/97 12:25p Hoffoss
77 * Fixed bugs: Briefing editor dialog wasn't getting reset when new
78 * mission created, and hitting MFC assert when quitting while briefing
81 * 11 7/03/97 9:42a Hoffoss
82 * Added a ship type field in briefing editor.
84 * 10 6/26/97 6:04p Hoffoss
85 * Briefing icons now are selected before normal objects.
87 * 9 6/26/97 5:18p Hoffoss
88 * Major rework of briefing editor functionality.
90 * 8 6/25/97 4:13p Hoffoss
91 * Added functionality to the make icon button.
93 * 7 6/25/97 10:37a Hoffoss
94 * Added icon text field support to briefing editor.
96 * 6 6/24/97 3:03p Hoffoss
97 * New stages now copy another stage if possible.
99 * 5 6/24/97 11:31a Hoffoss
100 * Added code for handling icon editing.
102 * 4 6/24/97 10:16a Hoffoss
103 * Changes to briefing editor code.
105 * 3 6/23/97 2:58p Hoffoss
106 * Added more functionality to briefing editor.
108 * 2 6/18/97 2:39p Hoffoss
109 * Improved on briefing editor. Still far from done, though.
114 #ifndef __BRIEFINGEDITORDLG_H__
115 #define __BRIEFINGEDITORDLG_H__
118 #include "missionbriefcommon.h"
120 /////////////////////////////////////////////////////////////////////////////
121 // briefing_editor_dlg dialog
123 class briefing_editor_dlg : public CDialog
127 void focus_sexp(int select_sexp_node);
128 int calc_num_lines_for_icons(int num);
130 void save_editor_state();
131 void restore_editor_state();
132 void reset_icon_loop(int stage);
133 int get_next_icon(int id);
136 int find_icon(int id, int stage);
137 void propagate_icon(int num);
139 int check_mouse_hit(int x, int y);
140 void delete_icon(int num);
141 void update_positions();
142 void icon_select(int num);
143 void draw_icon(object *objp);
145 void update_data(int update = 1);
146 briefing_editor_dlg(CWnd* pParent = NULL); // standard constructor
149 //{{AFX_DATA(briefing_editor_dlg)
150 enum { IDD = IDD_BRIEFING_EDITOR };
155 CString m_icon_label;
156 CString m_stage_title;
165 int m_briefing_music;
168 int m_current_briefing;
173 // copy view variables
175 vector m_copy_view_pos;
176 matrix m_copy_view_orient;
179 // ClassWizard generated virtual function overrides
180 //{{AFX_VIRTUAL(briefing_editor_dlg)
182 virtual BOOL DestroyWindow();
184 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
185 virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
191 briefing *save_briefing;
192 int icon_loop, stage_loop;
201 int icon_obj[MAX_STAGE_ICONS];
202 int icon_marked[MAX_STAGE_ICONS];
203 int line_marked[MAX_BRIEF_STAGE_LINES];
205 void copy_stage(int from, int to);
207 // Generated message map functions
208 //{{AFX_MSG(briefing_editor_dlg)
209 afx_msg void OnClose();
210 afx_msg void OnNext();
211 afx_msg void OnPrev();
212 afx_msg void OnBrowse();
213 afx_msg void OnAddStage();
214 afx_msg void OnDeleteStage();
215 afx_msg void OnInsertStage();
216 afx_msg void OnMakeIcon();
217 afx_msg void OnDeleteIcon();
218 afx_msg void OnGotoView();
219 afx_msg void OnSaveView();
220 afx_msg void OnSelchangeIconImage();
221 afx_msg void OnSelchangeTeam();
222 afx_msg void OnPropagateIcons();
223 afx_msg void OnInitMenu(CMenu* pMenu);
224 afx_msg void OnLines();
225 afx_msg void OnRclickTree(NMHDR* pNMHDR, LRESULT* pResult);
226 afx_msg void OnBeginlabeleditTree(NMHDR* pNMHDR, LRESULT* pResult);
227 afx_msg void OnEndlabeleditTree(NMHDR* pNMHDR, LRESULT* pResult);
228 afx_msg void OnPlay();
229 afx_msg void OnCopyView();
230 afx_msg void OnPasteView();
232 DECLARE_MESSAGE_MAP()