1 #ifndef _TRIGGER_EDIT_DLG_ 2 #define _TRIGGER_EDIT_DLG_ 3 #include "afxwin.h" 4 5 // Define trigger types 6 enum TRIGGER_TYPE{ 7 TRIGGER_TYPE_SYSTEM_EVENT = 1, 8 TRIGGER_TYPE_CHILD_SIGNAL, 9 TRIGGER_TYPE_USER_EVENT 10 }; 11 12 class trigger_edit_dlg : public express_dialog 13 { 14 DECLARE_DYNAMIC(trigger_edit_dlg) 15 16 public: 17 trigger_edit_dlg(int display_index, flow_item *item, trigger_info *trigger, CWnd* pParent = NULL); // standard constructor 18 virtual ~trigger_edit_dlg(); 19 20 static int GetTriggerType(CString type_name); 21 static CString GetTriggerTypeName(int type); 22 static int GetEventType(CString type_name); 23 static CString GetEventTypeName(int type); 24 static void GetWidgetEventList(widget_info *info, CArray<INT> *list); 25 static void AddChildSignals(CComboBox *pBox, CArray<CString> *pNameList, widget_info *info, CString signal_id_name, LONG current_val); 26 27 // Dialog Data 28 enum { IDD = IDD_TRIGGER_EDIT_DLG }; 29 30 protected: 31 virtual BOOL OnInitDialog(); 32 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 33 virtual void OnOK(); 34 virtual void OnCancel(); 35 afx_msg void OnChangeSystemEvent(); 36 afx_msg LRESULT OnTestMessage(WPARAM wParam, LPARAM lParam); 37 38 void AddComboList(CComboBox *pBox, STRING_VAL_PAIR *list, LONG current_val); 39 void SelectComboListItem(CComboBox *pBox, LONG val); 40 void SelectComboListItem(CComboBox *pBox, CString string); 41 42 void AddChildSignals(CString signal_id_name, LONG current_val); 43 void AddAnimationIds(CString selected_name); 44 void EnableDisableAnimationIdsCombo(); 45 46 BOOL SaveEventType(); 47 BOOL SaveTriggerInfo(); 48 49 DECLARE_MESSAGE_MAP() 50 protected: 51 flow_item *mpFlowItem; 52 trigger_info *mpTrigger; 53 widget_info *mpInfo; 54 trigger_info mOldTrigger; 55 int mDisplayIndex; 56 CArray<CString> mNameList; 57 58 express_combobox mSystemEventsCombo; 59 express_combobox mChildSignalsCombo; 60 CEdit mUserEventName; 61 express_combobox mAnimationIdsCombo; 62 CStatic mAnimationIdsLabel; 63 }; 64 #endif