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_FPDFDOC_INCLUDE_FPDF_DOC_H_ | 7 #ifndef CORE_FPDFDOC_INCLUDE_FPDF_DOC_H_ |
8 #define CORE_FPDFDOC_INCLUDE_FPDF_DOC_H_ | 8 #define CORE_FPDFDOC_INCLUDE_FPDF_DOC_H_ |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 SetOCGState, | 181 SetOCGState, |
182 Rendition, | 182 Rendition, |
183 Trans, | 183 Trans, |
184 GoTo3DView | 184 GoTo3DView |
185 }; | 185 }; |
186 | 186 |
187 CPDF_Action() : m_pDict(nullptr) {} | 187 CPDF_Action() : m_pDict(nullptr) {} |
188 explicit CPDF_Action(CPDF_Dictionary* pDict) : m_pDict(pDict) {} | 188 explicit CPDF_Action(CPDF_Dictionary* pDict) : m_pDict(pDict) {} |
189 | 189 |
190 CPDF_Dictionary* GetDict() const { return m_pDict; } | 190 CPDF_Dictionary* GetDict() const { return m_pDict; } |
191 CFX_ByteString GetTypeName() const { return m_pDict->GetStringBy("S"); } | |
192 ActionType GetType() const; | 191 ActionType GetType() const; |
193 CPDF_Dest GetDest(CPDF_Document* pDoc) const; | 192 CPDF_Dest GetDest(CPDF_Document* pDoc) const; |
194 CFX_WideString GetFilePath() const; | 193 CFX_WideString GetFilePath() const; |
195 FX_BOOL GetNewWindow() const { return m_pDict->GetBooleanBy("NewWindow"); } | |
196 CFX_ByteString GetURI(CPDF_Document* pDoc) const; | 194 CFX_ByteString GetURI(CPDF_Document* pDoc) const; |
197 FX_BOOL GetMouseMap() const { return m_pDict->GetBooleanBy("IsMap"); } | 195 bool GetHideStatus() const { return m_pDict->GetBooleanBy("H", true); } |
198 FX_BOOL GetHideStatus() const { return m_pDict->GetBooleanBy("H", TRUE); } | |
199 CFX_ByteString GetNamedAction() const { return m_pDict->GetStringBy("N"); } | 196 CFX_ByteString GetNamedAction() const { return m_pDict->GetStringBy("N"); } |
200 uint32_t GetFlags() const { return m_pDict->GetIntegerBy("Flags"); } | 197 uint32_t GetFlags() const { return m_pDict->GetIntegerBy("Flags"); } |
201 CFX_WideString GetJavaScript() const; | 198 CFX_WideString GetJavaScript() const; |
202 CPDF_Dictionary* GetAnnot() const; | |
203 int32_t GetOperationType() const; | |
204 CPDF_Stream* GetSoundStream() const { return m_pDict->GetStreamBy("Sound"); } | |
205 FX_FLOAT GetVolume() const { return m_pDict->GetNumberBy("Volume"); } | |
206 FX_BOOL IsSynchronous() const { return m_pDict->GetBooleanBy("Synchronous"); } | |
207 FX_BOOL IsRepeat() const { return m_pDict->GetBooleanBy("Repeat"); } | |
208 FX_BOOL IsMixPlay() const { return m_pDict->GetBooleanBy("Mix"); } | |
209 size_t GetSubActionsCount() const; | 199 size_t GetSubActionsCount() const; |
210 CPDF_Action GetSubAction(size_t iIndex) const; | 200 CPDF_Action GetSubAction(size_t iIndex) const; |
211 | 201 |
212 protected: | 202 protected: |
213 CPDF_Dictionary* const m_pDict; | 203 CPDF_Dictionary* const m_pDict; |
214 }; | 204 }; |
215 | 205 |
216 class CPDF_AAction { | 206 class CPDF_AAction { |
217 public: | 207 public: |
218 enum AActionType { | 208 enum AActionType { |
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
787 int nLevel = 0); | 777 int nLevel = 0); |
788 class CPDF_IconFit { | 778 class CPDF_IconFit { |
789 public: | 779 public: |
790 enum ScaleMethod { Always = 0, Bigger, Smaller, Never }; | 780 enum ScaleMethod { Always = 0, Bigger, Smaller, Never }; |
791 | 781 |
792 explicit CPDF_IconFit(const CPDF_Dictionary* pDict) : m_pDict(pDict) {} | 782 explicit CPDF_IconFit(const CPDF_Dictionary* pDict) : m_pDict(pDict) {} |
793 | 783 |
794 ScaleMethod GetScaleMethod(); | 784 ScaleMethod GetScaleMethod(); |
795 FX_BOOL IsProportionalScale(); | 785 FX_BOOL IsProportionalScale(); |
796 void GetIconPosition(FX_FLOAT& fLeft, FX_FLOAT& fBottom); | 786 void GetIconPosition(FX_FLOAT& fLeft, FX_FLOAT& fBottom); |
797 FX_BOOL GetFittingBounds(); | 787 bool GetFittingBounds(); |
798 const CPDF_Dictionary* GetDict() const { return m_pDict; } | 788 const CPDF_Dictionary* GetDict() const { return m_pDict; } |
799 | 789 |
800 protected: | 790 protected: |
801 const CPDF_Dictionary* const m_pDict; | 791 const CPDF_Dictionary* const m_pDict; |
802 }; | 792 }; |
803 | 793 |
804 #define TEXTPOS_CAPTION 0 | 794 #define TEXTPOS_CAPTION 0 |
805 #define TEXTPOS_ICON 1 | 795 #define TEXTPOS_ICON 1 |
806 #define TEXTPOS_BELOW 2 | 796 #define TEXTPOS_BELOW 2 |
807 #define TEXTPOS_ABOVE 3 | 797 #define TEXTPOS_ABOVE 3 |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1011 CFX_WideString GetCaption(const CFX_ByteString& csEntry) const; | 1001 CFX_WideString GetCaption(const CFX_ByteString& csEntry) const; |
1012 CPDF_Stream* GetIcon(const CFX_ByteString& csEntry) const; | 1002 CPDF_Stream* GetIcon(const CFX_ByteString& csEntry) const; |
1013 | 1003 |
1014 CPDF_Dictionary* const m_pDict; | 1004 CPDF_Dictionary* const m_pDict; |
1015 }; | 1005 }; |
1016 | 1006 |
1017 CPDF_Stream* FPDFDOC_GetAnnotAP(CPDF_Dictionary* pAnnotDict, | 1007 CPDF_Stream* FPDFDOC_GetAnnotAP(CPDF_Dictionary* pAnnotDict, |
1018 CPDF_Annot::AppearanceMode mode); | 1008 CPDF_Annot::AppearanceMode mode); |
1019 | 1009 |
1020 #endif // CORE_FPDFDOC_INCLUDE_FPDF_DOC_H_ | 1010 #endif // CORE_FPDFDOC_INCLUDE_FPDF_DOC_H_ |
OLD | NEW |