Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(251)

Side by Side Diff: xfa/src/fxfa/app/xfa_fwladapter.cpp

Issue 1803723002: Move xfa/src up to xfa/. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase to master Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/src/fxfa/app/xfa_fwladapter.h ('k') | xfa/src/fxfa/app/xfa_fwltheme.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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/src/fxfa/app/xfa_fwladapter.h"
8
9 #include "xfa/src/fxfa/app/xfa_ffdoc.h"
10 #include "xfa/src/fxfa/app/xfa_fffield.h"
11 #include "xfa/src/fxfa/app/xfa_ffwidget.h"
12
13 void FWL_PostMessageToMainRoop(CFWL_Message* pMessage) {}
14 FX_BOOL FWL_ShowCaret(IFWL_Widget* pWidget,
15 FX_BOOL bVisible,
16 const CFX_RectF* pRtAnchor) {
17 CXFA_FFWidget* pXFAWidget = (CXFA_FFWidget*)pWidget->GetPrivateData(pWidget);
18 if (!pXFAWidget) {
19 return FALSE;
20 }
21 IXFA_DocProvider* pDocProvider = pXFAWidget->GetDoc()->GetDocProvider();
22 if (!pDocProvider) {
23 return FALSE;
24 }
25 if (bVisible) {
26 CFX_Matrix mt;
27 pXFAWidget->GetRotateMatrix(mt);
28 CFX_RectF rt(*pRtAnchor);
29 mt.TransformRect(rt);
30 pDocProvider->DisplayCaret(pXFAWidget, bVisible, &rt);
31 return TRUE;
32 }
33 pDocProvider->DisplayCaret(pXFAWidget, bVisible, pRtAnchor);
34 return TRUE;
35 }
36
37 FWL_ERR CXFA_FWLAdapterWidgetMgr::RepaintWidget(IFWL_Widget* pWidget,
38 const CFX_RectF* pRect) {
39 if (!pWidget)
40 return FWL_ERR_Indefinite;
41 CXFA_FFField* pField = (CXFA_FFField*)pWidget->GetPrivateData(pWidget);
42 if (!pField)
43 return FWL_ERR_Indefinite;
44 pField->AddInvalidateRect(nullptr);
45 return FWL_ERR_Succeeded;
46 }
47
48 FX_BOOL CXFA_FWLAdapterWidgetMgr::GetPopupPos(IFWL_Widget* pWidget,
49 FX_FLOAT fMinHeight,
50 FX_FLOAT fMaxHeight,
51 const CFX_RectF& rtAnchor,
52 CFX_RectF& rtPopup) {
53 CXFA_FFWidget* pFFWidget = (CXFA_FFWidget*)(pWidget->GetPrivateData(pWidget));
54 CFX_Matrix mt;
55 pFFWidget->GetRotateMatrix(mt);
56 CFX_RectF rtRotateAnchor(rtAnchor);
57 mt.TransformRect(rtRotateAnchor);
58 pFFWidget->GetDoc()->GetDocProvider()->GetPopupPos(
59 pFFWidget, fMinHeight, fMaxHeight, rtRotateAnchor, rtPopup);
60 return TRUE;
61 }
OLDNEW
« no previous file with comments | « xfa/src/fxfa/app/xfa_fwladapter.h ('k') | xfa/src/fxfa/app/xfa_fwltheme.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698