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

Side by Side Diff: xfa/src/fxfa/app/xfa_ffsignature.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_ffsignature.h ('k') | xfa/src/fxfa/app/xfa_ffsubform.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_ffsignature.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_ffpageview.h"
12 #include "xfa/src/fxfa/app/xfa_ffwidget.h"
13
14 CXFA_FFSignature::CXFA_FFSignature(CXFA_FFPageView* pPageView,
15 CXFA_WidgetAcc* pDataAcc)
16 : CXFA_FFField(pPageView, pDataAcc) {}
17 CXFA_FFSignature::~CXFA_FFSignature() {}
18 FX_BOOL CXFA_FFSignature::LoadWidget() {
19 return CXFA_FFField::LoadWidget();
20 }
21 void CXFA_FFSignature::RenderWidget(CFX_Graphics* pGS,
22 CFX_Matrix* pMatrix,
23 FX_DWORD dwStatus,
24 int32_t iRotate) {
25 if (!IsMatchVisibleStatus(dwStatus)) {
26 return;
27 }
28 CFX_Matrix mtRotate;
29 GetRotateMatrix(mtRotate);
30 if (pMatrix) {
31 mtRotate.Concat(*pMatrix);
32 }
33 CXFA_FFWidget::RenderWidget(pGS, &mtRotate, dwStatus);
34 CXFA_Border borderUI = m_pDataAcc->GetUIBorder();
35 DrawBorder(pGS, borderUI, m_rtUI, &mtRotate);
36 RenderCaption(pGS, &mtRotate);
37 DrawHighlight(pGS, &mtRotate, dwStatus, FALSE);
38 CFX_RectF rtWidget = m_rtUI;
39 IXFA_DocProvider* pDocProvider = m_pDataAcc->GetDoc()->GetDocProvider();
40 FXSYS_assert(pDocProvider);
41 pDocProvider->RenderCustomWidget(this, pGS, &mtRotate, rtWidget);
42 }
43 FX_BOOL CXFA_FFSignature::OnMouseEnter() {
44 return FALSE;
45 }
46 FX_BOOL CXFA_FFSignature::OnMouseExit() {
47 return FALSE;
48 }
49 FX_BOOL CXFA_FFSignature::OnLButtonDown(FX_DWORD dwFlags,
50 FX_FLOAT fx,
51 FX_FLOAT fy) {
52 return FALSE;
53 }
54 FX_BOOL CXFA_FFSignature::OnLButtonUp(FX_DWORD dwFlags,
55 FX_FLOAT fx,
56 FX_FLOAT fy) {
57 return FALSE;
58 }
59 FX_BOOL CXFA_FFSignature::OnLButtonDblClk(FX_DWORD dwFlags,
60 FX_FLOAT fx,
61 FX_FLOAT fy) {
62 return FALSE;
63 }
64 FX_BOOL CXFA_FFSignature::OnMouseMove(FX_DWORD dwFlags,
65 FX_FLOAT fx,
66 FX_FLOAT fy) {
67 return FALSE;
68 }
69 FX_BOOL CXFA_FFSignature::OnMouseWheel(FX_DWORD dwFlags,
70 int16_t zDelta,
71 FX_FLOAT fx,
72 FX_FLOAT fy) {
73 return FALSE;
74 }
75 FX_BOOL CXFA_FFSignature::OnRButtonDown(FX_DWORD dwFlags,
76 FX_FLOAT fx,
77 FX_FLOAT fy) {
78 return FALSE;
79 }
80 FX_BOOL CXFA_FFSignature::OnRButtonUp(FX_DWORD dwFlags,
81 FX_FLOAT fx,
82 FX_FLOAT fy) {
83 return FALSE;
84 }
85 FX_BOOL CXFA_FFSignature::OnRButtonDblClk(FX_DWORD dwFlags,
86 FX_FLOAT fx,
87 FX_FLOAT fy) {
88 return FALSE;
89 }
90 FX_BOOL CXFA_FFSignature::OnKeyDown(FX_DWORD dwKeyCode, FX_DWORD dwFlags) {
91 return FALSE;
92 }
93 FX_BOOL CXFA_FFSignature::OnKeyUp(FX_DWORD dwKeyCode, FX_DWORD dwFlags) {
94 return FALSE;
95 }
96 FX_BOOL CXFA_FFSignature::OnChar(FX_DWORD dwChar, FX_DWORD dwFlags) {
97 return FALSE;
98 }
99 FX_DWORD CXFA_FFSignature::OnHitTest(FX_FLOAT fx, FX_FLOAT fy) {
100 if (m_pNormalWidget) {
101 FX_FLOAT ffx = fx, ffy = fy;
102 FWLToClient(ffx, ffy);
103 FX_DWORD dwWidgetHit = m_pNormalWidget->HitTest(ffx, ffy);
104 if (dwWidgetHit != FWL_WGTHITTEST_Unknown) {
105 return FWL_WGTHITTEST_Client;
106 }
107 }
108 CFX_RectF rtBox;
109 GetRectWithoutRotate(rtBox);
110 if (!rtBox.Contains(fx, fy)) {
111 return FWL_WGTHITTEST_Unknown;
112 }
113 if (m_rtCaption.Contains(fx, fy)) {
114 return FWL_WGTHITTEST_Titlebar;
115 }
116 return FWL_WGTHITTEST_Client;
117 }
118 FX_BOOL CXFA_FFSignature::OnSetCursor(FX_FLOAT fx, FX_FLOAT fy) {
119 return FALSE;
120 }
OLDNEW
« no previous file with comments | « xfa/src/fxfa/app/xfa_ffsignature.h ('k') | xfa/src/fxfa/app/xfa_ffsubform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698