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_FPDFXFA_FPDFXFA_PAGE_H_ | 7 #ifndef FPDFSDK_INCLUDE_FPDFXFA_FPDFXFA_PAGE_H_ |
8 #define FPDFSDK_INCLUDE_FPDFXFA_FPDFXFA_PAGE_H_ | 8 #define FPDFSDK_INCLUDE_FPDFXFA_FPDFXFA_PAGE_H_ |
9 | 9 |
10 #include "core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h" | 10 #include "core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h" |
11 #include "core/fpdfapi/include/cpdf_modulemgr.h" | 11 #include "core/fpdfapi/include/cpdf_modulemgr.h" |
12 #include "core/fxcrt/include/fx_coordinates.h" | 12 #include "core/fxcrt/include/fx_coordinates.h" |
13 #include "core/fxcrt/include/fx_system.h" | 13 #include "core/fxcrt/include/fx_system.h" |
14 | 14 |
15 class CPDFXFA_Document; | 15 class CPDFXFA_Document; |
16 class CPDF_Page; | 16 class CPDF_Page; |
17 class IXFA_PageView; | 17 class CXFA_FFPageView; |
18 | 18 |
19 class CPDFXFA_Page { | 19 class CPDFXFA_Page { |
20 public: | 20 public: |
21 CPDFXFA_Page(CPDFXFA_Document* pDoc, int page_index); | 21 CPDFXFA_Page(CPDFXFA_Document* pDoc, int page_index); |
22 ~CPDFXFA_Page(); | 22 ~CPDFXFA_Page(); |
23 | 23 |
24 void Release(); | 24 void Release(); |
25 void AddRef() { m_iRef++; } | 25 void AddRef() { m_iRef++; } |
26 FX_BOOL LoadPage(); | 26 FX_BOOL LoadPage(); |
27 FX_BOOL LoadPDFPage(CPDF_Dictionary* pageDict); | 27 FX_BOOL LoadPDFPage(CPDF_Dictionary* pageDict); |
28 CPDFXFA_Document* GetDocument() { return m_pDocument; } | 28 CPDFXFA_Document* GetDocument() { return m_pDocument; } |
29 int GetPageIndex() { return m_iPageIndex; } | 29 int GetPageIndex() { return m_iPageIndex; } |
30 CPDF_Page* GetPDFPage() { return m_pPDFPage; } | 30 CPDF_Page* GetPDFPage() { return m_pPDFPage; } |
31 IXFA_PageView* GetXFAPageView() { return m_pXFAPageView; } | 31 CXFA_FFPageView* GetXFAPageView() { return m_pXFAPageView; } |
32 void SetXFAPageView(IXFA_PageView* pPageView) { m_pXFAPageView = pPageView; } | 32 void SetXFAPageView(CXFA_FFPageView* pPageView) { |
| 33 m_pXFAPageView = pPageView; |
| 34 } |
33 | 35 |
34 FX_FLOAT GetPageWidth(); | 36 FX_FLOAT GetPageWidth(); |
35 FX_FLOAT GetPageHeight(); | 37 FX_FLOAT GetPageHeight(); |
36 | 38 |
37 void DeviceToPage(int start_x, | 39 void DeviceToPage(int start_x, |
38 int start_y, | 40 int start_y, |
39 int size_x, | 41 int size_x, |
40 int size_y, | 42 int size_y, |
41 int rotate, | 43 int rotate, |
42 int device_x, | 44 int device_x, |
(...skipping 16 matching lines...) Expand all Loading... |
59 int xSize, | 61 int xSize, |
60 int ySize, | 62 int ySize, |
61 int iRotate) const; | 63 int iRotate) const; |
62 | 64 |
63 protected: | 65 protected: |
64 FX_BOOL LoadPDFPage(); | 66 FX_BOOL LoadPDFPage(); |
65 FX_BOOL LoadXFAPageView(); | 67 FX_BOOL LoadXFAPageView(); |
66 | 68 |
67 private: | 69 private: |
68 CPDF_Page* m_pPDFPage; | 70 CPDF_Page* m_pPDFPage; |
69 IXFA_PageView* m_pXFAPageView; | 71 CXFA_FFPageView* m_pXFAPageView; |
70 int m_iPageIndex; | 72 int m_iPageIndex; |
71 CPDFXFA_Document* m_pDocument; | 73 CPDFXFA_Document* m_pDocument; |
72 int m_iRef; | 74 int m_iRef; |
73 }; | 75 }; |
74 | 76 |
75 #endif // FPDFSDK_INCLUDE_FPDFXFA_FPDFXFA_PAGE_H_ | 77 #endif // FPDFSDK_INCLUDE_FPDFXFA_FPDFXFA_PAGE_H_ |
OLD | NEW |