xref: /aosp_15_r20/external/pdfium/xfa/fxfa/cxfa_fwladapterwidgetmgr.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_FXFA_CXFA_FWLADAPTERWIDGETMGR_H_
8 #define XFA_FXFA_CXFA_FWLADAPTERWIDGETMGR_H_
9 
10 #include "fxjs/gc/heap.h"
11 #include "v8/include/cppgc/garbage-collected.h"
12 #include "xfa/fwl/cfwl_widgetmgr.h"
13 
14 class CFWL_Widget;
15 class CFX_RectF;
16 
17 class CXFA_FWLAdapterWidgetMgr final
18     : public cppgc::GarbageCollected<CXFA_FWLAdapterWidgetMgr>,
19       public CFWL_WidgetMgr::AdapterIface {
20  public:
21   CONSTRUCT_VIA_MAKE_GARBAGE_COLLECTED;
22   ~CXFA_FWLAdapterWidgetMgr() override;
23 
24   // CFWL_WidgetMgr::AdapterIface:
25   void Trace(cppgc::Visitor* visitor) const override;
26   void RepaintWidget(CFWL_Widget* pWidget) override;
27   bool GetPopupPos(CFWL_Widget* pWidget,
28                    float fMinHeight,
29                    float fMaxHeight,
30                    const CFX_RectF& rtAnchor,
31                    CFX_RectF* pPopupRect) override;
32 
33  private:
34   CXFA_FWLAdapterWidgetMgr();
35 };
36 
37 #endif  // XFA_FXFA_CXFA_FWLADAPTERWIDGETMGR_H_
38