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 CORE_INCLUDE_FPDFDOC_FPDF_DOC_H_ | 7 #ifndef CORE_INCLUDE_FPDFDOC_FPDF_DOC_H_ |
8 #define CORE_INCLUDE_FPDFDOC_FPDF_DOC_H_ | 8 #define CORE_INCLUDE_FPDFDOC_FPDF_DOC_H_ |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 GoTo3DView | 211 GoTo3DView |
212 }; | 212 }; |
213 | 213 |
214 CPDF_Action() : m_pDict(nullptr) {} | 214 CPDF_Action() : m_pDict(nullptr) {} |
215 explicit CPDF_Action(CPDF_Dictionary* pDict) : m_pDict(pDict) {} | 215 explicit CPDF_Action(CPDF_Dictionary* pDict) : m_pDict(pDict) {} |
216 | 216 |
217 operator bool() const { return m_pDict != NULL; } | 217 operator bool() const { return m_pDict != NULL; } |
218 | 218 |
219 CPDF_Dictionary* GetDict() const { return m_pDict; } | 219 CPDF_Dictionary* GetDict() const { return m_pDict; } |
220 | 220 |
221 CFX_ByteString GetTypeName() const { return m_pDict->GetString("S"); } | 221 CFX_ByteString GetTypeName() const { return m_pDict->GetStringBy("S"); } |
222 | 222 |
223 ActionType GetType() const; | 223 ActionType GetType() const; |
224 | 224 |
225 CPDF_Dest GetDest(CPDF_Document* pDoc) const; | 225 CPDF_Dest GetDest(CPDF_Document* pDoc) const; |
226 | 226 |
227 CFX_WideString GetFilePath() const; | 227 CFX_WideString GetFilePath() const; |
228 | 228 |
229 FX_BOOL GetNewWindow() const { return m_pDict->GetBoolean("NewWindow"); } | 229 FX_BOOL GetNewWindow() const { return m_pDict->GetBooleanBy("NewWindow"); } |
230 | 230 |
231 CFX_ByteString GetURI(CPDF_Document* pDoc) const; | 231 CFX_ByteString GetURI(CPDF_Document* pDoc) const; |
232 | 232 |
233 FX_BOOL GetMouseMap() const { return m_pDict->GetBoolean("IsMap"); } | 233 FX_BOOL GetMouseMap() const { return m_pDict->GetBooleanBy("IsMap"); } |
234 | 234 |
235 CPDF_ActionFields GetWidgets() const { return this; } | 235 CPDF_ActionFields GetWidgets() const { return this; } |
236 | 236 |
237 FX_BOOL GetHideStatus() const { return m_pDict->GetBoolean("H", TRUE); } | 237 FX_BOOL GetHideStatus() const { return m_pDict->GetBooleanBy("H", TRUE); } |
238 | 238 |
239 CFX_ByteString GetNamedAction() const { return m_pDict->GetString("N"); } | 239 CFX_ByteString GetNamedAction() const { return m_pDict->GetStringBy("N"); } |
240 | 240 |
241 FX_DWORD GetFlags() const { return m_pDict->GetInteger("Flags"); } | 241 FX_DWORD GetFlags() const { return m_pDict->GetIntegerBy("Flags"); } |
242 | 242 |
243 CFX_WideString GetJavaScript() const; | 243 CFX_WideString GetJavaScript() const; |
244 | 244 |
245 CPDF_Dictionary* GetAnnot() const; | 245 CPDF_Dictionary* GetAnnot() const; |
246 | 246 |
247 int32_t GetOperationType() const; | 247 int32_t GetOperationType() const; |
248 | 248 |
249 CPDF_Stream* GetSoundStream() const { return m_pDict->GetStream("Sound"); } | 249 CPDF_Stream* GetSoundStream() const { return m_pDict->GetStreamBy("Sound"); } |
250 | 250 |
251 FX_FLOAT GetVolume() const { return m_pDict->GetNumber("Volume"); } | 251 FX_FLOAT GetVolume() const { return m_pDict->GetNumberBy("Volume"); } |
252 | 252 |
253 FX_BOOL IsSynchronous() const { return m_pDict->GetBoolean("Synchronous"); } | 253 FX_BOOL IsSynchronous() const { return m_pDict->GetBooleanBy("Synchronous"); } |
254 | 254 |
255 FX_BOOL IsRepeat() const { return m_pDict->GetBoolean("Repeat"); } | 255 FX_BOOL IsRepeat() const { return m_pDict->GetBooleanBy("Repeat"); } |
256 | 256 |
257 FX_BOOL IsMixPlay() const { return m_pDict->GetBoolean("Mix"); } | 257 FX_BOOL IsMixPlay() const { return m_pDict->GetBooleanBy("Mix"); } |
258 | 258 |
259 FX_DWORD GetSubActionsCount() const; | 259 FX_DWORD GetSubActionsCount() const; |
260 | 260 |
261 CPDF_Action GetSubAction(FX_DWORD iIndex) const; | 261 CPDF_Action GetSubAction(FX_DWORD iIndex) const; |
262 | 262 |
263 protected: | 263 protected: |
264 CPDF_Dictionary* m_pDict; | 264 CPDF_Dictionary* m_pDict; |
265 }; | 265 }; |
266 class CPDF_AAction { | 266 class CPDF_AAction { |
267 public: | 267 public: |
(...skipping 880 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1148 CFX_WideString GetCaption(const CFX_ByteStringC& csEntry) const; | 1148 CFX_WideString GetCaption(const CFX_ByteStringC& csEntry) const; |
1149 | 1149 |
1150 CPDF_Stream* GetIcon(const CFX_ByteStringC& csEntry) const; | 1150 CPDF_Stream* GetIcon(const CFX_ByteStringC& csEntry) const; |
1151 | 1151 |
1152 CPDF_Dictionary* const m_pDict; | 1152 CPDF_Dictionary* const m_pDict; |
1153 }; | 1153 }; |
1154 | 1154 |
1155 CFX_WideString FILESPEC_EncodeFileName(const CFX_WideStringC& filepath); | 1155 CFX_WideString FILESPEC_EncodeFileName(const CFX_WideStringC& filepath); |
1156 | 1156 |
1157 #endif // CORE_INCLUDE_FPDFDOC_FPDF_DOC_H_ | 1157 #endif // CORE_INCLUDE_FPDFDOC_FPDF_DOC_H_ |
OLD | NEW |