]> icculus.org git repositories - taylor/freespace2.git/blob - include/briefingeditordlg.h
proper padding of PXO stats struct for FS2 demo
[taylor/freespace2.git] / include / briefingeditordlg.h
1 /*
2  * Copyright (C) Volition, Inc. 1999.  All rights reserved.
3  *
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
6  * the source.
7  */
8
9 /*
10  * $Logfile: /Freespace2/code/FRED2/BriefingEditorDlg.h $
11  * $Revision$
12  * $Date$
13  * $Author$
14  *
15  * Briefing editor dialog box class.
16  *
17  * $Log$
18  * Revision 1.2  2002/06/09 04:41:12  relnev
19  * added copyright header
20  *
21  * Revision 1.1.1.1  2002/05/03 03:28:11  root
22  * Initial import.
23  *
24  * 
25  * 3     5/20/99 1:46p Andsager
26  * Add briefing view copy and paste between stages
27  * 
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.
32  * 
33  * 1     10/07/98 3:01p Dave
34  * 
35  * 1     10/07/98 3:00p Dave
36  * 
37  * 24    4/20/98 4:40p Hoffoss
38  * Added a button to 4 editors to play the chosen wave file.
39  * 
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.
44  * 
45  * 22    4/06/98 5:37p Hoffoss
46  * Added sexp tree support to briefings in Fred.
47  * 
48  * 21    2/18/98 6:45p Hoffoss
49  * Added support for lines between icons in briefings for Fred.
50  * 
51  * 20    2/09/98 9:25p Allender
52  * team v team support.  multiple pools and breifings
53  * 
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
57  * 
58  * 18    11/04/97 4:33p Hoffoss
59  * Made saving keep the current briefing state intact.
60  * 
61  * 17    10/19/97 11:32p Hoffoss
62  * Added support for briefing cuts in Fred.
63  * 
64  * 16    9/30/97 5:56p Hoffoss
65  * Added music selection combo boxes to Fred.
66  * 
67  * 15    8/19/97 10:15a Hoffoss
68  * Made escape close briefing window through normal channels.
69  * 
70  * 14    8/14/97 6:37p Hoffoss
71  * Added briefing icon id support to Fred.
72  * 
73  * 13    8/07/97 3:45p Hoffoss
74  * Added in several requested features to the briefing editor.
75  * 
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
79  * editor open.
80  * 
81  * 11    7/03/97 9:42a Hoffoss
82  * Added a ship type field in briefing editor.
83  * 
84  * 10    6/26/97 6:04p Hoffoss
85  * Briefing icons now are selected before normal objects.
86  * 
87  * 9     6/26/97 5:18p Hoffoss
88  * Major rework of briefing editor functionality.
89  * 
90  * 8     6/25/97 4:13p Hoffoss
91  * Added functionality to the make icon button.
92  * 
93  * 7     6/25/97 10:37a Hoffoss
94  * Added icon text field support to briefing editor.
95  * 
96  * 6     6/24/97 3:03p Hoffoss
97  * New stages now copy another stage if possible.
98  * 
99  * 5     6/24/97 11:31a Hoffoss
100  * Added code for handling icon editing.
101  * 
102  * 4     6/24/97 10:16a Hoffoss
103  * Changes to briefing editor code.
104  * 
105  * 3     6/23/97 2:58p Hoffoss
106  * Added more functionality to briefing editor.
107  * 
108  * 2     6/18/97 2:39p Hoffoss
109  * Improved on briefing editor.  Still far from done, though.
110  *
111  * $NoKeywords: $
112  */
113
114 #ifndef __BRIEFINGEDITORDLG_H__
115 #define __BRIEFINGEDITORDLG_H__
116
117 #include "sexp.h"
118 #include "missionbriefcommon.h"
119
120 /////////////////////////////////////////////////////////////////////////////
121 // briefing_editor_dlg dialog
122
123 class briefing_editor_dlg : public CDialog
124 {
125 // Construction
126 public:
127         void focus_sexp(int select_sexp_node);
128         int calc_num_lines_for_icons(int num);
129         void batch_render();
130         void save_editor_state();
131         void restore_editor_state();
132         void reset_icon_loop(int stage);
133         int get_next_icon(int id);
134         void OnOK();
135         void OnCancel();
136         int find_icon(int id, int stage);
137         void propagate_icon(int num);
138         void reset_editor();
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);
144         void create();
145         void update_data(int update = 1);
146         briefing_editor_dlg(CWnd* pParent = NULL);   // standard constructor
147
148 // Dialog Data
149         //{{AFX_DATA(briefing_editor_dlg)
150         enum { IDD = IDD_BRIEFING_EDITOR };
151         sexp_tree       m_tree;
152         CButton m_lines;
153         BOOL    m_hilight;
154         int             m_icon_image;
155         CString m_icon_label;
156         CString m_stage_title;
157         CString m_text;
158         CString m_time;
159         CString m_voice;
160         CString m_icon_text;
161         int             m_icon_team;
162         int             m_ship_type;
163         BOOL    m_change_local;
164         int             m_id;
165         int             m_briefing_music;
166         BOOL    m_cut_next;
167         BOOL    m_cut_prev;
168         int             m_current_briefing;
169         //}}AFX_DATA
170
171         CBitmap m_play_bm;
172
173         // copy view variables
174         int             m_copy_view_set;
175         vector  m_copy_view_pos;
176         matrix  m_copy_view_orient;
177
178 // Overrides
179         // ClassWizard generated virtual function overrides
180         //{{AFX_VIRTUAL(briefing_editor_dlg)
181         public:
182         virtual BOOL DestroyWindow();
183         protected:
184         virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
185         virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
186         //}}AFX_VIRTUAL
187
188 // Implementation
189 protected:
190         brief_icon *iconp;
191         briefing *save_briefing;
192         int icon_loop, stage_loop;
193         int m_cur_stage;
194         int m_last_stage;
195         int m_cur_icon;
196         int m_last_icon;
197         int stage_saved;
198         int icon_saved;
199         int modified;
200 //      int point_obj;
201         int icon_obj[MAX_STAGE_ICONS];
202         int icon_marked[MAX_STAGE_ICONS];
203         int line_marked[MAX_BRIEF_STAGE_LINES];
204
205         void copy_stage(int from, int to);
206
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();
231         //}}AFX_MSG
232         DECLARE_MESSAGE_MAP()
233 private:
234 };
235
236 #endif
237