]> icculus.org git repositories - taylor/freespace2.git/blob - include/wing_editor.h
fix issue with looping audio streams
[taylor/freespace2.git] / include / wing_editor.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/wing_editor.h $
11  * $Revision$
12  * $Date$
13  * $Author$
14  *
15  * Wing editor dialog box handler code
16  *
17  * $Log$
18  * Revision 1.2  2002/06/09 04:41:15  relnev
19  * added copyright header
20  *
21  * Revision 1.1.1.1  2002/05/03 03:28:12  root
22  * Initial import.
23  *
24  * 
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.
29  * 
30  * 1     10/07/98 3:01p Dave
31  * 
32  * 1     10/07/98 3:00p Dave
33  * 
34  * 35    3/16/98 8:27p Allender
35  * Fred support for two new AI flags -- kamikaze and no dynamic goals.
36  * 
37  * 34    2/23/98 9:48p Allender
38  * added no arrival/departure warps to wings
39  * 
40  * 33    11/25/97 10:03a Allender
41  * added no arrival message checkbox to wing editor
42  * 
43  * 32    11/25/97 9:42a Hoffoss
44  * Removed starting wing checkbox from wing editor.
45  * 
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
50  * 
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.
54  * 
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.
58  * 
59  * 28    10/14/97 5:33p Hoffoss
60  * Added Fred support (and fsm support) for the no_arrival_music flags in
61  * ships and wings.
62  * 
63  * 27    8/30/97 9:52p Hoffoss
64  * Implemented arrival location, distance, and anchor in Fred.
65  * 
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.
69  * 
70  * 25    8/13/97 11:22p Hoffoss
71  * Implemented wave delay min and max in Fred.
72  * 
73  * 24    8/12/97 7:17p Hoffoss
74  * Added previous button to ship and wing editors.
75  * 
76  * 23    8/12/97 6:32p Hoffoss
77  * Added code to allow hiding of arrival and departure cues in editors.
78  * 
79  * 22    7/25/97 2:40p Hoffoss
80  * Fixed bug in sexp tree selection updating handling.
81  * 
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
86  * 
87  * 20    6/05/97 6:10p Hoffoss
88  * Added features: Autosaving, object hiding.  Also fixed some minor bugs.
89  * 
90  * 19    5/30/97 11:33a Allender
91  * more hotkey combo box stuff
92  * 
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.
98  * 
99  * 17    4/28/97 2:37p Hoffoss
100  * Added hotkey editing to Fred for ships and wings.
101  * 
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
105  * problems.
106  * 
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.
110  * 
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.
114  *
115  * $NoKeywords: $
116  */
117
118 #include "sexp_tree.h"
119
120 /////////////////////////////////////////////////////////////////////////////
121 // wing_editor dialog
122
123 class wing_editor : public CDialog
124 {
125 // Construction
126 public:
127         int cue_height;
128         int bypass_errors;
129         int modified;
130         int select_sexp_node;
131
132         void initialize_data_safe(int full_update);
133         void update_data_safe();
134         void show_hide_sexp_help();
135         void calc_cue_height();
136         int verify();
137         wing_editor(CWnd* pParent = NULL);   // standard constructor
138         BOOL Create();
139         void OnOK();
140         int update_data(int redraw = 1);
141         void initialize_data(int full);
142
143 // Dialog Data
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;
152         CString m_wing_name;
153         int             m_special_ship;
154         int             m_waves;
155         int             m_threshold;
156         int             m_arrival_location;
157         int             m_departure_location;
158         int             m_arrival_delay;
159         int             m_departure_delay;
160         BOOL    m_reinforcement;
161         int             m_hotkey;
162         BOOL    m_ignore_count;
163         int             m_arrival_delay_max;
164         int             m_arrival_delay_min;
165         int             m_arrival_dist;
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;
172         BOOL    m_no_dynamic;
173         //}}AFX_DATA
174
175 // Overrides
176         // ClassWizard generated virtual function overrides
177         //{{AFX_VIRTUAL(wing_editor)
178         protected:
179         virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
180         virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
181         //}}AFX_VIRTUAL
182
183 // Implementation
184 protected:
185
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();
209         //}}AFX_MSG
210         DECLARE_MESSAGE_MAP()
211 };
212