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 the
6  * source.
7  *
8 */
9 
10 
11 
12 #include "Sexp_tree.h"
13 
14 /////////////////////////////////////////////////////////////////////////////
15 // wing_editor dialog
16 
17 class wing_editor : public CDialog
18 {
19 // Construction
20 public:
21 	int cue_height;
22 	int bypass_errors;
23 	int modified;
24 	int select_sexp_node;
25 
26 	void initialize_data_safe(int full_update);
27 	void update_data_safe();
28 	void show_hide_sexp_help();
29 	void calc_cue_height();
30 	int verify();
31 	wing_editor(CWnd* pParent = NULL);   // standard constructor
32 	BOOL Create();
33 	void OnOK();
34 	int update_data(int redraw = 1);
35 	void initialize_data(int full);
36 
37 // Dialog Data
38 	//{{AFX_DATA(wing_editor)
39 	enum { IDD = IDD_WING_EDITOR };
40 	CSpinButtonCtrl	m_departure_delay_spin;
41 	CSpinButtonCtrl	m_arrival_delay_spin;
42 	sexp_tree	m_departure_tree;
43 	sexp_tree	m_arrival_tree;
44 	CSpinButtonCtrl	m_threshold_spin;
45 	CSpinButtonCtrl	m_waves_spin;
46 	CString	m_wing_name;
47 	int		m_special_ship;
48 	int		m_waves;
49 	int		m_threshold;
50 	int		m_formation;
51 	int		m_arrival_location;
52 	int		m_departure_location;
53 	int		m_arrival_delay;
54 	int		m_departure_delay;
55 	BOOL	m_reinforcement;
56 	int		m_hotkey;
57 	BOOL	m_ignore_count;
58 	int		m_arrival_delay_max;
59 	int		m_arrival_delay_min;
60 	int		m_arrival_dist;
61 	int		m_arrival_target;
62 	BOOL	m_no_arrival_music;
63 	int		m_departure_target;
64 	BOOL	m_no_arrival_message;
65 	BOOL	m_no_arrival_warp;
66 	BOOL	m_no_departure_warp;
67 	BOOL	m_no_dynamic;
68 	CString	m_wing_squad_filename;
69 	//}}AFX_DATA
70 
71 // Overrides
72 	// ClassWizard generated virtual function overrides
73 	//{{AFX_VIRTUAL(wing_editor)
74 	protected:
75 	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
76 	virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
77 	//}}AFX_VIRTUAL
78 
79 // Implementation
80 protected:
81 
82 	// Generated message map functions
83 	//{{AFX_MSG(wing_editor)
84 	afx_msg void OnInitMenu(CMenu* pMenu);
85 	afx_msg void OnDeltaposSpinWaves(NMHDR* pNMHDR, LRESULT* pResult);
86 	afx_msg void OnRclickArrivalTree(NMHDR* pNMHDR, LRESULT* pResult);
87 	afx_msg void OnRclickDepartureTree(NMHDR* pNMHDR, LRESULT* pResult);
88 	afx_msg void OnBeginlabeleditArrivalTree(NMHDR* pNMHDR, LRESULT* pResult);
89 	afx_msg void OnBeginlabeleditDepartureTree(NMHDR* pNMHDR, LRESULT* pResult);
90 	afx_msg void OnEndlabeleditArrivalTree(NMHDR* pNMHDR, LRESULT* pResult);
91 	afx_msg void OnEndlabeleditDepartureTree(NMHDR* pNMHDR, LRESULT* pResult);
92 	afx_msg void OnDeleteWing();
93 	afx_msg void OnDisbandWing();
94 	afx_msg void OnClose();
95 	afx_msg void OnGoals2();
96 	afx_msg void OnReinforcement();
97 	afx_msg void OnNext();
98 	afx_msg void OnSelchangedArrivalTree(NMHDR* pNMHDR, LRESULT* pResult);
99 	afx_msg void OnSelchangedDepartureTree(NMHDR* pNMHDR, LRESULT* pResult);
100 	afx_msg void OnHideCues();
101 	afx_msg void OnPrev();
102 	afx_msg void OnSelchangeArrivalLocation();
103 	afx_msg void OnSelchangeDepartureLocation();
104 	afx_msg void OnSelchangeHotkey();
105 	afx_msg void OnSquadLogo();
106 	afx_msg void OnRestrictArrival();
107 	afx_msg void OnRestrictDeparture();
108 	//}}AFX_MSG
109 	DECLARE_MESSAGE_MAP()
110 
111 	// Aux functions
112 	int calc_max_wave_treshold();
113 public:
114 	afx_msg void OnBnClickedCustomWarpinParams();
115 	afx_msg void OnBnClickedCustomWarpoutParams();
116 };
117