| OLD | NEW |
| 1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #include "fpdfsdk/include/cpdfsdk_widgethandler.h" | 7 #include "fpdfsdk/include/cpdfsdk_widgethandler.h" |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 CFX_Matrix* pUser2Device) { | 95 CFX_Matrix* pUser2Device) { |
| 96 if (pAnnot->IsSignatureWidget()) { | 96 if (pAnnot->IsSignatureWidget()) { |
| 97 static_cast<CPDFSDK_BAAnnot*>(pAnnot)->DrawAppearance( | 97 static_cast<CPDFSDK_BAAnnot*>(pAnnot)->DrawAppearance( |
| 98 pDevice, pUser2Device, CPDF_Annot::Normal, nullptr); | 98 pDevice, pUser2Device, CPDF_Annot::Normal, nullptr); |
| 99 } else { | 99 } else { |
| 100 if (m_pFormFiller) | 100 if (m_pFormFiller) |
| 101 m_pFormFiller->OnDraw(pPageView, pAnnot, pDevice, pUser2Device); | 101 m_pFormFiller->OnDraw(pPageView, pAnnot, pDevice, pUser2Device); |
| 102 } | 102 } |
| 103 } | 103 } |
| 104 | 104 |
| 105 void CPDFSDK_WidgetHandler::OnDrawSleep(CPDFSDK_PageView* pPageView, | |
| 106 CPDFSDK_Annot* pAnnot, | |
| 107 CFX_RenderDevice* pDevice, | |
| 108 CFX_Matrix* pUser2Device, | |
| 109 const CFX_FloatRect& rcWindow, | |
| 110 uint32_t dwFlags) {} | |
| 111 | |
| 112 void CPDFSDK_WidgetHandler::OnDelete(CPDFSDK_Annot* pAnnot) {} | 105 void CPDFSDK_WidgetHandler::OnDelete(CPDFSDK_Annot* pAnnot) {} |
| 113 | 106 |
| 114 void CPDFSDK_WidgetHandler::OnRelease(CPDFSDK_Annot* pAnnot) {} | 107 void CPDFSDK_WidgetHandler::OnRelease(CPDFSDK_Annot* pAnnot) {} |
| 115 | 108 |
| 116 void CPDFSDK_WidgetHandler::OnMouseEnter(CPDFSDK_PageView* pPageView, | 109 void CPDFSDK_WidgetHandler::OnMouseEnter(CPDFSDK_PageView* pPageView, |
| 117 CPDFSDK_Annot* pAnnot, | 110 CPDFSDK_Annot* pAnnot, |
| 118 uint32_t nFlag) { | 111 uint32_t nFlag) { |
| 119 if (!pAnnot->IsSignatureWidget() && m_pFormFiller) | 112 if (!pAnnot->IsSignatureWidget() && m_pFormFiller) |
| 120 m_pFormFiller->OnMouseEnter(pPageView, pAnnot, nFlag); | 113 m_pFormFiller->OnMouseEnter(pPageView, pAnnot, nFlag); |
| 121 } | 114 } |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 | 290 |
| 298 FX_BOOL CPDFSDK_WidgetHandler::HitTest(CPDFSDK_PageView* pPageView, | 291 FX_BOOL CPDFSDK_WidgetHandler::HitTest(CPDFSDK_PageView* pPageView, |
| 299 CPDFSDK_Annot* pAnnot, | 292 CPDFSDK_Annot* pAnnot, |
| 300 const CFX_FloatPoint& point) { | 293 const CFX_FloatPoint& point) { |
| 301 ASSERT(pPageView); | 294 ASSERT(pPageView); |
| 302 ASSERT(pAnnot); | 295 ASSERT(pAnnot); |
| 303 | 296 |
| 304 CFX_FloatRect rect = GetViewBBox(pPageView, pAnnot); | 297 CFX_FloatRect rect = GetViewBBox(pPageView, pAnnot); |
| 305 return rect.Contains(point.x, point.y); | 298 return rect.Contains(point.x, point.y); |
| 306 } | 299 } |
| OLD | NEW |