2 * $Logfile: /Freespace2/code/FRED2/BriefingEditorDlg.h $
7 * Briefing editor dialog box class.
10 * Revision 1.1 2002/05/03 03:28:11 root
14 * 3 5/20/99 1:46p Andsager
15 * Add briefing view copy and paste between stages
17 * 2 10/07/98 6:28p Dave
18 * Initial checkin. Renamed all relevant stuff to be Fred2 instead of
19 * Fred. Globalized mission and campaign file extensions. Removed Silent
20 * Threat specific code.
22 * 1 10/07/98 3:01p Dave
24 * 1 10/07/98 3:00p Dave
26 * 24 4/20/98 4:40p Hoffoss
27 * Added a button to 4 editors to play the chosen wave file.
29 * 23 4/07/98 4:51p Dave
30 * (Hoffoss) Fixed a boat load of bugs caused by the new change to
31 * multiple briefings. Allender's code changed to support this in the
32 * briefing editor wasn't quite correct.
34 * 22 4/06/98 5:37p Hoffoss
35 * Added sexp tree support to briefings in Fred.
37 * 21 2/18/98 6:45p Hoffoss
38 * Added support for lines between icons in briefings for Fred.
40 * 20 2/09/98 9:25p Allender
41 * team v team support. multiple pools and breifings
43 * 19 2/04/98 4:32p Allender
44 * support for multiple briefings and debriefings. Changes to mission
45 * type (now a bitfield). Bitfield defs for multiplayer modes
47 * 18 11/04/97 4:33p Hoffoss
48 * Made saving keep the current briefing state intact.
50 * 17 10/19/97 11:32p Hoffoss
51 * Added support for briefing cuts in Fred.
53 * 16 9/30/97 5:56p Hoffoss
54 * Added music selection combo boxes to Fred.
56 * 15 8/19/97 10:15a Hoffoss
57 * Made escape close briefing window through normal channels.
59 * 14 8/14/97 6:37p Hoffoss
60 * Added briefing icon id support to Fred.
62 * 13 8/07/97 3:45p Hoffoss
63 * Added in several requested features to the briefing editor.
65 * 12 8/06/97 12:25p Hoffoss
66 * Fixed bugs: Briefing editor dialog wasn't getting reset when new
67 * mission created, and hitting MFC assert when quitting while briefing
70 * 11 7/03/97 9:42a Hoffoss
71 * Added a ship type field in briefing editor.
73 * 10 6/26/97 6:04p Hoffoss
74 * Briefing icons now are selected before normal objects.
76 * 9 6/26/97 5:18p Hoffoss
77 * Major rework of briefing editor functionality.
79 * 8 6/25/97 4:13p Hoffoss
80 * Added functionality to the make icon button.
82 * 7 6/25/97 10:37a Hoffoss
83 * Added icon text field support to briefing editor.
85 * 6 6/24/97 3:03p Hoffoss
86 * New stages now copy another stage if possible.
88 * 5 6/24/97 11:31a Hoffoss
89 * Added code for handling icon editing.
91 * 4 6/24/97 10:16a Hoffoss
92 * Changes to briefing editor code.
94 * 3 6/23/97 2:58p Hoffoss
95 * Added more functionality to briefing editor.
97 * 2 6/18/97 2:39p Hoffoss
98 * Improved on briefing editor. Still far from done, though.
103 #ifndef __BRIEFINGEDITORDLG_H__
104 #define __BRIEFINGEDITORDLG_H__
107 #include "missionbriefcommon.h"
109 /////////////////////////////////////////////////////////////////////////////
110 // briefing_editor_dlg dialog
112 class briefing_editor_dlg : public CDialog
116 void focus_sexp(int select_sexp_node);
117 int calc_num_lines_for_icons(int num);
119 void save_editor_state();
120 void restore_editor_state();
121 void reset_icon_loop(int stage);
122 int get_next_icon(int id);
125 int find_icon(int id, int stage);
126 void propagate_icon(int num);
128 int check_mouse_hit(int x, int y);
129 void delete_icon(int num);
130 void update_positions();
131 void icon_select(int num);
132 void draw_icon(object *objp);
134 void update_data(int update = 1);
135 briefing_editor_dlg(CWnd* pParent = NULL); // standard constructor
138 //{{AFX_DATA(briefing_editor_dlg)
139 enum { IDD = IDD_BRIEFING_EDITOR };
144 CString m_icon_label;
145 CString m_stage_title;
154 int m_briefing_music;
157 int m_current_briefing;
162 // copy view variables
164 vector m_copy_view_pos;
165 matrix m_copy_view_orient;
168 // ClassWizard generated virtual function overrides
169 //{{AFX_VIRTUAL(briefing_editor_dlg)
171 virtual BOOL DestroyWindow();
173 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
174 virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
180 briefing *save_briefing;
181 int icon_loop, stage_loop;
190 int icon_obj[MAX_STAGE_ICONS];
191 int icon_marked[MAX_STAGE_ICONS];
192 int line_marked[MAX_BRIEF_STAGE_LINES];
194 void copy_stage(int from, int to);
196 // Generated message map functions
197 //{{AFX_MSG(briefing_editor_dlg)
198 afx_msg void OnClose();
199 afx_msg void OnNext();
200 afx_msg void OnPrev();
201 afx_msg void OnBrowse();
202 afx_msg void OnAddStage();
203 afx_msg void OnDeleteStage();
204 afx_msg void OnInsertStage();
205 afx_msg void OnMakeIcon();
206 afx_msg void OnDeleteIcon();
207 afx_msg void OnGotoView();
208 afx_msg void OnSaveView();
209 afx_msg void OnSelchangeIconImage();
210 afx_msg void OnSelchangeTeam();
211 afx_msg void OnPropagateIcons();
212 afx_msg void OnInitMenu(CMenu* pMenu);
213 afx_msg void OnLines();
214 afx_msg void OnRclickTree(NMHDR* pNMHDR, LRESULT* pResult);
215 afx_msg void OnBeginlabeleditTree(NMHDR* pNMHDR, LRESULT* pResult);
216 afx_msg void OnEndlabeleditTree(NMHDR* pNMHDR, LRESULT* pResult);
217 afx_msg void OnPlay();
218 afx_msg void OnCopyView();
219 afx_msg void OnPasteView();
221 DECLARE_MESSAGE_MAP()