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 "../include/fsdk_define.h" | 7 #include "../include/fsdk_define.h" |
8 #include "../include/fpdfxfa/fpdfxfa_doc.h" | 8 #include "../include/fpdfxfa/fpdfxfa_doc.h" |
9 #include "../include/fsdk_mgr.h" | 9 #include "../include/fsdk_mgr.h" |
10 #include "../include/fsdk_baseannot.h" | 10 #include "../include/fsdk_baseannot.h" |
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
511 | 511 |
512 // CPDFSDK_BAAnnot | 512 // CPDFSDK_BAAnnot |
513 CPDFSDK_BAAnnot::CPDFSDK_BAAnnot(CPDF_Annot* pAnnot, | 513 CPDFSDK_BAAnnot::CPDFSDK_BAAnnot(CPDF_Annot* pAnnot, |
514 CPDFSDK_PageView* pPageView) | 514 CPDFSDK_PageView* pPageView) |
515 : CPDFSDK_Annot(pPageView), m_pAnnot(pAnnot) {} | 515 : CPDFSDK_Annot(pPageView), m_pAnnot(pAnnot) {} |
516 | 516 |
517 CPDFSDK_BAAnnot::~CPDFSDK_BAAnnot() { | 517 CPDFSDK_BAAnnot::~CPDFSDK_BAAnnot() { |
518 m_pAnnot = NULL; | 518 m_pAnnot = NULL; |
519 } | 519 } |
520 | 520 |
521 CPDF_Annot* CPDFSDK_BAAnnot::GetPDFAnnot() { | 521 CPDF_Annot* CPDFSDK_BAAnnot::GetPDFAnnot() const { |
522 return m_pAnnot; | 522 return m_pAnnot; |
523 } | 523 } |
524 | 524 |
525 FX_BOOL CPDFSDK_Annot::IsSelected() { | 525 FX_BOOL CPDFSDK_Annot::IsSelected() { |
526 return m_bSelected; | 526 return m_bSelected; |
527 } | 527 } |
528 | 528 |
529 void CPDFSDK_Annot::SetSelected(FX_BOOL bSelected) { | 529 void CPDFSDK_Annot::SetSelected(FX_BOOL bSelected) { |
530 m_bSelected = bSelected; | 530 m_bSelected = bSelected; |
531 } | 531 } |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
564 CFX_ByteString CPDFSDK_BAAnnot::GetType() const { | 564 CFX_ByteString CPDFSDK_BAAnnot::GetType() const { |
565 ASSERT(m_pAnnot != NULL); | 565 ASSERT(m_pAnnot != NULL); |
566 | 566 |
567 return m_pAnnot->GetSubType(); | 567 return m_pAnnot->GetSubType(); |
568 } | 568 } |
569 | 569 |
570 CFX_ByteString CPDFSDK_BAAnnot::GetSubType() const { | 570 CFX_ByteString CPDFSDK_BAAnnot::GetSubType() const { |
571 return ""; | 571 return ""; |
572 } | 572 } |
573 | 573 |
574 void CPDFSDK_BAAnnot::ResetAppearance() { | |
575 ASSERT(FALSE); | |
576 } | |
577 | |
578 void CPDFSDK_BAAnnot::DrawAppearance(CFX_RenderDevice* pDevice, | 574 void CPDFSDK_BAAnnot::DrawAppearance(CFX_RenderDevice* pDevice, |
579 const CPDF_Matrix* pUser2Device, | 575 const CPDF_Matrix* pUser2Device, |
580 CPDF_Annot::AppearanceMode mode, | 576 CPDF_Annot::AppearanceMode mode, |
581 const CPDF_RenderOptions* pOptions) { | 577 const CPDF_RenderOptions* pOptions) { |
582 ASSERT(m_pPageView != NULL); | 578 ASSERT(m_pPageView != NULL); |
583 ASSERT(m_pAnnot != NULL); | 579 ASSERT(m_pAnnot != NULL); |
584 | 580 |
585 m_pAnnot->DrawAppearance(m_pPageView->GetPDFPage(), pDevice, pUser2Device, | 581 m_pAnnot->DrawAppearance(m_pPageView->GetPDFPage(), pDevice, pUser2Device, |
586 mode, pOptions); | 582 mode, pOptions); |
587 } | 583 } |
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1005 if (m_pPageView) | 1001 if (m_pPageView) |
1006 return m_pPageView->GetPDFPage(); | 1002 return m_pPageView->GetPDFPage(); |
1007 return NULL; | 1003 return NULL; |
1008 } | 1004 } |
1009 | 1005 |
1010 CPDFXFA_Page* CPDFSDK_Annot::GetPDFXFAPage() { | 1006 CPDFXFA_Page* CPDFSDK_Annot::GetPDFXFAPage() { |
1011 if (m_pPageView) | 1007 if (m_pPageView) |
1012 return m_pPageView->GetPDFXFAPage(); | 1008 return m_pPageView->GetPDFXFAPage(); |
1013 return NULL; | 1009 return NULL; |
1014 } | 1010 } |
OLD | NEW |