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 
125  {
132 
138 
144  };
145 
153  void SetOCDrawMode(OCDrawMode oc_draw_mode);
154 
159  OCDrawMode GetOCMode() const;
160 
164  void Destroy();
165 
166 
167  //for xamarin use only
168  static Context* CreateInternal(ptrdiff_t impl);
169  ptrdiff_t GetHandleInternal();
170 
171 #ifndef SWIGHIDDEN
172  Context(TRN_OCGContext ctx);
173  TRN_OCGContext mp_obj;
174 private:
175  bool m_owner;
176 #endif
177 };
178 
179  }; // namespace OCG
180  }; // namespace PDF
181 }; // namespace pdftron
182 
183 #endif // PDFTRON_H_CPPPDFOCGContext
TRN_OCGContext mp_obj
Definition: Context.h:173
bool GetNonOCDrawing() const
void SetState(const class Group &group, bool state)
bool IsValid() const
Definition: Context.h:68
void ResetStates(bool all_on)
static Context * CreateInternal(ptrdiff_t impl)
Context(const Context &context)
OCDrawMode GetOCMode() const
Context & operator=(const Context &g)
void SetOCDrawMode(OCDrawMode oc_draw_mode)
void SetNonOCDrawing(bool draw_non_OC)
bool GetState(const class Group &group) const