2 * Copyright (C) Volition, Inc. 1999. All rights reserved.
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
9 // CampaignEditorDlg.h : header file
13 #include "sexp_tree.h"
14 #include "campaignfilelistbox.h"
16 /////////////////////////////////////////////////////////////////////////////
17 // campaign_editor form view
23 class campaign_sexp_tree : public sexp_tree
26 int load_sub_tree(int index);
27 int get_new_node_position();
30 class campaign_editor : public CFormView
37 campaign_editor(); // protected constructor used by dynamic creation
38 DECLARE_DYNCREATE(campaign_editor)
42 void mission_selected(int num);
43 void insert_handler(int old, int node);
44 void swap_handler(int node1, int node2);
46 void load_tree(int save = 1);
47 void save_tree(int clear = 1);
48 int handler(int code, int node, char *str = NULL);
49 void initialize( int init_files = 1 );
51 void update_loop_desc_window();
52 void campaign_editor::save_loop_desc_window();
53 //{{AFX_DATA(campaign_editor)
54 enum { IDD = IDD_CAMPAIGN };
55 campaign_sexp_tree m_tree;
56 campaign_filelist_box m_filelist;
59 CString m_num_players;
62 CString m_loop_brief_anim;
63 CString m_loop_brief_sound;
73 // ClassWizard generated virtual function overrides
74 //{{AFX_VIRTUAL(campaign_editor)
76 virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
78 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
79 virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
84 virtual ~campaign_editor();
86 virtual void AssertValid() const;
87 virtual void Dump(CDumpContext& dc) const;
90 // Generated message map functions
91 //{{AFX_MSG(campaign_editor)
92 afx_msg void OnLoad();
93 afx_msg void OnAlign();
94 afx_msg void OnCpgnClose();
95 afx_msg void OnRclickTree(NMHDR* pNMHDR, LRESULT* pResult);
96 afx_msg void OnBeginlabeleditSexpTree(NMHDR* pNMHDR, LRESULT* pResult);
97 afx_msg void OnEndlabeleditSexpTree(NMHDR* pNMHDR, LRESULT* pResult);
98 afx_msg void OnSelchangedSexpTree(NMHDR* pNMHDR, LRESULT* pResult);
99 afx_msg void OnMoveUp();
100 afx_msg void OnMoveDown();
101 afx_msg void OnEndEdit();
102 afx_msg void OnChangeBriefingCutscene();
103 afx_msg void OnSelchangeType();
104 afx_msg void OnGalatea();
105 afx_msg void OnBastion();
106 afx_msg void OnToggleLoop();
107 afx_msg void OnBrowseLoopAni();
108 afx_msg void OnBrowseLoopSound();
110 DECLARE_MESSAGE_MAP()
113 /////////////////////////////////////////////////////////////////////////////
115 extern campaign_editor *Campaign_tree_formp;
116 extern int Cur_campaign_mission;
117 extern int Cur_campaign_link;