]> icculus.org git repositories - taylor/freespace2.git/blob - include/wing_editor.h
Initial revision
[taylor/freespace2.git] / include / wing_editor.h
1 /*
2  * $Logfile: /Freespace2/code/FRED2/wing_editor.h $
3  * $Revision$
4  * $Date$
5  * $Author$
6  *
7  * Wing editor dialog box handler code
8  *
9  * $Log$
10  * Revision 1.1  2002/05/03 03:28:12  root
11  * Initial revision
12  *
13  * 
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.
18  * 
19  * 1     10/07/98 3:01p Dave
20  * 
21  * 1     10/07/98 3:00p Dave
22  * 
23  * 35    3/16/98 8:27p Allender
24  * Fred support for two new AI flags -- kamikaze and no dynamic goals.
25  * 
26  * 34    2/23/98 9:48p Allender
27  * added no arrival/departure warps to wings
28  * 
29  * 33    11/25/97 10:03a Allender
30  * added no arrival message checkbox to wing editor
31  * 
32  * 32    11/25/97 9:42a Hoffoss
33  * Removed starting wing checkbox from wing editor.
34  * 
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
39  * 
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.
43  * 
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.
47  * 
48  * 28    10/14/97 5:33p Hoffoss
49  * Added Fred support (and fsm support) for the no_arrival_music flags in
50  * ships and wings.
51  * 
52  * 27    8/30/97 9:52p Hoffoss
53  * Implemented arrival location, distance, and anchor in Fred.
54  * 
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.
58  * 
59  * 25    8/13/97 11:22p Hoffoss
60  * Implemented wave delay min and max in Fred.
61  * 
62  * 24    8/12/97 7:17p Hoffoss
63  * Added previous button to ship and wing editors.
64  * 
65  * 23    8/12/97 6:32p Hoffoss
66  * Added code to allow hiding of arrival and departure cues in editors.
67  * 
68  * 22    7/25/97 2:40p Hoffoss
69  * Fixed bug in sexp tree selection updating handling.
70  * 
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
75  * 
76  * 20    6/05/97 6:10p Hoffoss
77  * Added features: Autosaving, object hiding.  Also fixed some minor bugs.
78  * 
79  * 19    5/30/97 11:33a Allender
80  * more hotkey combo box stuff
81  * 
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.
87  * 
88  * 17    4/28/97 2:37p Hoffoss
89  * Added hotkey editing to Fred for ships and wings.
90  * 
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
94  * problems.
95  * 
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.
99  * 
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.
103  *
104  * $NoKeywords: $
105  */
106
107 #include "sexp_tree.h"
108
109 /////////////////////////////////////////////////////////////////////////////
110 // wing_editor dialog
111
112 class wing_editor : public CDialog
113 {
114 // Construction
115 public:
116         int cue_height;
117         int bypass_errors;
118         int modified;
119         int select_sexp_node;
120
121         void initialize_data_safe(int full_update);
122         void update_data_safe();
123         void show_hide_sexp_help();
124         void calc_cue_height();
125         int verify();
126         wing_editor(CWnd* pParent = NULL);   // standard constructor
127         BOOL Create();
128         void OnOK();
129         int update_data(int redraw = 1);
130         void initialize_data(int full);
131
132 // Dialog Data
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;
141         CString m_wing_name;
142         int             m_special_ship;
143         int             m_waves;
144         int             m_threshold;
145         int             m_arrival_location;
146         int             m_departure_location;
147         int             m_arrival_delay;
148         int             m_departure_delay;
149         BOOL    m_reinforcement;
150         int             m_hotkey;
151         BOOL    m_ignore_count;
152         int             m_arrival_delay_max;
153         int             m_arrival_delay_min;
154         int             m_arrival_dist;
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;
161         BOOL    m_no_dynamic;
162         //}}AFX_DATA
163
164 // Overrides
165         // ClassWizard generated virtual function overrides
166         //{{AFX_VIRTUAL(wing_editor)
167         protected:
168         virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
169         virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
170         //}}AFX_VIRTUAL
171
172 // Implementation
173 protected:
174
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();
198         //}}AFX_MSG
199         DECLARE_MESSAGE_MAP()
200 };
201