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 _FPDF_DOC_H_ | 7 #ifndef _FPDF_DOC_H_ |
8 #define _FPDF_DOC_H_ | 8 #define _FPDF_DOC_H_ |
9 #ifndef _FPDF_PARSER_ | 9 #ifndef _FPDF_PARSER_ |
10 #include "../fpdfapi/fpdf_parser.h" | 10 #include "../fpdfapi/fpdf_parser.h" |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 #define PDFZOOM_FITPAGE 2 | 117 #define PDFZOOM_FITPAGE 2 |
118 #define PDFZOOM_FITHORZ 3 | 118 #define PDFZOOM_FITHORZ 3 |
119 #define PDFZOOM_FITVERT 4 | 119 #define PDFZOOM_FITVERT 4 |
120 #define PDFZOOM_FITRECT 5 | 120 #define PDFZOOM_FITRECT 5 |
121 #define PDFZOOM_FITBBOX 6 | 121 #define PDFZOOM_FITBBOX 6 |
122 #define PDFZOOM_FITBHORZ 7 | 122 #define PDFZOOM_FITBHORZ 7 |
123 #define PDFZOOM_FITBVERT 8 | 123 #define PDFZOOM_FITBVERT 8 |
124 class CPDF_Dest : public CFX_Object | 124 class CPDF_Dest : public CFX_Object |
125 { | 125 { |
126 public: | 126 public: |
| 127 CPDF_Dest() : m_pObj(nullptr) { } |
| 128 explicit CPDF_Dest(CPDF_Object* pObj) : m_pObj(pObj) { } |
127 | 129 |
128 CPDF_Dest(CPDF_Object* pObj = NULL) | 130 operator bool () const { return m_pObj != NULL; } |
129 { | 131 CPDF_Object* GetObject() const { return m_pObj; } |
130 m_pObj = pObj; | |
131 } | |
132 | |
133 operator CPDF_Object* () const | |
134 { | |
135 return m_pObj; | |
136 } | |
137 | 132 |
138 CFX_ByteString GetRemoteName(); | 133 CFX_ByteString GetRemoteName(); |
139 | |
140 int GetPageIndex(CPDF_Document* pDoc); | 134 int GetPageIndex(CPDF_Document* pDoc); |
141 | |
142 FX_DWORD GetPageObjNum(); | 135 FX_DWORD GetPageObjNum(); |
143 | |
144 int GetZoomMode(); | 136 int GetZoomMode(); |
145 | |
146 FX_FLOAT GetParam(int index); | 137 FX_FLOAT GetParam(int index); |
147 | 138 |
148 | 139 protected: |
149 CPDF_Object* m_pObj; | 140 CPDF_Object* m_pObj; |
150 }; | 141 }; |
151 class CPDF_OCContext : public CFX_Object, public IPDF_OCContext | 142 class CPDF_OCContext : public CFX_Object, public IPDF_OCContext |
152 { | 143 { |
153 public: | 144 public: |
154 | 145 |
155 enum UsageType { | 146 enum UsageType { |
156 View = 0, | 147 View = 0, |
157 Design, | 148 Design, |
158 Print, | 149 Print, |
(...skipping 1605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1764 FX_FLOAT GetOriginalColor(int index, FX_BSTR csEn
try); | 1755 FX_FLOAT GetOriginalColor(int index, FX_BSTR csEn
try); |
1765 | 1756 |
1766 void GetOriginalColor(int& iColorType
, FX_FLOAT fc[4], FX_BSTR csEntry); | 1757 void GetOriginalColor(int& iColorType
, FX_FLOAT fc[4], FX_BSTR csEntry); |
1767 | 1758 |
1768 CFX_WideString GetCaption(FX_BSTR csEntry); | 1759 CFX_WideString GetCaption(FX_BSTR csEntry); |
1769 | 1760 |
1770 CPDF_Stream* GetIcon(FX_BSTR csEntry); | 1761 CPDF_Stream* GetIcon(FX_BSTR csEntry); |
1771 friend class CPDF_FormControl; | 1762 friend class CPDF_FormControl; |
1772 }; | 1763 }; |
1773 #endif | 1764 #endif |
OLD | NEW |