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-2023 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 
40 class Context
41 {
42 public:
43 
48  Context(const Context& context);
49  Context& operator=(const Context& g);
50 
57  Context(const class Config& config);
58 
62  ~Context();
63 
67  bool IsValid() const { return mp_obj!=0; }
68 
75  bool GetState(const class Group& group) const;
76 
83  void SetState(const class Group& group, bool state);
84 
90  void ResetStates(bool all_on);
91 
100  void SetNonOCDrawing(bool draw_non_OC);
101 
107  bool GetNonOCDrawing() const;
108 
124  {
131 
137 
143  };
144 
152  void SetOCDrawMode(OCDrawMode oc_draw_mode);
153 
158  OCDrawMode GetOCMode() const;
159 
163  void Destroy();
164 
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
TRN_OCGContext mp_obj
Definition: Context.h:172
bool GetNonOCDrawing() const
void SetState(const class Group &group, bool state)
bool IsValid() const
Definition: Context.h:67
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