| 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_widgetimpproperties.h" | 10 #include "xfa/fwl/core/cfwl_widgetimpproperties.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 const CFWL_WidgetImpProperties& properties, | 17 const CFWL_WidgetImpProperties& properties, |
| 18 IFWL_Widget* pOuter); | 18 IFWL_Widget* pOuter); |
| 19 | 19 |
| 20 // IFWL_Widget | |
| 21 void Initialize() override; | |
| 22 void Finalize() override; | |
| 23 | |
| 24 int32_t MatchItem(const CFX_WideString& wsMatch); | 20 int32_t MatchItem(const CFX_WideString& wsMatch); |
| 25 void ChangeSelected(int32_t iSel); | 21 void ChangeSelected(int32_t iSel); |
| 26 int32_t CountItems(); | 22 int32_t CountItems(); |
| 27 void GetItemRect(int32_t nIndex, CFX_RectF& rtItem); | 23 void GetItemRect(int32_t nIndex, CFX_RectF& rtItem); |
| 28 void ClientToOuter(FX_FLOAT& fx, FX_FLOAT& fy); | 24 void ClientToOuter(FX_FLOAT& fx, FX_FLOAT& fy); |
| 29 void SetFocus(FX_BOOL bSet); | 25 void SetFocus(FX_BOOL bSet); |
| 30 | 26 |
| 31 FX_BOOL m_bNotifyOwner; | 27 FX_BOOL m_bNotifyOwner; |
| 32 | 28 |
| 33 friend class CFWL_ComboListImpDelegate; | 29 friend class CFWL_ComboListImpDelegate; |
| 34 friend class IFWL_ComboBox; | 30 friend class IFWL_ComboBox; |
| 35 }; | 31 }; |
| 36 | 32 |
| 37 class CFWL_ComboListImpDelegate : public CFWL_ListBoxImpDelegate { | 33 class CFWL_ComboListImpDelegate : public CFWL_ListBoxImpDelegate { |
| 38 public: | 34 public: |
| 39 CFWL_ComboListImpDelegate(IFWL_ComboList* pOwner); | 35 CFWL_ComboListImpDelegate(IFWL_ComboList* pOwner); |
| 40 void OnProcessMessage(CFWL_Message* pMessage) override; | 36 void OnProcessMessage(CFWL_Message* pMessage) override; |
| 41 | 37 |
| 42 protected: | 38 protected: |
| 43 void OnDropListFocusChanged(CFWL_Message* pMsg, FX_BOOL bSet = TRUE); | 39 void OnDropListFocusChanged(CFWL_Message* pMsg, FX_BOOL bSet = TRUE); |
| 44 int32_t OnDropListMouseMove(CFWL_MsgMouse* pMsg); | 40 int32_t OnDropListMouseMove(CFWL_MsgMouse* pMsg); |
| 45 int32_t OnDropListLButtonDown(CFWL_MsgMouse* pMsg); | 41 int32_t OnDropListLButtonDown(CFWL_MsgMouse* pMsg); |
| 46 int32_t OnDropListLButtonUp(CFWL_MsgMouse* pMsg); | 42 int32_t OnDropListLButtonUp(CFWL_MsgMouse* pMsg); |
| 47 int32_t OnDropListKey(CFWL_MsgKey* pKey); | 43 int32_t OnDropListKey(CFWL_MsgKey* pKey); |
| 48 void OnDropListKeyDown(CFWL_MsgKey* pKey); | 44 void OnDropListKeyDown(CFWL_MsgKey* pKey); |
| 49 IFWL_ComboList* m_pOwner; | 45 IFWL_ComboList* m_pOwner; |
| 50 }; | 46 }; |
| 51 | 47 |
| 52 #endif // XFA_FWL_CORE_IFWL_COMBOLIST_H_ | 48 #endif // XFA_FWL_CORE_IFWL_COMBOLIST_H_ |
| OLD | NEW |