OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef XFA_FWL_BASEWIDGET_FWL_COMBOBOXIMP_H_ | 7 #ifndef XFA_FWL_BASEWIDGET_FWL_COMBOBOXIMP_H_ |
8 #define XFA_FWL_BASEWIDGET_FWL_COMBOBOXIMP_H_ | 8 #define XFA_FWL_BASEWIDGET_FWL_COMBOBOXIMP_H_ |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 int32_t OnDropListKey(CFWL_MsgKey* pKey); | 78 int32_t OnDropListKey(CFWL_MsgKey* pKey); |
79 void OnDropListKeyDown(CFWL_MsgKey* pKey); | 79 void OnDropListKeyDown(CFWL_MsgKey* pKey); |
80 CFWL_ComboListImp* m_pOwner; | 80 CFWL_ComboListImp* m_pOwner; |
81 }; | 81 }; |
82 class CFWL_ComboBoxImp : public CFWL_WidgetImp { | 82 class CFWL_ComboBoxImp : public CFWL_WidgetImp { |
83 public: | 83 public: |
84 CFWL_ComboBoxImp(const CFWL_WidgetImpProperties& properties, | 84 CFWL_ComboBoxImp(const CFWL_WidgetImpProperties& properties, |
85 IFWL_Widget* pOuter); | 85 IFWL_Widget* pOuter); |
86 virtual ~CFWL_ComboBoxImp(); | 86 virtual ~CFWL_ComboBoxImp(); |
87 virtual FWL_ERR GetClassName(CFX_WideString& wsClass) const; | 87 virtual FWL_ERR GetClassName(CFX_WideString& wsClass) const; |
88 virtual FX_DWORD GetClassID() const; | 88 virtual uint32_t GetClassID() const; |
89 virtual FWL_ERR Initialize(); | 89 virtual FWL_ERR Initialize(); |
90 virtual FWL_ERR Finalize(); | 90 virtual FWL_ERR Finalize(); |
91 virtual FWL_ERR GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE); | 91 virtual FWL_ERR GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE); |
92 virtual FWL_ERR ModifyStylesEx(FX_DWORD dwStylesExAdded, | 92 virtual FWL_ERR ModifyStylesEx(uint32_t dwStylesExAdded, |
93 FX_DWORD dwStylesExRemoved); | 93 uint32_t dwStylesExRemoved); |
94 virtual FWL_ERR SetStates(FX_DWORD dwStates, FX_BOOL bSet = TRUE); | 94 virtual FWL_ERR SetStates(uint32_t dwStates, FX_BOOL bSet = TRUE); |
95 virtual FWL_ERR Update(); | 95 virtual FWL_ERR Update(); |
96 virtual FX_DWORD HitTest(FX_FLOAT fx, FX_FLOAT fy); | 96 virtual uint32_t HitTest(FX_FLOAT fx, FX_FLOAT fy); |
97 virtual FWL_ERR DrawWidget(CFX_Graphics* pGraphics, | 97 virtual FWL_ERR DrawWidget(CFX_Graphics* pGraphics, |
98 const CFX_Matrix* pMatrix = NULL); | 98 const CFX_Matrix* pMatrix = NULL); |
99 virtual FWL_ERR SetThemeProvider(IFWL_ThemeProvider* pThemeProvider); | 99 virtual FWL_ERR SetThemeProvider(IFWL_ThemeProvider* pThemeProvider); |
100 virtual int32_t GetCurSel(); | 100 virtual int32_t GetCurSel(); |
101 virtual FWL_ERR SetCurSel(int32_t iSel); | 101 virtual FWL_ERR SetCurSel(int32_t iSel); |
102 virtual FWL_ERR SetEditText(const CFX_WideString& wsText); | 102 virtual FWL_ERR SetEditText(const CFX_WideString& wsText); |
103 virtual int32_t GetEditTextLength() const; | 103 virtual int32_t GetEditTextLength() const; |
104 virtual FWL_ERR GetEditText(CFX_WideString& wsText, | 104 virtual FWL_ERR GetEditText(CFX_WideString& wsText, |
105 int32_t nStart = 0, | 105 int32_t nStart = 0, |
106 int32_t nCount = -1) const; | 106 int32_t nCount = -1) const; |
(...skipping 14 matching lines...) Expand all Loading... |
121 virtual FX_BOOL EditCanCopy(); | 121 virtual FX_BOOL EditCanCopy(); |
122 virtual FX_BOOL EditCanCut(); | 122 virtual FX_BOOL EditCanCut(); |
123 virtual FX_BOOL EditCanSelectAll(); | 123 virtual FX_BOOL EditCanSelectAll(); |
124 virtual FX_BOOL EditCopy(CFX_WideString& wsCopy); | 124 virtual FX_BOOL EditCopy(CFX_WideString& wsCopy); |
125 virtual FX_BOOL EditCut(CFX_WideString& wsCut); | 125 virtual FX_BOOL EditCut(CFX_WideString& wsCut); |
126 virtual FX_BOOL EditPaste(const CFX_WideString& wsPaste); | 126 virtual FX_BOOL EditPaste(const CFX_WideString& wsPaste); |
127 virtual FX_BOOL EditSelectAll(); | 127 virtual FX_BOOL EditSelectAll(); |
128 virtual FX_BOOL EditDelete(); | 128 virtual FX_BOOL EditDelete(); |
129 virtual FX_BOOL EditDeSelect(); | 129 virtual FX_BOOL EditDeSelect(); |
130 virtual FWL_ERR GetBBox(CFX_RectF& rect); | 130 virtual FWL_ERR GetBBox(CFX_RectF& rect); |
131 virtual FWL_ERR EditModifyStylesEx(FX_DWORD dwStylesExAdded, | 131 virtual FWL_ERR EditModifyStylesEx(uint32_t dwStylesExAdded, |
132 FX_DWORD dwStylesExRemoved); | 132 uint32_t dwStylesExRemoved); |
133 | 133 |
134 protected: | 134 protected: |
135 void DrawStretchHandler(CFX_Graphics* pGraphics, const CFX_Matrix* pMatrix); | 135 void DrawStretchHandler(CFX_Graphics* pGraphics, const CFX_Matrix* pMatrix); |
136 FX_FLOAT GetListHeight(); | 136 FX_FLOAT GetListHeight(); |
137 void ShowDropList(FX_BOOL bActivate); | 137 void ShowDropList(FX_BOOL bActivate); |
138 FX_BOOL IsDropListShowed(); | 138 FX_BOOL IsDropListShowed(); |
139 FX_BOOL IsDropDownStyle() const; | 139 FX_BOOL IsDropDownStyle() const; |
140 void MatchEditText(); | 140 void MatchEditText(); |
141 void SynchrEditText(int32_t iListItem); | 141 void SynchrEditText(int32_t iListItem); |
142 void Layout(); | 142 void Layout(); |
143 void ReSetTheme(); | 143 void ReSetTheme(); |
144 void ReSetEditAlignment(); | 144 void ReSetEditAlignment(); |
145 void ReSetListItemAlignment(); | 145 void ReSetListItemAlignment(); |
146 void ProcessSelChanged(FX_BOOL bLButtonUp); | 146 void ProcessSelChanged(FX_BOOL bLButtonUp); |
147 void InitProxyForm(); | 147 void InitProxyForm(); |
148 FWL_ERR DisForm_Initialize(); | 148 FWL_ERR DisForm_Initialize(); |
149 void DisForm_InitComboList(); | 149 void DisForm_InitComboList(); |
150 void DisForm_InitComboEdit(); | 150 void DisForm_InitComboEdit(); |
151 void DisForm_ShowDropList(FX_BOOL bActivate); | 151 void DisForm_ShowDropList(FX_BOOL bActivate); |
152 FX_BOOL DisForm_IsDropListShowed(); | 152 FX_BOOL DisForm_IsDropListShowed(); |
153 FWL_ERR DisForm_ModifyStylesEx(FX_DWORD dwStylesExAdded, | 153 FWL_ERR DisForm_ModifyStylesEx(uint32_t dwStylesExAdded, |
154 FX_DWORD dwStylesExRemoved); | 154 uint32_t dwStylesExRemoved); |
155 FWL_ERR DisForm_Update(); | 155 FWL_ERR DisForm_Update(); |
156 FX_DWORD DisForm_HitTest(FX_FLOAT fx, FX_FLOAT fy); | 156 uint32_t DisForm_HitTest(FX_FLOAT fx, FX_FLOAT fy); |
157 FWL_ERR DisForm_DrawWidget(CFX_Graphics* pGraphics, | 157 FWL_ERR DisForm_DrawWidget(CFX_Graphics* pGraphics, |
158 const CFX_Matrix* pMatrix = NULL); | 158 const CFX_Matrix* pMatrix = NULL); |
159 FWL_ERR DisForm_GetBBox(CFX_RectF& rect); | 159 FWL_ERR DisForm_GetBBox(CFX_RectF& rect); |
160 void DisForm_Layout(); | 160 void DisForm_Layout(); |
161 | 161 |
162 CFX_RectF m_rtClient; | 162 CFX_RectF m_rtClient; |
163 CFX_RectF m_rtContent; | 163 CFX_RectF m_rtContent; |
164 CFX_RectF m_rtBtn; | 164 CFX_RectF m_rtBtn; |
165 CFX_RectF m_rtList; | 165 CFX_RectF m_rtList; |
166 CFX_RectF m_rtProxy; | 166 CFX_RectF m_rtProxy; |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 void OnDeactive(CFWL_MsgDeactivate* pMsg); | 228 void OnDeactive(CFWL_MsgDeactivate* pMsg); |
229 void OnFocusChanged(CFWL_MsgKillFocus* pMsg, FX_BOOL bSet); | 229 void OnFocusChanged(CFWL_MsgKillFocus* pMsg, FX_BOOL bSet); |
230 FX_BOOL m_bLButtonDown; | 230 FX_BOOL m_bLButtonDown; |
231 FX_BOOL m_bLButtonUpSelf; | 231 FX_BOOL m_bLButtonUpSelf; |
232 FX_FLOAT m_fStartPos; | 232 FX_FLOAT m_fStartPos; |
233 IFWL_Form* m_pForm; | 233 IFWL_Form* m_pForm; |
234 CFWL_ComboBoxImp* m_pComboBox; | 234 CFWL_ComboBoxImp* m_pComboBox; |
235 }; | 235 }; |
236 | 236 |
237 #endif // XFA_FWL_BASEWIDGET_FWL_COMBOBOXIMP_H_ | 237 #endif // XFA_FWL_BASEWIDGET_FWL_COMBOBOXIMP_H_ |
OLD | NEW |