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 #include "xfa/fxfa/cxfa_fwladapterwidgetmgr.h" 8 9 #include "xfa/fxfa/cxfa_ffdoc.h" 10 #include "xfa/fxfa/cxfa_fffield.h" 11 12 CXFA_FWLAdapterWidgetMgr::CXFA_FWLAdapterWidgetMgr() {} 13 14 CXFA_FWLAdapterWidgetMgr::~CXFA_FWLAdapterWidgetMgr() {} 15 16 void CXFA_FWLAdapterWidgetMgr::RepaintWidget(CFWL_Widget* pWidget) { 17 if (!pWidget) 18 return; 19 20 CXFA_FFWidget* pFFWidget = pWidget->GetLayoutItem(); 21 if (!pFFWidget) 22 return; 23 24 pFFWidget->AddInvalidateRect(); 25 } 26 27 bool CXFA_FWLAdapterWidgetMgr::GetPopupPos(CFWL_Widget* pWidget, 28 float fMinHeight, 29 float fMaxHeight, 30 const CFX_RectF& rtAnchor, 31 CFX_RectF& rtPopup) { 32 CXFA_FFWidget* pFFWidget = pWidget->GetLayoutItem(); 33 CFX_RectF rtRotateAnchor = 34 pFFWidget->GetRotateMatrix().TransformRect(rtAnchor); 35 pFFWidget->GetDoc()->GetDocEnvironment()->GetPopupPos( 36 pFFWidget, fMinHeight, fMaxHeight, rtRotateAnchor, rtPopup); 37 return true; 38 } 39