Home | History | Annotate | Download | only in fpdfdoc
      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/unowned_ptr.h"
     13 
     14 class CPDF_Document;
     15 class CPDF_Object;
     16 
     17 class CPDF_Dest {
     18  public:
     19   CPDF_Dest();
     20   CPDF_Dest(const CPDF_Dest& that);
     21   explicit CPDF_Dest(CPDF_Object* pObj);
     22   ~CPDF_Dest();
     23 
     24   CPDF_Object* GetObject() const { return m_pObj.Get(); }
     25   ByteString GetRemoteName() const;
     26   int GetPageIndex(CPDF_Document* pDoc) const;
     27   uint32_t GetPageObjNum() const;
     28 
     29   // Returns the zoom mode, as one of the PDFDEST_VIEW_* values in fpdf_doc.h.
     30   int GetZoomMode() const;
     31 
     32   unsigned long GetNumParams() const;
     33   float GetParam(int index) const;
     34 
     35   bool GetXYZ(bool* pHasX,
     36               bool* pHasY,
     37               bool* pHasZoom,
     38               float* pX,
     39               float* pY,
     40               float* pZoom) const;
     41 
     42  private:
     43   UnownedPtr<CPDF_Object> m_pObj;
     44 };
     45 
     46 #endif  // CORE_FPDFDOC_CPDF_DEST_H_
     47