• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2016 PDFium Authors. All rights reserved.
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_DEST_H_
8 #define CORE_FPDFDOC_CPDF_DEST_H_
9 
10 #include "core/fxcrt/fx_string.h"
11 #include "core/fxcrt/fx_system.h"
12 #include "core/fxcrt/retain_ptr.h"
13 
14 class CPDF_Document;
15 class CPDF_Array;
16 
17 class CPDF_Dest {
18  public:
19   CPDF_Dest();
20   explicit CPDF_Dest(const CPDF_Array* pArray);
21   CPDF_Dest(const CPDF_Dest& that);
22   ~CPDF_Dest();
23 
GetArray()24   const CPDF_Array* GetArray() const { return m_pArray.Get(); }
25   int GetDestPageIndex(CPDF_Document* pDoc) const;
26 
27   // Returns the zoom mode, as one of the PDFDEST_VIEW_* values in fpdf_doc.h.
28   int GetZoomMode() const;
29 
30   unsigned long GetNumParams() const;
31   float GetParam(int index) const;
32 
33   bool GetXYZ(bool* pHasX,
34               bool* pHasY,
35               bool* pHasZoom,
36               float* pX,
37               float* pY,
38               float* pZoom) const;
39 
40  private:
41   RetainPtr<const CPDF_Array> const m_pArray;
42 };
43 
44 #endif  // CORE_FPDFDOC_CPDF_DEST_H_
45