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_action.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_ACTION_H_
8#define CORE_FPDFDOC_CPDF_ACTION_H_
9
10#include <vector>
11
12#include "core/fpdfdoc/cpdf_dest.h"
13#include "core/fxcrt/fx_string.h"
14#include "core/fxcrt/retain_ptr.h"
15#include "third_party/abseil-cpp/absl/types/optional.h"
16
17class CPDF_Dictionary;
18class CPDF_Document;
19class CPDF_Object;
20
22 public:
23 enum class Type {
24 kUnknown = 0,
25 kGoTo,
26 kGoToR,
27 kGoToE,
28 kLaunch,
29 kThread,
30 kURI,
31 kSound,
32 kMovie,
33 kHide,
34 kNamed,
41 kTrans,
44 };
45
46 explicit CPDF_Action(RetainPtr<const CPDF_Dictionary> pDict);
49
50 bool HasDict() const { return !!m_pDict; }
51 const CPDF_Dictionary* GetDict() const { return m_pDict.Get(); }
52
53 Type GetType() const;
54 CPDF_Dest GetDest(CPDF_Document* pDoc) const;
55 WideString GetFilePath() const;
56 ByteString GetURI(const CPDF_Document* pDoc) const;
57 bool GetHideStatus() const;
58 ByteString GetNamedAction() const;
59 uint32_t GetFlags() const;
60 bool HasFields() const;
61
63
64 // Differentiates between empty JS entry and no JS entry.
66
67 // Returns empty string for empty JS entry and no JS entry.
68 WideString GetJavaScript() const;
69
71 CPDF_Action GetSubAction(size_t iIndex) const;
72
73 private:
74 RetainPtr<const CPDF_Object> GetJavaScriptObject() const;
75
76 RetainPtr<const CPDF_Dictionary> const m_pDict;
77};
78
79#endif // CORE_FPDFDOC_CPDF_ACTION_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