Chromium Code Reviews| 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_MGR_H | 7 #ifndef _FPDFSDK_MGR_H |
| 8 #define _FPDFSDK_MGR_H | 8 #define _FPDFSDK_MGR_H |
| 9 | 9 |
| 10 #include "fsdk_common.h" | 10 #include "fsdk_common.h" |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 453 //CFX_ArrayTemplate<CPDFSDK_PageView*> m_pageArray; | 453 //CFX_ArrayTemplate<CPDFSDK_PageView*> m_pageArray; |
| 454 CFX_MapPtrTemplate<CPDF_Page*, CPDFSDK_PageView*> m_pageMap; | 454 CFX_MapPtrTemplate<CPDF_Page*, CPDFSDK_PageView*> m_pageMap; |
| 455 CPDF_Document* m_pDoc; | 455 CPDF_Document* m_pDoc; |
| 456 | 456 |
| 457 CPDFSDK_InterForm* m_pInterForm; | 457 CPDFSDK_InterForm* m_pInterForm; |
| 458 CPDFSDK_Annot* m_pFocusAnnot; | 458 CPDFSDK_Annot* m_pFocusAnnot; |
| 459 CPDFDoc_Environment * m_pEnv; | 459 CPDFDoc_Environment * m_pEnv; |
| 460 CPDF_OCContext * m_pOccontent; | 460 CPDF_OCContext * m_pOccontent; |
| 461 FX_BOOL m_bChangeMask; | 461 FX_BOOL m_bChangeMask; |
| 462 }; | 462 }; |
| 463 | 463 #define PAGEVIEW_FLAG_VALID 0x01 |
| 464 #define PAGEVIEW_FLAG_LOCK 0x02 | |
| 465 #define PAGEVIEW_FLAG_TAKEOVERPAGE 0x04 | |
| 464 class CPDFSDK_PageView FX_FINAL | 466 class CPDFSDK_PageView FX_FINAL |
| 465 { | 467 { |
| 466 public: | 468 public: |
| 467 CPDFSDK_PageView(CPDFSDK_Document* pSDKDoc,CPDF_Page* page); | 469 CPDFSDK_PageView(CPDFSDK_Document* pSDKDoc,CPDF_Page* page); |
| 468 ~CPDFSDK_PageView(); | 470 ~CPDFSDK_PageView(); |
| 469 public: | 471 public: |
| 470 void PageView_OnDraw(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Devic e,CPDF_RenderOptions* pOptions) ; | 472 void PageView_OnDraw(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Devic e,CPDF_RenderOptions* pOptions) ; |
| 471 public: | 473 public: |
| 472 CPDF_Annot* GetPDFAnnotAtPoi nt(FX_FLOAT pageX, FX_FLOAT pageY); | 474 CPDF_Annot* GetPDFAnnotAtPoi nt(FX_FLOAT pageX, FX_FLOAT pageY); |
| 473 CPDFSDK_Annot* GetFXAnnotAtPoint(FX_FLO AT pageX, FX_FLOAT pageY); | 475 CPDFSDK_Annot* GetFXAnnotAtPoint(FX_FLO AT pageX, FX_FLOAT pageY); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 521 //CPDFSDK_Annot* m_pFocusAnnot; | 523 //CPDFSDK_Annot* m_pFocusAnnot; |
| 522 CFX_PtrArray m_fxAnnotArray; | 524 CFX_PtrArray m_fxAnnotArray; |
| 523 | 525 |
| 524 CPDFSDK_Document* m_pSDKDoc; | 526 CPDFSDK_Document* m_pSDKDoc; |
| 525 private: | 527 private: |
| 526 CPDFSDK_Widget* m_CaptureWidget; | 528 CPDFSDK_Widget* m_CaptureWidget; |
| 527 FX_BOOL m_bEnterWidget; | 529 FX_BOOL m_bEnterWidget; |
| 528 FX_BOOL m_bExitWidget; | 530 FX_BOOL m_bExitWidget; |
| 529 FX_BOOL m_bOnWidget; | 531 FX_BOOL m_bOnWidget; |
| 530 public: | 532 public: |
| 531 » void SetValid(FX_BOOL bValid) {m_bValid = bValid;} | 533 void SetValid(FX_BOOL bValid) {m_Flag |= PAGEVIEW_FLAG_VALID;} |
|
Tom Sepez
2014/09/23 23:38:54
nit: we should probably clean up the redundant pub
Bo Xu
2014/09/24 01:01:13
Done.
| |
| 532 » FX_BOOL IsValid() {return m_bValid;} | 534 FX_BOOL IsValid() {return m_Flag & PAGEVIEW_FLAG_VALID;} |
| 535 void TakeOverPage() {m_Flag |= PAGEVIEW_FLAG_TAKEOVERPAGE;} | |
| 536 FX_BOOL IsLocked() {return m_Flag & PAGEVIEW_FLAG_LOCK;} | |
| 537 void SetLock() {m_Flag |= PAGEVIEW_FLAG_LOCK;} | |
| 538 void ClearLock() {m_Flag &= ~PAGEVIEW_FLAG_LOCK;} | |
| 533 private: | 539 private: |
| 534 » FX_BOOL m_bValid; | 540 » FX_BOOL m_Flag; |
|
Tom Sepez
2014/09/23 23:38:54
How many of these objects are we going to have all
Bo Xu
2014/09/24 01:01:13
Done.
| |
| 535 }; | 541 }; |
| 536 | 542 |
| 537 | 543 |
| 538 template<class TYPE> | 544 template<class TYPE> |
| 539 class CGW_ArrayTemplate : public CFX_ArrayTemplate<TYPE> | 545 class CGW_ArrayTemplate : public CFX_ArrayTemplate<TYPE> |
| 540 { | 546 { |
| 541 public: | 547 public: |
| 542 CGW_ArrayTemplate(){} | 548 CGW_ArrayTemplate(){} |
| 543 virtual ~CGW_ArrayTemplate(){} | 549 virtual ~CGW_ArrayTemplate(){} |
| 544 | 550 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 611 } | 617 } |
| 612 | 618 |
| 613 if (nStartPos < m) QuickSort(nStartPos, m, bAscend, pCompare); | 619 if (nStartPos < m) QuickSort(nStartPos, m, bAscend, pCompare); |
| 614 if (nStopPos > m) QuickSort(m, nStopPos, bAscend, pCompare); | 620 if (nStopPos > m) QuickSort(m, nStopPos, bAscend, pCompare); |
| 615 } | 621 } |
| 616 }; | 622 }; |
| 617 | 623 |
| 618 | 624 |
| 619 #endif //_FPDFSDK_MGR_H | 625 #endif //_FPDFSDK_MGR_H |
| 620 | 626 |
| OLD | NEW |