| 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_annothandlermgr.h" | 7 #include "fpdfsdk/include/cpdfsdk_annothandlermgr.h" |
| 8 | 8 |
| 9 #include "core/fpdfdoc/include/cpdf_annot.h" | 9 #include "core/fpdfdoc/include/cpdf_annot.h" |
| 10 #include "fpdfsdk/include/cba_annotiterator.h" | 10 #include "fpdfsdk/include/cba_annotiterator.h" |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 if (nAnnotSubtype == CPDF_Annot::Subtype::XFAWIDGET) | 86 if (nAnnotSubtype == CPDF_Annot::Subtype::XFAWIDGET) |
| 87 return m_pXFAWidgetHandler.get(); | 87 return m_pXFAWidgetHandler.get(); |
| 88 #endif // PDF_ENABLE_XFA | 88 #endif // PDF_ENABLE_XFA |
| 89 | 89 |
| 90 return m_pBAAnnotHandler.get(); | 90 return m_pBAAnnotHandler.get(); |
| 91 } | 91 } |
| 92 | 92 |
| 93 void CPDFSDK_AnnotHandlerMgr::Annot_OnDraw(CPDFSDK_PageView* pPageView, | 93 void CPDFSDK_AnnotHandlerMgr::Annot_OnDraw(CPDFSDK_PageView* pPageView, |
| 94 CPDFSDK_Annot* pAnnot, | 94 CPDFSDK_Annot* pAnnot, |
| 95 CFX_RenderDevice* pDevice, | 95 CFX_RenderDevice* pDevice, |
| 96 CFX_Matrix* pUser2Device, | 96 CFX_Matrix* pUser2Device) { |
| 97 uint32_t dwFlags) { | |
| 98 ASSERT(pAnnot); | 97 ASSERT(pAnnot); |
| 99 GetAnnotHandler(pAnnot)->OnDraw(pPageView, pAnnot, pDevice, pUser2Device, | 98 GetAnnotHandler(pAnnot)->OnDraw(pPageView, pAnnot, pDevice, pUser2Device); |
| 100 dwFlags); | |
| 101 } | 99 } |
| 102 | 100 |
| 103 FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnLButtonDown( | 101 FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnLButtonDown( |
| 104 CPDFSDK_PageView* pPageView, | 102 CPDFSDK_PageView* pPageView, |
| 105 CPDFSDK_Annot* pAnnot, | 103 CPDFSDK_Annot* pAnnot, |
| 106 uint32_t nFlags, | 104 uint32_t nFlags, |
| 107 const CFX_FloatPoint& point) { | 105 const CFX_FloatPoint& point) { |
| 108 ASSERT(pAnnot); | 106 ASSERT(pAnnot); |
| 109 return GetAnnotHandler(pAnnot)->OnLButtonDown(pPageView, pAnnot, nFlags, | 107 return GetAnnotHandler(pAnnot)->OnLButtonDown(pPageView, pAnnot, nFlags, |
| 110 point); | 108 point); |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 bNext ? pWidgetIterator->MoveToNext() : pWidgetIterator->MoveToPrevious(); | 295 bNext ? pWidgetIterator->MoveToNext() : pWidgetIterator->MoveToPrevious(); |
| 298 if (!hNextFocus && pSDKAnnot) | 296 if (!hNextFocus && pSDKAnnot) |
| 299 hNextFocus = pWidgetIterator->MoveToFirst(); | 297 hNextFocus = pWidgetIterator->MoveToFirst(); |
| 300 | 298 |
| 301 return pPageView->GetAnnotByXFAWidget(hNextFocus); | 299 return pPageView->GetAnnotByXFAWidget(hNextFocus); |
| 302 #else // PDF_ENABLE_XFA | 300 #else // PDF_ENABLE_XFA |
| 303 CBA_AnnotIterator ai(pSDKAnnot->GetPageView(), CPDF_Annot::Subtype::WIDGET); | 301 CBA_AnnotIterator ai(pSDKAnnot->GetPageView(), CPDF_Annot::Subtype::WIDGET); |
| 304 return bNext ? ai.GetNextAnnot(pSDKAnnot) : ai.GetPrevAnnot(pSDKAnnot); | 302 return bNext ? ai.GetNextAnnot(pSDKAnnot) : ai.GetPrevAnnot(pSDKAnnot); |
| 305 #endif // PDF_ENABLE_XFA | 303 #endif // PDF_ENABLE_XFA |
| 306 } | 304 } |
| OLD | NEW |