- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Context.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_CPPPDFOCGContext
6 #define PDFTRON_H_CPPPDFOCGContext
7
8 #include <SDF/Obj.h>
9 #include <C/PDF/OCG/TRN_OCGContext.h>
10
11 namespace pdftron {
12 namespace PDF {
13 namespace OCG {
14 class Group;
15
41 class Context
42 {
43 public:
44
49 Context(const Context& context);
50 Context& operator=(const Context& g);
51
58 Context(const class Config& config);
59
63 ~Context();
64
68 bool IsValid() const { return mp_obj!=0; }
69
76 bool GetState(const class Group& group) const;
77
84 void SetState(const class Group& group, bool state);
85
91 void ResetStates(bool all_on);
92
101 void SetNonOCDrawing(bool draw_non_OC);
102
108 bool GetNonOCDrawing() const;
109
124 enum OCDrawMode
125 {
131 e_VisibleOC,
132
137 e_AllOC,
138
143 e_NoOC
144 };
145
153 void SetOCDrawMode(OCDrawMode oc_draw_mode);
154
159 OCDrawMode GetOCMode() const;
160
164 void Destroy();
165
166 //for xamarin use only
167 static Context* CreateInternal(ptrdiff_t impl);
168 ptrdiff_t GetHandleInternal();
169
170 #ifndef SWIGHIDDEN
171 Context(TRN_OCGContext ctx);
172 TRN_OCGContext mp_obj;
173 private:
174 bool m_owner;
175 #endif
176 };
177
178 }; // namespace OCG
179 }; // namespace PDF
180 }; // namespace pdftron
181
182 #endif // PDFTRON_H_CPPPDFOCGContext
pdftron::PDF::OCG::Context
Definition: Context.h:41
pdftron::PDF::OCG::Context::mp_obj
TRN_OCGContext mp_obj
Definition: Context.h:172
pdftron::PDF::OCG::Context::GetNonOCDrawing
bool GetNonOCDrawing() const
pdftron::PDF::OCG::Context::SetState
void SetState(const class Group &group, bool state)
pdftron::PDF::OCG::Context::IsValid
bool IsValid() const
Definition: Context.h:68
pdftron::PDF::OCG::Context::ResetStates
void ResetStates(bool all_on)
pdftron::PDF::OCG::Context::OCDrawMode
OCDrawMode
Definition: Context.h:124
pdftron::PDF::OCG::Context::e_AllOC
Definition: Context.h:137
pdftron::PDF::OCG::Context::CreateInternal
static Context * CreateInternal(ptrdiff_t impl)
pdftron::PDF::OCG::Config
Definition: Config.h:35
pdftron::PDF::OCG::Group
Definition: Group.h:51
Obj.h
pdftron::PDF::OCG::Context::Destroy
void Destroy()
pdftron::PDF::OCG::Context::e_VisibleOC
Definition: Context.h:131
pdftron::PDF::OCG::Context::Context
Context(const Context &context)
pdftron::PDF::OCG::Context::GetOCMode
OCDrawMode GetOCMode() const
pdftron::PDF::OCG::Context::operator=
Context & operator=(const Context &g)
pdftron::PDF::OCG::Context::~Context
~Context()
pdftron::PDF::OCG::Context::GetHandleInternal
ptrdiff_t GetHandleInternal()
pdftron::PDF::OCG::Context::SetOCDrawMode
void SetOCDrawMode(OCDrawMode oc_draw_mode)
pdftron::PDF::OCG::Context::SetNonOCDrawing
void SetNonOCDrawing(bool draw_non_OC)
pdftron::PDF::OCG::Context::e_NoOC
Definition: Context.h:143
pdftron::PDF::OCG::Context::GetState
bool GetState(const class Group &group) const