• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_LINKLIST_H_
8 #define CORE_FPDFDOC_CPDF_LINKLIST_H_
9 
10 #include <stdint.h>
11 
12 #include <map>
13 #include <vector>
14 
15 #include "core/fpdfapi/parser/cpdf_document.h"
16 #include "core/fpdfdoc/cpdf_link.h"
17 #include "core/fxcrt/retain_ptr.h"
18 
19 class CPDF_Page;
20 class CPDF_Dictionary;
21 
22 class CPDF_LinkList final : public CPDF_Document::LinkListIface {
23  public:
24   CPDF_LinkList();
25   ~CPDF_LinkList() override;
26 
27   CPDF_Link GetLinkAtPoint(CPDF_Page* pPage,
28                            const CFX_PointF& point,
29                            int* z_order);
30 
31  private:
32   const std::vector<RetainPtr<CPDF_Dictionary>>* GetPageLinks(CPDF_Page* pPage);
33 
34   std::map<uint32_t, std::vector<RetainPtr<CPDF_Dictionary>>> m_PageMap;
35 };
36 
37 #endif  // CORE_FPDFDOC_CPDF_LINKLIST_H_
38