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