| 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_xfawidgethandler.h" | 7 #include "fpdfsdk/include/cpdfsdk_xfawidgethandler.h" |
| 8 | 8 |
| 9 #include "core/fpdfdoc/include/cpdf_interform.h" | 9 #include "core/fpdfdoc/include/cpdf_interform.h" |
| 10 #include "fpdfsdk/fpdfxfa/include/fpdfxfa_doc.h" | 10 #include "fpdfsdk/fpdfxfa/include/fpdfxfa_doc.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 CPDFSDK_Document* pSDKDoc = m_pApp->GetSDKDocument(); | 39 CPDFSDK_Document* pSDKDoc = m_pApp->GetSDKDocument(); |
| 40 CPDFSDK_InterForm* pInterForm = pSDKDoc->GetInterForm(); | 40 CPDFSDK_InterForm* pInterForm = pSDKDoc->GetInterForm(); |
| 41 CPDFSDK_XFAWidget* pWidget = new CPDFSDK_XFAWidget(pAnnot, pPage, pInterForm); | 41 CPDFSDK_XFAWidget* pWidget = new CPDFSDK_XFAWidget(pAnnot, pPage, pInterForm); |
| 42 pInterForm->AddXFAMap(pAnnot, pWidget); | 42 pInterForm->AddXFAMap(pAnnot, pWidget); |
| 43 return pWidget; | 43 return pWidget; |
| 44 } | 44 } |
| 45 | 45 |
| 46 void CPDFSDK_XFAWidgetHandler::OnDraw(CPDFSDK_PageView* pPageView, | 46 void CPDFSDK_XFAWidgetHandler::OnDraw(CPDFSDK_PageView* pPageView, |
| 47 CPDFSDK_Annot* pAnnot, | 47 CPDFSDK_Annot* pAnnot, |
| 48 CFX_RenderDevice* pDevice, | 48 CFX_RenderDevice* pDevice, |
| 49 CFX_Matrix* pUser2Device) { | 49 CFX_Matrix* pUser2Device, |
| 50 bool bDrawAnnots) { |
| 50 ASSERT(pPageView); | 51 ASSERT(pPageView); |
| 51 ASSERT(pAnnot); | 52 ASSERT(pAnnot); |
| 52 | 53 |
| 53 CPDFSDK_Document* pSDKDoc = pPageView->GetSDKDocument(); | 54 CPDFSDK_Document* pSDKDoc = pPageView->GetSDKDocument(); |
| 54 CXFA_FFWidgetHandler* pWidgetHandler = GetXFAWidgetHandler(pAnnot); | 55 CXFA_FFWidgetHandler* pWidgetHandler = GetXFAWidgetHandler(pAnnot); |
| 55 | 56 |
| 56 CFX_Graphics gs; | 57 CFX_Graphics gs; |
| 57 gs.Create(pDevice); | 58 gs.Create(pDevice); |
| 58 | 59 |
| 59 CFX_Matrix mt; | 60 CFX_Matrix mt; |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 dwFWLFlag |= FWL_KEYFLAG_MButton; | 366 dwFWLFlag |= FWL_KEYFLAG_MButton; |
| 366 if (dwFlag & FWL_EVENTFLAG_RightButtonDown) | 367 if (dwFlag & FWL_EVENTFLAG_RightButtonDown) |
| 367 dwFWLFlag |= FWL_KEYFLAG_RButton; | 368 dwFWLFlag |= FWL_KEYFLAG_RButton; |
| 368 if (dwFlag & FWL_EVENTFLAG_ShiftKey) | 369 if (dwFlag & FWL_EVENTFLAG_ShiftKey) |
| 369 dwFWLFlag |= FWL_KEYFLAG_Shift; | 370 dwFWLFlag |= FWL_KEYFLAG_Shift; |
| 370 if (dwFlag & FWL_EVENTFLAG_AltKey) | 371 if (dwFlag & FWL_EVENTFLAG_AltKey) |
| 371 dwFWLFlag |= FWL_KEYFLAG_Alt; | 372 dwFWLFlag |= FWL_KEYFLAG_Alt; |
| 372 | 373 |
| 373 return dwFWLFlag; | 374 return dwFWLFlag; |
| 374 } | 375 } |
| OLD | NEW |