FS2_Open
Open source remastering of the Freespace 2 engine
AltShipClassDlg.h
Go to the documentation of this file.
1 /*
2  * Created by Hassan "Karajorma" Kazmi for the FreeSpace2 Source Code Project.
3  * You may not sell or otherwise commercially exploit the source or things you
4  * create based on the source.
5  */
6 
7 #if !defined(AFX_AltShipClassDlg_H__2FE2C917_C7DA_4C05_A11F_DCC46BFB26BB__INCLUDED_)
8 #define AFX_AltShipClassDlg_H__2FE2C917_C7DA_4C05_A11F_DCC46BFB26BB__INCLUDED_
9 
10 #if _MSC_VER > 1000
11 #pragma once
12 #endif // _MSC_VER > 1000
13 // AltShipClassDlg.h : header file
14 //
15 
17 // AltShipClassDlg dialog
18 
19 class AltShipClassDlg : public CDialog
20 {
21 // Construction
22 public:
23  AltShipClassDlg(CWnd* pParent = NULL); // standard constructor
24 
25 // Dialog Data
26  //{{AFX_DATA(AltShipClassDlg)
27  enum { IDD = IDD_ALT_SHIP_CLASS };
29  CListBox m_alt_class_list;
34  //}}AFX_DATA
35 
36 
37 // Overrides
38  // ClassWizard generated virtual function overrides
39  //{{AFX_VIRTUAL(AltShipClassDlg)
40  protected:
41  virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
42  //}}AFX_VIRTUAL
43 
44 // Implementation
45 protected:
46 
47  // Generated message map functions
48  //{{AFX_MSG(AltShipClassDlg)
49  virtual BOOL OnInitDialog();
50  virtual void OnCancel();
51  virtual void OnOK();
52  afx_msg void OnAltClassAdd();
53  afx_msg void OnAltClassInsert();
54  afx_msg void OnAltClassDelete();
55  afx_msg void OnMoveUp();
56  afx_msg void OnMoveDown();
57  afx_msg void OnSelendokSetFromShipClass();
58  afx_msg void OnSelendokSetFromVariables();
59  afx_msg void OnSelchangeAltClassList();
60  afx_msg void OnDefaultToClass();
61  //}}AFX_MSG
62  DECLARE_MESSAGE_MAP()
63 
64 private:
65 
66  bool player_ships_only; // Whether we only add player ships to the alt classes or if we can add any ship
67 
68  SCP_vector<alt_class> alt_class_pool;
69  int num_string_variables; // Number of string variables in the mission
70  int string_variable_indices[MAX_SEXP_VARIABLES]; // maps string variables to their index in Sexp_variables
71  int ship_class_indices[MAX_SHIP_CLASSES]; // maps ships in the ships combobox to their index in Ship_info
72 
73 
74  // variables to handle selection of multiple ships
75  bool multi_edit;
76  int m_selected_ships[MAX_SHIPS];
77  int num_selected_ships;
78 
79  void AltShipClassDlg::alt_class_list_rebuild();
80  void AltShipClassDlg::alt_class_update_entry(alt_class &list_item);
81 };
82 
83 //{{AFX_INSERT_LOCATION}}
84 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
85 
86 #endif // !defined(AFX_AltShipClassDlg_H__2FE2C917_C7DA_4C05_A11F_DCC46BFB26BB__INCLUDED_)
#define MAX_SHIPS
Definition: globals.h:37
afx_msg void OnSelchangeAltClassList()
afx_msg void OnDefaultToClass()
afx_msg void OnAltClassInsert()
virtual void OnOK()
#define MAX_SHIP_CLASSES
Definition: globals.h:48
virtual BOOL OnInitDialog()
CButton m_default_to_class
CListBox m_alt_class_list
CComboBox m_set_from_variables
afx_msg void OnAltClassDelete()
int BOOL
Definition: config.h:80
CComboBox m_set_from_ship_class
afx_msg void OnMoveDown()
afx_msg void OnSelendokSetFromVariables()
virtual void DoDataExchange(CDataExchange *pDX)
afx_msg void OnMoveUp()
afx_msg void OnSelendokSetFromShipClass()
afx_msg void OnAltClassAdd()
#define IDD_ALT_SHIP_CLASS
Definition: resource.h:106
#define MAX_SEXP_VARIABLES
Definition: sexp.h:23
virtual void OnCancel()
AltShipClassDlg(CWnd *pParent=NULL)