FS2_Open
Open source remastering of the Freespace 2 engine
missiongoalsdlg.h
Go to the documentation of this file.
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 #include "mission/missiongoals.h"
14 
16 // CMissionGoalsDlg dialog
17 
18 #define MAX_GOAL_ELEMENTS 300
19 #define OPERAND 0x01
20 #define EDITABLE 0x02
21 
22 class goal_sexp_tree : public sexp_tree
23 {
24 };
25 
26 class CMissionGoalsDlg : public CDialog
27 {
28 // Construction
29 public:
30  void swap_handler(int node1, int node2);
31  int query_modified();
32  void OnCancel();
33  void OnOK();
34  void load_tree();
35  void update_cur_goal();
36  void add_sub_tree(int node, HTREEITEM root);
37  void create_tree();
38  CMissionGoalsDlg(CWnd* pParent = NULL); // standard constructor
40  int handler(int code, int goal);
41  void insert_handler(int old, int node);
43 
44 // Dialog Data
45  //{{AFX_DATA(CMissionGoalsDlg)
46  enum { IDD = IDD_MISSION_GOALS };
48  CString m_goal_desc;
51  CString m_name;
55  int m_team;
56  //}}AFX_DATA
57 
58 
59 // Overrides
60  // ClassWizard generated virtual function overrides
61  //{{AFX_VIRTUAL(CMissionGoalsDlg)
62  protected:
63  virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
64  //}}AFX_VIRTUAL
65 
66 // Implementation
67 protected:
68  // Generated message map functions
69  //{{AFX_MSG(CMissionGoalsDlg)
70  afx_msg void OnSelchangeDisplayGoalTypesDrop();
71  afx_msg void OnSelchangedGoalsTree(NMHDR* pNMHDR, LRESULT* pResult);
72  afx_msg void OnRclickGoalsTree(NMHDR* pNMHDR, LRESULT* pResult);
73  afx_msg void OnEndlabeleditGoalsTree(NMHDR* pNMHDR, LRESULT* pResult);
74  afx_msg void OnBeginlabeleditGoalsTree(NMHDR* pNMHDR, LRESULT* pResult);
75  afx_msg void OnButtonNewGoal();
76  afx_msg void OnChangeGoalDesc();
77  afx_msg void OnChangeGoalRating();
78  afx_msg void OnSelchangeGoalTypeDrop();
79  afx_msg void OnChangeGoalName();
80  afx_msg void OnOk();
81  afx_msg void OnClose();
82  afx_msg void OnGoalInvalid();
83  afx_msg void OnChangeGoalScore();
84  afx_msg void OnNoMusic();
85  afx_msg void OnSelchangeTeam();
86  //}}AFX_MSG
87  DECLARE_MESSAGE_MAP()
88 
92  mission_goal m_goals[MAX_GOALS];
93  int modified;
94 };
95 
96 extern CMissionGoalsDlg *Goal_editor_dlg; // global reference needed by sexp_tree class
int handler(int code, int goal)
afx_msg void OnButtonNewGoal()
afx_msg void OnGoalInvalid()
afx_msg void OnOk()
void insert_handler(int old, int node)
afx_msg void OnSelchangeDisplayGoalTypesDrop()
#define IDD_MISSION_GOALS
Definition: resource.h:38
virtual void DoDataExchange(CDataExchange *pDX)
HWND DWORD code
Definition: vddraw.h:425
typedef int(SCP_EXT_CALLCONV *SCPDLL_PFVERSION)(SCPDLL_Version *)
#define MAX_GOALS
Definition: missiongoals.h:23
afx_msg void OnBeginlabeleditGoalsTree(NMHDR *pNMHDR, LRESULT *pResult)
mission_goal m_goals[MAX_GOALS]
goal_sexp_tree m_goals_tree
afx_msg void OnEndlabeleditGoalsTree(NMHDR *pNMHDR, LRESULT *pResult)
int BOOL
Definition: config.h:80
afx_msg void OnSelchangeGoalTypeDrop()
afx_msg void OnChangeGoalDesc()
void swap_handler(int node1, int node2)
afx_msg void OnChangeGoalName()
int m_sig[MAX_GOALS]
long LRESULT
Definition: config.h:100
CMissionGoalsDlg(CWnd *pParent=NULL)
void add_sub_tree(int node, HTREEITEM root)
afx_msg void OnClose()
afx_msg void OnChangeGoalRating()
afx_msg void OnRclickGoalsTree(NMHDR *pNMHDR, LRESULT *pResult)
afx_msg void OnNoMusic()
CMissionGoalsDlg * Goal_editor_dlg
afx_msg void OnSelchangeTeam()
afx_msg void OnChangeGoalScore()
afx_msg void OnSelchangedGoalsTree(NMHDR *pNMHDR, LRESULT *pResult)