Foxit PDF SDK
fs_pdf3d.h
1 #if (defined(_WIN32) || defined(_WIN64))
2 
16 #ifndef FS_3DPDF_H_
17 #define FS_3DPDF_H_
18 #include "common/fs_common.h"
19 #include "pdf/fs_pdfdoc.h"
20 #include "pdf/annots/fs_annot.h"
21 
27 namespace foxit {
29 namespace addon {
31 namespace pdf3d {
33 class PDF3DAnnotViewData FS_FINAL : public Object{
34  public:
36  PDF3DAnnotViewData(){}
37 
43  PDF3DAnnotViewData(const PDF3DAnnotViewData& other) {
44  this->display_name = other.display_name;
45  this->name = other.name;
46  }
47 
54  PDF3DAnnotViewData& operator = (const PDF3DAnnotViewData& data) {
55  this->display_name = data.display_name;
56  this->name = data.name;
57  return *this;
58  }
59 
61  WString display_name;
62 
64  WString name;
65 };
66 
68 FSDK_DEFINE_ARRAY(PDF3DAnnotViewDataArray, PDF3DAnnotViewData)
69 
70 
75 class PDF3DAnnotInstance FS_FINAL : public Base{
76  public:
82  typedef enum _PDF3DController {
84  e_ControllerRotate = 0,
86  e_ControllerSpin = 1,
88  e_ControllerPan = 2,
90  e_ControllerZoom = 3,
92  e_ControllerWalk = 4,
94  e_ControllerFly = 5
95  } PDF3DController;
96 
102  typedef enum _PDF3DRenderMode {
104  e_RenderModeSolid = 1,
106  e_RenderModeSolidWireframe = 2,
108  e_RenderModeSolidOutline = 3,
110  e_RenderModeTransparent = 4,
112  e_RenderModeTransparentWireframe = 5,
114  e_RenderModeBoundingBox = 6,
116  e_RenderModeTransparentBoundingBox = 7,
118  e_RenderModeTransparentBoundingBoxOutline = 8,
120  e_RenderModeWireframe = 9,
122  e_RenderModeShadedWireframe = 10,
124  e_RenderModeHiddenWireframe = 11,
126  e_RenderModeIllustration = 12,
128  e_RenderModeShadedIllustration = 13,
130  e_RenderModeVertices = 14,
132  e_RenderModeShadedVertices = 15
133  } PDF3DRenderMode;
134 
135 
137  PDF3DAnnotInstance(){}
138 
144  PDF3DAnnotInstance(const PDF3DAnnotInstance& other);
145 
147  ~PDF3DAnnotInstance();
148 
156  PDF3DAnnotInstance& operator=(const PDF3DAnnotInstance& other);
157 
165  bool operator==(const PDF3DAnnotInstance& other) const;
166 
174  bool operator!=(const PDF3DAnnotInstance& other) const;
175 
183  bool IsEmpty() const;
184 
190  pdf::annots::Annot GetAnnot();
191 
203  void SetController(PDF3DController tool_tag);
204 
216  void SetRenderMode(PDF3DRenderMode render_mode);
217 
225  FX_HWND ActivateCanvas(FX_HWND screen_canvas_parent);
226 
237  void UpdateCanvas(RectI rect);
238 
249  void OnLButtonDown(int flag, PointF point);
250 
261  void OnLButtonUp(int flag, PointF point);
262 
273  void OnMouseMove(int flag, PointF point);
274 
286  void OnMouseWheel(int flag, int delta, PointF point);
287 
298  void OnRButtonDown(int flag, PointF point);
299 
310  void OnRButtonUp(int flag, PointF point);
311 
319  void ResetDefaultView();
320 
328  PDF3DAnnotViewDataArray GetPresetViewList();
329 
339  void ApplyPresetView(const PDF3DAnnotViewData& view_data);
340 
341  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
342  explicit PDF3DAnnotInstance(FS_HANDLE handle);
343 };
345 FSDK_DEFINE_ARRAY(PDF3DAnnotInstanceArray, PDF3DAnnotInstance)
346 
347 
355 class PDF3DContext FS_FINAL : public Base{
356  public:
358  explicit PDF3DContext(const pdf::PDFDoc& doc);
359 
365  PDF3DContext(const PDF3DContext& other);
366 
368  ~PDF3DContext();
369 
377  PDF3DContext& operator=(const PDF3DContext& other);
378 
386  bool operator==(const PDF3DContext& other) const;
387 
395  bool operator!=(const PDF3DContext& other) const;
396 
404  bool IsEmpty() const;
405 
414  PDF3DAnnotInstanceArray GetPage3DAnnotArray(int page_index);
415 
423  void Invalidate();
424 
425  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
426  explicit PDF3DContext(FS_HANDLE handle = NULL);
427 };
428 
429 } //pdf3d
430 } //addon
431 } //foxit
432 #endif //FS_3DPDF_H_
433 #endif //defined(_WIN32) || defined(_WIN64)
CFX_Object Object
Object type.
Definition: fs_basictypes.h:221
Header file for PDF document related definitions and classes.
CFX_WideString WString
Wide string.
Definition: fs_basictypes.h:223
bool operator==(const char *str1, const CFX_ByteString &str2)
Check if two byte strings are equal.
Definition: fs_basictypes.h:128
CFX_PointF PointF
Point information, in float.
Definition: fs_basictypes.h:463
Header file for annotation related definitions and classes.
void * FS_HANDLE
Handle type.
Definition: fs_basictypes.h:214
Header file for common definitions and classes.
Foxit namespace.
Definition: fs_taggedpdf.h:27
#define NULL
The null-pointer value.
Definition: fx_system.h:792
bool operator!=(const char *str1, const CFX_ByteString &str2)
Check if two byte strings are not equal.
Definition: fs_basictypes.h:140
FX_RECT RectI
Rectangle, in integer.
Definition: fs_basictypes.h:469