OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 |
| 7 #ifndef XFA_FWL_CORE_IFWL_COMBOLIST_H_ |
| 8 #define XFA_FWL_CORE_IFWL_COMBOLIST_H_ |
| 9 |
| 10 #include "xfa/fwl/core/cfwl_widgetimpproperties.h" |
| 11 #include "xfa/fwl/core/ifwl_listbox.h" |
| 12 #include "xfa/fwl/core/ifwl_widget.h" |
| 13 |
| 14 class IFWL_ComboList : public IFWL_ListBox { |
| 15 public: |
| 16 static IFWL_ComboList* Create(const CFWL_WidgetImpProperties& properties, |
| 17 IFWL_Widget* pOuter); |
| 18 |
| 19 IFWL_ComboList(const CFWL_WidgetImpProperties& properties, |
| 20 IFWL_Widget* pOuter); |
| 21 |
| 22 // IFWL_Widget |
| 23 FWL_Error Initialize() override; |
| 24 FWL_Error Finalize() override; |
| 25 |
| 26 int32_t MatchItem(const CFX_WideString& wsMatch); |
| 27 void ChangeSelected(int32_t iSel); |
| 28 int32_t CountItems(); |
| 29 void GetItemRect(int32_t nIndex, CFX_RectF& rtItem); |
| 30 void ClientToOuter(FX_FLOAT& fx, FX_FLOAT& fy); |
| 31 void SetFocus(FX_BOOL bSet); |
| 32 |
| 33 FX_BOOL m_bNotifyOwner; |
| 34 |
| 35 friend class CFWL_ComboListImpDelegate; |
| 36 friend class IFWL_ComboBox; |
| 37 }; |
| 38 |
| 39 class CFWL_ComboListImpDelegate : public CFWL_ListBoxImpDelegate { |
| 40 public: |
| 41 CFWL_ComboListImpDelegate(IFWL_ComboList* pOwner); |
| 42 void OnProcessMessage(CFWL_Message* pMessage) override; |
| 43 |
| 44 protected: |
| 45 void OnDropListFocusChanged(CFWL_Message* pMsg, FX_BOOL bSet = TRUE); |
| 46 int32_t OnDropListMouseMove(CFWL_MsgMouse* pMsg); |
| 47 int32_t OnDropListLButtonDown(CFWL_MsgMouse* pMsg); |
| 48 int32_t OnDropListLButtonUp(CFWL_MsgMouse* pMsg); |
| 49 int32_t OnDropListKey(CFWL_MsgKey* pKey); |
| 50 void OnDropListKeyDown(CFWL_MsgKey* pKey); |
| 51 IFWL_ComboList* m_pOwner; |
| 52 }; |
| 53 |
| 54 #endif // XFA_FWL_CORE_IFWL_COMBOLIST_H_ |
OLD | NEW |