OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 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/formfiller/cffl_formfiller.h" | 7 #include "fpdfsdk/formfiller/cffl_formfiller.h" |
8 | 8 |
9 #include "core/fpdfapi/fpdf_page/include/cpdf_page.h" | 9 #include "core/fpdfapi/fpdf_page/include/cpdf_page.h" |
10 #include "core/fxge/include/cfx_renderdevice.h" | 10 #include "core/fxge/include/cfx_renderdevice.h" |
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
558 | 558 |
559 void CFFL_FormFiller::SaveData(CPDFSDK_PageView* pPageView) {} | 559 void CFFL_FormFiller::SaveData(CPDFSDK_PageView* pPageView) {} |
560 | 560 |
561 #ifdef PDF_ENABLE_XFA | 561 #ifdef PDF_ENABLE_XFA |
562 FX_BOOL CFFL_FormFiller::IsFieldFull(CPDFSDK_PageView* pPageView) { | 562 FX_BOOL CFFL_FormFiller::IsFieldFull(CPDFSDK_PageView* pPageView) { |
563 return FALSE; | 563 return FALSE; |
564 } | 564 } |
565 #endif // PDF_ENABLE_XFA | 565 #endif // PDF_ENABLE_XFA |
566 | 566 |
567 void CFFL_FormFiller::SetChangeMark() { | 567 void CFFL_FormFiller::SetChangeMark() { |
568 m_pApp->FFI_OnChange(); | 568 m_pApp->OnChange(); |
569 } | 569 } |
570 | 570 |
571 void CFFL_FormFiller::GetActionData(CPDFSDK_PageView* pPageView, | 571 void CFFL_FormFiller::GetActionData(CPDFSDK_PageView* pPageView, |
572 CPDF_AAction::AActionType type, | 572 CPDF_AAction::AActionType type, |
573 PDFSDK_FieldAction& fa) { | 573 PDFSDK_FieldAction& fa) { |
574 fa.sValue = m_pWidget->GetValue(); | 574 fa.sValue = m_pWidget->GetValue(); |
575 } | 575 } |
576 | 576 |
577 void CFFL_FormFiller::SetActionData(CPDFSDK_PageView* pPageView, | 577 void CFFL_FormFiller::SetActionData(CPDFSDK_PageView* pPageView, |
578 CPDF_AAction::AActionType type, | 578 CPDF_AAction::AActionType type, |
(...skipping 29 matching lines...) Expand all Loading... |
608 | 608 |
609 if (bDestroyPDFWindow) | 609 if (bDestroyPDFWindow) |
610 DestroyPDFWindow(pPageView); | 610 DestroyPDFWindow(pPageView); |
611 } | 611 } |
612 | 612 |
613 void CFFL_FormFiller::InvalidateRect(double left, | 613 void CFFL_FormFiller::InvalidateRect(double left, |
614 double top, | 614 double top, |
615 double right, | 615 double right, |
616 double bottom) { | 616 double bottom) { |
617 UnderlyingPageType* pPage = m_pWidget->GetUnderlyingPage(); | 617 UnderlyingPageType* pPage = m_pWidget->GetUnderlyingPage(); |
618 m_pApp->FFI_Invalidate(pPage, left, top, right, bottom); | 618 m_pApp->Invalidate(pPage, left, top, right, bottom); |
619 } | 619 } |
620 | 620 |
621 CFFL_Button::CFFL_Button(CPDFSDK_Environment* pApp, CPDFSDK_Annot* pWidget) | 621 CFFL_Button::CFFL_Button(CPDFSDK_Environment* pApp, CPDFSDK_Annot* pWidget) |
622 : CFFL_FormFiller(pApp, pWidget), m_bMouseIn(FALSE), m_bMouseDown(FALSE) {} | 622 : CFFL_FormFiller(pApp, pWidget), m_bMouseIn(FALSE), m_bMouseDown(FALSE) {} |
623 | 623 |
624 CFFL_Button::~CFFL_Button() {} | 624 CFFL_Button::~CFFL_Button() {} |
625 | 625 |
626 void CFFL_Button::OnMouseEnter(CPDFSDK_PageView* pPageView, | 626 void CFFL_Button::OnMouseEnter(CPDFSDK_PageView* pPageView, |
627 CPDFSDK_Annot* pAnnot) { | 627 CPDFSDK_Annot* pAnnot) { |
628 m_bMouseIn = TRUE; | 628 m_bMouseIn = TRUE; |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
711 pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, nullptr); | 711 pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, nullptr); |
712 } | 712 } |
713 } | 713 } |
714 | 714 |
715 void CFFL_Button::OnDrawDeactive(CPDFSDK_PageView* pPageView, | 715 void CFFL_Button::OnDrawDeactive(CPDFSDK_PageView* pPageView, |
716 CPDFSDK_Annot* pAnnot, | 716 CPDFSDK_Annot* pAnnot, |
717 CFX_RenderDevice* pDevice, | 717 CFX_RenderDevice* pDevice, |
718 CFX_Matrix* pUser2Device) { | 718 CFX_Matrix* pUser2Device) { |
719 OnDraw(pPageView, pAnnot, pDevice, pUser2Device); | 719 OnDraw(pPageView, pAnnot, pDevice, pUser2Device); |
720 } | 720 } |
OLD | NEW |