1 #pragma once 2 3 #include "express_table_row.h" 4 #include "studiox_includes.h" 5 #include "afxwin.h" 6 7 class font_range_header : public CWnd 8 { 9 public: font_range_header(CFont * font)10 font_range_header(CFont* font) { mpFont = font; }; ~font_range_header()11 ~font_range_header() {}; 12 DECLARE_MESSAGE_MAP() 13 afx_msg void OnPaint(); 14 15 private: 16 CFont* mpFont; 17 }; 18 19 20 class font_range_row : public express_table_row 21 { 22 public: 23 font_range_row(CString &label, font_page_info *page_info, BOOL extended, INT row_id, CFont *font); 24 void OnEditRangeField(); 25 void OnChangeEnabled(); 26 27 afx_msg int OnCreate(LPCREATESTRUCT lpcs); 28 29 virtual BOOL PreTranslateMessage(MSG *pMsg); 30 virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam); 31 virtual void OnPaint(); 32 33 private: 34 BOOL PreTranslateKeyDown(WPARAM keyvalue); 35 36 DECLARE_MESSAGE_MAP() 37 38 private: 39 CString mNameText; 40 font_page_info *mpInfo; 41 42 CEdit mStartField; 43 CEdit mEndField; 44 CButton mEnabledBox; 45 46 BOOL mExtended; 47 INT mRowId; 48 CFont* mpFont; 49 }; 50 51 class range_list_win : public CWnd 52 { 53 public: 54 range_list_win(res_info *info, CFont *mpFont); 55 ~range_list_win(); 56 void SaveRangeInfo(void); 57 void CreateExtendedRangeEntry(); 58 void DeleteExtendedRangeEntry(); 59 BOOL Scroll(int delta); 60 61 DECLARE_MESSAGE_MAP() 62 afx_msg int OnCreate(LPCREATESTRUCT lpcs); 63 afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar); 64 afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt); 65 afx_msg void OnSetFocus(CWnd* pOldWnd); 66 67 private: 68 CScrollHelper *m_scroll_helper; 69 font_range_row *range_entry[NUM_FONT_CHAR_RANGES + NUM_FONT_EXTENDED_CHAR_RANGES]; 70 font_page_info mPageInfo[NUM_FONT_CHAR_RANGES + NUM_FONT_EXTENDED_CHAR_RANGES]; 71 res_info *m_info; 72 CFont* mpFont; 73 int page_count; 74 int m_range_row_height; 75 }; 76 77 // font_path_dialog dialog 78 79 class font_path_dialog : public express_dialog 80 { 81 82 public: 83 font_path_dialog(int display_index, int color_format, res_info *info, CWnd* pParent = NULL); // standard constructor 84 virtual ~font_path_dialog(); 85 86 static font_page_info *CreateDefaultFontPages(BOOL include_extended_unicode = FALSE); 87 static font_page_info *CreateExtendedFontPages(); 88 89 // Dialog Data 90 enum { IDD = IDD_EDIT_FONT }; 91 92 protected: 93 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 94 virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam); 95 96 DECLARE_MESSAGE_MAP() 97 98 public: 99 afx_msg void OnBnClickedBrowse(); 100 afx_msg void OnBnClickedOk(); 101 afx_msg void OnBnClickedPathType(); 102 afx_msg void OnBnClickedCustomOutput(); 103 afx_msg void OnBnClickedSupportExtendedUnicode(); 104 afx_msg void OnEnChangeFontHeight(); 105 afx_msg void SetPathProjectRelative(); 106 afx_msg void SetPathStudioRelative(); 107 afx_msg void SetPathAbsolute(); 108 afx_msg void OnKillFontPathEdit(); 109 afx_msg LRESULT OnTestMessage(WPARAM wParam, LPARAM lParam); 110 virtual BOOL OnInitDialog(); 111 afx_msg void OnPaint(); 112 113 void OnPathnameChange(); 114 115 private: 116 res_info *m_info; 117 int m_color_format; 118 int m_display_index; 119 int m_range_row_height; 120 121 public: 122 range_list_win *mpRangeListWin; 123 font_range_header *mpRangeListHeader; 124 void SetPathPrefix(); 125 126 private: 127 CEdit mCustomFile; 128 CButton mBinaryMode; 129 CButton mPathTypeButton; 130 CBitmap mPathBitmap; 131 CStatic mPagesPrompt; 132 PATHINFO pathinfo; 133 INT mHeight; 134 }; 135