| 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 #ifndef FPDFSDK_INCLUDE_FSDK_MGR_H_ | 7 #ifndef FPDFSDK_INCLUDE_FSDK_MGR_H_ |
| 8 #define FPDFSDK_INCLUDE_FSDK_MGR_H_ | 8 #define FPDFSDK_INCLUDE_FSDK_MGR_H_ |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 531 FX_BOOL m_bBeingDestroyed; | 531 FX_BOOL m_bBeingDestroyed; |
| 532 }; | 532 }; |
| 533 class CPDFSDK_PageView final { | 533 class CPDFSDK_PageView final { |
| 534 public: | 534 public: |
| 535 CPDFSDK_PageView(CPDFSDK_Document* pSDKDoc, CPDFXFA_Page* page); | 535 CPDFSDK_PageView(CPDFSDK_Document* pSDKDoc, CPDFXFA_Page* page); |
| 536 ~CPDFSDK_PageView(); | 536 ~CPDFSDK_PageView(); |
| 537 void PageView_OnDraw(CFX_RenderDevice* pDevice, | 537 void PageView_OnDraw(CFX_RenderDevice* pDevice, |
| 538 CPDF_Matrix* pUser2Device, | 538 CPDF_Matrix* pUser2Device, |
| 539 CPDF_RenderOptions* pOptions, | 539 CPDF_RenderOptions* pOptions, |
| 540 FX_RECT* pClip = NULL); | 540 FX_RECT* pClip = NULL); |
| 541 CPDF_Annot* GetPDFAnnotAtPoint(FX_FLOAT pageX, FX_FLOAT pageY); | 541 const CPDF_Annot* GetPDFAnnotAtPoint(FX_FLOAT pageX, FX_FLOAT pageY); |
| 542 CPDFSDK_Annot* GetFXAnnotAtPoint(FX_FLOAT pageX, FX_FLOAT pageY); | 542 CPDFSDK_Annot* GetFXAnnotAtPoint(FX_FLOAT pageX, FX_FLOAT pageY); |
| 543 CPDF_Annot* GetPDFWidgetAtPoint(FX_FLOAT pageX, FX_FLOAT pageY); | 543 const CPDF_Annot* GetPDFWidgetAtPoint(FX_FLOAT pageX, FX_FLOAT pageY); |
| 544 CPDFSDK_Annot* GetFXWidgetAtPoint(FX_FLOAT pageX, FX_FLOAT pageY); | 544 CPDFSDK_Annot* GetFXWidgetAtPoint(FX_FLOAT pageX, FX_FLOAT pageY); |
| 545 CPDFSDK_Annot* GetFocusAnnot(); | 545 CPDFSDK_Annot* GetFocusAnnot(); |
| 546 void SetFocusAnnot(CPDFSDK_Annot* pSDKAnnot, FX_UINT nFlag = 0) { | 546 void SetFocusAnnot(CPDFSDK_Annot* pSDKAnnot, FX_UINT nFlag = 0) { |
| 547 m_pSDKDoc->SetFocusAnnot(pSDKAnnot, nFlag); | 547 m_pSDKDoc->SetFocusAnnot(pSDKAnnot, nFlag); |
| 548 } | 548 } |
| 549 FX_BOOL KillFocusAnnot(FX_UINT nFlag = 0) { | 549 FX_BOOL KillFocusAnnot(FX_UINT nFlag = 0) { |
| 550 return m_pSDKDoc->KillFocusAnnot(nFlag); | 550 return m_pSDKDoc->KillFocusAnnot(nFlag); |
| 551 } | 551 } |
| 552 void KillFocusAnnotIfNeeded(); | 552 void KillFocusAnnotIfNeeded(); |
| 553 FX_BOOL Annot_HasAppearance(CPDF_Annot* pAnnot); | 553 FX_BOOL Annot_HasAppearance(CPDF_Annot* pAnnot); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 571 FX_BOOL OnRButtonUp(const CPDF_Point& point, FX_UINT nFlag); | 571 FX_BOOL OnRButtonUp(const CPDF_Point& point, FX_UINT nFlag); |
| 572 FX_BOOL OnChar(int nChar, FX_UINT nFlag); | 572 FX_BOOL OnChar(int nChar, FX_UINT nFlag); |
| 573 FX_BOOL OnKeyDown(int nKeyCode, int nFlag); | 573 FX_BOOL OnKeyDown(int nKeyCode, int nFlag); |
| 574 FX_BOOL OnKeyUp(int nKeyCode, int nFlag); | 574 FX_BOOL OnKeyUp(int nKeyCode, int nFlag); |
| 575 | 575 |
| 576 FX_BOOL OnMouseMove(const CPDF_Point& point, int nFlag); | 576 FX_BOOL OnMouseMove(const CPDF_Point& point, int nFlag); |
| 577 FX_BOOL OnMouseWheel(double deltaX, | 577 FX_BOOL OnMouseWheel(double deltaX, |
| 578 double deltaY, | 578 double deltaY, |
| 579 const CPDF_Point& point, | 579 const CPDF_Point& point, |
| 580 int nFlag); | 580 int nFlag); |
| 581 FX_BOOL IsValidAnnot(CPDF_Annot* p) const; | 581 bool IsValidAnnot(const CPDF_Annot* p) const; |
| 582 void GetCurrentMatrix(CPDF_Matrix& matrix) { matrix = m_curMatrix; } | 582 void GetCurrentMatrix(CPDF_Matrix& matrix) { matrix = m_curMatrix; } |
| 583 void UpdateRects(CFX_RectArray& rects); | 583 void UpdateRects(CFX_RectArray& rects); |
| 584 void UpdateView(CPDFSDK_Annot* pAnnot); | 584 void UpdateView(CPDFSDK_Annot* pAnnot); |
| 585 const std::vector<CPDFSDK_Annot*>& GetAnnotList() const { | 585 const std::vector<CPDFSDK_Annot*>& GetAnnotList() const { |
| 586 return m_fxAnnotArray; | 586 return m_fxAnnotArray; |
| 587 } | 587 } |
| 588 | 588 |
| 589 int GetPageIndex(); | 589 int GetPageIndex(); |
| 590 void LoadFXAnnots(); | 590 void LoadFXAnnots(); |
| 591 void SetValid(FX_BOOL bValid) { m_bValid = bValid; } | 591 void SetValid(FX_BOOL bValid) { m_bValid = bValid; } |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 677 } | 677 } |
| 678 | 678 |
| 679 if (nStartPos < m) | 679 if (nStartPos < m) |
| 680 QuickSort(nStartPos, m, bAscend, pCompare); | 680 QuickSort(nStartPos, m, bAscend, pCompare); |
| 681 if (nStopPos > m) | 681 if (nStopPos > m) |
| 682 QuickSort(m, nStopPos, bAscend, pCompare); | 682 QuickSort(m, nStopPos, bAscend, pCompare); |
| 683 } | 683 } |
| 684 }; | 684 }; |
| 685 | 685 |
| 686 #endif // FPDFSDK_INCLUDE_FSDK_MGR_H_ | 686 #endif // FPDFSDK_INCLUDE_FSDK_MGR_H_ |
| OLD | NEW |