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 _FWL_COMBOBOX_IMP_H | 7 #ifndef _FWL_COMBOBOX_IMP_H |
8 #define _FWL_COMBOBOX_IMP_H | 8 #define _FWL_COMBOBOX_IMP_H |
9 | 9 |
10 #include "third_party/base/nonstd_unique_ptr.h" | 10 #include "third_party/base/nonstd_unique_ptr.h" |
| 11 #include "xfa/src/fwl/src/basewidget/include/fwl_editimp.h" |
| 12 #include "xfa/src/fwl/src/basewidget/include/fwl_listboximp.h" |
11 | 13 |
12 class CFWL_WidgetImp; | 14 class CFWL_WidgetImp; |
13 class CFWL_WidgetImpProperties; | 15 class CFWL_WidgetImpProperties; |
14 class CFWL_WidgetImpDelegate; | 16 class CFWL_WidgetImpDelegate; |
15 class CFWL_EditImp; | |
16 class CFWL_EditImpDelegate; | |
17 class CFWL_ListBoxImp; | 17 class CFWL_ListBoxImp; |
18 class CFWL_ListBoxImpDelegate; | 18 class CFWL_ListBoxImpDelegate; |
19 class CFWL_FormProxyImp; | 19 class CFWL_FormProxyImp; |
20 class IFWL_Widget; | 20 class IFWL_Widget; |
21 class CFWL_ComboEditImp; | 21 class CFWL_ComboEditImp; |
22 class CFWL_ComboEditImpDelegate; | 22 class CFWL_ComboEditImpDelegate; |
23 class CFWL_ComboListImp; | 23 class CFWL_ComboListImp; |
24 class CFWL_ComboListImpDelegate; | 24 class CFWL_ComboListImpDelegate; |
25 class CFWL_ComboBoxImp; | 25 class CFWL_ComboBoxImp; |
26 class CFWL_ComboBoxImpDelegate; | 26 class CFWL_ComboBoxImpDelegate; |
27 class CFWL_ComboProxyImpDelegate; | 27 class CFWL_ComboProxyImpDelegate; |
28 class CFWL_ComboEditImp : public CFWL_EditImp { | 28 class CFWL_ComboEditImp : public CFWL_EditImp { |
29 public: | 29 public: |
30 CFWL_ComboEditImp(IFWL_Widget* pOuter); | |
31 CFWL_ComboEditImp(const CFWL_WidgetImpProperties& properties, | 30 CFWL_ComboEditImp(const CFWL_WidgetImpProperties& properties, |
32 IFWL_Widget* pOuter = NULL); | 31 IFWL_Widget* pOuter); |
33 | 32 |
34 void ClearSelected(); | 33 void ClearSelected(); |
35 void SetSelected(); | 34 void SetSelected(); |
36 void EndCaret(); | 35 void EndCaret(); |
37 void FlagFocus(FX_BOOL bSet); | 36 void FlagFocus(FX_BOOL bSet); |
38 | 37 |
39 protected: | 38 protected: |
40 void SetComboBoxFocus(FX_BOOL bSet); | 39 void SetComboBoxFocus(FX_BOOL bSet); |
41 CFWL_ComboBoxImp* m_pOuter; | 40 CFWL_ComboBoxImp* m_pOuter; |
42 friend class CFWL_ComboEditImpDelegate; | 41 friend class CFWL_ComboEditImpDelegate; |
43 }; | 42 }; |
44 class CFWL_ComboEditImpDelegate : public CFWL_EditImpDelegate { | 43 class CFWL_ComboEditImpDelegate : public CFWL_EditImpDelegate { |
45 public: | 44 public: |
46 CFWL_ComboEditImpDelegate(CFWL_ComboEditImp* pOwner); | 45 CFWL_ComboEditImpDelegate(CFWL_ComboEditImp* pOwner); |
47 int32_t OnProcessMessage(CFWL_Message* pMessage) override; | 46 int32_t OnProcessMessage(CFWL_Message* pMessage) override; |
48 | 47 |
49 protected: | 48 protected: |
50 CFWL_ComboEditImp* m_pOwner; | 49 CFWL_ComboEditImp* m_pOwner; |
51 }; | 50 }; |
52 class CFWL_ComboListImp : public CFWL_ListBoxImp { | 51 class CFWL_ComboListImp : public CFWL_ListBoxImp { |
53 public: | 52 public: |
54 CFWL_ComboListImp(IFWL_Widget* pOuter); | |
55 CFWL_ComboListImp(const CFWL_WidgetImpProperties& properties, | 53 CFWL_ComboListImp(const CFWL_WidgetImpProperties& properties, |
56 IFWL_Widget* pOuter); | 54 IFWL_Widget* pOuter); |
57 virtual FWL_ERR Initialize(); | 55 virtual FWL_ERR Initialize(); |
58 virtual FWL_ERR Finalize(); | 56 virtual FWL_ERR Finalize(); |
59 int32_t MatchItem(const CFX_WideString& wsMatch); | 57 int32_t MatchItem(const CFX_WideString& wsMatch); |
60 void ChangeSelected(int32_t iSel); | 58 void ChangeSelected(int32_t iSel); |
61 int32_t CountItems(); | 59 int32_t CountItems(); |
62 void GetItemRect(int32_t nIndex, CFX_RectF& rtItem); | 60 void GetItemRect(int32_t nIndex, CFX_RectF& rtItem); |
63 void ClientToOuter(FX_FLOAT& fx, FX_FLOAT& fy); | 61 void ClientToOuter(FX_FLOAT& fx, FX_FLOAT& fy); |
64 void SetFocus(FX_BOOL bSet); | 62 void SetFocus(FX_BOOL bSet); |
(...skipping 10 matching lines...) Expand all Loading... |
75 void OnDropListFocusChanged(CFWL_Message* pMsg, FX_BOOL bSet = TRUE); | 73 void OnDropListFocusChanged(CFWL_Message* pMsg, FX_BOOL bSet = TRUE); |
76 int32_t OnDropListMouseMove(CFWL_MsgMouse* pMsg); | 74 int32_t OnDropListMouseMove(CFWL_MsgMouse* pMsg); |
77 int32_t OnDropListLButtonDown(CFWL_MsgMouse* pMsg); | 75 int32_t OnDropListLButtonDown(CFWL_MsgMouse* pMsg); |
78 int32_t OnDropListLButtonUp(CFWL_MsgMouse* pMsg); | 76 int32_t OnDropListLButtonUp(CFWL_MsgMouse* pMsg); |
79 int32_t OnDropListKey(CFWL_MsgKey* pKey); | 77 int32_t OnDropListKey(CFWL_MsgKey* pKey); |
80 void OnDropListKeyDown(CFWL_MsgKey* pKey); | 78 void OnDropListKeyDown(CFWL_MsgKey* pKey); |
81 CFWL_ComboListImp* m_pOwner; | 79 CFWL_ComboListImp* m_pOwner; |
82 }; | 80 }; |
83 class CFWL_ComboBoxImp : public CFWL_WidgetImp { | 81 class CFWL_ComboBoxImp : public CFWL_WidgetImp { |
84 public: | 82 public: |
85 CFWL_ComboBoxImp(IFWL_Widget* pOuter = NULL); | |
86 CFWL_ComboBoxImp(const CFWL_WidgetImpProperties& properties, | 83 CFWL_ComboBoxImp(const CFWL_WidgetImpProperties& properties, |
87 IFWL_Widget* pOuter = NULL); | 84 IFWL_Widget* pOuter); |
88 virtual ~CFWL_ComboBoxImp(); | 85 virtual ~CFWL_ComboBoxImp(); |
89 virtual FWL_ERR GetClassName(CFX_WideString& wsClass) const; | 86 virtual FWL_ERR GetClassName(CFX_WideString& wsClass) const; |
90 virtual FX_DWORD GetClassID() const; | 87 virtual FX_DWORD GetClassID() const; |
91 virtual FWL_ERR Initialize(); | 88 virtual FWL_ERR Initialize(); |
92 virtual FWL_ERR Finalize(); | 89 virtual FWL_ERR Finalize(); |
93 virtual FWL_ERR GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE); | 90 virtual FWL_ERR GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE); |
94 virtual FWL_ERR ModifyStylesEx(FX_DWORD dwStylesExAdded, | 91 virtual FWL_ERR ModifyStylesEx(FX_DWORD dwStylesExAdded, |
95 FX_DWORD dwStylesExRemoved); | 92 FX_DWORD dwStylesExRemoved); |
96 virtual FWL_ERR SetStates(FX_DWORD dwStates, FX_BOOL bSet = TRUE); | 93 virtual FWL_ERR SetStates(FX_DWORD dwStates, FX_BOOL bSet = TRUE); |
97 virtual FWL_ERR Update(); | 94 virtual FWL_ERR Update(); |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 void OnMouseMove(CFWL_MsgMouse* pMsg); | 226 void OnMouseMove(CFWL_MsgMouse* pMsg); |
230 void OnDeactive(CFWL_MsgDeactivate* pMsg); | 227 void OnDeactive(CFWL_MsgDeactivate* pMsg); |
231 void OnFocusChanged(CFWL_MsgKillFocus* pMsg, FX_BOOL bSet); | 228 void OnFocusChanged(CFWL_MsgKillFocus* pMsg, FX_BOOL bSet); |
232 FX_BOOL m_bLButtonDown; | 229 FX_BOOL m_bLButtonDown; |
233 FX_BOOL m_bLButtonUpSelf; | 230 FX_BOOL m_bLButtonUpSelf; |
234 FX_FLOAT m_fStartPos; | 231 FX_FLOAT m_fStartPos; |
235 IFWL_Form* m_pForm; | 232 IFWL_Form* m_pForm; |
236 CFWL_ComboBoxImp* m_pComboBox; | 233 CFWL_ComboBoxImp* m_pComboBox; |
237 }; | 234 }; |
238 #endif | 235 #endif |
OLD | NEW |