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_CORE_IFWL_COMBOLIST_H_ | 7 #ifndef XFA_FWL_CORE_IFWL_COMBOLIST_H_ |
8 #define XFA_FWL_CORE_IFWL_COMBOLIST_H_ | 8 #define XFA_FWL_CORE_IFWL_COMBOLIST_H_ |
9 | 9 |
10 #include "xfa/fwl/core/cfwl_widgetproperties.h" | 10 #include "xfa/fwl/core/cfwl_widgetproperties.h" |
11 #include "xfa/fwl/core/ifwl_listbox.h" | 11 #include "xfa/fwl/core/ifwl_listbox.h" |
12 #include "xfa/fwl/core/ifwl_widget.h" | 12 #include "xfa/fwl/core/ifwl_widget.h" |
13 | 13 |
14 class IFWL_ComboList : public IFWL_ListBox { | 14 class IFWL_ComboList : public IFWL_ListBox { |
15 public: | 15 public: |
16 IFWL_ComboList(const IFWL_App* app, | 16 IFWL_ComboList(const IFWL_App* app, |
17 std::unique_ptr<CFWL_WidgetProperties> properties, | 17 std::unique_ptr<CFWL_WidgetProperties> properties, |
18 IFWL_Widget* pOuter); | 18 IFWL_Widget* pOuter); |
19 | 19 |
20 // IFWL_ListBox. | 20 // IFWL_ListBox. |
21 void OnProcessMessage(CFWL_Message* pMessage) override; | 21 void OnProcessMessage(CFWL_Message* pMessage) override; |
22 | 22 |
23 int32_t MatchItem(const CFX_WideString& wsMatch); | 23 int32_t MatchItem(const CFX_WideString& wsMatch); |
24 | 24 |
25 void ChangeSelected(int32_t iSel); | 25 void ChangeSelected(int32_t iSel); |
26 int32_t CountItems(); | 26 int32_t CountItems(); |
27 | 27 |
28 void SetFocus(bool bSet); | |
29 void SetNotifyOwner(bool notify) { m_bNotifyOwner = notify; } | 28 void SetNotifyOwner(bool notify) { m_bNotifyOwner = notify; } |
30 | 29 |
31 private: | 30 private: |
32 void GetItemRect(int32_t nIndex, CFX_RectF& rtItem); | 31 void GetItemRect(int32_t nIndex, CFX_RectF& rtItem); |
33 void ClientToOuter(FX_FLOAT& fx, FX_FLOAT& fy); | 32 void ClientToOuter(FX_FLOAT& fx, FX_FLOAT& fy); |
34 void OnDropListFocusChanged(CFWL_Message* pMsg, bool bSet); | 33 void OnDropListFocusChanged(CFWL_Message* pMsg, bool bSet); |
35 int32_t OnDropListMouseMove(CFWL_MsgMouse* pMsg); | 34 void OnDropListMouseMove(CFWL_MsgMouse* pMsg); |
36 int32_t OnDropListLButtonDown(CFWL_MsgMouse* pMsg); | 35 void OnDropListLButtonDown(CFWL_MsgMouse* pMsg); |
37 int32_t OnDropListLButtonUp(CFWL_MsgMouse* pMsg); | 36 void OnDropListLButtonUp(CFWL_MsgMouse* pMsg); |
38 int32_t OnDropListKey(CFWL_MsgKey* pKey); | 37 bool OnDropListKey(CFWL_MsgKey* pKey); |
39 void OnDropListKeyDown(CFWL_MsgKey* pKey); | 38 void OnDropListKeyDown(CFWL_MsgKey* pKey); |
40 | 39 |
41 bool m_bNotifyOwner; | 40 bool m_bNotifyOwner; |
42 }; | 41 }; |
43 | 42 |
44 #endif // XFA_FWL_CORE_IFWL_COMBOLIST_H_ | 43 #endif // XFA_FWL_CORE_IFWL_COMBOLIST_H_ |
OLD | NEW |