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