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_CFWL_COMBOLIST_H_ 8 #define XFA_FWL_CFWL_COMBOLIST_H_ 9 10 #include <memory> 11 12 #include "xfa/fwl/cfwl_listbox.h" 13 #include "xfa/fwl/cfwl_widget.h" 14 #include "xfa/fwl/cfwl_widgetproperties.h" 15 16 class CFWL_ComboList final : public CFWL_ListBox { 17 public: 18 CFWL_ComboList(const CFWL_App* app, 19 std::unique_ptr<CFWL_WidgetProperties> properties, 20 CFWL_Widget* pOuter); 21 22 // CFWL_ListBox. 23 void OnProcessMessage(CFWL_Message* pMessage) override; 24 25 int32_t MatchItem(WideStringView wsMatch); 26 void ChangeSelected(int32_t iSel); SetNotifyOwner(bool notify)27 void SetNotifyOwner(bool notify) { m_bNotifyOwner = notify; } 28 29 private: 30 CFX_PointF ClientToOuter(const CFX_PointF& point); 31 void OnDropListFocusChanged(CFWL_Message* pMsg, bool bSet); 32 void OnDropListMouseMove(CFWL_MessageMouse* pMsg); 33 void OnDropListLButtonDown(CFWL_MessageMouse* pMsg); 34 void OnDropListLButtonUp(CFWL_MessageMouse* pMsg); 35 bool OnDropListKey(CFWL_MessageKey* pKey); 36 void OnDropListKeyDown(CFWL_MessageKey* pKey); 37 38 bool m_bNotifyOwner = true; 39 }; 40 41 #endif // XFA_FWL_CFWL_COMBOLIST_H_ 42