mirror of
https://github.com/scp-fs2open/fs2open.github.com.git
synced 2026-11-07 08:15:59 -10:00
* long project will be long * add shared foundation files * unify some shared types across both editors * sexptreemodel framework * move opf functions to the model * move shared functions into the model * move variable/container stuff to the model * sexptreeactions and ui interface * wire the model into the ui * move some shared logic to the model * move more methods to the model * move clipboard to model * create new right click menu model * begin connecting the new right click menu * wire up the new right click menu in fred * wire up the new right click menu in qtfred * move help text and visuals to model * move menu option enable disable to model * wire up sexp_tree to the model * rename sexp_tree files to sexp_tree_ui * fix build errors * fix warning * remove all opf forwarders * remove some forwarder methods * connect qtfred events editor directly to model * wite plan for unifying tree types * replace legacy m_mode with treeflags * fix qtfred campaign dialog * fix qtfred ship/wing dialog trees * build error * documentation * more documentation * even more documentation * move more opf functions to opf file * clean up context menu function * move default argument to opf file * build errors * fix qtfred dialogs and annoations * new shared annotations model * sexp_tree_ui to sexp_tree_view * documentation pass * document annotations model * delete the plan * move event annotations to the new model * generic cleanup * remove some old defines * cleanup includes * more cleanup * parenthesis * more parenthesis * variable collisions * too many parenthesis this time * clang modernization * variable names again * more clang and assertions * static cast * clang again * fix some bugs and issues * Refactor sexp tree action duplication into SexpTreeActions * fix a few more minor issues * avoid clang false positive * rebase tweaks * fix annotations issue * fix typo and two small bugs claude found * fix event editor tree widget loading * fix ship and wing sexp tree editors in qtfred * fix qtfred briefing and debriefing trees * fix a regression Claude found * address feedback * fix annotations for root items in qtfred by copying fred's method * address feedback * rescope variables * clang
100 lines
2.6 KiB
C++
100 lines
2.6 KiB
C++
/*
|
|
* Copyright (C) Volition, Inc. 1999. All rights reserved.
|
|
*
|
|
* All source code herein is the property of Volition, Inc. You may not sell
|
|
* or otherwise commercially exploit the source or things you created based on the
|
|
* source.
|
|
*
|
|
*/
|
|
|
|
|
|
|
|
#include "sexp_tree_view.h"
|
|
#include "mission/missiongoals.h"
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CMissionGoalsDlg dialog
|
|
|
|
#define OPERAND 0x01
|
|
#define EDITABLE 0x02
|
|
|
|
class goal_sexp_tree : public sexp_tree_view
|
|
{
|
|
};
|
|
|
|
class CMissionGoalsDlg : public CDialog, public SexpTreeEditorInterface
|
|
{
|
|
// Construction
|
|
public:
|
|
int onRootDeleted(int formula_node) override;
|
|
void onRootInserted(int old_formula, int new_formula) override;
|
|
void onRootMoved(int node1, int node2, bool insert_before) override;
|
|
|
|
void move_handler(int node1, int node2, bool insert_before);
|
|
int query_modified();
|
|
void OnCancel();
|
|
void OnOK();
|
|
void load_tree();
|
|
void update_cur_goal();
|
|
void add_sub_tree(int node, HTREEITEM root);
|
|
void create_tree();
|
|
CMissionGoalsDlg(CWnd* pParent = NULL); // standard constructor
|
|
BOOL OnInitDialog();
|
|
void insert_handler(int old, int node);
|
|
int select_sexp_node;
|
|
|
|
// Dialog Data
|
|
//{{AFX_DATA(CMissionGoalsDlg)
|
|
enum { IDD = IDD_MISSION_GOALS };
|
|
goal_sexp_tree m_goals_tree;
|
|
CString m_goal_desc;
|
|
int m_goal_type;
|
|
int m_display_goal_types;
|
|
CString m_name;
|
|
BOOL m_goal_invalid;
|
|
int m_goal_score;
|
|
BOOL m_no_music;
|
|
int m_team;
|
|
//}}AFX_DATA
|
|
|
|
|
|
// Overrides
|
|
// ClassWizard generated virtual function overrides
|
|
//{{AFX_VIRTUAL(CMissionGoalsDlg)
|
|
public:
|
|
virtual BOOL DestroyWindow();
|
|
protected:
|
|
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
|
//}}AFX_VIRTUAL
|
|
|
|
// Implementation
|
|
protected:
|
|
// Generated message map functions
|
|
//{{AFX_MSG(CMissionGoalsDlg)
|
|
afx_msg void OnSelchangeDisplayGoalTypesDrop();
|
|
afx_msg void OnSelchangedGoalsTree(NMHDR* pNMHDR, LRESULT* pResult);
|
|
afx_msg void OnRclickGoalsTree(NMHDR* pNMHDR, LRESULT* pResult);
|
|
afx_msg void OnEndlabeleditGoalsTree(NMHDR* pNMHDR, LRESULT* pResult);
|
|
afx_msg void OnBeginlabeleditGoalsTree(NMHDR* pNMHDR, LRESULT* pResult);
|
|
afx_msg void OnButtonNewGoal();
|
|
afx_msg void OnChangeGoalDesc();
|
|
afx_msg void OnChangeGoalRating();
|
|
afx_msg void OnSelchangeGoalTypeDrop();
|
|
afx_msg void OnChangeGoalName();
|
|
afx_msg void OnButtonOk();
|
|
afx_msg void OnClose();
|
|
afx_msg void OnGoalInvalid();
|
|
afx_msg void OnChangeGoalScore();
|
|
afx_msg void OnNoMusic();
|
|
afx_msg void OnSelchangeTeam();
|
|
//}}AFX_MSG
|
|
DECLARE_MESSAGE_MAP()
|
|
|
|
int cur_goal;
|
|
SCP_vector<int> m_sig;
|
|
SCP_vector<mission_goal> m_goals;
|
|
int modified;
|
|
};
|
|
|
|
extern CMissionGoalsDlg *Goal_editor_dlg; // global reference needed by sexp_tree_view class
|