Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
cxfa_fwladapterwidgetmgr.cpp
Go to the documentation of this file.
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#include "xfa/fxfa/cxfa_fwladapterwidgetmgr.h"
8
9#include "core/fxcrt/fx_coordinates.h"
10#include "xfa/fxfa/cxfa_ffdoc.h"
11#include "xfa/fxfa/cxfa_fffield.h"
12
13CXFA_FWLAdapterWidgetMgr::CXFA_FWLAdapterWidgetMgr() = default;
14
15CXFA_FWLAdapterWidgetMgr::~CXFA_FWLAdapterWidgetMgr() = default;
16
17void CXFA_FWLAdapterWidgetMgr::Trace(cppgc::Visitor* visitor) const {}
18
19void CXFA_FWLAdapterWidgetMgr::RepaintWidget(CFWL_Widget* pWidget) {
20 if (!pWidget)
21 return;
22
23 auto* pFFWidget = static_cast<CXFA_FFWidget*>(pWidget->GetAdapterIface());
24 if (!pFFWidget)
25 return;
26
27 pFFWidget->InvalidateRect();
28}
29
30bool CXFA_FWLAdapterWidgetMgr::GetPopupPos(CFWL_Widget* pWidget,
31 float fMinHeight,
32 float fMaxHeight,
33 const CFX_RectF& rtAnchor,
34 CFX_RectF* pPopupRect) {
35 auto* pFFWidget = static_cast<CXFA_FFWidget*>(pWidget->GetAdapterIface());
36 CFX_RectF rtRotateAnchor =
38 pFFWidget->GetDoc()->GetPopupPos(pFFWidget, fMinHeight, fMaxHeight,
39 rtRotateAnchor, pPopupRect);
40 return true;
41}
AdapterIface * GetAdapterIface() const
CFX_RectF TransformRect(const CFX_RectF &rect) const
bool GetPopupPos(CXFA_FFWidget *hWidget, float fMinPopup, float fMaxPopup, const CFX_RectF &rtAnchor, CFX_RectF *pPopupRect) const
CFX_Matrix GetRotateMatrix() override
CXFA_FFDoc * GetDoc()
void RepaintWidget(CFWL_Widget *pWidget) override
~CXFA_FWLAdapterWidgetMgr() override
void Trace(cppgc::Visitor *visitor) const override
bool GetPopupPos(CFWL_Widget *pWidget, float fMinHeight, float fMaxHeight, const CFX_RectF &rtAnchor, CFX_RectF *pPopupRect) override