1 #ifndef _TRIGGER_ACTION_EDIT_DLG_ 2 #define _TRIGGER_ACTION_EDIT_DLG_ 3 #include "afxwin.h" 4 #include "custom_edit.h" 5 6 enum TRIGGER_ACTION_EDIT_CONTROL_IDS { 7 ID_EASING_FUNCTION_SELECT = 4096, 8 ID_ANIMATION_ID, 9 ID_ANIMATION_START_X, 10 ID_ANIMATION_START_Y, 11 ID_ANIMATION_END_X, 12 ID_ANIMATION_END_Y, 13 ID_ANIMATION_STEPS, 14 ID_ANIMATION_TICK_RATE, 15 ID_ANIMATION_DELAY_BEFORE, 16 ID_ANIMATION_START_ALPHA, 17 ID_ANIMATION_END_ALPHA, 18 ID_ON_ANIMATION_COMPLETE_WND 19 }; 20 21 #define ANIMATION_PARAMS_COUNT (ID_ANIMATION_END_ALPHA - ID_ANIMATION_ID + 1) 22 23 class trigger_action_edit_dlg : public express_dialog 24 { 25 DECLARE_DYNAMIC(trigger_action_edit_dlg) 26 27 public: 28 trigger_action_edit_dlg(int display_index, flow_item *item, trigger_info *trigger, CWnd* pParent = NULL); // standard constructor 29 virtual ~trigger_action_edit_dlg(); 30 31 // Dialog Data 32 enum { IDD = IDD_TRIGGER_ACTION_EDIT_DLG }; 33 34 protected: 35 virtual BOOL OnInitDialog(); 36 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 37 virtual void OnOK(); 38 virtual void OnCancel(); 39 virtual BOOL PreTranslateMessage(MSG* pMsg); 40 afx_msg void OnAddAction(); 41 afx_msg void OnDeleteAction(); 42 afx_msg void OnSelectAddedActionList(); 43 afx_msg void OnChangeActionName(); 44 afx_msg void OnSelectTargetCombo(); 45 afx_msg void OnSelectParentCombo(); 46 afx_msg void OnClickEasingFunction(); 47 afx_msg void OnClickTargetShowChildWidgets(); 48 afx_msg void OnClickParentShowChildWidgets(); 49 afx_msg LRESULT OnTestMessage(WPARAM wParam, LPARAM lParam); 50 51 action_info *SelectedActionGet(); 52 53 void SetEasingFunction(); 54 void UpdateListBoxHorizontalExtend(CListBox *pList); 55 56 void UpdateTargetCombo(CComboBox *pBox, CString &string); 57 void OnSelectTargetCombo(CComboBox *pBox); 58 59 void AddComboList(CComboBox *pBox, STRING_VAL_PAIR *list, LONG current_val); 60 void SelectComboListItem(CComboBox *pBox, LONG val); 61 void SelectComboListItem(CComboBox *pBox, CString string); 62 void InitActionLists(); 63 void AddChildSignals(CString signal_id_name, LONG current_val); 64 void AddAnimationIds(CString selected_name); 65 void ResetAnimationIds(CString selected_name); 66 void EnableDisableAnimationIdsCombo(); 67 void AddChildTargets(CComboBox *pBox, widget_info *info); 68 void AddTargets(CComboBox *pBox); 69 void ResetTargets(CComboBox *pBox); 70 void ShowHideAnimationParams(); 71 void EnableDisableActionDeleteButton(); 72 73 BOOL SaveActionInfo(); 74 BOOL SaveAnimationInfo(); 75 76 DECLARE_MESSAGE_MAP() 77 protected: 78 trigger_info *mpTrigger; 79 widget_info *mpInfo; 80 CArray<action_info *> mActionList; 81 CArray<CString> mNameList; 82 int mAddedActionListSel; 83 int mDisplayIndex; 84 int mAnimationEasingFuncId; 85 86 express_combobox mTargetCombo; 87 express_combobox mParentCombo; 88 CButton mTargetShowChildWidgets; 89 CButton mParentShowChildWidgets; 90 CStatic mAnimationParams; 91 CStatic mOnAnimationCompleteGroup; 92 CStatic mAnimationParamLabels[ANIMATION_PARAMS_COUNT]; 93 custom_edit mAnimationParamEdits[ANIMATION_PARAMS_COUNT]; 94 CButton mDetachTargetBox; 95 CButton mPushTargetBox; 96 CEdit mEasingFunctionEdit; 97 CButton mEasingFunctionButton; 98 CListBox mAddedActionList; 99 CStatic mStatusMsg; 100 }; 101 #endif