1 #if (defined(_WIN32) || defined(_WIN64)) || defined(__EMSCRIPTEN__) 32 class PDF3DAnnotViewData FS_FINAL :
public Object{
35 PDF3DAnnotViewData(){}
42 PDF3DAnnotViewData(
const PDF3DAnnotViewData& other) {
43 this->display_name = other.display_name;
44 this->name = other.name;
53 PDF3DAnnotViewData& operator = (
const PDF3DAnnotViewData& data) {
54 this->display_name = data.display_name;
55 this->name = data.name;
67 FSDK_DEFINE_ARRAY(PDF3DAnnotViewDataArray, PDF3DAnnotViewData)
74 class ModelNode FS_FINAL :
public Base{
81 typedef enum _PDF3DModelNodeType {
93 e_TypePunctualLight = 5,
95 e_TypeAmbientLight = 6,
99 e_TypeClippingPlane = 8,
101 e_TypeProcedural = 9,
106 } PDF3DModelNodeType;
116 ModelNode(
const ModelNode& other);
128 bool IsEmpty()
const;
137 ModelNode& operator=(
const ModelNode& other);
146 bool operator==(
const ModelNode& other)
const;
155 bool operator!=(
const ModelNode& other)
const;
163 PDF3DModelNodeType GetNodeType();
170 ModelNode GetFirstChildNode();
177 ModelNode GetNextSiblingNode();
184 ModelNode GetParentNode();
201 void SetVisible(
bool is_visible);
219 class PDF3DAnnotInstance FS_FINAL :
public Base{
226 typedef enum _PDF3DController {
228 e_ControllerRotate = 0,
230 e_ControllerSpin = 1,
234 e_ControllerZoom = 3,
236 e_ControllerWalk = 4,
246 typedef enum _PDF3DRenderMode {
248 e_RenderModeSolid = 1,
250 e_RenderModeSolidWireframe = 2,
252 e_RenderModeSolidOutline = 3,
254 e_RenderModeTransparent = 4,
256 e_RenderModeTransparentWireframe = 5,
258 e_RenderModeBoundingBox = 6,
260 e_RenderModeTransparentBoundingBox = 7,
262 e_RenderModeTransparentBoundingBoxOutline = 8,
264 e_RenderModeWireframe = 9,
266 e_RenderModeShadedWireframe = 10,
268 e_RenderModeHiddenWireframe = 11,
270 e_RenderModeIllustration = 12,
272 e_RenderModeShadedIllustration = 13,
274 e_RenderModeVertices = 14,
276 e_RenderModeShadedVertices = 15
281 PDF3DAnnotInstance(){}
288 PDF3DAnnotInstance(
const PDF3DAnnotInstance& other);
291 ~PDF3DAnnotInstance();
300 PDF3DAnnotInstance& operator=(
const PDF3DAnnotInstance& other);
309 bool operator==(
const PDF3DAnnotInstance& other)
const;
318 bool operator!=(
const PDF3DAnnotInstance& other)
const;
327 bool IsEmpty()
const;
340 void SetController(PDF3DController tool_tag);
353 void SetRenderMode(PDF3DRenderMode render_mode);
362 FX_HWND ActivateCanvas(FX_HWND screen_canvas_parent);
374 void UpdateCanvas(
RectI rect);
386 void OnLButtonDown(
int flag,
PointF point);
398 void OnLButtonUp(
int flag,
PointF point);
410 void OnMouseMove(
int flag,
PointF point);
423 void OnMouseWheel(
int flag,
int delta,
PointF point);
435 void OnRButtonDown(
int flag,
PointF point);
447 void OnRButtonUp(
int flag,
PointF point);
456 void ResetDefaultView();
465 PDF3DAnnotViewDataArray GetPresetViewList();
476 void ApplyPresetView(
const PDF3DAnnotViewData& view_data);
485 ModelNode GetRootNode();
488 explicit PDF3DAnnotInstance(
FS_HANDLE handle);
491 FSDK_DEFINE_ARRAY(PDF3DAnnotInstanceArray, PDF3DAnnotInstance)
494 class PDF3DAnnot FS_FINAL :
public Base{
501 typedef enum _PDF3DType {
505 e_3DTypeRichMedia = 1
517 PDF3DAnnot(
const PDF3DAnnot& other);
526 PDF3DAnnot& operator=(
const PDF3DAnnot& other);
535 bool operator==(
const PDF3DAnnot& other)
const;
544 bool operator!=(
const PDF3DAnnot& other)
const;
553 bool IsEmpty()
const;
567 pdf::annots::Annot GetAnnot();
575 PDF3DType Get3DAnnotType();
584 PDF3DAnnotInstance Get3DArtworkInstance();
593 PDF3DAnnotInstanceArray GetRichMediaInstances();
598 FSDK_DEFINE_ARRAY(PDF3DAnnotArray, PDF3DAnnot)
601 class PDF3DLaunchSetting FS_FINAL :
public Object {
608 typedef enum _PDF3DActivationEnableSetting {
610 e_3DActivationEnableSettingContentClicked = 0,
612 e_3DActivationEnableSettingPageOpened = 1,
614 e_3DActivationEnableSettingPageVisible = 2
615 } PDF3DActivationEnableSetting;
622 typedef enum _PDF3DActivationDisableSetting {
624 e_3DActivationDisableSettingContextMenuSelected = 0,
626 e_3DActivationDisableSettingPageClosed = 1,
628 e_3DActivationDisableSettingPageInvisible = 2
629 } PDF3DActivationDisableSetting;
636 typedef enum _PDF3DActivationPlaybackStyleSetting {
638 e_3DActivationPlaybackStyleOnPage = 0,
640 e_3DActivationPlaybackStyleInFloatingWindow = 1
641 } PDF3DActivationPlaybackStyleSetting;
648 typedef enum _PDF3DAppearanceSettingBorderWidth {
650 e_3DAppearanceSettingBorderWidthNone = 0,
652 e_3DAppearanceSettingBorderWidthThin = 1,
654 e_3DAppearanceSettingBorderWidthMedium = 2,
656 e_3DAppearanceSettingBorderWidthThick = 3
657 } PDF3DAppearanceSettingBorderWidth;
664 typedef enum _PDF3DPosterImageSetting {
666 e_3DPosterImageKeepCurrent = 0,
668 e_3DPosterImageRetrieveFromDefaultView = 1,
670 e_3DPosterImageCreateFromFile = 2
671 } PDF3DPosterImageSetting;
676 : activation_enable(e_3DActivationEnableSettingContentClicked)
677 , activation_disable(e_3DActivationDisableSettingContextMenuSelected)
678 , activation_playback(e_3DActivationPlaybackStyleOnPage)
681 , border_width(e_3DAppearanceSettingBorderWidthNone)
682 , is_transparent_background(false)
683 , poster_image(e_3DPosterImageKeepCurrent)
684 , poster_file_path(L
"") {
692 PDF3DLaunchSetting(
const PDF3DLaunchSetting& launch_setting)
693 : activation_enable(launch_setting.activation_enable)
694 , activation_disable(launch_setting.activation_disable)
695 , activation_playback(launch_setting.activation_playback)
696 , window_width(launch_setting.window_width)
697 , window_height(launch_setting.window_height)
698 , border_width(launch_setting.border_width)
699 , is_transparent_background(launch_setting.is_transparent_background)
700 , poster_image(launch_setting.poster_image)
701 , poster_file_path(launch_setting.poster_file_path) {
727 PDF3DLaunchSetting(PDF3DActivationEnableSetting activation_enable, PDF3DActivationDisableSetting activation_disable ,
728 PDF3DActivationPlaybackStyleSetting activation_playback,
int window_width,
int window_height,
729 PDF3DAppearanceSettingBorderWidth border_width,
bool is_transparent_background,
730 PDF3DPosterImageSetting poster_image,
WString poster_file_path) {
731 this->activation_enable = activation_enable;
732 this->activation_disable = activation_disable;
733 this->activation_playback = activation_playback;
734 this->window_width = window_width;
735 this->window_height = window_height;
736 this->border_width = border_width;
737 this->is_transparent_background = is_transparent_background;
738 this->poster_image = poster_image;
739 this->poster_file_path = poster_file_path;
767 void Set(PDF3DActivationEnableSetting activation_enable, PDF3DActivationDisableSetting activation_disable ,
768 PDF3DActivationPlaybackStyleSetting activation_playback,
int window_width,
int window_height,
769 PDF3DAppearanceSettingBorderWidth border_width,
bool is_transparent_background,
770 PDF3DPosterImageSetting poster_image,
WString poster_file_path) {
771 this->activation_enable = activation_enable;
772 this->activation_disable = activation_disable;
773 this->activation_playback = activation_playback;
774 this->window_width = window_width;
775 this->window_height = window_height;
776 this->border_width = border_width;
777 this->is_transparent_background = is_transparent_background;
778 this->poster_image = poster_image;
779 this->poster_file_path = poster_file_path;
789 PDF3DLaunchSetting& operator=(
const PDF3DLaunchSetting& launch_setting) {
790 this->activation_enable = launch_setting.activation_enable;
791 this->activation_disable = launch_setting.activation_disable;
792 this->activation_playback = launch_setting.activation_playback;
793 this->window_width = launch_setting.window_width;
794 this->window_height = launch_setting.window_height;
795 this->border_width = launch_setting.border_width;
796 this->is_transparent_background = launch_setting.is_transparent_background;
797 this->poster_image = launch_setting.poster_image;
798 this->poster_file_path = launch_setting.poster_file_path;
807 PDF3DActivationEnableSetting activation_enable;
814 PDF3DActivationDisableSetting activation_disable;
821 PDF3DActivationPlaybackStyleSetting activation_playback;
838 PDF3DAppearanceSettingBorderWidth border_width;
844 bool is_transparent_background;
851 PDF3DPosterImageSetting poster_image;
861 class PDF3DAdvancedSetting FS_FINAL :
public Object{
868 typedef enum _PDF3DLightingScheme {
870 e_3DLightingSchemeNone = 0,
872 e_3DLightingSchemeFromFile = 1,
874 e_3DLightingSchemeNoLights = 2,
876 e_3DLightingSchemeWhiteLights = 3,
878 e_3DLightingSchemeDayLights = 4,
880 e_3DLightingSchemeHardLights = 5,
882 e_3DLightingSchemePrimaryLights = 6,
884 e_3DLightingSchemeNightLights = 7,
886 e_3DLightingSchemeBlueLights = 8,
888 e_3DLightingSchemeRedLights = 9,
890 e_3DLightingSchemeCubeLights = 10,
892 e_3DLightingSchemeCADLights= 11,
894 e_3DLightingSchemeHeadlamp= 12
895 } PDF3DLightingScheme;
902 typedef enum _PDF3DRenderingStyle {
904 e_3DRenderingStyleNone = 0,
906 e_3DRenderingStyleBoundingBox = 1,
908 e_3DRenderingStyleTransparentBoundingBox = 2,
910 e_3DRenderingStyleTransparentBoundingBoxOutline = 3,
912 e_3DRenderingStyleVertices = 4,
914 e_3DRenderingStyleShadedVertices = 5,
916 e_3DRenderingStyleWireframe = 6,
918 e_3DRenderingStyleShadedWireframe = 7,
920 e_3DRenderingStyleSolid = 8,
922 e_3DRenderingStyleTransparent = 9,
924 e_3DRenderingStyleSolidWireframe = 10,
926 e_3DRenderingStyleTransparentWireframe = 11,
928 e_3DRenderingStyleIllustration = 12,
930 e_3DRenderingStyleSolidOutline = 13,
932 e_3DRenderingStyleShadedIllustration = 14,
934 e_3DRenderingStyleHiddenWireframe = 15
935 } PDF3DRenderingStyle;
942 typedef enum _PDF3DAnimationStyle {
944 e_3DAnimationStyleNone = 0,
946 e_3DAnimationStyleLoop = 1,
948 e_3DAnimationStyleBounce = 2
949 } PDF3DAnimationStyle;
956 typedef enum _PDF3DDefaultViews {
958 e_3DDefaultViewsNoViews = 0,
960 e_3DDefaultViewsLeftTopFrontIsoAllOrtho = 1,
962 e_3DDefaultViewsLeftTopFrontIsoAllPerspective = 2,
964 e_3DDefaultViewsLeftTopFrontOrthoIsoPerspective = 3,
966 e_3DDefaultViewsLeftTopFrontPerspectiveIsoOrtho = 4,
968 e_3DDefaultViewsLeftTopFrontRightBottomBackAllOrtho = 5,
970 e_3DDefaultViewsFromFile = 6
975 PDF3DAdvancedSetting()
976 : background_color(0x5E5E5E)
977 , lighting_scheme(e_3DLightingSchemeNone)
978 , rendering_style(e_3DRenderingStyleBoundingBox)
979 , animation_style(e_3DAnimationStyleNone)
980 , default_views(e_3DDefaultViewsNoViews)
981 , is_add_default_views(false)
982 , is_retain_views_and_comments(false)
983 , is_show_tool_bar(true)
984 , is_open_model_tree(false)
985 , script_file_path(L
"") {
993 PDF3DAdvancedSetting(
const PDF3DAdvancedSetting& advanced_setting)
994 : background_color(advanced_setting.background_color)
995 , lighting_scheme(advanced_setting.lighting_scheme)
996 , rendering_style(advanced_setting.rendering_style)
997 , animation_style(advanced_setting.animation_style)
998 , default_views(advanced_setting.default_views)
999 , is_add_default_views(advanced_setting.is_add_default_views)
1000 , is_retain_views_and_comments(advanced_setting.is_retain_views_and_comments)
1001 , is_show_tool_bar(advanced_setting.is_show_tool_bar)
1002 , is_open_model_tree(advanced_setting.is_open_model_tree)
1003 , script_file_path(advanced_setting.script_file_path) {
1013 PDF3DAdvancedSetting& operator=(
const PDF3DAdvancedSetting& advanced_setting) {
1014 this->background_color = advanced_setting.background_color;
1015 this->lighting_scheme = advanced_setting.lighting_scheme;
1016 this->rendering_style = advanced_setting.rendering_style;
1017 this->animation_style = advanced_setting.animation_style;
1018 this->default_views = advanced_setting.default_views;
1019 this->is_add_default_views = advanced_setting.is_add_default_views;
1020 this->is_retain_views_and_comments = advanced_setting.is_retain_views_and_comments;
1021 this->is_show_tool_bar = advanced_setting.is_show_tool_bar;
1022 this->is_open_model_tree = advanced_setting.is_open_model_tree;
1023 this->script_file_path = advanced_setting.script_file_path;
1049 PDF3DAdvancedSetting(
foxit::RGB background_color, PDF3DLightingScheme lighting_scheme ,
1050 PDF3DRenderingStyle rendering_style, PDF3DAnimationStyle animation_style,
1051 PDF3DDefaultViews default_views,
bool is_add_default_views,
bool is_retain_views_and_comments,
1052 bool is_show_tool_bar,
bool is_open_model_tree,
WString script_file_path) {
1053 this->background_color = background_color;
1054 this->lighting_scheme = lighting_scheme;
1055 this->rendering_style = rendering_style;
1056 this->animation_style = animation_style;
1057 this->default_views = default_views;
1058 this->is_add_default_views = is_add_default_views;
1059 this->is_retain_views_and_comments = is_retain_views_and_comments;
1060 this->is_show_tool_bar = is_show_tool_bar;
1061 this->is_open_model_tree = is_open_model_tree;
1062 this->script_file_path = script_file_path;
1088 void Set(
foxit::RGB background_color, PDF3DLightingScheme lighting_scheme ,
1089 PDF3DRenderingStyle rendering_style, PDF3DAnimationStyle animation_style,
1090 PDF3DDefaultViews default_views,
bool is_add_default_views,
bool is_retain_views_and_comments,
1091 bool is_show_tool_bar,
bool is_open_model_tree,
WString script_file_path) {
1092 this->background_color = background_color;
1093 this->lighting_scheme = lighting_scheme;
1094 this->rendering_style = rendering_style;
1095 this->animation_style = animation_style;
1096 this->default_views = default_views;
1097 this->is_add_default_views = is_add_default_views;
1098 this->is_retain_views_and_comments = is_retain_views_and_comments;
1099 this->is_show_tool_bar = is_show_tool_bar;
1100 this->is_open_model_tree = is_open_model_tree;
1101 this->script_file_path = script_file_path;
1113 PDF3DLightingScheme lighting_scheme;
1120 PDF3DRenderingStyle rendering_style;
1127 PDF3DAnimationStyle animation_style;
1134 PDF3DDefaultViews default_views;
1140 bool is_add_default_views;
1146 bool is_retain_views_and_comments;
1152 bool is_show_tool_bar;
1158 bool is_open_model_tree;
1172 class PDF3DContext FS_FINAL :
public Base{
1175 explicit PDF3DContext(
const pdf::PDFDoc& doc);
1182 PDF3DContext(
const PDF3DContext& other);
1194 PDF3DContext& operator=(
const PDF3DContext& other);
1203 bool operator==(
const PDF3DContext& other)
const;
1212 bool operator!=(
const PDF3DContext& other)
const;
1221 bool IsEmpty()
const;
1231 PDF3DAnnotArray GetPage3DAnnotArray(
int page_index);
1254 PDF3DAnnot Add3DAnnot(
const wchar_t* threeD_file_path,
int page_index,
foxit::RectF rectf,
void* screen_canvas_parent,
1255 PDF3DLaunchSetting launch_setting, PDF3DAdvancedSetting advanced_setting);
1278 #endif //FS_3DPDF_H_ 1279 #endif //defined(_WIN32) || defined(_WIN64) CFX_Object Object
Object type.
Definition: fs_basictypes.h:220
Header file for PDF document related definitions and classes.
uint32 RGB
RGB color type, 24 bits, ((b) | ((g) << 8) | ((r) << 16)))
Definition: fs_basictypes.h:211
File reading interface.
Definition: fx_stream.h:587
CFX_WideString WString
Wide string.
Definition: fs_basictypes.h:222
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:471
Header file for annotation related definitions and classes.
void * FS_HANDLE
Handle type.
Definition: fs_basictypes.h:213
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:477
Definition: fx_coordinates.h:771