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 bool bDrawAnnots) { |
97 ASSERT(pAnnot); | 98 ASSERT(pAnnot); |
98 GetAnnotHandler(pAnnot)->OnDraw(pPageView, pAnnot, pDevice, pUser2Device); | 99 GetAnnotHandler(pAnnot)->OnDraw(pPageView, pAnnot, pDevice, pUser2Device, |
| 100 bDrawAnnots); |
99 } | 101 } |
100 | 102 |
101 FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnLButtonDown( | 103 FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnLButtonDown( |
102 CPDFSDK_PageView* pPageView, | 104 CPDFSDK_PageView* pPageView, |
103 CPDFSDK_Annot* pAnnot, | 105 CPDFSDK_Annot* pAnnot, |
104 uint32_t nFlags, | 106 uint32_t nFlags, |
105 const CFX_FloatPoint& point) { | 107 const CFX_FloatPoint& point) { |
106 ASSERT(pAnnot); | 108 ASSERT(pAnnot); |
107 return GetAnnotHandler(pAnnot)->OnLButtonDown(pPageView, pAnnot, nFlags, | 109 return GetAnnotHandler(pAnnot)->OnLButtonDown(pPageView, pAnnot, nFlags, |
108 point); | 110 point); |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 bNext ? pWidgetIterator->MoveToNext() : pWidgetIterator->MoveToPrevious(); | 297 bNext ? pWidgetIterator->MoveToNext() : pWidgetIterator->MoveToPrevious(); |
296 if (!hNextFocus && pSDKAnnot) | 298 if (!hNextFocus && pSDKAnnot) |
297 hNextFocus = pWidgetIterator->MoveToFirst(); | 299 hNextFocus = pWidgetIterator->MoveToFirst(); |
298 | 300 |
299 return pPageView->GetAnnotByXFAWidget(hNextFocus); | 301 return pPageView->GetAnnotByXFAWidget(hNextFocus); |
300 #else // PDF_ENABLE_XFA | 302 #else // PDF_ENABLE_XFA |
301 CBA_AnnotIterator ai(pSDKAnnot->GetPageView(), CPDF_Annot::Subtype::WIDGET); | 303 CBA_AnnotIterator ai(pSDKAnnot->GetPageView(), CPDF_Annot::Subtype::WIDGET); |
302 return bNext ? ai.GetNextAnnot(pSDKAnnot) : ai.GetPrevAnnot(pSDKAnnot); | 304 return bNext ? ai.GetNextAnnot(pSDKAnnot) : ai.GetPrevAnnot(pSDKAnnot); |
303 #endif // PDF_ENABLE_XFA | 305 #endif // PDF_ENABLE_XFA |
304 } | 306 } |
OLD | NEW |