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