1 // Copyright 2016 The PDFium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 6 7 #ifndef CORE_FPDFDOC_CPDF_LINK_H_ 8 #define CORE_FPDFDOC_CPDF_LINK_H_ 9 10 #include "core/fpdfapi/parser/cpdf_dictionary.h" 11 #include "core/fpdfdoc/cpdf_action.h" 12 #include "core/fpdfdoc/cpdf_dest.h" 13 #include "core/fxcrt/fx_coordinates.h" 14 #include "core/fxcrt/retain_ptr.h" 15 16 class CPDF_Link { 17 public: 18 CPDF_Link(); 19 explicit CPDF_Link(RetainPtr<CPDF_Dictionary> pDict); 20 CPDF_Link(const CPDF_Link& that); 21 ~CPDF_Link(); 22 GetMutableDict()23 RetainPtr<CPDF_Dictionary> GetMutableDict() const { return m_pDict; } 24 CFX_FloatRect GetRect(); 25 CPDF_Dest GetDest(CPDF_Document* pDoc); 26 CPDF_Action GetAction(); 27 28 private: 29 RetainPtr<CPDF_Dictionary> m_pDict; 30 }; 31 32 #endif // CORE_FPDFDOC_CPDF_LINK_H_ 33