1 2 #ifndef _PROPERTIES_WIN_ 3 #define _PROPERTIES_WIN_ 4 5 #include <afxcview.h> 6 7 class properties_win : public CDialog 8 { 9 public: 10 properties_win(); 11 ~properties_win(); 12 void OnWidgetSelect(widget_info *info); 13 virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam); 14 void WidgetWasMoved(void); 15 16 void WidgetWasModified(widget_info *info); 17 void WidgetWasModified(GX_WIDGET *widget); 18 19 void ResourcesChanged(); 20 21 // functions shared by properties window and Undo manager: 22 static void SetChildAllocation(widget_info *info, int allocation_type); 23 static void AssignProgressBarInfo(widget_info *wi); 24 void SendEditFocusLoseMessage(); 25 void SetControlSize(); 26 27 protected: 28 void AssignChildFont(); 29 void DestroyChildren(void); 30 CButton *AddCheckBox(char *description, ULONG checked, int id); 31 void AddEditControl(char *description, int value, int id); 32 void AddEditControl(char *description, CString &name, int id); 33 void AddRichEditControl(char *description, CString &name, int id); 34 void AddPromptControl(char *description, CString &name); 35 CButton *AddRadioButton(char *description, ULONG checked, int id); 36 void AddPushButton(char *description, int id); 37 38 CButton *CreateGroup(char *caption, int rows); 39 void AddComboBox(char *label, STRING_VAL_PAIR *list, int id, ULONG current_val); 40 void AddComboBox(char *label, int res_type, int id, ULONG current_val); 41 42 void AddWidgetProps(void); 43 void AddButtonStyles(widget_info *info); 44 45 void AddTextWidgetProperties(widget_info *info); 46 void AddTextCopyProperty(widget_info *info); 47 void AddNumericPromptProps(widget_info *info); 48 49 void AddPixelmapButtonProps(widget_info *info); 50 void AddCheckboxProps(widget_info *info); 51 void AddRadioButtonProps(widget_info *info); 52 void AddIconButtonProps(widget_info *info); 53 void AddIconProps(widget_info *info); 54 void AddPixelmapPromptProps(widget_info *info); 55 56 void AddTextInputProperties(widget_info *info); 57 void AddMLTextViewProperties(widget_info *info); 58 void AddMLTextInputProperties(widget_info *info); 59 void AddRichTextViewProperties(widget_info *info); 60 61 void AddSliderProps(widget_info *info); 62 void AddPixelmapSliderProps(widget_info *info); 63 void AddProgressBarProps(widget_info *info); 64 void AddRadialProgressBarProps(widget_info *info); 65 void AddSpriteProps(widget_info *info); 66 67 void AddRadialSliderProps(widget_info *info); 68 69 void AddWindowProps(widget_info *info); 70 void AddVerticalListProps(widget_info *info); 71 void AddHorizontalListProps(widget_info *info); 72 void AddDropListProps(widget_info *info); 73 void AddScrollbarProps(widget_info *info); 74 75 void AddGaugeProps(widget_info *info); 76 void AddChartProps(widget_info *info); 77 78 void AddScrollWheelProps(widget_info *info); 79 void AddTextScrollWheelProps(widget_info *info); 80 void AddStringScrollWheelProps(widget_info *info); 81 void AddNumericScrollWheelProps(widget_info *info); 82 void AddGenericScrollWheelProps(widget_info *info); 83 84 void AddMenuProps(widget_info *info); 85 void AddTreeViewProps(widget_info *info); 86 87 void AddStringSelect(int current_val); 88 89 int m_top_pos; 90 int m_group_pos; 91 92 void OnTabKey(); 93 void OnPageUp(); 94 void OnPageDown(); 95 virtual BOOL PreTranslateMessage(MSG* pMsg); 96 afx_msg int OnCreate(LPCREATESTRUCT lpcs); 97 afx_msg BOOL OnEraseBkgnd(CDC *pDC); 98 afx_msg HBRUSH OnCtlColor(CDC *pDC, CWnd *pWnd, UINT nCtlColor); 99 afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar); 100 afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt); 101 afx_msg void OnLButtonDown(UINT nFlags, CPoint point); 102 afx_msg void OnNcLButtonDown(UINT nHitTest, CPoint point); 103 104 afx_msg void OnSize(UINT nType, int cx, int cy); 105 afx_msg void OnPaint(); 106 afx_msg void OnSysChar(UINT nChar, UINT RepCnt,UINT nFlags); 107 108 afx_msg void OnChangeWidgetName(); 109 BOOL CheckChangeWidgetId(CString new_name); 110 afx_msg void OnChangeWidgetId(); 111 afx_msg void OnChangeDrawFunction(); 112 afx_msg void OnChangeEventFunction(); 113 afx_msg void OnChangeWidgetUserData(); 114 115 afx_msg void OnChangeBorder(); 116 afx_msg void OnChangeColor(); 117 afx_msg void OnChangeWidgetPos(); 118 afx_msg void OnChangeTileWallpaper(); 119 120 afx_msg void OnChangeNumericPrompt(); 121 122 afx_msg void OnChangeDynamicWidget(); 123 afx_msg void OnChangeDynamicBuffer(); 124 125 126 afx_msg void OnChangeTextViewLineSpace(); 127 afx_msg void OnChangeTextViewWhitespace(); 128 afx_msg void OnChangeTextBufferSize(); 129 130 afx_msg void OnChangePixelmap0(); 131 afx_msg void OnChangePixelmap1(); 132 afx_msg void OnChangePixelmap2(); 133 afx_msg void OnChangePixelmap3(); 134 afx_msg void OnChangePixelmap4(); 135 afx_msg void OnChangePixelmap5(); 136 afx_msg void OnChangePixelmap6(); 137 afx_msg void OnChangePixelmap7(); 138 139 afx_msg void OnTextAlignmentChange(); 140 afx_msg void OnFontChange(int index); 141 afx_msg void OnFontChange0(); 142 afx_msg void OnFontChange1(); 143 afx_msg void OnFontChange2(); 144 afx_msg void OnFontChange3(); 145 afx_msg void OnChangeNormalTextColor(); 146 afx_msg void OnChangeSelectedTextColor(); 147 afx_msg void OnChangeDisabledTextColor(); 148 afx_msg void OnChangeReadonlyFillColor(); 149 afx_msg void OnChangeReadonlyTextColor(); 150 afx_msg void OnChangePixmapAlign(); 151 afx_msg void OnButtonStyleChange(); 152 afx_msg void OnSliderStyleChange(); 153 afx_msg void OnDropListStyleChange(); 154 155 afx_msg void OnProgressInfoChange(); 156 afx_msg void OnChangeRadialProgressBarInfo(); 157 afx_msg void OnChangeChartInfo(); 158 159 afx_msg void OnChangeRadialSliderInfo(); 160 161 afx_msg void OnSpriteStyleChange(); 162 afx_msg void OnEditSpriteFrames(); 163 164 afx_msg void OnChangeSliderInfo(); 165 166 afx_msg void OnChangeListWrap(); 167 afx_msg void OnChangeListRepeatSelect(); 168 169 afx_msg void OnChangeListRows(); 170 afx_msg void OnChangeOpenHeight(); 171 172 afx_msg void OnScrollAppearanceChange(); 173 afx_msg void OnScrollStyleChange(); 174 175 afx_msg void OnChangeTransparent(); 176 afx_msg void OnChangeSelected(); 177 afx_msg void OnChangeEnabled(); 178 afx_msg void OnChangeTextCopy(); 179 afx_msg void OnChangeMLTextVCenter(); 180 afx_msg void OnChangeFocus(); 181 afx_msg void OnChangeReadonly(); 182 183 afx_msg void OnChangeStringId(); 184 afx_msg void OnChangeStringText(); 185 afx_msg void OnChangeCallbackName(); 186 187 afx_msg void OnChangeGaugeInfo(); 188 189 afx_msg void OnChangeScrollWheelProps(); 190 afx_msg void OnChangeTextScrollWheelProps(); 191 afx_msg void OnChangeStringScrollWheelProps(); 192 afx_msg void OnEditStringScrolWheelStrings(); 193 afx_msg void OnChangeNumericScrollWheelRange(); 194 195 afx_msg void OnChangeTemplate(); 196 afx_msg void OnChangeVisibleAtStartup(); 197 198 afx_msg void OnChangeMenuInfo(); 199 afx_msg void OnChangeTreeViewInfo(); 200 201 afx_msg void OnEditRichTextViewText(); 202 afx_msg void OnSettingChange(UINT uFlags, LPCTSTR lpszSection); 203 204 afx_msg LRESULT OnTestMessage(WPARAM wParam, LPARAM lParam);// add to receive test message from py. 205 206 DECLARE_MESSAGE_MAP() 207 208 private: 209 void OnPixelmapChange(int index); 210 void ValidateTemplateName(CString &name); 211 INT ValidateAlignStyle(INT style); 212 213 widget_info *mpInfo; 214 studiox_project *mpProject; 215 CScrollHelper *m_scroll_helper; 216 int m_item_height; 217 int m_leftcol_width; 218 int m_row_height; 219 }; 220 221 #endif 222