]> icculus.org git repositories - taylor/freespace2.git/blob - include/shipgoalsdlg.h
Initial revision
[taylor/freespace2.git] / include / shipgoalsdlg.h
1 /*
2  * $Logfile: /Freespace2/code/FRED2/ShipGoalsDlg.h $
3  * $Revision$
4  * $Date$
5  * $Author$
6  *
7  * Initial orders editor dialog box handling code.  This dialog is used for both
8  * ship and wing initial orders, and can support more if need be without modification.
9  *
10  * $Log$
11  * Revision 1.1  2002/05/03 03:28:12  root
12  * Initial revision
13  *
14  * 
15  * 2     10/07/98 6:28p Dave
16  * Initial checkin. Renamed all relevant stuff to be Fred2 instead of
17  * Fred. Globalized mission and campaign file extensions. Removed Silent
18  * Threat specific code.
19  * 
20  * 1     10/07/98 3:01p Dave
21  * 
22  * 1     10/07/98 3:00p Dave
23  * 
24  * 13    8/26/97 4:18p Hoffoss
25  * Added error checking to initial orders dialog when ok is clicked.
26  * 
27  * 12    7/30/97 12:31p Hoffoss
28  * Made improvements to ship goals editor (initial orders) to disallow
29  * illegal orders.
30  * 
31  * 11    5/30/97 4:50p Hoffoss
32  * Added code to allow marked ship editing of data in child dialogs of
33  * ship editor dialog.
34  * 
35  * 10    3/10/97 5:37p Hoffoss
36  * fixed bug in dock goal selection.
37  * 
38  * 9     3/03/97 4:32p Hoffoss
39  * Initial orders supports new docking stuff Allender added.
40  * 
41  * 8     2/17/97 5:28p Hoffoss
42  * Checked RCS headers, added them were missing, changing description to
43  * something better, etc where needed.
44  *
45  * $NoKeywords: $
46  */
47
48 #include "management.h"
49
50 #ifndef _SHIPGOALSDLG_H
51 #define _SHIPGOALSDLG_H
52
53 #define ED_MAX_GOALS 10
54
55 /////////////////////////////////////////////////////////////////////////////
56 // ShipGoalsDlg dialog
57
58 class ShipGoalsDlg : public CDialog
59 {
60 // Construction
61 public:
62         int verify_orders(int ship = -1);
63         void initialize_multi();
64         void OnOK();
65         void update();
66         void initialize(ai_goal *goals, int ship = cur_ship);
67         ShipGoalsDlg(CWnd* pParent = NULL);   // standard constructor
68
69         int self_ship, self_wing;
70         int m_behavior[ED_MAX_GOALS];
71         int m_object[ED_MAX_GOALS];
72         int m_priority[ED_MAX_GOALS];
73         int m_subsys[ED_MAX_GOALS];
74         int m_dock2[ED_MAX_GOALS];
75         int m_data[ED_MAX_GOALS];
76
77         CComboBox *m_behavior_box[ED_MAX_GOALS];
78         CComboBox *m_object_box[ED_MAX_GOALS];
79         CComboBox *m_subsys_box[ED_MAX_GOALS];
80         CComboBox *m_dock2_box[ED_MAX_GOALS];
81         CComboBox *m_priority_box[ED_MAX_GOALS];
82
83 // Dialog Data
84         //{{AFX_DATA(ShipGoalsDlg)
85         enum { IDD = IDD_SHIP_GOALS_EDITOR };
86         //}}AFX_DATA
87
88 // Overrides
89         // ClassWizard generated virtual function overrides
90         //{{AFX_VIRTUAL(ShipGoalsDlg)
91         public:
92         virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
93         protected:
94         virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
95         //}}AFX_VIRTUAL
96
97 // Implementation
98 protected:
99
100         // Generated message map functions
101         //{{AFX_MSG(ShipGoalsDlg)
102         virtual BOOL OnInitDialog();
103         afx_msg void OnSelchangeBehavior1();
104         afx_msg void OnSelchangeBehavior2();
105         afx_msg void OnSelchangeBehavior3();
106         afx_msg void OnSelchangeBehavior4();
107         afx_msg void OnSelchangeBehavior5();
108         afx_msg void OnSelchangeBehavior6();
109         afx_msg void OnSelchangeBehavior7();
110         afx_msg void OnSelchangeBehavior8();
111         afx_msg void OnSelchangeBehavior9();
112         afx_msg void OnSelchangeBehavior10();
113         afx_msg void OnSelchangeObject1();
114         afx_msg void OnSelchangeObject2();
115         afx_msg void OnSelchangeObject3();
116         afx_msg void OnSelchangeObject4();
117         afx_msg void OnSelchangeObject5();
118         afx_msg void OnSelchangeObject6();
119         afx_msg void OnSelchangeObject7();
120         afx_msg void OnSelchangeObject8();
121         afx_msg void OnSelchangeObject9();
122         afx_msg void OnSelchangeObject10();
123         //}}AFX_MSG
124         DECLARE_MESSAGE_MAP()
125
126 private:
127         void set_item(int item, int init = 0);
128         void update_item(int item, int multi = 0);
129         void set_object(int item);
130
131         ai_goal *goalp;
132 };
133
134 extern char *goal_behaviors[];
135
136 #endif
137