Loading...
Searching...
No Matches
OCMD.h
Go to the documentation of this file.
1//---------------------------------------------------------------------------------------
2// Copyright (c) 2001-2025 by Apryse Software Inc. All Rights Reserved.
3// Consult legal.txt regarding legal and license information.
4//---------------------------------------------------------------------------------------
5#ifndef PDFTRON_H_CPPPDFOCGOCMD
6#define PDFTRON_H_CPPPDFOCGOCMD
7
8#include <C/PDF/OCG/TRN_OCMD.h>
9#include <Common/BasicTypes.h>
10
11 namespace pdftron {
12 namespace PDF {
13 namespace OCG {
14
30 class OCMD
31{
32 public:
33
40 enum VisibilityPolicyType {
41 e_AllOn,
42 e_AnyOn,
43 e_AnyOff,
44 e_AllOff
45 };
46
58 static OCMD Create(PDFDoc& doc, SDF::Obj ocgs, VisibilityPolicyType vis_policy);
59
64 OCMD(SDF::Obj ocmd);
65
69 bool IsValid() const;
70
78 SDF::Obj GetOCGs() const;
79
87 VisibilityPolicyType GetVisibilityPolicy() const;
88
95 void SetVisibilityPolicy(VisibilityPolicyType vis_policy);
96
101 SDF::Obj GetVisibilityExpression() const;
102
114 bool IsCurrentlyVisible(const class Context& context) const;
115
119 SDF::Obj GetSDFObj () const;
120
124 OCMD (const OCMD& g);
125 OCMD& operator=(const OCMD& g);
126
127 // @cond PRIVATE_DOC
128 #ifndef SWIGHIDDEN
129 OCMD(TRN_OCMD o) : mp_obj(o) {}
130 TRN_OCMD mp_obj;
131 #endif
132 // @endcond
133};
134
135 }; // namespace OCG
136 }; // namespace PDF
137}; // namespace pdftron
138
139#endif // PDFTRON_H_CPPPDFOCGOCMD
BasicTypes.h
pdftron::PDF::OCG::Context
Definition Context.h:42
pdftron::PDF::OCG::OCMD::Create
static OCMD Create(PDFDoc &doc, SDF::Obj ocgs, VisibilityPolicyType vis_policy)
pdftron::PDF::OCG::OCMD::GetVisibilityExpression
SDF::Obj GetVisibilityExpression() const
pdftron::PDF::OCG::OCMD::IsCurrentlyVisible
bool IsCurrentlyVisible(const class Context &context) const
pdftron::PDF::OCG::OCMD::VisibilityPolicyType
VisibilityPolicyType
Definition OCMD.h:40
pdftron::PDF::OCG::OCMD::e_AnyOn
@ e_AnyOn
visible if any of the entries in OCGs are ON.
Definition OCMD.h:42
pdftron::PDF::OCG::OCMD::e_AnyOff
@ e_AnyOff
visible if any of the entries in OCGs are OFF.
Definition OCMD.h:43
pdftron::PDF::OCG::OCMD::e_AllOn
@ e_AllOn
visible only if all of the entries in OCGs are ON.
Definition OCMD.h:41
pdftron::PDF::OCG::OCMD::e_AllOff
@ e_AllOff
visible only if all of the entries in OCGs are OFF.
Definition OCMD.h:44
pdftron::PDF::OCG::OCMD::GetSDFObj
SDF::Obj GetSDFObj() const
pdftron::PDF::OCG::OCMD::GetOCGs
SDF::Obj GetOCGs() const
pdftron::PDF::OCG::OCMD::OCMD
OCMD(SDF::Obj ocmd)
pdftron::PDF::OCG::OCMD::GetVisibilityPolicy
VisibilityPolicyType GetVisibilityPolicy() const
pdftron::PDF::OCG::OCMD::IsValid
bool IsValid() const
pdftron::PDF::OCG::OCMD::operator=
OCMD & operator=(const OCMD &g)
pdftron::PDF::OCG::OCMD::OCMD
OCMD(const OCMD &g)
pdftron::PDF::OCG::OCMD::SetVisibilityPolicy
void SetVisibilityPolicy(VisibilityPolicyType vis_policy)
pdftron::PDF::PDFDoc
Definition PDFDoc.h:72
pdftron::SDF::Obj
Definition Obj.h:41
pdftron::PDF::OCG
Definition Config.h:17
pdftron::PDF
Definition Action.h:15
pdftron
Definition BasicTypes.h:10