Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
cpdf_dest.h
Go to the documentation of this file.
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_DEST_H_
8#define CORE_FPDFDOC_CPDF_DEST_H_
9
10#include <vector>
11
12#include "core/fpdfapi/parser/cpdf_array.h"
13#include "core/fxcrt/retain_ptr.h"
14
15class CPDF_Document;
16class CPDF_Object;
17
18class CPDF_Dest {
19 public:
20 explicit CPDF_Dest(RetainPtr<const CPDF_Array> pArray);
21 CPDF_Dest(const CPDF_Dest& that);
23
24 // Use when |pDest| is an object of an unknown type. Can pass in nullptr.
25 static CPDF_Dest Create(CPDF_Document* pDoc,
26 RetainPtr<const CPDF_Object> pDest);
27
28 const CPDF_Array* GetArray() const { return m_pArray.Get(); }
29
30 int GetDestPageIndex(CPDF_Document* pDoc) const;
31 std::vector<float> GetScrollPositionArray() const;
32
33 // Returns the zoom mode, as one of the PDFDEST_VIEW_* values in fpdf_doc.h.
34 int GetZoomMode() const;
35
36 size_t GetNumParams() const;
37 float GetParam(size_t index) const;
38 bool GetXYZ(bool* pHasX,
39 bool* pHasY,
40 bool* pHasZoom,
41 float* pX,
42 float* pY,
43 float* pZoom) const;
44
45 private:
46 RetainPtr<const CPDF_Array> const m_pArray;
47};
48
49#endif // CORE_FPDFDOC_CPDF_DEST_H_
bool ActionExist(AActionType eType) const
bool HasDict() const
CPDF_AAction(const CPDF_AAction &that)
CPDF_AAction(RetainPtr< const CPDF_Dictionary > pDict)
CPDF_Action GetAction(AActionType eType) const
static bool IsUserInput(AActionType type)
CPDF_Action(RetainPtr< const CPDF_Dictionary > pDict)
size_t GetSubActionsCount() const
CPDF_Dest GetDest(CPDF_Document *pDoc) const
CPDF_Action GetSubAction(size_t iIndex) const
CPDF_Action(const CPDF_Action &that)
WideString GetFilePath() const
bool HasDict() const
Definition cpdf_action.h:50
std::vector< RetainPtr< const CPDF_Object > > GetAllFields() const
Type GetType() const
ByteString GetURI(const CPDF_Document *pDoc) const
uint32_t GetFlags() const
bool GetHideStatus() const
const CPDF_Dictionary * GetDict() const
Definition cpdf_action.h:51
WideString GetJavaScript() const
absl::optional< WideString > MaybeGetJavaScript() const
ByteString GetNamedAction() const
bool HasFields() const
bool GetXYZ(bool *pHasX, bool *pHasY, bool *pHasZoom, float *pX, float *pY, float *pZoom) const
Definition cpdf_dest.cpp:98
size_t GetNumParams() const
static CPDF_Dest Create(CPDF_Document *pDoc, RetainPtr< const CPDF_Object > pDest)
Definition cpdf_dest.cpp:42
CPDF_Dest(const CPDF_Dest &that)
int GetDestPageIndex(CPDF_Document *pDoc) const
Definition cpdf_dest.cpp:53
float GetParam(size_t index) const
int GetZoomMode() const
Definition cpdf_dest.cpp:81
std::vector< float > GetScrollPositionArray() const
Definition cpdf_dest.cpp:70
CPDF_Dest(RetainPtr< const CPDF_Array > pArray)
Definition cpdf_dest.cpp:34
const CPDF_Array * GetArray() const
Definition cpdf_dest.h:28