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/wing_editor.h $
15 * Wing editor dialog box handler code
18 * Revision 1.2 2002/06/09 04:41:15 relnev
19 * added copyright header
21 * Revision 1.1.1.1 2002/05/03 03:28:12 root
25 * 2 10/07/98 6:28p Dave
26 * Initial checkin. Renamed all relevant stuff to be Fred2 instead of
27 * Fred. Globalized mission and campaign file extensions. Removed Silent
28 * Threat specific code.
30 * 1 10/07/98 3:01p Dave
32 * 1 10/07/98 3:00p Dave
34 * 35 3/16/98 8:27p Allender
35 * Fred support for two new AI flags -- kamikaze and no dynamic goals.
37 * 34 2/23/98 9:48p Allender
38 * added no arrival/departure warps to wings
40 * 33 11/25/97 10:03a Allender
41 * added no arrival message checkbox to wing editor
43 * 32 11/25/97 9:42a Hoffoss
44 * Removed starting wing checkbox from wing editor.
46 * 31 11/13/97 4:14p Allender
47 * automatic assignment of hotkeys for starting wings. Appripriate
48 * warnings when they are incorrectly used. hotkeys correctly assigned to
49 * ships/wing arriving after mission start
51 * 30 11/11/97 2:13p Allender
52 * docking bay support for Fred and Freespace. Added hook to ai code for
53 * arrival/departure from dock bays. Fred support now sufficient.
55 * 29 11/10/97 10:13p Allender
56 * added departure anchor to Fred and Freespace in preparation for using
57 * docking bays. Functional in Fred, not in FreeSpace.
59 * 28 10/14/97 5:33p Hoffoss
60 * Added Fred support (and fsm support) for the no_arrival_music flags in
63 * 27 8/30/97 9:52p Hoffoss
64 * Implemented arrival location, distance, and anchor in Fred.
66 * 26 8/22/97 4:16p Hoffoss
67 * added support for arrival and departure info in ship editor using
68 * wing's info if editing marked ships in a wing instead of using ship's.
70 * 25 8/13/97 11:22p Hoffoss
71 * Implemented wave delay min and max in Fred.
73 * 24 8/12/97 7:17p Hoffoss
74 * Added previous button to ship and wing editors.
76 * 23 8/12/97 6:32p Hoffoss
77 * Added code to allow hiding of arrival and departure cues in editors.
79 * 22 7/25/97 2:40p Hoffoss
80 * Fixed bug in sexp tree selection updating handling.
82 * 21 7/09/97 2:38p Allender
83 * organized ship/wing editor dialogs. Added protect ship and ignore
84 * count checkboxes to those dialogs. Changed flag code for
85 * parse_objects. Added unprotect sexpressions
87 * 20 6/05/97 6:10p Hoffoss
88 * Added features: Autosaving, object hiding. Also fixed some minor bugs.
90 * 19 5/30/97 11:33a Allender
91 * more hotkey combo box stuff
93 * 18 5/23/97 1:53p Hoffoss
94 * Fixed problems with modeless dialog updating. It won't get caught in
95 * an infinate loop anymore, but still gives an error warning 3 times when
96 * using cancel and trying to switch window focus to main window. Don't
97 * know if I can fix that, but it's not too critical right now.
99 * 17 4/28/97 2:37p Hoffoss
100 * Added hotkey editing to Fred for ships and wings.
102 * 16 3/20/97 3:55p Hoffoss
103 * Major changes to how dialog boxes initialize (load) and update (save)
104 * their internal data. This should simplify things and create less
107 * 15 2/20/97 4:03p Hoffoss
108 * Several ToDo items: new reinforcement clears arrival cue, reinforcement
109 * control from ship and wing dialogs, show grid toggle.
111 * 14 2/17/97 5:28p Hoffoss
112 * Checked RCS headers, added them were missing, changing description to
113 * something better, etc where needed.
118 #include "sexp_tree.h"
120 /////////////////////////////////////////////////////////////////////////////
121 // wing_editor dialog
123 class wing_editor : public CDialog
130 int select_sexp_node;
132 void initialize_data_safe(int full_update);
133 void update_data_safe();
134 void show_hide_sexp_help();
135 void calc_cue_height();
137 wing_editor(CWnd* pParent = NULL); // standard constructor
140 int update_data(int redraw = 1);
141 void initialize_data(int full);
144 //{{AFX_DATA(wing_editor)
145 enum { IDD = IDD_WING_EDITOR };
146 CSpinButtonCtrl m_departure_delay_spin;
147 CSpinButtonCtrl m_arrival_delay_spin;
148 sexp_tree m_departure_tree;
149 sexp_tree m_arrival_tree;
150 CSpinButtonCtrl m_threshold_spin;
151 CSpinButtonCtrl m_waves_spin;
156 int m_arrival_location;
157 int m_departure_location;
159 int m_departure_delay;
160 BOOL m_reinforcement;
163 int m_arrival_delay_max;
164 int m_arrival_delay_min;
166 int m_arrival_target;
167 BOOL m_no_arrival_music;
168 int m_departure_target;
169 BOOL m_no_arrival_message;
170 BOOL m_no_arrival_warp;
171 BOOL m_no_departure_warp;
176 // ClassWizard generated virtual function overrides
177 //{{AFX_VIRTUAL(wing_editor)
179 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
180 virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
186 // Generated message map functions
187 //{{AFX_MSG(wing_editor)
188 afx_msg void OnInitMenu(CMenu* pMenu);
189 afx_msg void OnDeltaposSpinWaves(NMHDR* pNMHDR, LRESULT* pResult);
190 afx_msg void OnRclickArrivalTree(NMHDR* pNMHDR, LRESULT* pResult);
191 afx_msg void OnRclickDepartureTree(NMHDR* pNMHDR, LRESULT* pResult);
192 afx_msg void OnBeginlabeleditArrivalTree(NMHDR* pNMHDR, LRESULT* pResult);
193 afx_msg void OnBeginlabeleditDepartureTree(NMHDR* pNMHDR, LRESULT* pResult);
194 afx_msg void OnEndlabeleditArrivalTree(NMHDR* pNMHDR, LRESULT* pResult);
195 afx_msg void OnEndlabeleditDepartureTree(NMHDR* pNMHDR, LRESULT* pResult);
196 afx_msg void OnDeleteWing();
197 afx_msg void OnDisbandWing();
198 afx_msg void OnClose();
199 afx_msg void OnGoals2();
200 afx_msg void OnReinforcement();
201 afx_msg void OnNext();
202 afx_msg void OnSelchangedArrivalTree(NMHDR* pNMHDR, LRESULT* pResult);
203 afx_msg void OnSelchangedDepartureTree(NMHDR* pNMHDR, LRESULT* pResult);
204 afx_msg void OnHideCues();
205 afx_msg void OnPrev();
206 afx_msg void OnSelchangeArrivalLocation();
207 afx_msg void OnSelchangeDepartureLocation();
208 afx_msg void OnSelchangeHotkey();
210 DECLARE_MESSAGE_MAP()