xref: /aosp_15_r20/external/pdfium/xfa/fwl/cfwl_combolist.h (revision 3ac0a46f773bac49fa9476ec2b1cf3f8da5ec3a4)
1 // Copyright 2014 The PDFium Authors
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 "xfa/fwl/cfwl_listbox.h"
11 #include "xfa/fwl/cfwl_widget.h"
12 
13 class CFWL_ComboList final : public CFWL_ListBox {
14  public:
15   CONSTRUCT_VIA_MAKE_GARBAGE_COLLECTED;
16   ~CFWL_ComboList() override;
17 
18   // CFWL_ListBox.
19   void OnProcessMessage(CFWL_Message* pMessage) override;
20 
21   int32_t MatchItem(WideStringView wsMatch);
22   void ChangeSelected(int32_t iSel);
23 
24  private:
25   CFWL_ComboList(CFWL_App* app,
26                  const Properties& properties,
27                  CFWL_Widget* pOuter);
28 
29   CFX_PointF ClientToOuter(const CFX_PointF& point);
30   void OnDropListFocusChanged(CFWL_Message* pMsg, bool bSet);
31   void OnDropListMouseMove(CFWL_MessageMouse* pMsg);
32   void OnDropListLButtonDown(CFWL_MessageMouse* pMsg);
33   void OnDropListLButtonUp(CFWL_MessageMouse* pMsg);
34   bool OnDropListKey(CFWL_MessageKey* pKey);
35   void OnDropListKeyDown(CFWL_MessageKey* pKey);
36 
37   bool m_bNotifyOwner = true;
38 };
39 
40 #endif  // XFA_FWL_CFWL_COMBOLIST_H_
41