sprk.h
1 // Copyright (c) Tech Soft 3D, Inc.
2 //
3 // The information contained herein is confidential and proprietary to Tech Soft 3D, Inc.,
4 // and considered a trade secret as defined under civil and criminal statutes.
5 // Tech Soft 3D, Inc. shall pursue its civil and criminal remedies in the event of
6 // unauthorized use or misappropriation of its trade secrets. Use of this information
7 // by anyone other than authorized employees of Tech Soft 3D, Inc. is granted only under
8 // a written non-disclosure agreement, expressly prescribing the scope and manner of such use.
9 
10 #ifndef SPRK_H
11 #define SPRK_H
12 
13 #include "hps.h"
14 
15 #include <memory>
16 #include <unordered_map>
17 
18 #ifdef _MSC_VER
19 # pragma warning(disable: 4251) //Not an issue as long as debug and release libraries aren't mixed
20 #ifndef STATIC_APP
21 # ifdef SPRK
22 # define SPRK_API __declspec (dllexport)
23 # else
24 # define SPRK_API __declspec (dllimport)
25 # endif
26 #endif
27 #else
28 # include <stddef.h>
29 # if defined(LINUX_SYSTEM) && defined(SPRK)
30 # ifndef STATIC_APP
31 # define SPRK_API __attribute__ ((visibility ("default")))
32 # endif
33 # endif
34 #endif
35 
36 #ifndef SPRK_API
37 # define SPRK_API
38 #endif
39 namespace SPRKI
40 {
41  class X;
42 };
43 
44 namespace HPS
45 {
46 
47 class Factory;
48 class Canvas;
49 class Layout;
50 class View;
51 class Model;
52 class Operator;
53 class OperatorControl;
54 class AnimationControl;
55 class NavigationCubeControl;
56 class AxisTriadControl;
57 class Component;
58 class ComponentPath;
59 class ComponentHighlightEvent;
60 class Filter;
61 class Capture;
62 class CADModel;
63 class Metadata;
64 class Sampler;
65 class Channel;
66 class Animation;
67 
68 class SPRK_API Sprocket : public HPS::Object
69 {
70 public:
71  Sprocket() {}
72 #if !defined(_MSC_VER) || _MSC_VER >= 1900
73  Sprocket(HPS::Sprocket const & in_that) = default;
74 #endif
75  Sprocket(Sprocket && in_that) : HPS::Object(std::move(in_that)) {}
76 
77  virtual ~Sprocket() {}
78 };
79 
80 struct SPRK_API RGBColorKeyframe
81 {
88  RGBColorKeyframe(uint32_t in_ticks, RGBColor const & in_value);
89 
93  bool operator!=(RGBColorKeyframe const & in_that) const;
94 
98  bool operator==(RGBColorKeyframe const & in_that) const;
99 
100  uint32_t time_in_ticks;
101  RGBColor value;
102 };
103 
105 {
110  RGBColorSplineControlValues(RGBColor const & in_input, RGBColor const & in_output);
111 
115  bool operator!=(RGBColorSplineControlValues const & in_that) const;
116 
120  bool operator==(RGBColorSplineControlValues const & in_that) const;
121 
122  RGBColor input;
123  RGBColor output;
124 };
125 
126 struct SPRK_API VectorKeyframe
127 {
132  VectorKeyframe(uint32_t in_ticks, Vector const & in_value);
133 
137  bool operator!=(VectorKeyframe const & in_that) const;
138 
142  bool operator==(VectorKeyframe const & in_that) const;
143 
144  uint32_t time_in_ticks;
145  Vector value;
146 };
147 
149 {
154  VectorSplineControlValues(Vector const & in_input, Vector const & in_output);
155 
159  bool operator!=(VectorSplineControlValues const & in_that) const;
160 
164  bool operator==(VectorSplineControlValues const & in_that) const;
165 
166  Vector input;
167  Vector output;
168 };
169 
170 struct SPRK_API PointKeyframe
171 {
176  PointKeyframe(uint32_t in_ticks, Point const & in_value);
177 
181  bool operator!=(PointKeyframe const & in_that) const;
182 
186  bool operator==(PointKeyframe const & in_that) const;
187 
188  uint32_t time_in_ticks;
189  Point value;
190 };
191 
193 {
198  PointSplineControlValues(Point const & in_input, Point const & in_output);
199 
203  bool operator!=(PointSplineControlValues const & in_that) const;
204 
208  bool operator==(PointSplineControlValues const & in_that) const;
209 
210  Point input;
211  Point output;
212 };
213 
214 struct SPRK_API QuaternionKeyframe
215 {
220  QuaternionKeyframe(uint32_t in_ticks, Quaternion const & in_value);
221 
225  bool operator!=(QuaternionKeyframe const & in_that) const;
226 
230  bool operator==(QuaternionKeyframe const & in_that) const;
231 
232  uint32_t time_in_ticks;
233  Quaternion value;
234 };
235 
237 {
242  QuaternionSplineControlValues(Quaternion const & in_input, Quaternion const & in_output);
243 
247  bool operator!=(QuaternionSplineControlValues const & in_that) const;
248 
252  bool operator==(QuaternionSplineControlValues const & in_that) const;
253 
254  Quaternion input;
255  Quaternion output;
256 };
257 
258 struct SPRK_API FloatKeyframe
259 {
264  FloatKeyframe(uint32_t in_ticks, float in_value);
265 
269  bool operator!=(FloatKeyframe const & in_that) const;
270 
274  bool operator==(FloatKeyframe const & in_that) const;
275 
276  uint32_t time_in_ticks;
277  float value;
278 };
279 
281 {
286  FloatSplineControlValues(float in_input, float in_output);
287 
291  bool operator!=(FloatSplineControlValues const & in_that) const;
292 
296  bool operator==(FloatSplineControlValues const & in_that) const;
297 
298  float input;
299  float output;
300 };
301 
308 typedef std::shared_ptr<Operator> OperatorPtr;
309 
310 typedef std::vector<OperatorPtr, Allocator<OperatorPtr> > OperatorPtrArray;
311 
312 typedef std::vector<Canvas, Allocator<Canvas> > CanvasArray;
313 typedef std::vector<Layout, Allocator<Layout> > LayoutArray;
314 typedef std::vector<View, Allocator<View> > ViewArray;
315 typedef std::vector<Model, Allocator<Model> > ModelArray;
316 
317 typedef std::vector<Component, Allocator<Component> > ComponentArray;
318 typedef std::vector<Metadata, Allocator<Metadata> > MetadataArray;
319 typedef std::vector<Filter, Allocator<Filter> > FilterArray;
320 typedef std::vector<Capture, Allocator<Capture> > CaptureArray;
321 typedef std::vector<CADModel, Allocator<CADModel> > CADModelArray;
322 typedef std::vector<ReferenceKeyArray, Allocator<ReferenceKeyArray>> ReferenceKeyArrayArray;
323 typedef std::vector<ComponentPath, Allocator<ComponentPath>> ComponentPathArray;
324 typedef std::vector<HighlightOptionsKit, Allocator<HighlightOptionsKit>> HighlightOptionsKitArray;
325 
326 typedef std::vector<Sampler, Allocator<Sampler> > SamplerArray;
327 typedef std::vector<Channel, Allocator<Channel> > ChannelArray;
328 typedef std::vector<Animation, Allocator<Animation> > AnimationArray;
329 typedef std::vector<VectorKeyframe, Allocator<VectorKeyframe> > VectorKeyframeArray;
330 typedef std::vector<PointKeyframe, Allocator<PointKeyframe> > PointKeyframeArray;
331 typedef std::vector<FloatKeyframe, Allocator<FloatKeyframe> > FloatKeyframeArray;
332 typedef std::vector<QuaternionKeyframe, Allocator<QuaternionKeyframe> > QuaternionKeyframeArray;
333 typedef std::vector<RGBColorKeyframe, Allocator<RGBColorKeyframe> > RGBColorKeyframeArray;
334 
335 typedef std::vector<VectorSplineControlValues, Allocator<VectorSplineControlValues>> VectorSplineControlValuesArray;
336 typedef std::vector<PointSplineControlValues, Allocator<PointSplineControlValues>> PointSplineControlValuesArray;
337 typedef std::vector<FloatSplineControlValues, Allocator<FloatSplineControlValues>> FloatSplineControlValuesArray;
338 typedef std::vector<QuaternionSplineControlValues, Allocator<QuaternionSplineControlValues>> QuaternionSplineControlValuesArray;
339 typedef std::vector<RGBColorSplineControlValues, Allocator<RGBColorSplineControlValues>> RGBColorSplineControlValuesArray;
348 class SPRK_API Sampler : public Sprocket
349 {
350 public:
353  enum class InterpolationType
354  {
355  Constant,
356  Linear,
357  SphericalLinear,
358  Spline
359  };
360 
361  static const HPS::Type staticType = HPS::Type::Sampler;
362  HPS::Type ObjectType() const { return staticType; }
363 
364  Sampler();
365  Sampler(Sampler const & in_that);
366  virtual ~Sampler();
367 
371  void Assign(Sampler const & in_that);
372  Sampler & operator=(Sampler const & in_that);
373  Sampler & operator=(Sampler && in_that);
374 
378  bool Equals(Sampler const & in_that) const;
379 
383  bool operator!=(Sampler const & in_that) const;
384 
388  bool operator==(Sampler const & in_that) const;
389 
392  void SetInterpolation(InterpolationType in_interpolation);
393 
396  InterpolationType GetInterpolation() const;
397 };
398 
403 class SPRK_API RGBColorSampler : public Sampler
404 {
405 public:
406  static const HPS::Type staticType = HPS::Type::RGBColorSampler;
407  HPS::Type ObjectType() const { return staticType; }
408 
409  RGBColorSampler();
410  explicit RGBColorSampler(Sampler const & in_that);
411  RGBColorSampler(RGBColorSampler const & in_that);
412  virtual ~RGBColorSampler();
413 
420  void SetKeyframes(RGBColorKeyframeArray const & in_keyframes);
421 
429  void SetKeyframes(size_t in_count, RGBColorKeyframe const in_keyframes[]);
430 
438  void AddKeyframes(RGBColorKeyframeArray const & in_keyframes);
439 
448  void AddKeyframes(size_t in_count, RGBColorKeyframe const in_keyframes[]);
449 
456  void AddKeyframe(RGBColorKeyframe const & in_keyframe);
457 
462  RGBColorKeyframeArray const & GetKeyframes() const;
463 
468  void SetControlValues(RGBColorSplineControlValuesArray const & in_control_points);
469 
472  RGBColorSplineControlValuesArray const & GetControlValues() const;
473 };
474 
479 class SPRK_API VectorSampler : public Sampler
480 {
481 public:
482  static const HPS::Type staticType = HPS::Type::VectorSampler;
483  HPS::Type ObjectType() const { return staticType; }
484 
485  VectorSampler();
486  explicit VectorSampler(Sampler const & in_that);
487  VectorSampler(VectorSampler const & in_that);
488  virtual ~VectorSampler();
489 
495  void SetKeyframes(VectorKeyframeArray const & in_keyframes);
496 
503  void SetKeyframes(size_t in_count, VectorKeyframe const in_keyframes[]);
504 
511  void AddKeyframes(VectorKeyframeArray const & in_keyframes);
512 
520  void AddKeyframes(size_t in_count, VectorKeyframe const in_keyframes[]);
521 
526  void AddKeyframe(VectorKeyframe const & in_keyframe);
527 
532  VectorKeyframeArray const & GetKeyframes() const;
533 
538  void SetControlValues(VectorSplineControlValuesArray const & in_control_points);
539 
542  VectorSplineControlValuesArray const & GetControlValues() const;
543 };
544 
549 class SPRK_API PointSampler : public Sampler
550 {
551 public:
552  static const HPS::Type staticType = HPS::Type::PointSampler;
553  HPS::Type ObjectType() const { return staticType; }
554 
555  PointSampler();
556  explicit PointSampler(Sampler const & in_that);
557  PointSampler(PointSampler const & in_that);
558  virtual ~PointSampler();
559 
565  void SetKeyframes(PointKeyframeArray const & in_keyframes);
566 
573  void SetKeyframes(size_t in_count, PointKeyframe const in_keyframes[]);
574 
581  void AddKeyframes(PointKeyframeArray const & in_keyframes);
582 
590  void AddKeyframes(size_t in_count, PointKeyframe const in_keyframes[]);
591 
596  void AddKeyframe(PointKeyframe const & in_keyframe);
597 
602  PointKeyframeArray const & GetKeyframes() const;
603 
608  void SetControlValues(PointSplineControlValuesArray const & in_control_points);
609 
612  PointSplineControlValuesArray const & GetControlValues() const;
613 };
614 
619 class SPRK_API QuaternionSampler : public Sampler
620 {
621 public:
622  static const HPS::Type staticType = HPS::Type::QuaternionSampler;
623  HPS::Type ObjectType() const { return staticType; }
624 
626  explicit QuaternionSampler(Sampler const & in_that);
627  QuaternionSampler(QuaternionSampler const & in_that);
628  virtual ~QuaternionSampler();
629 
635  void SetKeyframes(QuaternionKeyframeArray const & in_keyframes);
636 
643  void SetKeyframes(size_t in_count, QuaternionKeyframe const in_keyframes[]);
644 
651  void AddKeyframes(QuaternionKeyframeArray const & in_keyframes);
652 
660  void AddKeyframes(size_t in_count, QuaternionKeyframe const in_keyframes[]);
661 
666  void AddKeyframe(QuaternionKeyframe const & in_keyframe);
667 
672  QuaternionKeyframeArray const & GetKeyframes() const;
673 
678  void SetControlValues(QuaternionSplineControlValuesArray const & in_control_points);
679 
682  QuaternionSplineControlValuesArray const & GetControlValues() const;
683 };
684 
689 class SPRK_API FloatSampler : public Sampler
690 {
691 public:
692  static const HPS::Type staticType = HPS::Type::FloatSampler;
693  HPS::Type ObjectType() const { return staticType; }
694 
695  FloatSampler();
696  explicit FloatSampler(Sampler const & in_that);
697  FloatSampler(FloatSampler const & in_that);
698  virtual ~FloatSampler();
699 
705  void SetKeyframes(FloatKeyframeArray const & in_keyframes);
706 
713  void SetKeyframes(size_t in_count, FloatKeyframe const in_keyframes[]);
714 
721  void AddKeyframes(FloatKeyframeArray const & in_keyframes);
722 
730  void AddKeyframes(size_t in_count, FloatKeyframe const in_keyframes[]);
731 
736  void AddKeyframe(FloatKeyframe const & in_keyframe);
737 
742  FloatKeyframeArray const & GetKeyframes() const;
743 
748  void SetControlValues(FloatSplineControlValuesArray const & in_control_points);
749 
752  FloatSplineControlValuesArray const & GetControlValues() const;
753 };
754 
758 class SPRK_API Channel : public Sprocket
759 {
760 public:
763  enum class ChannelType
764  {
765  Translation,
766  Rotation,
767  Scale,
768  Color,
769  Opacity,
770  CameraPosition,
771  CameraTarget,
772  CameraUp
773  };
774 
775  static const HPS::Type staticType = HPS::Type::Channel;
776  HPS::Type ObjectType() const { return staticType; }
777 
778  Channel();
779  Channel(Channel const & in_that);
780  ~Channel();
781 
785  void Assign(Channel const & in_that);
786  Channel & operator=(Channel const & in_that);
787  Channel & operator=(Channel && in_that);
788 
792  bool Equals(Channel const & in_that) const;
793 
797  bool operator!=(Channel const & in_that) const;
798 
802  bool operator==(Channel const & in_that) const;
803 
806  KeyPath const & GetTarget() const;
807 
810  Sampler const & GetSampler() const;
811 
814  Sampler & GetSampler();
815 
818  UTF8 & GetName() const;
819 
822  ChannelType GetChannelType() const;
823 
826  void SetSampler(Sampler const & sampler);
827 };
828 
832 class SPRK_API Animation : public Sprocket
833 {
834 public:
835  static const HPS::Type staticType = HPS::Type::Animation;
836  HPS::Type ObjectType() const { return staticType; }
837 
838  Animation();
839  Animation(Animation const & in_that);
840  ~Animation();
841 
845  void Assign(Animation const & in_that);
846  Animation & operator=(Animation const & in_that);
847  Animation & operator=(Animation && in_that);
848 
852  bool Equals(Animation const & in_that) const;
853 
857  bool operator!=(Animation const & in_that) const;
858 
862  bool operator==(Animation const & in_that) const;
863 
869  Channel AddTranslationChannel(char const * in_name, KeyPath const & in_target, VectorSampler const & in_sampler);
870 
876  Channel AddRotationChannel(char const * in_name, KeyPath const & in_target, QuaternionSampler const & in_sampler);
877 
883  Channel AddScaleChannel(char const * in_name, KeyPath const & in_target, VectorSampler const & in_sampler);
884 
890  Channel AddColorChannel(char const * in_name, KeyPath const & in_target, RGBColorSampler const & in_sampler);
891 
897  Channel AddOpacityChannel(char const * in_name, KeyPath const & in_target, FloatSampler const & in_sampler);
898 
903  Channel AddCameraPositionChannel(char const * in_name, PointSampler const & in_sampler);
904 
909  Channel AddCameraTargetChannel(char const * in_name, PointSampler const & in_sampler);
910 
915  Channel AddCameraUpChannel(char const * in_name, VectorSampler const & in_sampler);
916 
919  void RemoveChannel(Channel & in_channel);
920 
923  ChannelArray const & GetChannels() const;
924 
927  UTF8 const & GetName() const;
928 
930  void Delete();
931 };
932 
936 class SPRK_API Canvas : public Sprocket
937 {
938 public:
939  Canvas();
940  Canvas(Canvas const & that);
941  ~Canvas();
942 
943  static const HPS::Type staticType = HPS::Type::Canvas;
944  HPS::Type ObjectType() const { return staticType; }
945 
947  void Delete();
948 
949  Canvas & operator=(Canvas const & in_that);
950  void Assign(Canvas const & in_that);
951 
952  bool Equals(Canvas const & in_that) const;
953  bool operator!= (Canvas const & in_that) const;
954  bool operator== (Canvas const & in_that) const;
955 
957  UTF8 GetName() const;
958 
962  void AttachLayout(Layout const & in_layout);
963 
966  void AttachViewAsLayout(View const & in_view);
967 
969  void DetachLayout();
970 
972  Layout GetAttachedLayout() const;
973 
975  IncludeKey GetAttachedLayoutIncludeLink() const;
976 
978  View GetFrontView() const;
979 
980  WindowKey const GetWindowKey() const;
981 
984  WindowKey GetWindowKey();
985 
986  PortfolioKey const GetPortfolioKey() const;
987 
989  PortfolioKey GetPortfolioKey();
990 
992  void Update() const;
993 
996  UpdateNotifier UpdateWithNotifier() const;
997 
1001  void Update(HPS::Window::UpdateType in_type, HPS::Time in_time_limit = -1.0) const;
1002 
1007  UpdateNotifier UpdateWithNotifier(HPS::Window::UpdateType in_type, HPS::Time in_time_limit = -1.0) const;
1008 
1012  void SetFrameRate(float in_frame_rate=20);
1013 
1017  float GetFrameRate() const;
1018 };
1019 
1020 class SPRK_API Rendering
1021 {
1022 public:
1025  enum class Mode
1026  {
1027  Gouraud,
1028  GouraudWithLines,
1029  Flat,
1030  FlatWithLines,
1031  Phong,
1032  PhongWithLines,
1033  HiddenLine,
1034  FastHiddenLine,
1035  Wireframe,
1036  Default = Phong
1037  };
1038 
1039 private:
1040  Rendering() {}
1041 };
1042 
1043 class SPRK_API SprocketControl : public Sprocket
1044 {
1045 public:
1046  static const HPS::Type staticType = HPS::Type::SprocketControl;
1047  HPS::Type ObjectType() const {return staticType;}
1048 
1049 #if !defined(_MSC_VER) || _MSC_VER >= 1900
1050  SprocketControl(HPS::SprocketControl const & in_that) = default;
1051 #endif
1052 
1053 protected:
1054  SprocketControl() {}
1055 
1059  SprocketControl(SprocketControl && in_that) : Sprocket(std::move(in_that)) {}
1060 
1065  {
1066  this->Object::operator=(std::move(in_that));
1067  return *this;
1068  }
1069 };
1070 
1071 class SPRK_API SprocketKit : public Sprocket
1072 {
1073 public:
1074  static const HPS::Type staticType = HPS::Type::SprocketKit;
1075  HPS::Type ObjectType() const { return staticType; }
1076 
1077 #if !defined(_MSC_VER) || _MSC_VER >= 1900
1078  SprocketKit(HPS::SprocketKit const & in_that) = default;
1079 #endif
1080 
1081 protected:
1082  SprocketKit() {}
1083 
1087  SprocketKit(SprocketKit && in_that) : Sprocket(std::move(in_that)) {}
1088 
1093  {
1094  this->Object::operator=(std::move(in_that));
1095  return *this;
1096  }
1097 };
1098 
1102 class SPRK_API View : public Sprocket
1103 {
1104 public:
1105  View();
1106  View(View const & that);
1107  explicit View(SprocketControl const & in_ctrl);
1108  ~View();
1109 
1110  static const HPS::Type staticType = HPS::Type::View;
1111  HPS::Type ObjectType() const { return staticType; }
1112 
1114  void Delete();
1115 
1116  View & operator=(View const & in_that);
1117  void Assign(View const & in_that);
1118 
1119  bool Equals(View const & in_that) const;
1120  bool operator!= (View const & in_that) const;
1121  bool operator== (View const & in_that) const;
1122 
1124  UTF8 GetName() const;
1125 
1126 
1129  HPS::View & ComputeFitWorldCamera(HPS::CameraKit & out_camera);
1130 
1134  HPS::View & ComputeFitWorldCamera(SegmentKey const & in_segment, HPS::CameraKit & out_camera);
1135 
1136 
1140  HPS::View & ComputeFitWorldCamera(BoundingKit const & in_bounding, HPS::CameraKit & out_camera);
1141 
1147  HPS::View & ComputeFitWorldCamera(SegmentKey const & in_segment, MatrixKit const & in_transform, HPS::CameraKit & out_camera);
1148 
1149 
1155  HPS::View & ComputeFitWorldCamera(BoundingKit const & in_bounding, MatrixKit const & in_transform, HPS::CameraKit & out_camera);
1156 
1157 
1159  HPS::View & FitWorld();
1160 
1166  HPS::View & FitWorld(SegmentKey const & in_segment);
1167 
1168 
1171  HPS::View & FitWorld(BoundingKit const & in_bounding);
1172 
1178  HPS::View & FitWorld(SegmentKey const & in_segment, MatrixKit const & in_transform);
1179 
1180 
1185  HPS::View & FitWorld(BoundingKit const & in_bounding, MatrixKit const & in_transform);
1186 
1191  void AttachModel(Model const & in_model);
1192 
1194  void DetachModel();
1195 
1197  Model GetAttachedModel() const;
1198 
1200  IncludeKey GetAttachedModelIncludeLink() const;
1201 
1205  void SetRenderingMode(Rendering::Mode in_mode);
1206 
1209  Rendering::Mode GetRenderingMode() const;
1210 
1212  OperatorPtrArray GetOperators() const;
1213 
1216  void SetOperators(OperatorPtrArray & in_operators);
1217 
1221  void SetOperators(size_t in_count, OperatorPtr in_operators []);
1222 
1225  void SetOperator(OperatorPtr const & in_operator);
1226 
1230  void SetOperator(Operator * in_operator);
1231 
1233  OperatorControl GetOperatorControl();
1234  OperatorControl const GetOperatorControl() const;
1235 
1237  AnimationControl GetAnimationControl();
1238  AnimationControl const GetAnimationControl() const;
1239 
1241  NavigationCubeControl GetNavigationCubeControl();
1242  NavigationCubeControl const GetNavigationCubeControl() const;
1243 
1245  AxisTriadControl GetAxisTriadControl();
1246  AxisTriadControl const GetAxisTriadControl() const;
1247 
1250  SegmentKey GetSegmentKey();
1251  SegmentKey const GetSegmentKey() const;
1252 
1255  SegmentKey GetModelOverrideSegmentKey();
1256  SegmentKey const GetModelOverrideSegmentKey() const;
1257 
1258 
1259  PortfolioKey const GetPortfolioKey() const;
1260 
1262  PortfolioKey GetPortfolioKey();
1263 
1268  void SetSimpleShadow(bool in_state, float in_percent_offset = 5.0f);
1269 
1271  bool GetSimpleShadow();
1272 
1277  void SetSimpleReflection(bool in_state, float in_percent_offset = 5.0f);
1278 
1280  bool GetSimpleReflection();
1281 
1283  void Update() const;
1284 
1287  UpdateNotifier UpdateWithNotifier() const;
1288 
1292  void Update(HPS::Window::UpdateType in_type, HPS::Time in_time_limit = -1.0) const;
1293 
1299  UpdateNotifier UpdateWithNotifier(HPS::Window::UpdateType in_type, HPS::Time in_time_limit = -1.0) const;
1300 
1304  void SmoothTransition(HPS::CameraKit const & in_camera_kit, HPS::Time in_duration = 0.5);
1305 
1307  KeyArray const GetNavigationKeys();
1308 
1310  LayoutArray GetOwningLayouts();
1311  LayoutArray const GetOwningLayouts() const;
1312 };
1313 
1317 class SPRK_API Model : public Sprocket
1318 {
1319 public:
1320  Model();
1321  Model(Model const & that);
1322  ~Model();
1323 
1324  static const HPS::Type staticType = HPS::Type::Model;
1325  HPS::Type ObjectType() const { return staticType; }
1326 
1328  void Delete();
1329 
1330  Model & operator=(Model const & in_that);
1331  void Assign(Model const & in_that);
1332 
1333  bool Equals(Model const & in_that) const;
1334  bool operator!= (Model const & in_that) const;
1335  bool operator== (Model const & in_that) const;
1336 
1338  UTF8 GetName() const;
1339 
1342  SegmentKey GetSegmentKey();
1343  SegmentKey const GetSegmentKey() const;
1344 
1346  SegmentKey GetLibraryKey();
1347  SegmentKey const GetLibraryKey() const;
1348 
1350  PortfolioKey GetPortfolioKey();
1351  PortfolioKey const GetPortfolioKey() const;
1352 
1354  HPS::Vector GetUpVector();
1355  HPS::Vector const GetUpVector() const;
1356 
1358  HPS::Vector GetFrontVector();
1359  HPS::Vector const GetFrontVector() const;
1360 
1362  HPS::ViewArray GetOwningViews();
1363  HPS::ViewArray const GetOwningViews() const;
1364 
1368  void SetOrientation(HPS::Vector const & in_up_vector, HPS::Vector const & in_front_vector);
1369 
1371  bool ShowOrientation(HPS::Vector & out_up_vector, HPS::Vector & out_front_vector) const;
1372 
1374  void Update() const;
1375 
1378  UpdateNotifier UpdateWithNotifier() const;
1379 
1383  void Update(HPS::Window::UpdateType in_type, HPS::Time in_time_limit = -1.0) const;
1384 
1390  UpdateNotifier UpdateWithNotifier(HPS::Window::UpdateType in_type, HPS::Time in_time_limit = -1.0) const;
1391 
1392  Animation CreateAnimation(const char * in_name);
1393 
1396  AnimationArray const & GetAnimations();
1397 };
1398 
1402 class SPRK_API Layout : public Sprocket
1403 {
1404 public:
1405  Layout();
1406  Layout(Layout const & that);
1407  ~Layout();
1408 
1409  static const HPS::Type staticType = HPS::Type::Layout;
1410  HPS::Type ObjectType() const { return staticType; }
1411 
1413  void Delete();
1414 
1415  Layout & operator=(Layout const & in_that);
1416  void Assign(Layout const & in_that);
1417 
1418  bool Equals(Layout const & in_that) const;
1419  bool operator!= (Layout const & in_that) const;
1420  bool operator== (Layout const & in_that) const;
1421 
1423  UTF8 GetName() const;
1424 
1426  size_t GetLayerCount() const;
1427 
1431  void AttachViewFront(View const & in_view, HPS::Rectangle const & in_position = HPS::Rectangle(-1.0f, 1.0f, -1.0f, 1.0f));
1435  void AttachViewBack(View const & in_view, HPS::Rectangle const & in_position = HPS::Rectangle(-1.0f, 1.0f, -1.0f, 1.0f));
1436 
1439  void DetachLayer(size_t in_layer);
1440 
1443  void DetachView(View const & in_view); // everywhere it occurs
1444 
1447  void BringToFront(size_t in_layer);
1448 
1452  void ReassignLayer(size_t in_layer, HPS::View in_view);
1453 
1457  void RepositionLayer(size_t in_layer, HPS::Rectangle const & in_position);
1458 
1460  View GetFrontView() const;
1461 
1465  View GetAttachedView(size_t in_layer = 0) const;
1466 
1470  Rectangle GetPosition(size_t in_layer) const;
1471 
1473  IncludeKey GetAttachedViewIncludeLink(size_t in_layer) const;
1474 
1476  SegmentKey GetLayerSegmentKey(size_t in_layer) const;
1477 
1481  size_t GetLayerAt(HPS::WindowPoint const & in_point) const;
1482 
1486  bool ShowLayerAt(HPS::WindowPoint const & in_point) const;
1487 
1490  SegmentKey GetSegmentKey();
1491  SegmentKey const GetSegmentKey() const;
1492 
1494  CanvasArray GetOwningCanvases();
1495  CanvasArray const GetOwningCanvases() const;
1496 
1498  void Update() const;
1499 
1502  UpdateNotifier UpdateWithNotifier() const;
1503 
1507  void Update(HPS::Window::UpdateType in_type, HPS::Time in_time_limit = -1.0) const;
1508 
1514  UpdateNotifier UpdateWithNotifier(HPS::Window::UpdateType in_type, HPS::Time in_time_limit = -1.0) const;
1515 
1516 };
1517 
1518 class SPRK_API CanvasDeletedEvent : public Event
1519 {
1520 public:
1523  {
1524  channel = GetClassID();
1525  consumable = false;
1526  }
1527 
1528  CanvasDeletedEvent(Canvas const & in_canvas)
1529  : Event(), canvas(in_canvas)
1530  {
1531  channel = GetClassID();
1532  consumable = false;
1533  }
1534 
1537  CanvasDeletedEvent(Event const & in_event) : Event(in_event)
1538  {
1539  if (in_event.GetChannel() == Object::ClassID<CanvasDeletedEvent>())
1540  {
1541  auto that = static_cast<CanvasDeletedEvent const &>(in_event);
1542  canvas = that.canvas;
1543  }
1544  else
1545  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
1546  }
1547 
1548  ~CanvasDeletedEvent();
1549 
1552  Event * Clone() const
1553  {
1554  CanvasDeletedEvent * new_event = new CanvasDeletedEvent(*this);
1555  return new_event;
1556  }
1557 
1558  Canvas canvas;
1559 };
1560 
1561 class SPRK_API LayoutDetachedEvent : public Event
1562 {
1563 public:
1566  {
1567  channel = GetClassID();
1568  consumable = false;
1569  }
1570 
1571  LayoutDetachedEvent(Canvas const & in_canvas, Layout const & in_layout)
1572  : Event(), canvas(in_canvas), layout(in_layout)
1573  {
1574  channel = GetClassID();
1575  consumable = false;
1576  }
1577 
1580  LayoutDetachedEvent(Event const & in_event) : Event(in_event)
1581  {
1582  if (in_event.GetChannel() == Object::ClassID<LayoutDetachedEvent>())
1583  {
1584  auto that = static_cast<LayoutDetachedEvent const &>(in_event);
1585  canvas = that.canvas;
1586  layout = that.layout;
1587  }
1588  else
1589  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
1590  }
1591 
1593 
1596  Event * Clone() const
1597  {
1598  LayoutDetachedEvent * new_event = new LayoutDetachedEvent(*this);
1599  return new_event;
1600  }
1601 
1602  Canvas canvas;
1603  Layout layout;
1604 };
1605 
1606 class SPRK_API LayoutDeletedEvent : public Event
1607 {
1608 public:
1611  {
1612  channel = GetClassID();
1613  consumable = false;
1614  }
1615 
1616  LayoutDeletedEvent(Layout const & in_layout)
1617  : Event(), layout(in_layout)
1618  {
1619  channel = GetClassID();
1620  consumable = false;
1621  }
1622 
1625  LayoutDeletedEvent(Event const & in_event) : Event(in_event)
1626  {
1627  if (in_event.GetChannel() == Object::ClassID<LayoutDeletedEvent>())
1628  {
1629  auto that = static_cast<LayoutDeletedEvent const &>(in_event);
1630  layout = that.layout;
1631  }
1632  else
1633  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
1634  }
1635 
1636  ~LayoutDeletedEvent();
1637 
1640  Event * Clone() const
1641  {
1642  LayoutDeletedEvent * new_event = new LayoutDeletedEvent(*this);
1643  return new_event;
1644  }
1645 
1646  Layout layout;
1647 };
1648 
1649 class SPRK_API ViewDetachedEvent : public Event
1650 {
1651 public:
1652  enum class Action
1653  {
1654  None = 0,
1655  SpecificLayer,
1656  AllLayers,
1657  };
1658 
1660  ViewDetachedEvent() : Event(), action(Action::None), layer(0)
1661  {
1662  channel = GetClassID();
1663  consumable = false;
1664  }
1665 
1666  ViewDetachedEvent(Layout const & in_layout, size_t in_layer, View const & in_view)
1667  : Event(), layout(in_layout), action(Action::SpecificLayer), layer(in_layer), view(in_view)
1668  {
1669  channel = GetClassID();
1670  consumable = false;
1671  }
1672 
1673  ViewDetachedEvent(Layout const & in_layout, View const & in_view)
1674  : Event(), layout(in_layout), action(Action::AllLayers), layer(std::numeric_limits<size_t>::max()), view(in_view)
1675  {
1676  channel = GetClassID();
1677  consumable = false;
1678  }
1679 
1682  ViewDetachedEvent(Event const & in_event) : Event(in_event)
1683  {
1684  if (in_event.GetChannel() == Object::ClassID<ViewDetachedEvent>())
1685  {
1686  auto that = static_cast<ViewDetachedEvent const &>(in_event);
1687  layout = that.layout;
1688  action = that.action;
1689  layer = that.layer;
1690  view = that.view;
1691  }
1692  else
1693  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
1694  }
1695 
1696  ~ViewDetachedEvent();
1697 
1700  Event * Clone() const
1701  {
1702  ViewDetachedEvent * new_event = new ViewDetachedEvent(*this);
1703  return new_event;
1704  }
1705 
1706  Layout layout;
1707  Action action;
1708  size_t layer;
1709  View view;
1710 };
1711 
1712 class SPRK_API ViewDeletedEvent : public Event
1713 {
1714 public:
1717  {
1718  channel = GetClassID();
1719  consumable = false;
1720  }
1721 
1722  ViewDeletedEvent(View const & in_view)
1723  : Event(), view(in_view)
1724  {
1725  channel = GetClassID();
1726  consumable = false;
1727  }
1728 
1731  ViewDeletedEvent(Event const & in_event) : Event(in_event)
1732  {
1733  if (in_event.GetChannel() == Object::ClassID<ViewDeletedEvent>())
1734  {
1735  auto that = static_cast<ViewDeletedEvent const &>(in_event);
1736  view = that.view;
1737  }
1738  else
1739  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
1740  }
1741 
1742  ~ViewDeletedEvent();
1743 
1746  Event * Clone() const
1747  {
1748  ViewDeletedEvent * new_event = new ViewDeletedEvent(*this);
1749  return new_event;
1750  }
1751 
1752  View view;
1753 };
1754 
1755 class SPRK_API ModelDetachedEvent : public Event
1756 {
1757 public:
1760  {
1761  channel = GetClassID();
1762  consumable = false;
1763  }
1764 
1765  ModelDetachedEvent(View const & in_view, Model const & in_model)
1766  : Event(), view(in_view), model(in_model)
1767  {
1768  channel = GetClassID();
1769  consumable = false;
1770  }
1771 
1774  ModelDetachedEvent(Event const & in_event) : Event(in_event)
1775  {
1776  if (in_event.GetChannel() == Object::ClassID<ModelDetachedEvent>())
1777  {
1778  auto that = static_cast<ModelDetachedEvent const &>(in_event);
1779  view = that.view;
1780  model = that.model;
1781  }
1782  else
1783  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
1784  }
1785 
1786  ~ModelDetachedEvent();
1787 
1790  Event * Clone() const
1791  {
1792  ModelDetachedEvent * new_event = new ModelDetachedEvent(*this);
1793  return new_event;
1794  }
1795 
1796  View view;
1797  Model model;
1798 };
1799 
1800 class SPRK_API ModelDeletedEvent : public Event
1801 {
1802 public:
1805  {
1806  channel = GetClassID();
1807  consumable = false;
1808  }
1809 
1810  ModelDeletedEvent(Model const & in_model)
1811  : Event(), model(in_model)
1812  {
1813  channel = GetClassID();
1814  consumable = false;
1815  }
1816 
1819  ModelDeletedEvent(Event const & in_event) : Event(in_event)
1820  {
1821  if (in_event.GetChannel() == Object::ClassID<ModelDeletedEvent>())
1822  {
1823  auto that = static_cast<ModelDeletedEvent const &>(in_event);
1824  model = that.model;
1825  }
1826  else
1827  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
1828  }
1829 
1830  ~ModelDeletedEvent();
1831 
1834  Event * Clone() const
1835  {
1836  ModelDeletedEvent * new_event = new ModelDeletedEvent(*this);
1837  return new_event;
1838  }
1839 
1840  Model model;
1841 };
1842 
1843 class SPRK_API CameraChangedEvent : public Event
1844 {
1845 public:
1848  {
1849  channel = GetClassID();
1850  consumable = false;
1851  }
1852 
1853  CameraChangedEvent(View const & in_view)
1854  : Event(), view(in_view)
1855  {
1856  channel = GetClassID();
1857  consumable = false;
1858  }
1859 
1862  CameraChangedEvent(Event const & in_event) : Event(in_event)
1863  {
1864  if (in_event.GetChannel() == Object::ClassID<CameraChangedEvent>())
1865  {
1866  auto that = static_cast<CameraChangedEvent const &>(in_event);
1867  view = that.view;
1868  }
1869  else
1870  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
1871  }
1872 
1873  ~CameraChangedEvent();
1874 
1875  virtual bool Drop(Event const * in_that_event) const
1876  {
1877  CameraChangedEvent const * that_event = static_cast<CameraChangedEvent const *>(in_that_event);
1878 
1879  if (view == that_event->view)
1880  return true;
1881 
1882  return false;
1883  }
1884 
1885  virtual intptr_t Freshen() const
1886  {
1887  return GetClassID();
1888  }
1889 
1892  Event * Clone() const
1893  {
1894  CameraChangedEvent * new_event = new CameraChangedEvent(*this);
1895  return new_event;
1896  }
1897 
1898  View view;
1899 };
1900 
1903 class SPRK_API SprocketPath : public Sprocket
1904 {
1905 public:
1906  SprocketPath();
1907  SprocketPath(Model const & in_model, View const & in_view, Layout const & in_layout, Canvas const & in_canvas);
1908  SprocketPath(Canvas const & in_canvas, Layout const & in_layout, View const & in_view, Model const & in_model);
1909  SprocketPath(Canvas const & in_canvas, size_t in_layer = 0);
1910  SprocketPath(SprocketPath const & that);
1911  ~SprocketPath();
1912 
1913  static const HPS::Type staticType = HPS::Type::SprocketPath;
1914  HPS::Type ObjectType() const { return staticType; }
1915 
1916  SprocketPath & operator=(SprocketPath const & in_that);
1917  void Set(SprocketPath const & in_that);
1918 
1919  bool Equals(SprocketPath const & in_that) const;
1920  bool operator!= (SprocketPath const & in_that) const;
1921  bool operator== (SprocketPath const & in_that) const;
1922 
1924  Canvas GetCanvas() const;
1925 
1927  Layout GetLayout() const;
1928 
1930  View GetView() const;
1931 
1933  Model GetModel() const;
1934 
1939  KeyPath GetKeyPath() const;
1940 };
1941 
1942 
1945 class SPRK_API Operator : public Sprocket
1946 {
1947 public:
1948  Operator(MouseButtons in_mouse_trigger = MouseButtons::ButtonLeft(), ModifierKeys in_modifier_trigger = ModifierKeys());
1949  Operator(Operator const & in_that);
1950 
1951  virtual ~Operator();
1952 
1953  static const HPS::Type staticType = HPS::Type::Operator;
1954  HPS::Type ObjectType() const { return staticType; }
1955 
1956  virtual Operator & operator= (Operator const & in_that);
1957 
1959  virtual void Assign(Operator const & in_that);
1960 
1962  virtual bool Equals(Operator const & in_that) const;
1963 
1965  virtual bool operator!= (Operator const & in_that) const;
1966 
1968  virtual bool operator== (Operator const & in_that) const;
1969 
1971  void DetachView();
1972 
1974  View GetAttachedView() const;
1975 
1977  virtual UTF8 GetName() const { return "Operator"; }
1978 
1982  virtual bool OnMouseDown(MouseState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
1983 
1987  virtual bool OnMouseUp(MouseState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
1988 
1992  virtual bool OnMouseMove(MouseState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
1993 
1997  virtual bool OnMouseWheel(MouseState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
1998 
2002  virtual bool OnMouseEnter(MouseState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
2003 
2007  virtual bool OnMouseLeave(MouseState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
2008 
2012  virtual bool OnTouchDown(TouchState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
2013 
2017  virtual bool OnTouchUp(TouchState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
2018 
2022  virtual bool OnTouchMove(TouchState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
2023 
2027  virtual bool OnKeyDown(KeyboardState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
2028 
2032  virtual bool OnKeyUp(KeyboardState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
2033 
2037  virtual bool OnTextInput(HPS::UTF8 const & in_text) { HPS_UNREFERENCED(in_text); return false; }
2038 
2042  virtual bool OnTimerTick(HPS::TimerTickEvent const & in_event) { HPS_UNREFERENCED(in_event); return false; }
2043 
2046  virtual void OnViewAttached(HPS::View const & in_attached_view) { HPS_UNREFERENCED(in_attached_view); return; }
2047 
2050  virtual void OnViewDetached(HPS::View const & in_detached_view) { HPS_UNREFERENCED(in_detached_view); return; }
2051 
2054  virtual void OnModelAttached() { return; }
2055 
2058  virtual void OnModelDetached() { return; }
2059 
2061  void SetMouseTrigger(MouseButtons in_buttons) { mouse_trigger = in_buttons; }
2062 
2065  MouseButtons GetMouseTrigger() const { return mouse_trigger; }
2066 
2070  void SetModifierTrigger(ModifierKeys in_modifiers) { modifier_trigger = in_modifiers; }
2071 
2073  ModifierKeys GetModifierTrigger() const { return modifier_trigger; }
2074 
2076  virtual bool IsMouseTriggered(MouseState const & in_state) { return in_state.HasAll(mouse_trigger, modifier_trigger); }
2077 
2078  enum class Priority
2079  {
2080  Low,
2081  Default,
2082  High
2083  };
2084 
2085 protected:
2086 
2087  HPS::MouseButtons mouse_trigger;
2088  HPS::ModifierKeys modifier_trigger;
2089 };
2090 
2091 class SPRK_API OperatorUtility
2092 {
2093  static double internal_acos(double x)
2094  {
2095  return (((x)<-1) ? (HPS::PI) : (((x)>1) ? (0) : (acos(x))));
2096  }
2097 
2098 public:
2099 
2100  enum ProjectedPlane
2101  {
2102  Plane_XY,
2103  Plane_YZ,
2104  Plane_XZ
2105  };
2106 
2107  static void ScreenToSphereMousePoint(HPS::Point const &in_pt, HPS::Vector &out_vec)
2108  {
2109  out_vec = HPS::Vector(in_pt);
2110  float len = static_cast<float>(out_vec.Length());
2111  if (len > 1.0f)
2112  {
2113  out_vec /= len;
2114  out_vec.z = 0;
2115  }
2116  else
2117  out_vec.z = (float)sqrt(1.0f - (len*len));
2118  }
2119 
2120  static float CalculateAngleOrbitOnPlane(HPS::Vector const &axis, ProjectedPlane plane)
2121  {
2122  float theta;
2123 
2124  HPS::Vector vtmp;
2125  if (plane == Plane_XY)
2126  vtmp = HPS::Vector(axis.x, axis.y, 0);
2127  else if (plane == Plane_YZ)
2128  vtmp = HPS::Vector(0, axis.y, axis.z);
2129  else
2130  vtmp = HPS::Vector(axis.x, 0, axis.z);
2131  Vector naxis = axis;
2132 
2133  naxis.Normalize();
2134  vtmp.Normalize();
2135 
2136  float tmp = naxis.Dot(vtmp);
2137  if (static_cast<float>(Abs(tmp)) > 1.001f || static_cast<float>(Abs(tmp)) < 0.999f)
2138  theta = static_cast<float>(internal_acos(tmp));
2139  else
2140  theta = 0.0f;
2141 
2142  return theta;
2143  }
2144 };
2145 
2148 class SPRK_API OperatorControl : public SprocketControl
2149 {
2150 public:
2152  explicit OperatorControl(View const & in_view);
2153 
2155  OperatorControl(OperatorControl const & in_that);
2156 
2160  OperatorControl(OperatorControl && in_that);
2161 
2165  OperatorControl & operator=(OperatorControl && in_that);
2166 
2168  ~OperatorControl();
2169 
2170  static const HPS::Type staticType = HPS::Type::OperatorControl;
2171  HPS::Type ObjectType() const {return staticType;};
2172 
2174  OperatorControl & operator=(OperatorControl const & in_that);
2175 
2176 
2178  size_t GetCount();
2179 
2182  size_t GetCount(Operator::Priority in_priority);
2183 
2184 
2190  OperatorControl & Push(OperatorPtr const & in_operator, Operator::Priority in_priority = Operator::Priority::Default);
2191 
2198  OperatorControl & Push(Operator * in_operator, Operator::Priority in_priority = Operator::Priority::Default);
2199 
2203  bool Pop(Operator::Priority in_priority = Operator::Priority::Default);
2204 
2209  bool Pop(OperatorPtr & out_operator);
2210 
2216  bool Pop(Operator::Priority in_priority, OperatorPtr & out_operator);
2217 
2218 
2224  OperatorControl & Set(OperatorPtr const & in_operator, Operator::Priority in_priority = Operator::Priority::Default);
2225 
2232  OperatorControl & Set(Operator * in_operator, Operator::Priority in_priority = Operator::Priority::Default);
2233 
2239  OperatorControl & Set(OperatorPtrArray & in_operators, Operator::Priority in_priority = Operator::Priority::Default);
2240 
2247  OperatorControl & Set(size_t in_count, OperatorPtr in_operators [], Operator::Priority in_priority = Operator::Priority::Default);
2248 
2249 
2253  OperatorControl & UnsetTop(Operator::Priority in_priority = Operator::Priority::Default);
2254 
2258  OperatorControl & UnsetEverything(Operator::Priority in_priority);
2259 
2262  OperatorControl & UnsetEverything();
2263 
2264 
2268  bool ShowTop(OperatorPtr & out_operator) const;
2269 
2274  bool ShowTop(Operator::Priority in_priority, OperatorPtr & out_operator) const;
2275 
2279  bool Show(OperatorPtrArray & out_operators) const;
2280 
2285  bool Show(Operator::Priority in_priority, OperatorPtrArray & out_operators) const;
2286 
2287 private:
2289  OperatorControl() {}
2290 };
2291 
2298 {
2299 public:
2300 
2301  enum class Location
2302  {
2303  TopRight,
2304  TopLeft,
2305  BottomRight,
2306  BottomLeft,
2307  Custom,
2308  };
2309 
2311  explicit NavigationCubeControl(View const & in_view);
2312 
2315 
2320 
2324  NavigationCubeControl & operator=(NavigationCubeControl && in_that);
2325 
2328 
2329  static const HPS::Type staticType = HPS::Type::NavigationCubeControl;
2330  HPS::Type ObjectType() const {return staticType;};
2331 
2333  NavigationCubeControl & operator=(NavigationCubeControl const & in_that);
2334 
2343  NavigationCubeControl & SetLocation(Location in_location, HPS::Rectangle const & in_rectangle = HPS::Rectangle(), HPS::IntRectangle in_offsets = HPS::IntRectangle::Zero());
2344 
2347  Location GetLocation() const;
2348 
2352  NavigationCubeControl & SetPosition(HPS::Rectangle const & in_rectangle);
2353 
2356  HPS::Rectangle GetPosition() const;
2357 
2361  NavigationCubeControl & SetPositionOffsets(HPS::IntRectangle const & in_offsets);
2362 
2365  HPS::IntRectangle GetPositionOffsets() const;
2366 
2371  NavigationCubeControl & SetVisibility(bool in_visibility);
2372 
2375  bool GetVisibility() const;
2376 
2380  NavigationCubeControl & SetTextVisibility(bool in_text_visibility);
2381 
2384  bool GetTextVisibility() const;
2385 
2400  NavigationCubeControl & SetMaterialPalette(char const * in_material_palette);
2401 
2404  HPS::UTF8 GetMaterialPalette() const;
2405 
2413  NavigationCubeControl & SetInteractivity(bool in_interactivity);
2414 
2415 
2418  bool GetInteractivity() const;
2419 
2424  NavigationCubeControl & SetSize(float in_size);
2425 
2428  float GetSize() const;
2429 
2446  NavigationCubeControl & SetText(const char * in_back_string, const char * in_top_string, const char * in_left_string,
2447  const char * in_front_string, const char * in_bottom_string, const char * in_right_string,
2448  HPS::TextAttributeKit const & in_text_attributes, HPS::UTF8Array const & in_fallback_fonts = HPS::UTF8Array());
2449 
2478  NavigationCubeControl & SetMaterialPaletteAndText(char const * in_material_palette, const char * in_back_string,
2479  const char * in_top_string, const char * in_left_string, const char * in_front_string, const char * in_bottom_string,
2480  const char * in_right_string, HPS::TextAttributeKit const & in_text_attributes,
2481  HPS::UTF8Array const & in_fallback_fonts = HPS::UTF8Array());
2482 
2493  bool GetText(UTF8 & out_back_string, UTF8 & out_top_string, UTF8 & out_left_string,
2494  UTF8 & out_front_string, UTF8 & out_bottom_string, UTF8 & out_right_string,
2495  HPS::TextAttributeKit & out_text_attributes, HPS::UTF8Array & out_fallback_fonts) const;
2496 
2499  HPS::SegmentKey GetSegmentKey() const;
2500 
2501 private:
2504 
2506  HPS::SegmentKey GetNavigationCubeSegment() const;
2507  void SetNavigationCubeVisibilityLink(bool in_visibility) const;
2508 
2509  bool IsTextVisible() const;
2510 };
2511 
2514 class SPRK_API AxisTriadControl : public SprocketControl
2515 {
2516 public:
2517 
2518  enum class Location
2519  {
2520  TopRight,
2521  TopLeft,
2522  BottomRight,
2523  BottomLeft,
2524  Custom,
2525  };
2526 
2528  explicit AxisTriadControl(View const & in_view);
2529 
2531  AxisTriadControl(AxisTriadControl const & in_that);
2532 
2536  AxisTriadControl(AxisTriadControl && in_that);
2537 
2541  AxisTriadControl & operator=(AxisTriadControl && in_that);
2542 
2544  ~AxisTriadControl();
2545 
2546  static const HPS::Type staticType = HPS::Type::AxisTriadControl;
2547  HPS::Type ObjectType() const {return staticType;};
2548 
2550  AxisTriadControl & operator=(AxisTriadControl const & in_that);
2551 
2560  HPS::AxisTriadControl & SetLocation(Location in_location, HPS::Rectangle const & in_position = HPS::Rectangle(), HPS::IntRectangle in_offsets = HPS::IntRectangle::Zero());
2561 
2564  Location GetLocation() const;
2565 
2569  AxisTriadControl & SetPosition(HPS::Rectangle const & in_position);
2570 
2573  HPS::Rectangle GetPosition() const;
2574 
2578  AxisTriadControl & SetPositionOffsets(HPS::IntRectangle const & in_offsets);
2579 
2582  HPS::IntRectangle GetPositionOffsets() const;
2583 
2588  HPS::AxisTriadControl & SetVisibility(bool in_visibility);
2589 
2592  bool GetVisibility() const;
2593 
2597  HPS::AxisTriadControl & SetTextVisibility(bool in_text_visibility);
2598 
2601  bool GetTextVisibility() const;
2602 
2611  HPS::AxisTriadControl & SetMaterialPalette(char const * in_material_palette);
2612 
2615  HPS::UTF8 GetMaterialPalette() const;
2616 
2623  HPS::AxisTriadControl & SetInteractivity(bool in_interactivity);
2624 
2627  bool GetInteractivity() const;
2628 
2633  AxisTriadControl & SetSize(float in_size);
2634 
2637  float GetSize() const;
2638 
2641  HPS::SegmentKey GetSegmentKey() const;
2642 
2643 private:
2645  AxisTriadControl(){};
2646 
2648  HPS::SegmentKey GetAxisTriadSegment() const;
2649 
2650  void SetAxisVisibilityLink(bool in_visibility) const;
2651 };
2652 
2654 class SPRK_API Component : public Sprocket
2655 {
2656 public:
2657 
2660  enum class ComponentType : uint32_t
2661  {
2662  None = 0x00000000,
2663  GenericMask = 0xfffff000,
2664 
2665  ExchangeComponentMask = 0x00001000,
2666  ExchangeModelFile = 0x00001001,
2667  ExchangeProductOccurrence = 0x00001002,
2668  ExchangePartDefinition = 0x00001003,
2669 
2670  ExchangeView = 0x00001004,
2671  ExchangeFilter = 0x00001005,
2672 
2673  ExchangeRepresentationItemMask = 0x00003000,
2674  ExchangeRIBRepModel = 0x00003001,
2675  ExchangeRICurve = 0x00003002,
2676  ExchangeRIDirection = 0x00003003,
2677  ExchangeRIPlane = 0x00003004,
2678  ExchangeRIPointSet = 0x00003005,
2679  ExchangeRIPolyBRepModel = 0x00003006,
2680  ExchangeRIPolyWire = 0x00003007,
2681  ExchangeRISet = 0x00003008,
2682  ExchangeRICoordinateSystem = 0x00003009,
2683 
2684  ExchangeTopologyMask = 0x00005000,
2685  ExchangeTopoBody = 0x00005001,
2686  ExchangeTopoConnex = 0x00005002,
2687  ExchangeTopoShell = 0x00005003,
2688  ExchangeTopoFace = 0x00005004,
2689  ExchangeTopoLoop = 0x00005005,
2690  ExchangeTopoCoEdge = 0x00005006,
2691  ExchangeTopoEdge = 0x00005007,
2692  ExchangeTopoVertex = 0x00005008,
2693  ExchangeTopoSingleWireBody = 0x00005009,
2694  ExchangeTopoWireEdge = 0x0000500a,
2695 
2696  ExchangeDrawingMask = 0x00009000,
2697  ExchangeDrawingModel = 0x00009001,
2698  ExchangeDrawingView = 0x00009002,
2699  ExchangeDrawingSheet = 0x00009003,
2700  ExchangeBasicDrawingBlock = 0x00009004,
2701  ExchangeOperatorDrawingBlock = 0x00009005,
2702 
2703  ExchangePMIMask = 0x00011000,
2704  ExchangePMI = ExchangePMIMask,
2705  ExchangePMIText = 0x00011100,
2706  ExchangePMIRichText = 0x00011200,
2707  ExchangePMIRoughness = 0x00011300,
2708  ExchangePMIGDT = 0x00011400,
2709  ExchangePMIDatum = 0x00011500,
2710  ExchangePMILineWelding = 0x00011600,
2711  ExchangePMISpotWelding = 0x00011700,
2712  ExchangePMIDimension = 0x00011800,
2713  ExchangePMIBalloon = 0x00011900,
2714  ExchangePMICoordinate = 0x00011a00,
2715  ExchangePMIFastener = 0x00011b00,
2716  ExchangePMILocator = 0x00011c00,
2717  ExchangePMIMeasurementPoint = 0x00011d00,
2718 
2719 
2720  ParasolidComponentMask = 0x00020000,
2721 
2722  ParasolidModelFile = 0x00020001,
2723  ParasolidAssembly = 0x00020002,
2724  ParasolidInstance = 0x00020003,
2725 
2726  ParasolidTopologyMask = 0x00060000,
2727  ParasolidTopoBody = 0x00060001,
2728  ParasolidTopoRegion = 0x00060002,
2729  ParasolidTopoShell = 0x00060003,
2730  ParasolidTopoFace = 0x00060004,
2731  ParasolidTopoLoop = 0x00060005,
2732  ParasolidTopoFin = 0x00060006,
2733  ParasolidTopoEdge = 0x00060007,
2734  ParasolidTopoVertex = 0x00060008,
2735 
2736 
2737  DWGComponentMask = 0x00100000,
2738  DWGModelFile = 0x00100001,
2739  DWGLayout = 0x00100002,
2740  DWGBlockTable = 0x00100003,
2741  DWGBlockTableRecord = 0x00100004,
2742  DWGEntity = 0x00100005,
2743  DWGLayerTable = 0x00100006,
2744  DWGLayer = 0x00100007,
2745 
2746 
2747  UserComponent = 0x01000000,
2748  };
2749 
2752  enum class DeleteMode
2753  {
2754  Standard, // subcomponents will be deleted if they don't have multiple owners, otherwise their reference count will be decremented
2755  Full, // subcomponents will always be deleted, even if they are shared
2756  StandardAndExchange // Subcomponent will deleted if they don't have multiple owners, otherwise their reference count will be decremented.
2757  // The Exchange Entity associated to the Component will be deleted.
2758  };
2759 
2761  Component();
2762 
2765  Component(Component const & in_that);
2766 
2769  Component(Component && in_that);
2770 
2772  virtual ~Component();
2773 
2774  static const HPS::Type staticType = HPS::Type::Component;
2775  HPS::Type ObjectType() const { return staticType; }
2776 
2777 
2781  Component & operator=(Component const & in_that);
2782 
2786  Component & operator=(Component && in_that);
2787 
2791  virtual void Assign(Component const & in_that);
2792 
2796  bool Equals(Component const & in_that) const;
2797 
2801  bool operator!=(Component const & in_that) const;
2802 
2806  bool operator==(Component const & in_that) const;
2807 
2808 
2811  ComponentType GetComponentType() const;
2812 
2816  bool HasComponentType(ComponentType in_mask) const;
2817 
2818 
2819 
2825  void AddKey(Key const & in_key);
2826 
2829  KeyArray GetKeys() const;
2830 
2831 
2832 
2837  void AddOwner(Component & in_owner, IncludeKey const & in_include = IncludeKey());
2838 
2843  ComponentArray GetOwners() const;
2844 
2847  ComponentArray GetSubcomponents() const;
2848 
2853  ComponentArray GetAllSubcomponents(ComponentType in_type) const;
2854 
2855 
2856 
2859  void AddReference(Component & in_reference);
2860 
2867  ComponentArray GetReferrers() const;
2868 
2872  ComponentArray GetReferences() const;
2873 
2874 
2875 
2878  MetadataArray GetAllMetadata() const;
2879 
2883  Metadata GetMetadata(char const * in_name) const;
2884 
2888  UTF8 GetName() const;
2889 
2890 
2891 
2944  void Delete(HPS::Component::DeleteMode mode = HPS::Component::DeleteMode::Standard);
2945 
2949  void Flush();
2950 
2951 
2959  static KeyPathArray GetKeyPath(Component const & in_component);
2960 
2970  static KeyPathArray GetKeyPath(size_t in_count, Component const in_components[]);
2971 
2980  static KeyPathArray GetKeyPath(ComponentArray const & in_components);
2981 
2987  bool SetTransform(MatrixKit const & in_transform);
2988 
2994  bool AddTransform(MatrixKit const & in_transform);
2995 
3016  Component CopyTo(HPS::Component const & in_new_owner);
3017 
3022  bool SetName(char const * in_new_name);
3023 };
3024 
3026 class SPRK_API ComponentPath : public Sprocket
3027 {
3028 public:
3031  enum class PathType : uint32_t
3032  {
3033  Complete,
3034  Unique,
3035  };
3036 
3038  ComponentPath();
3039 
3042  ComponentPath(ComponentArray const & in_components);
3043 
3047  ComponentPath(size_t in_count, Component const in_components[]);
3048 
3050  ComponentPath(ComponentPath const & in_that);
3051 
3055  ComponentPath(ComponentPath && in_that);
3056 
3060  ComponentPath & operator=(ComponentPath && in_that);
3061 
3063  virtual ~ComponentPath();
3064 
3065  static const HPS::Type staticType = HPS::Type::ComponentPath;
3066  HPS::Type ObjectType() const { return staticType; }
3067 
3070  bool Empty() const;
3071 
3075  ComponentPath & operator+=(Component const & in_component);
3076 
3080  ComponentPath & operator+=(ComponentPath const & in_path);
3081 
3085  ComponentPath & operator+=(ComponentArray const & in_components);
3086 
3091  ComponentPath & Append(Component const & in_component);
3092 
3097  ComponentPath & Append(ComponentPath const & in_path);
3098 
3103  ComponentPath & Append(ComponentArray const & in_components);
3104 
3108  ComponentPath & operator=(ComponentPath const & in_that);
3109 
3113  ComponentPath & operator=(ComponentArray const & in_path);
3114 
3117  void Set(ComponentPath const & in_that);
3118 
3122  bool Equals(ComponentPath const & in_that) const;
3123 
3127  bool operator!= (ComponentPath const & in_that) const;
3128 
3132  bool operator== (ComponentPath const & in_that) const;
3133 
3134 
3138  ComponentPath & SetComponents(ComponentArray const & in_components);
3139 
3144  ComponentPath & SetComponents(size_t in_count, Component const in_components[]);
3145 
3148  ComponentArray GetComponents() const;
3149 
3153  KeyPathArray GetKeyPaths() const;
3154 
3159  KeyPathArray GetKeyPaths(Canvas const & in_canvas, size_t in_layer = 0) const;
3160 
3161 
3168  void Highlight(Canvas const & in_canvas, HighlightOptionsKit const & in_options, bool in_remove_existing = true) const;
3169 
3176  void Highlight(Canvas const & in_canvas, size_t in_layer, HighlightOptionsKit const & in_options, bool in_remove_existing = true) const;
3177 
3181  void Unhighlight(Canvas const & in_canvas, HighlightOptionsKit const & in_options = HighlightOptionsKit()) const;
3182 
3187  void Unhighlight(Canvas const & in_canvas, size_t in_layer, HighlightOptionsKit const & in_options = HighlightOptionsKit()) const;
3188 
3189 
3201  void Hide(Canvas const & in_canvas, size_t in_layer = 0);
3202 
3214  void Show(Canvas const & in_canvas, size_t in_layer = 0);
3215 
3227  bool IsHidden(Canvas const & in_canvas, size_t in_layer = 0) const;
3228 
3239  void Isolate(Canvas const & in_canvas, size_t in_layer = 0);
3240 
3252  static void Isolate(HPS::ComponentPathArray & in_component_paths, Canvas const & in_canvas, size_t in_layer = 0);
3253 
3263  void ResetVisibility(Canvas const & in_canvas, size_t in_layer = 0);
3264 
3275  static void ResetVisibility(HPS::ComponentPathArray & in_component_paths, Canvas const & in_canvas, size_t in_layer = 0);
3276 
3279  size_t Size() const;
3280 
3284  Component & At(size_t in_index);
3285 
3289  Component const & At(size_t in_index) const;
3290 
3295  void Insert(size_t in_index, Component const & in_item);
3296 
3300  void Remove(Component const & in_item);
3301 
3304  void Remove(size_t in_index);
3305 
3308  ComponentPath Reverse() const;
3309 
3312  Component & Front();
3313 
3316  Component const & Front() const;
3317 
3320  Component & Back();
3321 
3324  Component const & Back() const;
3325 
3328  Component PopFront();
3329 
3332  Component PopBack();
3333 
3337  ComponentPath & PushFront(Component const & in_component);
3338 
3342  ComponentPath & PushBack(Component const & in_component);
3343 
3347  ComponentPath & PushBack(ComponentPath const & in_path);
3348 
3352  ComponentPath & PushBack(ComponentArray const & in_components);
3353 
3354 #ifndef HPS_GULP_CLANG
3355  using iterator = HPS::ComponentArray::iterator;
3356  using const_iterator = HPS::ComponentArray::const_iterator;
3357  using reverse_iterator = HPS::ComponentArray::reverse_iterator;
3358  using const_reverse_iterator = HPS::ComponentArray::const_reverse_iterator;
3359 
3362  iterator begin();
3363 
3366  const_iterator begin() const;
3367 
3370  iterator end();
3371 
3374  const_iterator end() const;
3375 
3378  const_iterator cbegin() const;
3379 
3382  const_iterator cend() const;
3383 
3386  reverse_iterator rbegin();
3387 
3390  reverse_iterator rend();
3391 
3394  const_reverse_iterator rbegin() const;
3395 
3398  const_reverse_iterator rend() const;
3399 #endif
3400 };
3401 
3402 
3407 inline ComponentPath operator+(Component const & in_lhs, Component const & in_rhs)
3408 {
3409  return HPS::ComponentPath().PushBack(in_lhs).PushBack(in_rhs);
3410 }
3411 
3416 inline ComponentPath operator+(Component const & in_lhs, ComponentArray const & in_rhs)
3417 {
3418  return HPS::ComponentPath().PushBack(in_lhs).PushBack(in_rhs);
3419 }
3420 
3425 inline ComponentPath operator+(Component const & in_lhs, ComponentPath const & in_rhs)
3426 {
3427  return HPS::ComponentPath().PushBack(in_lhs).PushBack(in_rhs);
3428 }
3429 
3434 inline ComponentPath operator+(ComponentArray const & in_lhs, Component const & in_rhs)
3435 {
3436  return HPS::ComponentPath().PushBack(in_lhs).PushBack(in_rhs);
3437 }
3438 
3443 inline ComponentPath operator+(ComponentArray const & in_lhs, ComponentArray const & in_rhs)
3444 {
3445  return HPS::ComponentPath().PushBack(in_lhs).PushBack(in_rhs);
3446 }
3447 
3452 inline ComponentPath operator+(ComponentArray const & in_lhs, ComponentPath const & in_rhs)
3453 {
3454  return HPS::ComponentPath().PushBack(in_lhs).PushBack(in_rhs);
3455 }
3456 
3461 inline ComponentPath operator+(ComponentPath const & in_lhs, Component const & in_rhs)
3462 {
3463  return HPS::ComponentPath().PushBack(in_lhs).PushBack(in_rhs);
3464 }
3465 
3470 inline ComponentPath operator+(ComponentPath const & in_lhs, ComponentArray const & in_rhs)
3471 {
3472  return HPS::ComponentPath().PushBack(in_lhs).PushBack(in_rhs);
3473 }
3474 
3479 inline ComponentPath operator+(ComponentPath const & in_lhs, ComponentPath const & in_rhs)
3480 {
3481  return HPS::ComponentPath().PushBack(in_lhs).PushBack(in_rhs);
3482 }
3483 
3485 class SPRK_API ComponentResetEvent : public HPS::Event
3486 {
3487 public:
3488 
3490  {
3491  channel = GetClassID();
3492  consumable = false;
3493  }
3494 
3495  ComponentResetEvent(HPS::ComponentPath const & in_path, HPS::Canvas const & in_canvas, size_t in_layer = 0)
3496  : Event(), path(in_path), canvas(in_canvas), layer(in_layer)
3497  {
3498  channel = GetClassID();
3499  consumable = false;
3500  }
3501 
3502  ComponentResetEvent(HPS::Event const & in_event) : Event(in_event)
3503  {
3504  if (in_event.GetChannel() == HPS::Object::ClassID<ComponentResetEvent>())
3505  {
3506  auto that = static_cast<ComponentResetEvent const &>(in_event);
3507  path = that.path;
3508  canvas = that.canvas;
3509  layer = that.layer;
3510  }
3511  else
3512  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
3513  }
3514 
3515  virtual ~ComponentResetEvent() {}
3516 
3517  Event * Clone() const override
3518  {
3519  ComponentResetEvent * new_event = new ComponentResetEvent(*this);
3520  return new_event;
3521  }
3522 
3523  HPS::ComponentPath path;
3524  HPS::Canvas canvas;
3525  size_t layer;
3526 };
3527 
3529 class SPRK_API ComponentShownEvent : public HPS::Event
3530 {
3531 public:
3532 
3534  {
3535  channel = GetClassID();
3536  consumable = false;
3537  }
3538 
3539  ComponentShownEvent(HPS::ComponentPath const & in_path, HPS::Canvas const & in_canvas, size_t in_layer = 0)
3540  : Event(), path(in_path), canvas(in_canvas), layer(in_layer)
3541  {
3542  channel = GetClassID();
3543  consumable = false;
3544  }
3545 
3546  ComponentShownEvent(HPS::Event const & in_event) : Event(in_event)
3547  {
3548  if (in_event.GetChannel() == HPS::Object::ClassID<ComponentShownEvent>())
3549  {
3550  auto that = static_cast<ComponentShownEvent const &>(in_event);
3551  path = that.path;
3552  canvas = that.canvas;
3553  layer = that.layer;
3554  }
3555  else
3556  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
3557  }
3558 
3559  virtual ~ComponentShownEvent() {}
3560 
3561  Event * Clone() const override
3562  {
3563  ComponentShownEvent * new_event = new ComponentShownEvent(*this);
3564  return new_event;
3565  }
3566 
3567  HPS::ComponentPath path;
3568  HPS::Canvas canvas;
3569  size_t layer;
3570 };
3571 
3573 class SPRK_API ComponentHiddenEvent : public HPS::Event
3574 {
3575 public:
3576 
3578  {
3579  channel = GetClassID();
3580  consumable = false;
3581  }
3582 
3583  ComponentHiddenEvent(HPS::ComponentPath const & in_path, HPS::Canvas const & in_canvas, size_t in_layer = 0)
3584  : Event(), path(in_path), canvas(in_canvas), layer(in_layer)
3585  {
3586  channel = GetClassID();
3587  consumable = false;
3588  }
3589 
3590  ComponentHiddenEvent(HPS::Event const & in_event) : Event(in_event)
3591  {
3592  if (in_event.GetChannel() == HPS::Object::ClassID<ComponentHiddenEvent>())
3593  {
3594  auto that = static_cast<ComponentHiddenEvent const &>(in_event);
3595  path = that.path;
3596  canvas = that.canvas;
3597  layer = that.layer;
3598  }
3599  else
3600  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
3601  }
3602 
3603  virtual ~ComponentHiddenEvent() {}
3604 
3605  Event * Clone() const override
3606  {
3607  ComponentHiddenEvent * new_event = new ComponentHiddenEvent(*this);
3608  return new_event;
3609  }
3610 
3611  HPS::ComponentPath path;
3612  HPS::Canvas canvas;
3613  size_t layer;
3614 };
3615 
3617 class SPRK_API ComponentIsolatedEvent : public Event
3618 {
3619 public:
3620 
3623  {
3624  channel = GetClassID();
3625  consumable = false;
3626  }
3627 
3628  ComponentIsolatedEvent(HPS::ComponentPath const & in_path, HPS::Canvas const & in_canvas, size_t in_layer = 0)
3629  : Event(), path(in_path), canvas(in_canvas), layer(in_layer)
3630  {
3631  channel = GetClassID();
3632  consumable = false;
3633  }
3634 
3637  ComponentIsolatedEvent(Event const & in_event) : Event(in_event)
3638  {
3639  if (in_event.GetChannel() == Object::ClassID<ComponentIsolatedEvent>())
3640  {
3641  auto that = static_cast<ComponentIsolatedEvent const &>(in_event);
3642  path = that.path;
3643  canvas = that.canvas;
3644  layer = that.layer;
3645  }
3646  else
3647  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
3648  }
3649 
3650  virtual ~ComponentIsolatedEvent();
3651 
3654  Event * Clone() const override
3655  {
3656  ComponentIsolatedEvent * new_event = new ComponentIsolatedEvent(*this);
3657  return new_event;
3658  }
3659 
3660  ComponentPath path;
3661  HPS::Canvas canvas;
3662  size_t layer;
3663 };
3664 
3665 
3667 class SPRK_API ComponentHighlightEvent : public Event
3668 {
3669 public:
3670  enum class Action
3671  {
3672  None = 0,
3673  Highlight,
3674  Unhighlight,
3675  };
3676 
3679  {
3680  channel = GetClassID();
3681  consumable = false;
3682  action = Action::None;
3683  }
3684 
3685  ComponentHighlightEvent(Action in_action,
3686  HPS::Canvas const & in_canvas,
3687  size_t in_layer = 0,
3688  ComponentPath const & in_path = ComponentPath(),
3689  HighlightOptionsKit const & in_options = HighlightOptionsKit())
3690  : Event(), action(in_action), path(in_path), options(in_options), canvas(in_canvas), layer(in_layer)
3691  {
3692  channel = GetClassID();
3693  consumable = false;
3694  }
3695 
3698  ComponentHighlightEvent(Event const & in_event) : Event(in_event)
3699  {
3700  if (in_event.GetChannel() == Object::ClassID<ComponentHighlightEvent>())
3701  {
3702  auto that = static_cast<ComponentHighlightEvent const &>(in_event);
3703  action = that.action;
3704  path = that.path;
3705  options = that.options;
3706  canvas = that.canvas;
3707  layer = that.layer;
3708  }
3709  else
3710  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
3711  }
3712 
3713  virtual ~ComponentHighlightEvent();
3714 
3717  Event * Clone() const override
3718  {
3719  ComponentHighlightEvent * new_event = new ComponentHighlightEvent(*this);
3720  return new_event;
3721  }
3722 
3723  Action action;
3724  ComponentPath path;
3725  HighlightOptionsKit options;
3726  HPS::Canvas canvas;
3727  size_t layer;
3728 };
3729 
3730 
3732 class SPRK_API Filter : public Component
3733 {
3734 public:
3736  Filter();
3737 
3741  Filter(Component const & in_that);
3742 
3745  Filter(Filter const & in_that);
3746 
3749  Filter(Filter && in_that);
3750 
3751  virtual ~Filter();
3752 
3753  static const HPS::Type staticType = HPS::Type::Filter;
3754  HPS::Type ObjectType() const { return staticType; }
3755 
3756 
3757 #if !defined(_MSC_VER) || _MSC_VER >= 1900
3758  Filter & operator=(Filter const & in_that) = default;
3759 #endif
3760 
3764  Filter & operator=(Filter && in_that);
3765 
3766 
3769  void Activate(View const & in_view);
3770 
3773  void Deactivate(View const & in_view);
3774 };
3775 
3776 
3777 class SPRK_API FilterActivationEvent : public Event
3778 {
3779 public:
3780  enum class Action
3781  {
3782  None = 0,
3783  Activate,
3784  Deactivate,
3785  };
3786 
3789  {
3790  channel = GetClassID();
3791  consumable = false;
3792  }
3793 
3794  FilterActivationEvent(Filter in_filter, Action in_action, View in_view) : Event(), filter(in_filter), action(in_action), view(in_view)
3795  {
3796  channel = GetClassID();
3797  consumable = false;
3798  }
3799 
3802  FilterActivationEvent(Event const & in_event) : Event(in_event)
3803  {
3804  if (in_event.GetChannel() == Object::ClassID<FilterActivationEvent>())
3805  {
3806  auto that = static_cast<FilterActivationEvent const &>(in_event);
3807  filter = that.filter;
3808  action = that.action;
3809  view = that.view;
3810  }
3811  else
3812  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
3813  }
3814 
3816 
3819  Event * Clone() const
3820  {
3821  FilterActivationEvent * new_event = new FilterActivationEvent(*this);
3822  return new_event;
3823  }
3824 
3825  Filter filter;
3826  Action action;
3827  View view;
3828 };
3829 
3830 
3832 class SPRK_API Capture : public Component
3833 {
3834 public:
3836  Capture();
3837 
3841  Capture(Component const & in_that);
3842 
3845  Capture(Capture const & in_that);
3846 
3849  Capture(Capture && in_that);
3850 
3851  virtual ~Capture();
3852 
3853  static const HPS::Type staticType = HPS::Type::Capture;
3854  HPS::Type ObjectType() const { return staticType; }
3855 
3856 #if !defined(_MSC_VER) || _MSC_VER >= 1900
3857  Capture & operator=(Capture const & in_that) = default;
3858 #endif
3859 
3863  Capture & operator=(Capture && in_that);
3864 
3865 
3869  View Activate();
3870 };
3871 
3872 
3873 class SPRK_API CaptureActivationEvent : public Event
3874 {
3875 public:
3878  {
3879  channel = GetClassID();
3880  consumable = false;
3881  }
3882 
3883  CaptureActivationEvent(Capture in_capture, View in_view) : Event(), capture(in_capture), view(in_view)
3884  {
3885  channel = GetClassID();
3886  consumable = false;
3887  }
3888 
3891  CaptureActivationEvent(Event const & in_event) : Event(in_event)
3892  {
3893  if (in_event.GetChannel() == Object::ClassID<CaptureActivationEvent>())
3894  {
3895  auto that = static_cast<CaptureActivationEvent const &>(in_event);
3896  capture = that.capture;
3897  view = that.view;
3898  }
3899  else
3900  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
3901  }
3902 
3904 
3907  Event * Clone() const
3908  {
3909  CaptureActivationEvent * new_event = new CaptureActivationEvent(*this);
3910  return new_event;
3911  }
3912 
3913  Capture capture;
3914  View view;
3915 };
3916 
3917 
3919 class SPRK_API CADModel : public Component
3920 {
3921 public:
3923  CADModel();
3924 
3928  CADModel(Component const & in_that);
3929 
3932  CADModel(CADModel const & in_that);
3933 
3936  CADModel(CADModel && in_that);
3937 
3940  CADModel(Model const & in_that);
3941 
3942  virtual ~CADModel();
3943 
3944  static const HPS::Type staticType = HPS::Type::CADModel;
3945  HPS::Type ObjectType() const { return staticType; }
3946 
3947 #if !defined(_MSC_VER) || _MSC_VER >= 1900
3948  CADModel & operator=(CADModel const & in_that) = default;
3949 #endif
3950 
3954  CADModel & operator=(CADModel && in_that);
3955 
3956 
3960  Component GetComponentFromKey(Key const & in_key) const;
3961 
3973  ComponentPath GetComponentPath(KeyPath const & in_key_path, ComponentPath::PathType in_path_type = ComponentPath::PathType::Unique) const;
3974 
3986  ComponentPath GetComponentPath(SelectionItem const & in_item, ComponentPath::PathType in_path_type = ComponentPath::PathType::Unique) const;
3987 
3988 
3991  Model GetModel() const;
3992 
3995  FilterArray GetAllFilters() const;
3996 
3999  CaptureArray GetAllCaptures() const;
4000 
4004  FilterArray GetActiveFilters(View const & in_view) const;
4005 
4006 
4010  View ActivateDefaultCapture();
4011 
4012 
4020  void ResetVisibility(Canvas const & in_canvas, size_t in_layer = 0);
4021 };
4022 
4023 
4024 
4027 class SPRK_API Metadata : public Sprocket
4028 {
4029 public:
4031  Metadata();
4032 
4035  Metadata(Metadata const & in_that);
4036 
4039  Metadata(Metadata && in_that);
4040 
4043  Metadata(char const * in_name);
4044 
4045  virtual ~Metadata();
4046 
4047  static const HPS::Type staticType = HPS::Type::Metadata;
4048  HPS::Type ObjectType() const { return staticType; }
4049 
4050 
4054  Metadata & operator=(Metadata const & in_that);
4055 
4059  Metadata & operator=(Metadata && in_that);
4060 
4064  virtual void Assign(Metadata const & in_that);
4065 
4069  bool Equals(Metadata const & in_that) const;
4070 
4074  bool operator!=(Metadata const & in_that) const;
4075 
4079  bool operator==(Metadata const & in_that) const;
4080 
4081 
4084  HPS::UTF8 GetName() const;
4085 
4088  void SetName(char const * in_name);
4089 };
4090 
4092 class SPRK_API IntegerMetadata : public Metadata
4093 {
4094 public:
4096  IntegerMetadata();
4097 
4101  IntegerMetadata(Metadata const & in_that);
4102 
4105  IntegerMetadata(IntegerMetadata const & in_that);
4106 
4109  IntegerMetadata(IntegerMetadata && in_that);
4110 
4114  IntegerMetadata(char const * in_name, int in_value);
4115 
4116  virtual ~IntegerMetadata();
4117 
4118  static const HPS::Type staticType = HPS::Type::IntegerMetadata;
4119  HPS::Type ObjectType() const { return staticType; }
4120 
4121 #if !defined(_MSC_VER) || _MSC_VER >= 1900
4122  IntegerMetadata & operator=(IntegerMetadata const & in_that) = default;
4123 #endif
4124 
4128  IntegerMetadata & operator=(IntegerMetadata && in_that);
4129 
4130 
4133  int GetValue() const;
4134 
4137  void SetValue(int in_value);
4138 };
4139 
4141 class SPRK_API UnsignedIntegerMetadata : public Metadata
4142 {
4143 public:
4146 
4150  UnsignedIntegerMetadata(Metadata const & in_that);
4151 
4155 
4159 
4163  UnsignedIntegerMetadata(char const * in_name, unsigned int in_value);
4164 
4165  virtual ~UnsignedIntegerMetadata();
4166 
4167  static const HPS::Type staticType = HPS::Type::UnsignedIntegerMetadata;
4168  HPS::Type ObjectType() const { return staticType; }
4169 
4170 #if !defined(_MSC_VER) || _MSC_VER >= 1900
4171  UnsignedIntegerMetadata & operator=(UnsignedIntegerMetadata const & in_that) = default;
4172 #endif
4173 
4177  UnsignedIntegerMetadata & operator=(UnsignedIntegerMetadata && in_that);
4178 
4179 
4182  unsigned int GetValue() const;
4183 
4186  void SetValue(unsigned int in_value);
4187 };
4188 
4190 class SPRK_API DoubleMetadata : public Metadata
4191 {
4192 public:
4194  DoubleMetadata();
4195 
4199  DoubleMetadata(Metadata const & in_that);
4200 
4203  DoubleMetadata(DoubleMetadata const & in_that);
4204 
4207  DoubleMetadata(DoubleMetadata && in_that);
4208 
4212  DoubleMetadata(char const * in_name, double in_value);
4213 
4214  virtual ~DoubleMetadata();
4215 
4216  static const HPS::Type staticType = HPS::Type::DoubleMetadata;
4217  HPS::Type ObjectType() const { return staticType; }
4218 
4219 #if !defined(_MSC_VER) || _MSC_VER >= 1900
4220  DoubleMetadata & operator=(DoubleMetadata const & in_that) = default;
4221 #endif
4222 
4226  DoubleMetadata & operator=(DoubleMetadata && in_that);
4227 
4228 
4231  double GetValue() const;
4232 
4235  void SetValue(double in_value);
4236 };
4237 
4239 class SPRK_API StringMetadata : public Metadata
4240 {
4241 public:
4243  StringMetadata();
4244 
4248  StringMetadata(Metadata const & in_that);
4249 
4252  StringMetadata(StringMetadata const & in_that);
4253 
4256  StringMetadata(StringMetadata && in_that);
4257 
4261  StringMetadata(char const * in_name, char const * in_value);
4262 
4263  virtual ~StringMetadata();
4264 
4265  static const HPS::Type staticType = HPS::Type::StringMetadata;
4266  HPS::Type ObjectType() const { return staticType; }
4267 
4268 #if !defined(_MSC_VER) || _MSC_VER >= 1900
4269  StringMetadata & operator=(StringMetadata const & in_that) = default;
4270 #endif
4271 
4275  StringMetadata & operator=(StringMetadata && in_that);
4276 
4277 
4280  UTF8 GetValue() const;
4281 
4284  void SetValue(char const * in_value);
4285 };
4286 
4288 class SPRK_API TimeMetadata : public Metadata
4289 {
4290 public:
4292  TimeMetadata();
4293 
4297  TimeMetadata(Metadata const & in_that);
4298 
4301  TimeMetadata(TimeMetadata const & in_that);
4302 
4305  TimeMetadata(TimeMetadata && in_that);
4306 
4310  TimeMetadata(char const * in_name, unsigned int in_value);
4311 
4312  virtual ~TimeMetadata();
4313 
4314  static const HPS::Type staticType = HPS::Type::TimeMetadata;
4315  HPS::Type ObjectType() const { return staticType; }
4316 
4317 #if !defined(_MSC_VER) || _MSC_VER >= 1900
4318  TimeMetadata & operator=(TimeMetadata const & in_that) = default;
4319 #endif
4320 
4324  TimeMetadata & operator=(TimeMetadata && in_that);
4325 
4326 
4329  unsigned int GetValue() const;
4330 
4333  HPS::UTF8 GetValueAsString() const;
4334 
4337  void SetValue(unsigned int in_value);
4338 };
4339 
4340 
4342 class SPRK_API BooleanMetadata : public Metadata
4343 {
4344 public:
4346  BooleanMetadata();
4347 
4351  BooleanMetadata(Metadata const & in_that);
4352 
4355  BooleanMetadata(BooleanMetadata const & in_that);
4356 
4359  BooleanMetadata(BooleanMetadata && in_that);
4360 
4364  BooleanMetadata(char const * in_name, bool in_value);
4365 
4366  virtual ~BooleanMetadata();
4367 
4368  static const HPS::Type staticType = HPS::Type::BooleanMetadata;
4369  HPS::Type ObjectType() const { return staticType; }
4370 
4371 #if !defined(_MSC_VER) || _MSC_VER >= 1900
4372  BooleanMetadata & operator=(BooleanMetadata const & in_that) = default;
4373 #endif
4374 
4378  BooleanMetadata & operator=(BooleanMetadata && in_that);
4379 
4380 
4383  bool GetValue() const;
4384 
4387  void SetValue(bool in_value);
4388 };
4389 
4390 
4391 
4393 class SPRK_API Factory : public Sprocket
4394 {
4395 public:
4398  static CanvasArray GetCanvases();
4399 
4402  static LayoutArray GetLayouts();
4403 
4406  static ViewArray GetViews();
4407 
4410  static ModelArray GetModels();
4411 
4414  static CADModelArray GetCADModels();
4415 
4421  static Canvas CreateCanvas(HPS::WindowHandle in_window_handle, char const * in_name = "", HPS::ApplicationWindowOptionsKit const & in_options = HPS::ApplicationWindowOptionsKit());
4422 
4423 #if TARGET_OS_ANDROID == 0 && !defined(__APPLE__)
4424 
4429  static Canvas CreateCanvas(char const * in_name = "", HPS::StandAloneWindowOptionsKit const & in_options = HPS::StandAloneWindowOptionsKit());
4430 #endif
4431 
4437  static Canvas CreateCanvas(HPS::WindowKey const & in_window_key, HPS::PortfolioKey const & in_portfolio_key = HPS::PortfolioKey(), char const * in_name = "");
4438 
4442  static Layout CreateLayout(char const * in_name = "");
4443 
4447  static View CreateView(char const * in_name = "");
4448 
4452  static Model CreateModel(char const * in_name = "");
4453 
4458  static Component CreateComponent(Component const & in_owner, char const * in_name = "");
4459 
4465  static Component DeInstanceComponent(ComponentPath const & in_component_path);
4466 
4467 private:
4468  Factory() {}
4469 };
4470 
4480 class SPRK_API AxisTriadOperator : public Operator
4481 {
4482 public:
4483  AxisTriadOperator(MouseButtons in_mouse_trigger = MouseButtons::ButtonLeft(), ModifierKeys in_modifier_trigger = ModifierKeys());
4485  virtual HPS::UTF8 GetName() const { return "HPS_AxisTriadOperator"; }
4486 
4492  virtual bool OnMouseDown(MouseState const & in_state);
4497  virtual bool OnMouseUp(MouseState const & in_state);
4502  virtual bool OnMouseMove(MouseState const & in_state);
4503 
4508  virtual bool OnTouchDown(TouchState const & in_state);
4513  virtual bool OnTouchUp(TouchState const & in_state);
4518  virtual bool OnTouchMove(TouchState const & in_state);
4519 
4520  virtual void OnViewAttached(HPS::View const & in_attached_view);
4521 
4522 private:
4523 
4524  bool AxisOrbit(HPS::WindowPoint const & in_loc);
4525  void Transition(HPS::SelectionResults selection_results);
4526  void TranslatePoint(HPS::WindowPoint * point);
4527  bool IsEventRelevant(HPS::Point const & event_location);
4528 
4529  bool operator_active;
4530  HPS::WindowPoint start_point;
4531  HPS::Vector start_sphere_point;
4532  float axis_subwindow_width;
4533  float axis_subwindow_height;
4534  HPS::TouchID tracked_touch_ID;
4535  HPS::Rectangle axis_subwindow;
4536  HPS::IntRectangle axis_subwindow_offsets;
4537  HPS::SegmentKey axis_triad_segment;
4538 
4539 };
4540 
4543 {
4544 public:
4547  virtual ~SmoothTransitionCompleteEvent();
4548 
4551  SmoothTransitionCompleteEvent(HPS::View const & in_view) : view(in_view)
4552  { channel = HPS::Object::ClassID<SmoothTransitionCompleteEvent>(); }
4553 
4556  SmoothTransitionCompleteEvent(Event const & in_event) : Event(in_event)
4557  {
4558  if (in_event.GetChannel() == Object::ClassID<SmoothTransitionCompleteEvent>())
4559  {
4560  auto that = static_cast<SmoothTransitionCompleteEvent const &>(in_event);
4561  view = that.view;
4562  }
4563  else
4564  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
4565  }
4566 
4569  Event * Clone() const
4570  {
4572  return new_event;
4573  }
4574 
4578  virtual bool Drop(Event const * in_that_event) const
4579  {
4580  HPS_UNREFERENCED(in_that_event);
4581  return false;
4582  }
4583 
4584  HPS::View view;
4585 };
4586 
4605 class SPRK_API NavigationCubeOperator : public Operator
4606 {
4607 public:
4608  NavigationCubeOperator(MouseButtons in_mouse_trigger = MouseButtons::ButtonLeft(), ModifierKeys in_modifier_trigger = ModifierKeys());
4609  ~NavigationCubeOperator() { }
4610 
4612  virtual HPS::UTF8 GetName() const { return "HPS_NavigationCubeOperator"; }
4613 
4618  virtual bool OnMouseDown(MouseState const & in_state);
4623  virtual bool OnMouseUp(MouseState const & in_state);
4628  virtual bool OnMouseMove(MouseState const & in_state);
4629 
4633  virtual bool OnTouchDown(TouchState const & in_state);
4638  virtual bool OnTouchUp(TouchState const & in_state);
4643  virtual bool OnTouchMove(TouchState const & in_state);
4644 
4645  virtual void OnViewAttached(HPS::View const & in_attached_view);
4646  virtual void OnViewDetached(HPS::View const & in_attached_view);
4647 
4648  virtual void OnModelAttached();
4649 
4654  void SetReferenceSegment(HPS::KeyPath const & in_path_to_segment);
4655 
4660  void SetReferenceSegment(HPS::KeyPathArray const & in_path_to_segments);
4661 
4665  HPS::KeyPathArray ShowReferenceSegment();
4666 
4671  void SetTransitionTime(HPS::Time const & in_time);
4672 
4675  HPS::Time GetTransitionTime() const;
4676 
4677 private:
4678  void Transition(HPS::SelectionResults const & selection_results);
4679  bool Orbit(HPS::WindowPoint const & in_loc);
4680  void TranslatePoint(HPS::WindowPoint * point);
4681  bool IsEventRelevant(HPS::Point const & event_location, HPS::KeyPath const & event_path);
4682  bool AreCamerasEqual(HPS::CameraKit const & this_camera, HPS::CameraKit const & that_camera);
4683 
4684 
4685  bool operator_active;
4686  HPS::TouchID tracked_touch_ID;
4687  HPS::WindowPoint start_point;
4688  HPS::WindowPoint down_position;
4689  HPS::Vector start_sphere_point;
4690  HPS::KeyPathArray reference_segments; //rotation and zooming happen around these segments
4691 
4692  HPS::SegmentKey nav_cube_segment;
4693  SegmentKeyArray style_segments; //in order: left / right / bottom / top / front / back
4694  UTF8Array named_styles; //in order: left / right / bottom / top / front / back
4695  HighlightOptionsKit highlight_options_kit;
4696  std::unordered_map<intptr_t, UTF8> key_to_style_map;
4697  HPS::PortfolioKey portfolio;
4698  HPS::ReferenceKeyArrayArray groups;
4699  HPS::CameraKit previous_camera;
4700  int previous_face;
4701  bool suppress_mouse_over_highlights;
4702 
4703  HPS::Rectangle nav_cube_subwindow;
4704  HPS::IntRectangle nav_cube_subwindow_offsets;
4705  float nav_cube_subwindow_width;
4706  float nav_cube_subwindow_height;
4707 
4708  int highlighted_group;
4709 
4710  bool moving;
4711  HPS::Time transition_time;
4712  HPS::SelectionOptionsKit selection_options;
4713 
4714  class SmoothTransitionCompleteEventHandler : public EventHandler
4715  {
4716  public:
4717  SmoothTransitionCompleteEventHandler(View const & in_view, bool & in_moving)
4718  : handler_view(in_view), handler_moving(&in_moving) {}
4719 
4720  ~SmoothTransitionCompleteEventHandler() { Shutdown(); }
4721 
4722  virtual HandleResult Handle(HPS::Event const * in_event);
4723 
4724  private:
4725  View handler_view;
4726  bool * handler_moving;
4727  };
4728 
4729  SmoothTransitionCompleteEventHandler * handler;
4730 };
4731 
4732 
4733 
4734 
4735 class SceneTreeItem;
4736 typedef std::shared_ptr<SceneTreeItem> SceneTreeItemPtr;
4737 class SceneTree;
4738 typedef std::shared_ptr<SceneTree> SceneTreePtr;
4739 
4742 class SPRK_API SceneTree : public Sprocket
4743 {
4744 public:
4747  enum class ItemType : uint32_t
4748  {
4749  None = 0x00000000,
4750  GenericMask = 0xffff0000,
4751 
4752  Segment = 0x00000001,
4753  Include = 0x00000002,
4754  ConditionalExpression = 0x00000003,
4755  StaticModelSegment = 0x00000004,
4756  AttributeFilter = 0x00000005,
4757 
4758  Geometry = 0x00010000,
4759  CuttingSection = 0x00010001,
4760  Shell = 0x00010002,
4761  Mesh = 0x00010003,
4762  Grid = 0x00010004,
4763  NURBSSurface = 0x00010005,
4764  Cylinder = 0x00010006,
4765  Sphere = 0x00010007,
4766  Polygon = 0x00010008,
4767  Circle = 0x00010009,
4768  CircularWedge = 0x0001000a,
4769  Ellipse = 0x0001000b,
4770  Line = 0x0001000c,
4771  NURBSCurve = 0x0001000d,
4772  CircularArc = 0x0001000e,
4773  EllipticalArc = 0x0001000f,
4774  InfiniteLine = 0x00010010,
4775  InfiniteRay = 0x00010011,
4776  Marker = 0x00010012,
4777  Text = 0x00010013,
4778  Reference = 0x00010014,
4779  DistantLight = 0x00010015,
4780  Spotlight = 0x00010016,
4781 
4782  Attribute = 0x00020000,
4783  Portfolio = 0x00020001,
4784  SegmentStyle = 0x00020002,
4785  NamedStyle = 0x00020003,
4786  MaterialPalette = 0x00020004,
4787  Priority = 0x00020005,
4788  Material = 0x00020006,
4789  Camera = 0x00020007,
4790  ModellingMatrix = 0x00020008,
4791  UserData = 0x00020009,
4792  TextureMatrix = 0x0002000a,
4793  Culling = 0x0002000b,
4794  CurveAttribute = 0x0002000c,
4795  CylinderAttribute = 0x0002000d,
4796  EdgeAttribute = 0x0002000e,
4797  LightingAttribute = 0x0002000f,
4798  LineAttribute = 0x00020010,
4799  MarkerAttribute = 0x00020011,
4800  SurfaceAttribute = 0x00020012,
4801  Selectability = 0x00020013,
4802  SphereAttribute = 0x00020014,
4803  Subwindow = 0x00020015,
4804  TextAttribute = 0x00020016,
4805  Transparency = 0x00020017,
4806  Visibility = 0x00020018,
4807  VisualEffects = 0x00020019,
4808  Performance = 0x00020020,
4809  DrawingAttribute = 0x00020021,
4810  HiddenLineAttribute = 0x00020022,
4811  ContourLine = 0x00020023,
4812  Condition = 0x00020024,
4813  Bounding = 0x00020025,
4814  AttributeLock = 0x00020026,
4815  TransformMask = 0x00020027,
4816  ColorInterpolation = 0x00020028,
4817  CuttingSectionAttribute = 0x00020029,
4818 
4819  // window only attributes
4820  Debugging = 0x00020030,
4821  PostProcessEffects = 0x00020031,
4822  SelectionOptions = 0x00020032,
4823  UpdateOptions = 0x00020033,
4824 
4825  Definition = 0x00040000,
4826  NamedStyleDefinition = 0x00040001,
4827  TextureDefinition = 0x00040002,
4828  LinePatternDefinition = 0x00040003,
4829  GlyphDefinition = 0x00040004,
4830  CubeMapDefinition = 0x00040005,
4831  ImageDefinition = 0x00040006,
4832  MaterialPaletteDefinition = 0x00040007,
4833  LegacyShaderDefinition = 0x00040008,
4834  ShapeDefinition = 0x00040009,
4835 
4836  Group = 0x00080000,
4837  SegmentGroup = 0x00080100,
4838  GeometryGroup = 0x00080200,
4839  AttributeGroup = 0x00080300,
4840  PortfolioGroup = 0x00080400,
4841  StyleGroup = 0x00080500,
4842  IncludeGroup = 0x00080600,
4843  DefinitionGroup = 0x00180000,
4844  NamedStyleDefinitionGroup = 0x00180700,
4845  TextureDefinitionGroup = 0x00180800,
4846  LinePatternDefinitionGroup = 0x00180900,
4847  GlyphDefinitionGroup = 0x00180a00,
4848  CubeMapDefinitionGroup = 0x00180b00,
4849  ImageDefinitionGroup = 0x00180c00,
4850  MaterialPaletteDefinitionGroup = 0x00180d00,
4851  LegacyShaderDefinitionGroup = 0x00180e00,
4852  ShapeDefinitionGroup = 0x00180f00,
4853  GeometryGroupMask = 0x00280000,
4854  CuttingSectionGroup = 0x00280001,
4855  ShellGroup = 0x00280002,
4856  MeshGroup = 0x00280003,
4857  GridGroup = 0x00280004,
4858  NURBSSurfaceGroup = 0x00280005,
4859  CylinderGroup = 0x00280006,
4860  SphereGroup = 0x00280007,
4861  PolygonGroup = 0x00280008,
4862  CircleGroup = 0x00280009,
4863  CircularWedgeGroup = 0x0028000a,
4864  EllipseGroup = 0x0028000b,
4865  LineGroup = 0x0028000c,
4866  NURBSCurveGroup = 0x0028000d,
4867  CircularArcGroup = 0x0028000e,
4868  EllipticalArcGroup = 0x0028000f,
4869  InfiniteLineGroup = 0x00280010,
4870  InfiniteRayGroup = 0x00280011,
4871  MarkerGroup = 0x00280012,
4872  TextGroup = 0x00280013,
4873  ReferenceGroup = 0x00280014,
4874  DistantLightGroup = 0x00280015,
4875  SpotlightGroup = 0x00280016,
4876  };
4877 
4879  SceneTree();
4880 
4883  SceneTree(Canvas const & in_canvas);
4884 
4887  SceneTree(SceneTree const & in_that);
4888 
4891  SceneTree(SceneTree && in_that);
4892 
4893  virtual ~SceneTree();
4894 
4895  static const HPS::Type staticType = HPS::Type::SceneTree;
4896  virtual HPS::Type ObjectType() const { return staticType; }
4897 
4901  SceneTree & operator=(SceneTree const & in_that);
4902 
4906  SceneTree & operator=(SceneTree && in_that);
4907 
4911  virtual void Assign(SceneTree const & in_that);
4912 
4916  bool Equals(SceneTree const & in_that) const;
4917 
4921  bool operator!=(SceneTree const & in_that) const;
4922 
4926  bool operator==(SceneTree const & in_that) const;
4927 
4928 
4937  void SetHighlightOptions(HighlightOptionsKit const & in_options);
4938 
4948  void SetHighlightOptions(HighlightOptionsKitArray const & in_options);
4949 
4960  void SetHighlightOptions(size_t in_count, HighlightOptionsKit const in_options []);
4961 
4969  void AddHighlightOptions(HighlightOptionsKit const & in_options);
4970 
4973  HighlightOptionsKitArray GetHighlightOptions() const;
4974 
4975 
4980  void SetGroupingLimit(size_t in_limit);
4981 
4984  size_t GetGroupingLimit() const;
4985 
4986 
4993  void SetRoot(SceneTreeItemPtr const & in_root);
4994 
4997  SceneTreeItemPtr GetRoot() const;
4998 
4999 
5002  virtual void Flush();
5003 
5008  void SetHighlightEventHandling(bool in_state);
5009 
5013  bool GetHighlightEventHandling() const;
5014 
5017  void ReExpand();
5018 };
5019 
5020 
5023 class SPRK_API SceneTreeItem : public Sprocket
5024 {
5025 public:
5027  SceneTreeItem();
5028 
5031  SceneTreeItem(SceneTreeItem const & in_that);
5032 
5035  SceneTreeItem(SceneTreeItem && in_that);
5036 
5042  SceneTreeItem(SceneTreePtr const & in_tree, Model const & in_model);
5043 
5049  SceneTreeItem(SceneTreePtr const & in_tree, View const & in_view);
5050 
5056  SceneTreeItem(SceneTreePtr const & in_tree, Layout const & in_layout);
5057 
5063  SceneTreeItem(SceneTreePtr const & in_tree, Canvas const & in_canvas);
5064 
5072  SceneTreeItem(SceneTreePtr const & in_tree, Key const & in_key, SceneTree::ItemType in_type, char const * in_title = nullptr);
5073 
5074  virtual ~SceneTreeItem();
5075 
5076  static const HPS::Type staticType = HPS::Type::SceneTreeItem;
5077  HPS::Type ObjectType() const { return staticType; }
5078 
5082  SceneTreeItem & operator=(SceneTreeItem const & in_that);
5083 
5087  SceneTreeItem & operator=(SceneTreeItem && in_that);
5088 
5092  virtual void Assign(SceneTreeItem const & in_that);
5093 
5097  bool Equals(SceneTreeItem const & in_that) const;
5098 
5102  bool operator!=(SceneTreeItem const & in_that) const;
5103 
5107  bool operator==(SceneTreeItem const & in_that) const;
5108 
5109 
5112  SceneTreePtr GetTree() const;
5113 
5116  UTF8 GetTitle() const;
5117 
5120  SceneTree::ItemType GetItemType() const;
5121 
5125  bool HasItemType(SceneTree::ItemType in_mask) const;
5126 
5129  Key GetKey() const;
5130 
5133  KeyPath GetKeyPath() const;
5134 
5137  bool HasChildren() const;
5138 
5139 
5148  virtual SceneTreeItemPtr AddChild(Key const & in_key, SceneTree::ItemType in_type, char const * in_title = nullptr) = 0;
5149 
5150 
5153  virtual void Expand();
5154 
5157  virtual void Collapse();
5158 
5159 
5164  bool IsSelected() const;
5165 
5171  virtual void Select();
5172 
5178  virtual void Unselect();
5179 
5184  bool IsHighlightable() const;
5185 
5191  bool IsHighlighted() const;
5192 
5197  void Highlight(size_t in_highlight_options_index = 0);
5198 
5204  void Highlight(HighlightOptionsKit const & in_highlight_options);
5205 
5211  void Unhighlight(size_t in_highlight_options_index = 0);
5212 
5219  void Unhighlight(HighlightOptionsKit const & in_highlight_options);
5220 
5223  bool IsExpanded() const;
5224 
5227  void ReExpand();
5228 };
5229 
5230 
5231 
5232 class ComponentTreeItem;
5233 typedef std::shared_ptr<ComponentTreeItem> ComponentTreeItemPtr;
5234 class ComponentTree;
5235 typedef std::shared_ptr<ComponentTree> ComponentTreePtr;
5236 
5239 class SPRK_API ComponentTree : public Sprocket
5240 {
5241 public:
5244  enum class ItemType
5245  {
5246  None,
5247  ExchangeComponent,
5248  ExchangeModelFile,
5249 
5250  ExchangeViewGroup,
5251  ExchangeAnnotationViewGroup,
5252  ExchangePMIGroup,
5253  ExchangeModelGroup,
5254 
5255  ParasolidComponent,
5256  ParasolidModelFile,
5257 
5258  DWGComponent,
5259  DWGModelFile,
5260  };
5261 
5263  ComponentTree();
5264 
5268  ComponentTree(Canvas const & in_canvas, size_t in_layer = 0);
5269 
5272  ComponentTree(ComponentTree const & in_that);
5273 
5276  ComponentTree(ComponentTree && in_that);
5277 
5278  virtual ~ComponentTree();
5279 
5280  static const HPS::Type staticType = HPS::Type::ComponentTree;
5281  virtual HPS::Type ObjectType() const { return staticType; }
5282 
5286  ComponentTree & operator=(ComponentTree const & in_that);
5287 
5291  ComponentTree & operator=(ComponentTree && in_that);
5292 
5296  virtual void Assign(ComponentTree const & in_that);
5297 
5301  bool Equals(ComponentTree const & in_that) const;
5302 
5306  bool operator!=(ComponentTree const & in_that) const;
5307 
5311  bool operator==(ComponentTree const & in_that) const;
5312 
5313 
5322  void SetHighlightOptions(HighlightOptionsKit const & in_options);
5323 
5333  void SetHighlightOptions(HighlightOptionsKitArray const & in_options);
5334 
5345  void SetHighlightOptions(size_t in_count, HighlightOptionsKit const in_options []);
5346 
5356  void AddHighlightOptions(HighlightOptionsKit const & in_options);
5357 
5360  HighlightOptionsKitArray GetHighlightOptions() const;
5361 
5362 
5369  void SetRoot(ComponentTreeItemPtr const & in_root);
5370 
5373  ComponentTreeItemPtr GetRoot() const;
5374 
5375 
5378  virtual void Flush();
5379 
5382  void ReExpand();
5383 
5388  void SetHighlightEventHandling(bool in_state);
5389 
5393  bool GetHighlightEventHandling() const;
5394 };
5395 
5396 
5399 class SPRK_API ComponentTreeItem : public Sprocket
5400 {
5401 public:
5404 
5407  ComponentTreeItem(ComponentTreeItem const & in_that);
5408 
5412 
5418  ComponentTreeItem(ComponentTreePtr const & in_tree, CADModel const & in_cad_model);
5419 
5426  ComponentTreeItem(ComponentTreePtr const & in_tree, Component const & in_component, ComponentTree::ItemType in_type);
5427 
5428  virtual ~ComponentTreeItem();
5429 
5430  static const HPS::Type staticType = HPS::Type::ComponentTreeItem;
5431  HPS::Type ObjectType() const { return staticType; }
5432 
5436  ComponentTreeItem & operator=(ComponentTreeItem const & in_that);
5437 
5441  ComponentTreeItem & operator=(ComponentTreeItem && in_that);
5442 
5446  virtual void Assign(ComponentTreeItem const & in_that);
5447 
5451  bool Equals(ComponentTreeItem const & in_that) const;
5452 
5456  bool operator!=(ComponentTreeItem const & in_that) const;
5457 
5461  bool operator==(ComponentTreeItem const & in_that) const;
5462 
5463 
5464 
5467  ComponentTreePtr GetTree() const;
5468 
5471  UTF8 GetTitle() const;
5472 
5475  ComponentTree::ItemType GetItemType() const;
5476 
5479  Component GetComponent() const;
5480 
5483  bool HasChildren() const;
5484 
5487  ComponentPath GetPath() const;
5488 
5489 
5497  virtual ComponentTreeItemPtr AddChild(Component const & in_component, ComponentTree::ItemType in_type) = 0;
5498 
5499 
5502  virtual void Expand();
5503 
5506  virtual void Collapse();
5507 
5508 
5516  bool IsHighlighted() const;
5517 
5522  virtual void OnHighlight(HighlightOptionsKit const & in_options);
5523 
5528  virtual void OnUnhighlight(HighlightOptionsKit const & in_options);
5529 
5530 
5535  void Highlight(size_t in_highlight_options_index = 0);
5536 
5542  void Highlight(HighlightOptionsKit const & in_highlight_options);
5543 
5548  void Unhighlight(size_t in_highlight_options_index = 0);
5549 
5555  void Unhighlight(HighlightOptionsKit const & in_highlight_options);
5556 
5557 
5573  bool IsHidden() const;
5574 
5580  virtual void OnHide();
5581 
5587  virtual void OnShow();
5588 
5601  void Hide();
5602 
5615  void Show();
5616 
5629  void Isolate();
5630 
5639  void ResetVisibility();
5640 
5643  bool IsExpanded() const;
5644 
5647  void ReExpand();
5648 };
5649 
5652 class SPRK_API AnimationControl : public SprocketControl
5653 {
5654 public:
5656  explicit AnimationControl(View const & in_view);
5657 
5659  AnimationControl(AnimationControl const & in_that);
5660 
5664  AnimationControl(AnimationControl && in_that);
5665 
5669  AnimationControl & operator=(AnimationControl && in_that);
5670 
5672  ~AnimationControl();
5673 
5674  static const HPS::Type staticType = HPS::Type::AnimationControl;
5675  HPS::Type ObjectType() const {return staticType;};
5676 
5678  AnimationControl & operator=(AnimationControl const & in_that);
5679 
5683  void SetMillisecondsPerTick(Time const & in_duration);
5684 
5687  Time GetMillisecondsPerTick() const;
5688 
5696  void Play(uint32_t in_start_tick, uint32_t in_end_tick);
5697 
5703  void Play();
5704 
5707  void Stop();
5708 
5710  void Resume();
5711 
5713  void Wait();
5714 
5717  void Undo();
5718 
5723  void SetAnimation(Animation const & in_animation);
5724 
5731  void SetAnimations(size_t in_count, Animation const * const in_animations);
5732 
5733 
5739  void SetAnimations(AnimationArray const & in_animations);
5740 
5741 
5744  bool ShowAnimations(AnimationArray & out_animations);
5745 };
5746 
5747 }
5748 
5749 
5750 #endif
5751 
5752 
5753 
Definition: sprk.h:4288
Definition: hps.h:3578
Definition: hps.h:6514
Definition: hps.h:85
Definition: sprk.h:619
Definition: sprk.h:1843
ComponentIsolatedEvent(Event const &in_event)
Definition: sprk.h:3637
Definition: sprk.h:3617
Definition: sprk.h:148
Definition: sprk.h:4480
Definition: sprk.h:280
HPS::Type ObjectType() const
Definition: sprk.h:4369
Definition: sprk.h:1102
ChannelType
Definition: sprk.h:763
ComponentHighlightEvent(Event const &in_event)
Definition: sprk.h:3698
virtual bool OnTimerTick(HPS::TimerTickEvent const &in_event)
Definition: sprk.h:2042
Definition: hps.h:43735
HPS::Type ObjectType() const
Definition: sprk.h:483
ComponentHighlightEvent()
Definition: sprk.h:3678
void SetModifierTrigger(ModifierKeys in_modifiers)
Definition: sprk.h:2070
Definition: hps.h:545
CameraChangedEvent(Event const &in_event)
Definition: sprk.h:1862
virtual bool OnKeyDown(KeyboardState const &in_state)
Definition: sprk.h:2027
std::vector< SegmentKey, Allocator< SegmentKey > > SegmentKeyArray
Array of type HPS::SegmentKey.
Definition: hps.h:6942
An InvalidSpecificationException is thrown when a method is called with non-sensical or contradictory...
Definition: hps.h:6118
Location
Definition: sprk.h:2301
Event * Clone() const override
Definition: sprk.h:3517
HPS::Type ObjectType() const
Definition: sprk.h:693
virtual bool OnKeyUp(KeyboardState const &in_state)
Definition: sprk.h:2032
ItemType
Definition: sprk.h:5244
Definition: hps.h:6158
Event * Clone() const
Definition: sprk.h:1552
CaptureActivationEvent()
Definition: sprk.h:3877
HPS::Type ObjectType() const
Definition: sprk.h:3066
Definition: sprk.h:68
Definition: sprk.h:1043
Definition: sprk.h:1518
PathType
Definition: sprk.h:3031
Definition: sprk.h:936
virtual bool OnMouseMove(MouseState const &in_state)
Definition: sprk.h:1992
Definition: sprk.h:126
Definition: sprk.h:5399
virtual bool OnMouseEnter(MouseState const &in_state)
Definition: sprk.h:2002
Definition: sprk.h:4342
Event * Clone() const
Definition: sprk.h:4569
intptr_t GetChannel() const
Definition: hps.h:6631
Definition: hps.h:43518
Event * Clone() const override
Definition: sprk.h:3654
virtual bool Drop(Event const *in_that_event) const
Definition: sprk.h:1875
Definition: hps.h:1444
Definition: hps.h:1139
Definition: hps.h:1838
Definition: sprk.h:1071
virtual intptr_t Freshen() const
Definition: sprk.h:1885
ModelDeletedEvent()
Definition: sprk.h:1804
Event * Clone() const override
Definition: sprk.h:3717
SmoothTransitionCompleteEvent(HPS::View const &in_view)
Definition: sprk.h:4551
std::vector< KeyPath, Allocator< KeyPath > > KeyPathArray
Array of type HPS::KeyPath.
Definition: hps.h:6980
Definition: sprk.h:5239
Definition: hps.h:49288
HPS::Type ObjectType() const
Definition: sprk.h:4048
Definition: sprk.h:1903
virtual bool OnTouchUp(TouchState const &in_state)
Definition: sprk.h:2017
Definition: hps.h:8044
virtual UTF8 GetName() const
Definition: sprk.h:1977
Definition: hps.h:3729
Definition: hps.h:2214
HPS::Type ObjectType() const
Definition: sprk.h:3945
Definition: sprk.h:1755
Definition: sprk.h:403
HPS::Type ObjectType() const
Definition: sprk.h:4168
Definition: hps.h:5059
HPS::Type ObjectType() const
Definition: sprk.h:553
bool HasAll(MouseButtons in_mouse_trigger, ModifierKeys in_modifier_trigger) const
Definition: sprk_ops.h:20
Definition: sprk.h:1606
Definition: hps.h:1527
Definition: hps.h:959
Definition: hps.h:43638
virtual void OnModelDetached()
Definition: sprk.h:2058
SmoothTransitionCompleteEvent(Event const &in_event)
Definition: sprk.h:4556
Definition: hps.h:1896
Definition: sprk.h:689
Definition: hps.h:1662
Definition: hps.h:9288
Definition: hps.h:315
void SetMouseTrigger(MouseButtons in_buttons)
Definition: sprk.h:2061
HPS::Type ObjectType() const
Definition: sprk.h:623
virtual HPS::UTF8 GetName() const
Definition: sprk.h:4612
Event * Clone() const override
Definition: sprk.h:3561
Definition: hps.h:1965
CameraChangedEvent()
Definition: sprk.h:1847
Definition: sprk.h:39
Definition: sprk.h:3573
SprocketKit & operator=(SprocketKit &&in_that)
Definition: sprk.h:1092
virtual void OnViewAttached(HPS::View const &in_attached_view)
Definition: sprk.h:2046
HPS::Type ObjectType() const
Definition: sprk.h:4315
HPS::Type ObjectType() const
Definition: sprk.h:1954
HPS::Type ObjectType() const
Definition: sprk.h:1410
Definition: hps.h:49186
Definition: hps.h:42550
Definition: sprk.h:2297
Definition: sprk.h:549
Definition: sprk.h:1800
Definition: sprk.h:1402
ViewDetachedEvent(Event const &in_event)
Definition: sprk.h:1682
Definition: sprk.h:170
Definition: hps.h:42597
HPS::Type ObjectType() const
Definition: sprk.h:5431
LayoutDeletedEvent()
Definition: sprk.h:1610
Definition: hps.h:41982
Definition: hps.h:45304
HPS::Type ObjectType() const
Definition: sprk.h:944
Definition: hps.h:1179
Definition: sprk.h:4027
HPS::Type ObjectType() const
Definition: sprk.h:3754
Definition: hps.h:44074
LayoutDetachedEvent()
Definition: sprk.h:1565
Event * Clone() const
Definition: sprk.h:3819
MouseButtons GetMouseTrigger() const
Definition: sprk.h:2065
Definition: sprk.h:4141
virtual bool OnMouseLeave(MouseState const &in_state)
Definition: sprk.h:2007
HPS::Type ObjectType() const
Definition: sprk.h:4217
Event * Clone() const
Definition: sprk.h:1790
Definition: hps.h:10272
Definition: hps.h:43682
Definition: hps.h:1615
SmoothTransitionCompleteEvent()
Definition: sprk.h:4546
Definition: hps.h:1547
HPS::Type ObjectType() const
Definition: sprk.h:1325
virtual bool OnMouseUp(MouseState const &in_state)
Definition: sprk.h:1987
FilterActivationEvent()
Definition: sprk.h:3788
Definition: hps.h:1566
virtual void OnModelAttached()
Definition: sprk.h:2054
ComponentPath & PushBack(Component const &in_component)
Definition: hps.h:39565
FilterActivationEvent(Event const &in_event)
Definition: sprk.h:3802
HPS::Type ObjectType() const
Definition: sprk.h:3854
ModelDetachedEvent(Event const &in_event)
Definition: sprk.h:1774
Definition: sprk.h:214
Definition: hps.h:4636
Definition: sprk.h:5652
Definition: hps.h:7396
Definition: sprk.h:758
HPS::Type ObjectType() const
Definition: sprk.h:1914
Location
Definition: sprk.h:2518
Definition: hps.h:48657
HPS::Type ObjectType() const
Definition: sprk.h:1111
Definition: sprk.h:4092
Definition: sprk.h:2514
Definition: hps.h:45484
HPS::Type ObjectType() const
Definition: sprk.h:2775
SprocketControl & operator=(SprocketControl &&in_that)
Definition: sprk.h:1064
Definition: hps.h:47547
Definition: hps.h:44563
Definition: hps.h:49073
Definition: sprk.h:1561
CaptureActivationEvent(Event const &in_event)
Definition: sprk.h:3891
Definition: hps.h:2381
virtual bool OnTouchDown(TouchState const &in_state)
Definition: sprk.h:2012
CanvasDeletedEvent()
Definition: sprk.h:1522
Definition: sprk.h:348
virtual bool OnMouseWheel(MouseState const &in_state)
Definition: sprk.h:1997
SprocketControl(SprocketControl &&in_that)
Definition: sprk.h:1059
Definition: hps.h:16183
HPS::Type ObjectType() const
Definition: sprk.h:5077
Event * Clone() const
Definition: sprk.h:1700
ViewDeletedEvent()
Definition: sprk.h:1716
Definition: sprk.h:1649
SprocketKit(SprocketKit &&in_that)
Definition: sprk.h:1087
Definition: sprk.h:2654
Definition: hps.h:45771
Definition: hps.h:48164
virtual bool OnTextInput(HPS::UTF8 const &in_text)
Definition: sprk.h:2037
The ComponentPath contains only components which are unique to this request, omitting ambiguous entri...
HPS::Type ObjectType() const
Definition: sprk.h:2330
HPS::Type ObjectType() const
Definition: sprk.h:2547
ViewDeletedEvent(Event const &in_event)
Definition: sprk.h:1731
Definition: hps.h:39068
ModifierKeys GetModifierTrigger() const
Definition: sprk.h:2073
Definition: sprk.h:4239
Event * Clone() const
Definition: sprk.h:1892
ViewDetachedEvent()
Definition: sprk.h:1660
Definition: hps.h:6598
Definition: hps.h:14431
HPS::Type ObjectType() const
Definition: sprk.h:1047
std::vector< UTF8, Allocator< UTF8 > > UTF8Array
Array of type HPS::UTF8.
Definition: hps.h:6948
Definition: sprk.h:192
Definition: sprk.h:2148
HPS::Type ObjectType() const
Definition: sprk.h:4119
Event * Clone() const
Definition: sprk.h:1596
Definition: hps.h:481
Definition: sprk.h:1317
CanvasDeletedEvent(Event const &in_event)
Definition: sprk.h:1537
HPS::Type ObjectType() const
Definition: sprk.h:1075
Definition: sprk.h:4605
Definition: sprk.h:3026
std::shared_ptr< Operator > OperatorPtr
Shared pointer to an Operator object.
Definition: sprk.h:308
ComponentType
Definition: sprk.h:2660
Definition: hps.h:47472
std::vector< Key, Allocator< Key > > KeyArray
Array of type HPS::Key.
Definition: hps.h:6952
Definition: hps.h:2233
Event * Clone() const
Definition: sprk.h:1834
Definition: sprk.h:3667
LayoutDetachedEvent(Event const &in_event)
Definition: sprk.h:1580
virtual bool OnMouseDown(MouseState const &in_state)
Definition: sprk.h:1982
ItemType
Definition: sprk.h:4747
HPS::Type ObjectType() const
Definition: sprk.h:2171
Definition: sprk.h:3732
Definition: sprk.h:4393
Event * Clone() const
Definition: sprk.h:1746
HPS::Type ObjectType() const
Definition: sprk.h:4266
DeleteMode
Definition: sprk.h:2752
Definition: sprk.h:1020
virtual void OnViewDetached(HPS::View const &in_detached_view)
Definition: sprk.h:2050
Definition: sprk.h:4542
Definition: hps.h:500
Definition: sprk.h:3832
Definition: hps.h:2253
HPS::Type ObjectType() const
Definition: sprk.h:407
ModelDetachedEvent()
Definition: sprk.h:1759
static MouseButtons ButtonLeft()
Definition: hps.h:48775
Definition: sprk.h:4742
HPS::Type ObjectType() const
Definition: sprk.h:776
Definition: sprk.h:3485
Definition: sprk.h:4190
Definition: sprk.h:80
UpdateType
Definition: hps.h:249
Definition: hps.h:9446
Event * Clone() const
Definition: sprk.h:1640
Definition: sprk.h:104
virtual bool IsMouseTriggered(MouseState const &in_state)
Definition: sprk.h:2076
Definition: hps.h:7962
Definition: sprk.h:3777
Definition: hps.h:38668
Definition: hps.h:426
Event * Clone() const
Definition: sprk.h:3907
ModelDeletedEvent(Event const &in_event)
Definition: sprk.h:1819
InterpolationType
Definition: sprk.h:353
ComponentIsolatedEvent()
Definition: sprk.h:3622
HPS::Type ObjectType() const
Definition: sprk.h:5675
LayoutDeletedEvent(Event const &in_event)
Definition: sprk.h:1625
Definition: hps.h:9675
Definition: hps.h:11377
HPS::Type ObjectType() const
Definition: sprk.h:362
Definition: sprk.h:2091
virtual bool OnTouchMove(TouchState const &in_state)
Definition: sprk.h:2022
virtual HPS::Type ObjectType() const
Definition: sprk.h:4896
virtual bool Drop(Event const *in_that_event) const
Definition: sprk.h:4578
Definition: sprk.h:5023
Definition: sprk.h:258
Definition: sprk.h:3919
Definition: sprk.h:3529
Definition: hps.h:44214
HPS::Type ObjectType() const
Definition: sprk.h:836
Mode
Definition: sprk.h:1025
Definition: hps.h:586
Definition: sprk.h:1945
Definition: sprk.h:832
Definition: sprk.h:479
Definition: hps.h:1245
Definition: hps.h:43564
Definition: sprk.h:1712
Definition: sprk.h:3873
virtual HPS::Type ObjectType() const
Definition: sprk.h:5281
Definition: hps.h:42046
virtual HPS::UTF8 GetName() const
Definition: sprk.h:4485
Event * Clone() const override
Definition: sprk.h:3605
Definition: hps.h:7654