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;
342 /* Sampler is an abstract class which is contains settings common to all kinds of Samplers.
343  * A Sampler is an object that contains a series of Keyframes and which describe how the Animation will interpolate
344  * between the values specified in the Keyframes.
345  * Objects of the Sampler class should not be instantiated directly, rather, users should created objects of type
346  * FloatSampler, VectorSampler, PointSampler or RGBColorSampler, based on the type of data required by the Channel to which the Sampler
347  * will be assigned. */
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 
399 /* A RGBColorSampler is a type of Sampler which holds Keyframe which specify values as RGBColors.
400  * For example, if a Channel is setup to animate the color of a target segment, the values assumed by that
401  * color will have to be specified as RGBColors, and therefore be held in RGBColorKeyframes, which will be collected
402  * in a RGBColorSampler. */
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 
475 /* A VectorSampler is a type of Sampler which holds Keyframe which specify values as Vectors.
476  * For example, if a Channel is setup to animate the value of the camera's up vector, the values assumed by the
477  * up vector will have to be specified as Vectors, and therefore be held in VectorKeyframes, which will be collected
478  * in a VectorSampler. */
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 
545 /* A PointSampler is a type of Sampler which holds Keyframe which specify values as Points.
546  * For example, if a Channel is setup to animate the value of the camera's target, the values assumed by the
547  * camera target will have to be specified as Points, and therefore be held in PointKeyframes, which will be collected
548  * in a PointSampler. */
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 
615 /* A QuaternionSampler is a type of Sampler which holds Keyframe which specify values as Quaternions.
616  * For example, if a Channel is setup to animate the value of the camera's target, the values assumed by the
617  * camera target will have to be specified as Quaternions, and therefore be held in QuaternionKeyframes, which will be collected
618  * in a QuaternionSampler. */
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 
685 /* A FloatSampler is a type of Sampler which holds Keyframe which specify values as floats.
686  * For example, if a Channel is setup to animate the target's opacity, the target's alpha channel value
687  * will be specified in floats, and therefore be held in FloatKeyframes, which will be collected
688  * in a FloatSampler. */
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 
921  /* Returns a list of Channels currently associated with this Animation.
922  * \return a list of Channels currently associated with this Animation. */
923  ChannelArray const & GetChannels() const;
924 
925  /* Returns the name given to this Animation when it was created.
926  * \return The name of this Animation. */
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 
2430  /* Sets the text displayed on the navigation cube.
2431  * note that if you plan on using the navigation cube on a very large and pixel dense screen
2432  * (example: a large TV), if you wish to specify a custom text size, you should do so using
2433  * one of the window relative text sizes.
2434  * \param in_back_string The text to display on the back face of the navigation cube
2435  * \param in_top_string The text to display on the top face of the navigation cube
2436  * \param in_left_string The text to display on the left face of the navigation cube
2437  * \param in_front_string The text to display on the front face of the navigation cube
2438  * \param in_bottom_string The text to display on the bottom face of the navigation cube
2439  * \param in_right_string The text to display on the right face of the navigation cube
2440  * \param in_text_attributes The attributes applied to the text on the navigation cube
2441  * \param in_fallback_fonts An array of fonts to use in case the one specified in in_text_attributes cannot be found at runtime.
2442  * Generally this should be the same array passed to SetFallbackFonts.
2443  * If the font specified is not found at runtime, and no fallback fonts are specified, a stroked representation of the text will be
2444  * used. Non-Latin characters might render as boxes in this eventuality.
2445  * \return A reference to this object. */
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 
2450  /* Gets the text displayed on the navigation cube.
2451  * \param out_back_string The text displayed on the back face of the navigation cube
2452  * \param out_top_string The text displayed on the top face of the navigation cube
2453  * \param out_left_string The text displayed on the left face of the navigation cube
2454  * \param out_front_string The text displayed on the front face of the navigation cube
2455  * \param out_bottom_string The text displayed on the bottom face of the navigation cube
2456  * \param out_right_string The text displayed on the right face of the navigation cube
2457  * \param out_text_attributes The attributes applied to the text on the navigation cube
2458  * \param out_fallback_fonts The fonts that will be used if the preferred font specified when setting text could not be found at runtime. Can be empty.
2459  * \return <span class='code'>true</span> if the navigation cube text was retrieved successfully, <span class='code'>false</span> otherwise. */
2460  bool GetText(UTF8 & out_back_string, UTF8 & out_top_string, UTF8 & out_left_string,
2461  UTF8 & out_front_string, UTF8 & out_bottom_string, UTF8 & out_right_string,
2462  HPS::TextAttributeKit & out_text_attributes, HPS::UTF8Array & out_fallback_fonts) const;
2463 
2466  HPS::SegmentKey GetSegmentKey() const;
2467 
2468 private:
2471 
2473  HPS::SegmentKey GetNavigationCubeSegment() const;
2474  void SetNavigationCubeVisibilityLink(bool in_visibility) const;
2475 
2476  bool IsTextVisible() const;
2477 };
2478 
2481 class SPRK_API AxisTriadControl : public SprocketControl
2482 {
2483 public:
2484 
2485  enum class Location
2486  {
2487  TopRight,
2488  TopLeft,
2489  BottomRight,
2490  BottomLeft,
2491  Custom,
2492  };
2493 
2495  explicit AxisTriadControl(View const & in_view);
2496 
2498  AxisTriadControl(AxisTriadControl const & in_that);
2499 
2503  AxisTriadControl(AxisTriadControl && in_that);
2504 
2508  AxisTriadControl & operator=(AxisTriadControl && in_that);
2509 
2511  ~AxisTriadControl();
2512 
2513  static const HPS::Type staticType = HPS::Type::AxisTriadControl;
2514  HPS::Type ObjectType() const {return staticType;};
2515 
2517  AxisTriadControl & operator=(AxisTriadControl const & in_that);
2518 
2527  HPS::AxisTriadControl & SetLocation(Location in_location, HPS::Rectangle const & in_position = HPS::Rectangle(), HPS::IntRectangle in_offsets = HPS::IntRectangle::Zero());
2528 
2531  Location GetLocation() const;
2532 
2536  AxisTriadControl & SetPosition(HPS::Rectangle const & in_position);
2537 
2540  HPS::Rectangle GetPosition() const;
2541 
2545  AxisTriadControl & SetPositionOffsets(HPS::IntRectangle const & in_offsets);
2546 
2549  HPS::IntRectangle GetPositionOffsets() const;
2550 
2555  HPS::AxisTriadControl & SetVisibility(bool in_visibility);
2556 
2559  bool GetVisibility() const;
2560 
2564  HPS::AxisTriadControl & SetTextVisibility(bool in_text_visibility);
2565 
2568  bool GetTextVisibility() const;
2569 
2578  HPS::AxisTriadControl & SetMaterialPalette(char const * in_material_palette);
2579 
2582  HPS::UTF8 GetMaterialPalette() const;
2583 
2590  HPS::AxisTriadControl & SetInteractivity(bool in_interactivity);
2591 
2594  bool GetInteractivity() const;
2595 
2600  AxisTriadControl & SetSize(float in_size);
2601 
2604  float GetSize() const;
2605 
2608  HPS::SegmentKey GetSegmentKey() const;
2609 
2610 private:
2612  AxisTriadControl(){};
2613 
2615  HPS::SegmentKey GetAxisTriadSegment() const;
2616 
2617  void SetAxisVisibilityLink(bool in_visibility) const;
2618 };
2619 
2621 class SPRK_API Component : public Sprocket
2622 {
2623 public:
2624 
2627  enum class ComponentType : uint32_t
2628  {
2629  None = 0x00000000,
2630  GenericMask = 0xfffff000,
2631 
2632  ExchangeComponentMask = 0x00001000,
2633  ExchangeModelFile = 0x00001001,
2634  ExchangeProductOccurrence = 0x00001002,
2635  ExchangePartDefinition = 0x00001003,
2636 
2637  ExchangeView = 0x00001004,
2638  ExchangeFilter = 0x00001005,
2639 
2640  ExchangeRepresentationItemMask = 0x00003000,
2641  ExchangeRIBRepModel = 0x00003001,
2642  ExchangeRICurve = 0x00003002,
2643  ExchangeRIDirection = 0x00003003,
2644  ExchangeRIPlane = 0x00003004,
2645  ExchangeRIPointSet = 0x00003005,
2646  ExchangeRIPolyBRepModel = 0x00003006,
2647  ExchangeRIPolyWire = 0x00003007,
2648  ExchangeRISet = 0x00003008,
2649  ExchangeRICoordinateSystem = 0x00003009,
2650 
2651  ExchangeTopologyMask = 0x00005000,
2652  ExchangeTopoBody = 0x00005001,
2653  ExchangeTopoConnex = 0x00005002,
2654  ExchangeTopoShell = 0x00005003,
2655  ExchangeTopoFace = 0x00005004,
2656  ExchangeTopoLoop = 0x00005005,
2657  ExchangeTopoCoEdge = 0x00005006,
2658  ExchangeTopoEdge = 0x00005007,
2659  ExchangeTopoVertex = 0x00005008,
2660  ExchangeTopoSingleWireBody = 0x00005009,
2661  ExchangeTopoWireEdge = 0x0000500a,
2662 
2663  ExchangeDrawingMask = 0x00009000,
2664  ExchangeDrawingModel = 0x00009001,
2665  ExchangeDrawingView = 0x00009002,
2666  ExchangeDrawingSheet = 0x00009003,
2667  ExchangeBasicDrawingBlock = 0x00009004,
2668  ExchangeOperatorDrawingBlock = 0x00009005,
2669 
2670  ExchangePMIMask = 0x00011000,
2671  ExchangePMI = ExchangePMIMask,
2672  ExchangePMIText = 0x00011100,
2673  ExchangePMIRichText = 0x00011200,
2674  ExchangePMIRoughness = 0x00011300,
2675  ExchangePMIGDT = 0x00011400,
2676  ExchangePMIDatum = 0x00011500,
2677  ExchangePMILineWelding = 0x00011600,
2678  ExchangePMISpotWelding = 0x00011700,
2679  ExchangePMIDimension = 0x00011800,
2680  ExchangePMIBalloon = 0x00011900,
2681  ExchangePMICoordinate = 0x00011a00,
2682  ExchangePMIFastener = 0x00011b00,
2683  ExchangePMILocator = 0x00011c00,
2684  ExchangePMIMeasurementPoint = 0x00011d00,
2685 
2686 
2687  ParasolidComponentMask = 0x00020000,
2688 
2689  ParasolidModelFile = 0x00020001,
2690  ParasolidAssembly = 0x00020002,
2691  ParasolidInstance = 0x00020003,
2692 
2693  ParasolidTopologyMask = 0x00060000,
2694  ParasolidTopoBody = 0x00060001,
2695  ParasolidTopoRegion = 0x00060002,
2696  ParasolidTopoShell = 0x00060003,
2697  ParasolidTopoFace = 0x00060004,
2698  ParasolidTopoLoop = 0x00060005,
2699  ParasolidTopoFin = 0x00060006,
2700  ParasolidTopoEdge = 0x00060007,
2701  ParasolidTopoVertex = 0x00060008,
2702 
2703 
2704  DWGComponentMask = 0x00100000,
2705  DWGModelFile = 0x00100001,
2706  DWGLayout = 0x00100002,
2707  DWGBlockTable = 0x00100003,
2708  DWGBlockTableRecord = 0x00100004,
2709  DWGEntity = 0x00100005,
2710  DWGLayerTable = 0x00100006,
2711  DWGLayer = 0x00100007,
2712 
2713 
2714  UserComponent = 0x01000000,
2715  };
2716 
2719  enum class DeleteMode
2720  {
2721  Standard, // subcomponents will be deleted if they don't have multiple owners, otherwise their reference count will be decremented
2722  Full, // subcomponents will always be deleted, even if they are shared
2723  StandardAndExchange // Subcomponent will deleted if they don't have multiple owners, otherwise their reference count will be decremented.
2724  // The Exchange Entity associated to the Component will be deleted.
2725  };
2726 
2728  Component();
2729 
2732  Component(Component const & in_that);
2733 
2736  Component(Component && in_that);
2737 
2739  virtual ~Component();
2740 
2741  static const HPS::Type staticType = HPS::Type::Component;
2742  HPS::Type ObjectType() const { return staticType; }
2743 
2744 
2748  Component & operator=(Component const & in_that);
2749 
2753  Component & operator=(Component && in_that);
2754 
2758  virtual void Assign(Component const & in_that);
2759 
2763  bool Equals(Component const & in_that) const;
2764 
2768  bool operator!=(Component const & in_that) const;
2769 
2773  bool operator==(Component const & in_that) const;
2774 
2775 
2778  ComponentType GetComponentType() const;
2779 
2783  bool HasComponentType(ComponentType in_mask) const;
2784 
2785 
2786 
2792  void AddKey(Key const & in_key);
2793 
2796  KeyArray GetKeys() const;
2797 
2798 
2799 
2804  void AddOwner(Component & in_owner, IncludeKey const & in_include = IncludeKey());
2805 
2810  ComponentArray GetOwners() const;
2811 
2814  ComponentArray GetSubcomponents() const;
2815 
2820  ComponentArray GetAllSubcomponents(ComponentType in_type) const;
2821 
2822 
2823 
2826  void AddReference(Component & in_reference);
2827 
2834  ComponentArray GetReferrers() const;
2835 
2839  ComponentArray GetReferences() const;
2840 
2841 
2842 
2845  MetadataArray GetAllMetadata() const;
2846 
2850  Metadata GetMetadata(char const * in_name) const;
2851 
2855  UTF8 GetName() const;
2856 
2857 
2858 
2911  void Delete(HPS::Component::DeleteMode mode = HPS::Component::DeleteMode::Standard);
2912 
2916  void Flush();
2917 
2918 
2926  static KeyPathArray GetKeyPath(Component const & in_component);
2927 
2937  static KeyPathArray GetKeyPath(size_t in_count, Component const in_components[]);
2938 
2947  static KeyPathArray GetKeyPath(ComponentArray const & in_components);
2948 
2954  bool SetTransform(MatrixKit const & in_transform);
2955 
2961  bool AddTransform(MatrixKit const & in_transform);
2962 
2983  Component CopyTo(HPS::Component const & in_new_owner);
2984 
2989  bool SetName(char const * in_new_name);
2990 };
2991 
2993 class SPRK_API ComponentPath : public Sprocket
2994 {
2995 public:
2998  enum class PathType : uint32_t
2999  {
3000  Complete,
3001  Unique,
3002  };
3003 
3005  ComponentPath();
3006 
3009  ComponentPath(ComponentArray const & in_components);
3010 
3014  ComponentPath(size_t in_count, Component const in_components[]);
3015 
3017  ComponentPath(ComponentPath const & in_that);
3018 
3022  ComponentPath(ComponentPath && in_that);
3023 
3027  ComponentPath & operator=(ComponentPath && in_that);
3028 
3030  virtual ~ComponentPath();
3031 
3032  static const HPS::Type staticType = HPS::Type::ComponentPath;
3033  HPS::Type ObjectType() const { return staticType; }
3034 
3037  bool Empty() const;
3038 
3042  ComponentPath & operator+=(Component const & in_component);
3043 
3047  ComponentPath & operator+=(ComponentPath const & in_path);
3048 
3052  ComponentPath & operator+=(ComponentArray const & in_components);
3053 
3058  ComponentPath & Append(Component const & in_component);
3059 
3064  ComponentPath & Append(ComponentPath const & in_path);
3065 
3070  ComponentPath & Append(ComponentArray const & in_components);
3071 
3075  ComponentPath & operator=(ComponentPath const & in_that);
3076 
3080  ComponentPath & operator=(ComponentArray const & in_path);
3081 
3084  void Set(ComponentPath const & in_that);
3085 
3089  bool Equals(ComponentPath const & in_that) const;
3090 
3094  bool operator!= (ComponentPath const & in_that) const;
3095 
3099  bool operator== (ComponentPath const & in_that) const;
3100 
3101 
3105  ComponentPath & SetComponents(ComponentArray const & in_components);
3106 
3111  ComponentPath & SetComponents(size_t in_count, Component const in_components[]);
3112 
3115  ComponentArray GetComponents() const;
3116 
3120  KeyPathArray GetKeyPaths() const;
3121 
3126  KeyPathArray GetKeyPaths(Canvas const & in_canvas, size_t in_layer = 0) const;
3127 
3128 
3135  void Highlight(Canvas const & in_canvas, HighlightOptionsKit const & in_options, bool in_remove_existing = true) const;
3136 
3143  void Highlight(Canvas const & in_canvas, size_t in_layer, HighlightOptionsKit const & in_options, bool in_remove_existing = true) const;
3144 
3148  void Unhighlight(Canvas const & in_canvas, HighlightOptionsKit const & in_options = HighlightOptionsKit()) const;
3149 
3154  void Unhighlight(Canvas const & in_canvas, size_t in_layer, HighlightOptionsKit const & in_options = HighlightOptionsKit()) const;
3155 
3156 
3168  void Hide(Canvas const & in_canvas, size_t in_layer = 0);
3169 
3181  void Show(Canvas const & in_canvas, size_t in_layer = 0);
3182 
3194  bool IsHidden(Canvas const & in_canvas, size_t in_layer = 0) const;
3195 
3206  void Isolate(Canvas const & in_canvas, size_t in_layer = 0);
3207 
3219  static void Isolate(HPS::ComponentPathArray & in_component_paths, Canvas const & in_canvas, size_t in_layer = 0);
3220 
3230  void ResetVisibility(Canvas const & in_canvas, size_t in_layer = 0);
3231 
3242  static void ResetVisibility(HPS::ComponentPathArray & in_component_paths, Canvas const & in_canvas, size_t in_layer = 0);
3243 
3244  /* Returns the number of Components contained in this ComponentPath object.
3245  * \return the number of Components in this ComponentPath.*/
3246  size_t Size() const;
3247 
3248  /* Access a Component in this ComponentPath object. An HPS::IndexOutOfRangeException exception is thrown if in_index is out of range.
3249  * \param in_index The index of the Component to access, zero based.
3250  * \return The Component at position in_index in this ComponentPath.*/
3251  Component & At(size_t in_index);
3252 
3253  /* Access a Component in this ComponentPath object. An HPS::IndexOutOfRangeException exception is thrown if in_index is out of range.
3254  * \param in_index The index of the Component to access, zero based.
3255  * \return The Component at position in_index in this ComponentPath.*/
3256  Component const & At(size_t in_index) const;
3257 
3258  /* Inserts in_item in the ComponentPath before the element at position in_index, increasing the size of the ComponentPath by one.
3259  * An HPS::IndexOutOfRangeException exception is thrown if in_index is out of range.
3260  * \param in_index The index where in_item will be inserted
3261  * \param in_item The component to insert in this key path. */
3262  void Insert(size_t in_index, Component const & in_item);
3263 
3264  /* Traverses the components in this ComponentPath and removes the first one which matches in_item
3265  * NOTE: A useful ComponentPath should not contain duplicate components.
3266  * \param in_item The item to remove from the ComponentPath. */
3267  void Remove(Component const & in_item);
3268 
3269  /* Removes the the component at position in_index from this ComponentPath. An HPS::IndexOutOfRangeException exception is thrown if in_index is out of range.
3270  * \param in_index The index of the component to remove, zero based. */
3271  void Remove(size_t in_index);
3272 
3273  /* Creates and returns a new ComponentPath object, with the components organized in the reverse order.
3274  * \return A new ComponentPath object, containing components organized in the reverse order. */
3275  ComponentPath Reverse() const;
3276 
3277  /* Returns the first component of this ComponentPath. An HPS::IndexOutOfRangeException exception is thrown if the ComponentPath is empty.
3278  * \return The first component of this ComponentPath.*/
3279  Component & Front();
3280 
3281  /* Returns the first component of this ComponentPath. An HPS::IndexOutOfRangeException exception is thrown if the ComponentPath is empty.
3282  * \return The first component of this ComponentPath.*/
3283  Component const & Front() const;
3284 
3285  /* Returns the last component of this ComponentPath. An HPS::IndexOutOfRangeException exception is thrown if the ComponentPath is empty.
3286  * \return The last component of this ComponentPath.*/
3287  Component & Back();
3288 
3289  /* Returns the last component of this ComponentPath. An HPS::IndexOutOfRangeException exception is thrown if the ComponentPath is empty.
3290  * \return The last component of this ComponentPath.*/
3291  Component const & Back() const;
3292 
3293  /* Returns the first component of this ComponentPath and returns it. An HPS::IndexOutOfRangeException exception is thrown if the ComponentPath is empty.
3294  * \return The first component of this ComponentPath.*/
3295  Component PopFront();
3296 
3297  /* Returns the last component of this ComponentPath and returns it. An HPS::IndexOutOfRangeException exception is thrown if the ComponentPath is empty.
3298  * \return The last component of this ComponentPath.*/
3299  Component PopBack();
3300 
3301  /* Adds in_component to the front of the ComponentPath.
3302  * \param in_component The component to add to the front of the ComponentPath.
3303  * \return A reference to this object.*/
3304  ComponentPath & PushFront(Component const & in_component);
3305 
3306  /* Adds in_component to the end of the ComponentPath.
3307  * \param in_component The component to add to the end of the ComponentPath.
3308  * \return A reference to this object.*/
3309  ComponentPath & PushBack(Component const & in_component);
3310 
3314  ComponentPath & PushBack(ComponentPath const & in_path);
3315 
3319  ComponentPath & PushBack(ComponentArray const & in_components);
3320 
3321 #ifndef HPS_GULP_CLANG
3322  using iterator = HPS::ComponentArray::iterator;
3323  using const_iterator = HPS::ComponentArray::const_iterator;
3324  using reverse_iterator = HPS::ComponentArray::reverse_iterator;
3325  using const_reverse_iterator = HPS::ComponentArray::const_reverse_iterator;
3326 
3327  /* Returns an iterator pointing to the first Component contained in this ComponentPath
3328  * \return An iterator pointing to the first Component contained in this ComponentPath. */
3329  iterator begin();
3330 
3331  /* Returns an iterator pointing to the first Component contained in this ComponentPath
3332  * \return An iterator pointing to the first Component contained in this ComponentPath. */
3333  const_iterator begin() const;
3334 
3335  /* Returns a constant iterator pointing to the last Component contained in this ComponentPath
3336  * \return A constant iterator pointing to the last Component contained in this ComponentPath. */
3337  iterator end();
3338 
3339  /* Returns a constant iterator pointing to the last Component contained in this ComponentPath
3340  * \return A constant iterator pointing to the last Component contained in this ComponentPath. */
3341  const_iterator end() const;
3342 
3343  /* Returns a constant iterator pointing to the first Component contained in this ComponentPath
3344  * \return A constant iterator pointing to the first Component contained in this ComponentPath. */
3345  const_iterator cbegin() const;
3346 
3347  /* Returns a constant iterator pointing to the last Component contained in this ComponentPath
3348  * \return A constant iterator pointing to the last Component contained in this ComponentPath. */
3349  const_iterator cend() const;
3350 
3351  /* Returns a reverse iterator pointing to the last Component contained in this ComponentPath
3352  * \return A reverse iterator pointing to the last Component contained in this ComponentPath. */
3353  reverse_iterator rbegin();
3354 
3355  /* Returns a reverse iterator pointing to the first Component contained in this ComponentPath
3356  * \return A reverse iterator pointing to the first Component contained in this ComponentPath. */
3357  reverse_iterator rend();
3358 
3359  /* Returns a constant reverse iterator pointing to the last Component contained in this ComponentPath
3360  * \return A constant reverse iterator pointing to the last Component contained in this ComponentPath. */
3361  const_reverse_iterator rbegin() const;
3362 
3363  /* Returns a constant iterator pointing to the first Component contained in this ComponentPath
3364  * \return A constant iterator pointing to the first Component contained in this ComponentPath. */
3365  const_reverse_iterator rend() const;
3366 #endif
3367 };
3368 
3369 
3374 inline ComponentPath operator+(Component const & in_lhs, Component const & in_rhs)
3375 {
3376  return HPS::ComponentPath().PushBack(in_lhs).PushBack(in_rhs);
3377 }
3378 
3383 inline ComponentPath operator+(Component const & in_lhs, ComponentArray const & in_rhs)
3384 {
3385  return HPS::ComponentPath().PushBack(in_lhs).PushBack(in_rhs);
3386 }
3387 
3392 inline ComponentPath operator+(Component const & in_lhs, ComponentPath const & in_rhs)
3393 {
3394  return HPS::ComponentPath().PushBack(in_lhs).PushBack(in_rhs);
3395 }
3396 
3401 inline ComponentPath operator+(ComponentArray const & in_lhs, Component const & in_rhs)
3402 {
3403  return HPS::ComponentPath().PushBack(in_lhs).PushBack(in_rhs);
3404 }
3405 
3410 inline ComponentPath operator+(ComponentArray const & in_lhs, ComponentArray const & in_rhs)
3411 {
3412  return HPS::ComponentPath().PushBack(in_lhs).PushBack(in_rhs);
3413 }
3414 
3419 inline ComponentPath operator+(ComponentArray const & in_lhs, ComponentPath const & in_rhs)
3420 {
3421  return HPS::ComponentPath().PushBack(in_lhs).PushBack(in_rhs);
3422 }
3423 
3428 inline ComponentPath operator+(ComponentPath const & in_lhs, Component const & in_rhs)
3429 {
3430  return HPS::ComponentPath().PushBack(in_lhs).PushBack(in_rhs);
3431 }
3432 
3437 inline ComponentPath operator+(ComponentPath const & in_lhs, ComponentArray const & in_rhs)
3438 {
3439  return HPS::ComponentPath().PushBack(in_lhs).PushBack(in_rhs);
3440 }
3441 
3446 inline ComponentPath operator+(ComponentPath const & in_lhs, ComponentPath const & in_rhs)
3447 {
3448  return HPS::ComponentPath().PushBack(in_lhs).PushBack(in_rhs);
3449 }
3450 
3452 class SPRK_API ComponentResetEvent : public HPS::Event
3453 {
3454 public:
3455 
3457  {
3458  channel = GetClassID();
3459  consumable = false;
3460  }
3461 
3462  ComponentResetEvent(HPS::ComponentPath const & in_path, HPS::Canvas const & in_canvas, size_t in_layer = 0)
3463  : Event(), path(in_path), canvas(in_canvas), layer(in_layer)
3464  {
3465  channel = GetClassID();
3466  consumable = false;
3467  }
3468 
3469  ComponentResetEvent(HPS::Event const & in_event) : Event(in_event)
3470  {
3471  if (in_event.GetChannel() == HPS::Object::ClassID<ComponentResetEvent>())
3472  {
3473  auto that = static_cast<ComponentResetEvent const &>(in_event);
3474  path = that.path;
3475  canvas = that.canvas;
3476  layer = that.layer;
3477  }
3478  else
3479  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
3480  }
3481 
3482  virtual ~ComponentResetEvent() {}
3483 
3484  Event * Clone() const override
3485  {
3486  ComponentResetEvent * new_event = new ComponentResetEvent(*this);
3487  return new_event;
3488  }
3489 
3490  HPS::ComponentPath path;
3491  HPS::Canvas canvas;
3492  size_t layer;
3493 };
3494 
3496 class SPRK_API ComponentShownEvent : public HPS::Event
3497 {
3498 public:
3499 
3501  {
3502  channel = GetClassID();
3503  consumable = false;
3504  }
3505 
3506  ComponentShownEvent(HPS::ComponentPath const & in_path, HPS::Canvas const & in_canvas, size_t in_layer = 0)
3507  : Event(), path(in_path), canvas(in_canvas), layer(in_layer)
3508  {
3509  channel = GetClassID();
3510  consumable = false;
3511  }
3512 
3513  ComponentShownEvent(HPS::Event const & in_event) : Event(in_event)
3514  {
3515  if (in_event.GetChannel() == HPS::Object::ClassID<ComponentShownEvent>())
3516  {
3517  auto that = static_cast<ComponentShownEvent const &>(in_event);
3518  path = that.path;
3519  canvas = that.canvas;
3520  layer = that.layer;
3521  }
3522  else
3523  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
3524  }
3525 
3526  virtual ~ComponentShownEvent() {}
3527 
3528  Event * Clone() const override
3529  {
3530  ComponentShownEvent * new_event = new ComponentShownEvent(*this);
3531  return new_event;
3532  }
3533 
3534  HPS::ComponentPath path;
3535  HPS::Canvas canvas;
3536  size_t layer;
3537 };
3538 
3540 class SPRK_API ComponentHiddenEvent : public HPS::Event
3541 {
3542 public:
3543 
3545  {
3546  channel = GetClassID();
3547  consumable = false;
3548  }
3549 
3550  ComponentHiddenEvent(HPS::ComponentPath const & in_path, HPS::Canvas const & in_canvas, size_t in_layer = 0)
3551  : Event(), path(in_path), canvas(in_canvas), layer(in_layer)
3552  {
3553  channel = GetClassID();
3554  consumable = false;
3555  }
3556 
3557  ComponentHiddenEvent(HPS::Event const & in_event) : Event(in_event)
3558  {
3559  if (in_event.GetChannel() == HPS::Object::ClassID<ComponentHiddenEvent>())
3560  {
3561  auto that = static_cast<ComponentHiddenEvent const &>(in_event);
3562  path = that.path;
3563  canvas = that.canvas;
3564  layer = that.layer;
3565  }
3566  else
3567  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
3568  }
3569 
3570  virtual ~ComponentHiddenEvent() {}
3571 
3572  Event * Clone() const override
3573  {
3574  ComponentHiddenEvent * new_event = new ComponentHiddenEvent(*this);
3575  return new_event;
3576  }
3577 
3578  HPS::ComponentPath path;
3579  HPS::Canvas canvas;
3580  size_t layer;
3581 };
3582 
3584 class SPRK_API ComponentIsolatedEvent : public Event
3585 {
3586 public:
3587 
3590  {
3591  channel = GetClassID();
3592  consumable = false;
3593  }
3594 
3595  ComponentIsolatedEvent(HPS::ComponentPath const & in_path, HPS::Canvas const & in_canvas, size_t in_layer = 0)
3596  : Event(), path(in_path), canvas(in_canvas), layer(in_layer)
3597  {
3598  channel = GetClassID();
3599  consumable = false;
3600  }
3601 
3604  ComponentIsolatedEvent(Event const & in_event) : Event(in_event)
3605  {
3606  if (in_event.GetChannel() == Object::ClassID<ComponentIsolatedEvent>())
3607  {
3608  auto that = static_cast<ComponentIsolatedEvent const &>(in_event);
3609  path = that.path;
3610  canvas = that.canvas;
3611  layer = that.layer;
3612  }
3613  else
3614  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
3615  }
3616 
3617  virtual ~ComponentIsolatedEvent();
3618 
3621  Event * Clone() const override
3622  {
3623  ComponentIsolatedEvent * new_event = new ComponentIsolatedEvent(*this);
3624  return new_event;
3625  }
3626 
3627  ComponentPath path;
3628  HPS::Canvas canvas;
3629  size_t layer;
3630 };
3631 
3632 
3634 class SPRK_API ComponentHighlightEvent : public Event
3635 {
3636 public:
3637  enum class Action
3638  {
3639  None = 0,
3640  Highlight,
3641  Unhighlight,
3642  };
3643 
3646  {
3647  channel = GetClassID();
3648  consumable = false;
3649  action = Action::None;
3650  }
3651 
3652  ComponentHighlightEvent(Action in_action,
3653  HPS::Canvas const & in_canvas,
3654  size_t in_layer = 0,
3655  ComponentPath const & in_path = ComponentPath(),
3656  HighlightOptionsKit const & in_options = HighlightOptionsKit())
3657  : Event(), action(in_action), path(in_path), options(in_options), canvas(in_canvas), layer(in_layer)
3658  {
3659  channel = GetClassID();
3660  consumable = false;
3661  }
3662 
3665  ComponentHighlightEvent(Event const & in_event) : Event(in_event)
3666  {
3667  if (in_event.GetChannel() == Object::ClassID<ComponentHighlightEvent>())
3668  {
3669  auto that = static_cast<ComponentHighlightEvent const &>(in_event);
3670  action = that.action;
3671  path = that.path;
3672  options = that.options;
3673  canvas = that.canvas;
3674  layer = that.layer;
3675  }
3676  else
3677  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
3678  }
3679 
3680  virtual ~ComponentHighlightEvent();
3681 
3684  Event * Clone() const override
3685  {
3686  ComponentHighlightEvent * new_event = new ComponentHighlightEvent(*this);
3687  return new_event;
3688  }
3689 
3690  Action action;
3691  ComponentPath path;
3692  HighlightOptionsKit options;
3693  HPS::Canvas canvas;
3694  size_t layer;
3695 };
3696 
3697 
3699 class SPRK_API Filter : public Component
3700 {
3701 public:
3703  Filter();
3704 
3708  Filter(Component const & in_that);
3709 
3712  Filter(Filter const & in_that);
3713 
3716  Filter(Filter && in_that);
3717 
3718  virtual ~Filter();
3719 
3720  static const HPS::Type staticType = HPS::Type::Filter;
3721  HPS::Type ObjectType() const { return staticType; }
3722 
3723 
3724 #if !defined(_MSC_VER) || _MSC_VER >= 1900
3725  Filter & operator=(Filter const & in_that) = default;
3726 #endif
3727 
3731  Filter & operator=(Filter && in_that);
3732 
3733 
3736  void Activate(View const & in_view);
3737 
3740  void Deactivate(View const & in_view);
3741 };
3742 
3743 
3744 class SPRK_API FilterActivationEvent : public Event
3745 {
3746 public:
3747  enum class Action
3748  {
3749  None = 0,
3750  Activate,
3751  Deactivate,
3752  };
3753 
3756  {
3757  channel = GetClassID();
3758  consumable = false;
3759  }
3760 
3761  FilterActivationEvent(Filter in_filter, Action in_action, View in_view) : Event(), filter(in_filter), action(in_action), view(in_view)
3762  {
3763  channel = GetClassID();
3764  consumable = false;
3765  }
3766 
3769  FilterActivationEvent(Event const & in_event) : Event(in_event)
3770  {
3771  if (in_event.GetChannel() == Object::ClassID<FilterActivationEvent>())
3772  {
3773  auto that = static_cast<FilterActivationEvent const &>(in_event);
3774  filter = that.filter;
3775  action = that.action;
3776  view = that.view;
3777  }
3778  else
3779  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
3780  }
3781 
3783 
3786  Event * Clone() const
3787  {
3788  FilterActivationEvent * new_event = new FilterActivationEvent(*this);
3789  return new_event;
3790  }
3791 
3792  Filter filter;
3793  Action action;
3794  View view;
3795 };
3796 
3797 
3799 class SPRK_API Capture : public Component
3800 {
3801 public:
3803  Capture();
3804 
3808  Capture(Component const & in_that);
3809 
3812  Capture(Capture const & in_that);
3813 
3816  Capture(Capture && in_that);
3817 
3818  virtual ~Capture();
3819 
3820  static const HPS::Type staticType = HPS::Type::Capture;
3821  HPS::Type ObjectType() const { return staticType; }
3822 
3823 #if !defined(_MSC_VER) || _MSC_VER >= 1900
3824  Capture & operator=(Capture const & in_that) = default;
3825 #endif
3826 
3830  Capture & operator=(Capture && in_that);
3831 
3832 
3836  View Activate();
3837 };
3838 
3839 
3840 class SPRK_API CaptureActivationEvent : public Event
3841 {
3842 public:
3845  {
3846  channel = GetClassID();
3847  consumable = false;
3848  }
3849 
3850  CaptureActivationEvent(Capture in_capture, View in_view) : Event(), capture(in_capture), view(in_view)
3851  {
3852  channel = GetClassID();
3853  consumable = false;
3854  }
3855 
3858  CaptureActivationEvent(Event const & in_event) : Event(in_event)
3859  {
3860  if (in_event.GetChannel() == Object::ClassID<CaptureActivationEvent>())
3861  {
3862  auto that = static_cast<CaptureActivationEvent const &>(in_event);
3863  capture = that.capture;
3864  view = that.view;
3865  }
3866  else
3867  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
3868  }
3869 
3871 
3874  Event * Clone() const
3875  {
3876  CaptureActivationEvent * new_event = new CaptureActivationEvent(*this);
3877  return new_event;
3878  }
3879 
3880  Capture capture;
3881  View view;
3882 };
3883 
3884 
3886 class SPRK_API CADModel : public Component
3887 {
3888 public:
3890  CADModel();
3891 
3895  CADModel(Component const & in_that);
3896 
3899  CADModel(CADModel const & in_that);
3900 
3903  CADModel(CADModel && in_that);
3904 
3907  CADModel(Model const & in_that);
3908 
3909  virtual ~CADModel();
3910 
3911  static const HPS::Type staticType = HPS::Type::CADModel;
3912  HPS::Type ObjectType() const { return staticType; }
3913 
3914 #if !defined(_MSC_VER) || _MSC_VER >= 1900
3915  CADModel & operator=(CADModel const & in_that) = default;
3916 #endif
3917 
3921  CADModel & operator=(CADModel && in_that);
3922 
3923 
3927  Component GetComponentFromKey(Key const & in_key) const;
3928 
3940  ComponentPath GetComponentPath(KeyPath const & in_key_path, ComponentPath::PathType in_path_type = ComponentPath::PathType::Unique) const;
3941 
3953  ComponentPath GetComponentPath(SelectionItem const & in_item, ComponentPath::PathType in_path_type = ComponentPath::PathType::Unique) const;
3954 
3955 
3958  Model GetModel() const;
3959 
3962  FilterArray GetAllFilters() const;
3963 
3966  CaptureArray GetAllCaptures() const;
3967 
3971  FilterArray GetActiveFilters(View const & in_view) const;
3972 
3973 
3977  View ActivateDefaultCapture();
3978 
3979 
3987  void ResetVisibility(Canvas const & in_canvas, size_t in_layer = 0);
3988 };
3989 
3990 
3991 
3994 class SPRK_API Metadata : public Sprocket
3995 {
3996 public:
3998  Metadata();
3999 
4002  Metadata(Metadata const & in_that);
4003 
4006  Metadata(Metadata && in_that);
4007 
4010  Metadata(char const * in_name);
4011 
4012  virtual ~Metadata();
4013 
4014  static const HPS::Type staticType = HPS::Type::Metadata;
4015  HPS::Type ObjectType() const { return staticType; }
4016 
4017 
4021  Metadata & operator=(Metadata const & in_that);
4022 
4026  Metadata & operator=(Metadata && in_that);
4027 
4031  virtual void Assign(Metadata const & in_that);
4032 
4036  bool Equals(Metadata const & in_that) const;
4037 
4041  bool operator!=(Metadata const & in_that) const;
4042 
4046  bool operator==(Metadata const & in_that) const;
4047 
4048 
4051  HPS::UTF8 GetName() const;
4052 
4055  void SetName(char const * in_name);
4056 };
4057 
4059 class SPRK_API IntegerMetadata : public Metadata
4060 {
4061 public:
4063  IntegerMetadata();
4064 
4068  IntegerMetadata(Metadata const & in_that);
4069 
4072  IntegerMetadata(IntegerMetadata const & in_that);
4073 
4076  IntegerMetadata(IntegerMetadata && in_that);
4077 
4081  IntegerMetadata(char const * in_name, int in_value);
4082 
4083  virtual ~IntegerMetadata();
4084 
4085  static const HPS::Type staticType = HPS::Type::IntegerMetadata;
4086  HPS::Type ObjectType() const { return staticType; }
4087 
4088 #if !defined(_MSC_VER) || _MSC_VER >= 1900
4089  IntegerMetadata & operator=(IntegerMetadata const & in_that) = default;
4090 #endif
4091 
4095  IntegerMetadata & operator=(IntegerMetadata && in_that);
4096 
4097 
4100  int GetValue() const;
4101 
4104  void SetValue(int in_value);
4105 };
4106 
4108 class SPRK_API UnsignedIntegerMetadata : public Metadata
4109 {
4110 public:
4113 
4117  UnsignedIntegerMetadata(Metadata const & in_that);
4118 
4122 
4126 
4130  UnsignedIntegerMetadata(char const * in_name, unsigned int in_value);
4131 
4132  virtual ~UnsignedIntegerMetadata();
4133 
4134  static const HPS::Type staticType = HPS::Type::UnsignedIntegerMetadata;
4135  HPS::Type ObjectType() const { return staticType; }
4136 
4137 #if !defined(_MSC_VER) || _MSC_VER >= 1900
4138  UnsignedIntegerMetadata & operator=(UnsignedIntegerMetadata const & in_that) = default;
4139 #endif
4140 
4144  UnsignedIntegerMetadata & operator=(UnsignedIntegerMetadata && in_that);
4145 
4146 
4149  unsigned int GetValue() const;
4150 
4153  void SetValue(unsigned int in_value);
4154 };
4155 
4157 class SPRK_API DoubleMetadata : public Metadata
4158 {
4159 public:
4161  DoubleMetadata();
4162 
4166  DoubleMetadata(Metadata const & in_that);
4167 
4170  DoubleMetadata(DoubleMetadata const & in_that);
4171 
4174  DoubleMetadata(DoubleMetadata && in_that);
4175 
4179  DoubleMetadata(char const * in_name, double in_value);
4180 
4181  virtual ~DoubleMetadata();
4182 
4183  static const HPS::Type staticType = HPS::Type::DoubleMetadata;
4184  HPS::Type ObjectType() const { return staticType; }
4185 
4186 #if !defined(_MSC_VER) || _MSC_VER >= 1900
4187  DoubleMetadata & operator=(DoubleMetadata const & in_that) = default;
4188 #endif
4189 
4193  DoubleMetadata & operator=(DoubleMetadata && in_that);
4194 
4195 
4198  double GetValue() const;
4199 
4202  void SetValue(double in_value);
4203 };
4204 
4206 class SPRK_API StringMetadata : public Metadata
4207 {
4208 public:
4210  StringMetadata();
4211 
4215  StringMetadata(Metadata const & in_that);
4216 
4219  StringMetadata(StringMetadata const & in_that);
4220 
4223  StringMetadata(StringMetadata && in_that);
4224 
4228  StringMetadata(char const * in_name, char const * in_value);
4229 
4230  virtual ~StringMetadata();
4231 
4232  static const HPS::Type staticType = HPS::Type::StringMetadata;
4233  HPS::Type ObjectType() const { return staticType; }
4234 
4235 #if !defined(_MSC_VER) || _MSC_VER >= 1900
4236  StringMetadata & operator=(StringMetadata const & in_that) = default;
4237 #endif
4238 
4242  StringMetadata & operator=(StringMetadata && in_that);
4243 
4244 
4247  UTF8 GetValue() const;
4248 
4251  void SetValue(char const * in_value);
4252 };
4253 
4255 class SPRK_API TimeMetadata : public Metadata
4256 {
4257 public:
4259  TimeMetadata();
4260 
4264  TimeMetadata(Metadata const & in_that);
4265 
4268  TimeMetadata(TimeMetadata const & in_that);
4269 
4272  TimeMetadata(TimeMetadata && in_that);
4273 
4277  TimeMetadata(char const * in_name, unsigned int in_value);
4278 
4279  virtual ~TimeMetadata();
4280 
4281  static const HPS::Type staticType = HPS::Type::TimeMetadata;
4282  HPS::Type ObjectType() const { return staticType; }
4283 
4284 #if !defined(_MSC_VER) || _MSC_VER >= 1900
4285  TimeMetadata & operator=(TimeMetadata const & in_that) = default;
4286 #endif
4287 
4291  TimeMetadata & operator=(TimeMetadata && in_that);
4292 
4293 
4296  unsigned int GetValue() const;
4297 
4300  HPS::UTF8 GetValueAsString() const;
4301 
4304  void SetValue(unsigned int in_value);
4305 };
4306 
4307 
4309 class SPRK_API BooleanMetadata : public Metadata
4310 {
4311 public:
4313  BooleanMetadata();
4314 
4318  BooleanMetadata(Metadata const & in_that);
4319 
4322  BooleanMetadata(BooleanMetadata const & in_that);
4323 
4326  BooleanMetadata(BooleanMetadata && in_that);
4327 
4331  BooleanMetadata(char const * in_name, bool in_value);
4332 
4333  virtual ~BooleanMetadata();
4334 
4335  static const HPS::Type staticType = HPS::Type::BooleanMetadata;
4336  HPS::Type ObjectType() const { return staticType; }
4337 
4338 #if !defined(_MSC_VER) || _MSC_VER >= 1900
4339  BooleanMetadata & operator=(BooleanMetadata const & in_that) = default;
4340 #endif
4341 
4345  BooleanMetadata & operator=(BooleanMetadata && in_that);
4346 
4347 
4350  bool GetValue() const;
4351 
4354  void SetValue(bool in_value);
4355 };
4356 
4357 
4358 
4360 class SPRK_API Factory : public Sprocket
4361 {
4362 public:
4365  static CanvasArray GetCanvases();
4366 
4369  static LayoutArray GetLayouts();
4370 
4373  static ViewArray GetViews();
4374 
4377  static ModelArray GetModels();
4378 
4381  static CADModelArray GetCADModels();
4382 
4388  static Canvas CreateCanvas(HPS::WindowHandle in_window_handle, char const * in_name = "", HPS::ApplicationWindowOptionsKit const & in_options = HPS::ApplicationWindowOptionsKit());
4389 
4390 #if TARGET_OS_ANDROID == 0 && !defined(__APPLE__)
4391 
4396  static Canvas CreateCanvas(char const * in_name = "", HPS::StandAloneWindowOptionsKit const & in_options = HPS::StandAloneWindowOptionsKit());
4397 #endif
4398 
4404  static Canvas CreateCanvas(HPS::WindowKey const & in_window_key, HPS::PortfolioKey const & in_portfolio_key = HPS::PortfolioKey(), char const * in_name = "");
4405 
4409  static Layout CreateLayout(char const * in_name = "");
4410 
4414  static View CreateView(char const * in_name = "");
4415 
4419  static Model CreateModel(char const * in_name = "");
4420 
4425  static Component CreateComponent(Component const & in_owner, char const * in_name = "");
4426 
4432  static Component DeInstanceComponent(ComponentPath const & in_component_path);
4433 
4434 private:
4435  Factory() {}
4436 };
4437 
4447 class SPRK_API AxisTriadOperator : public Operator
4448 {
4449 public:
4450  AxisTriadOperator(MouseButtons in_mouse_trigger = MouseButtons::ButtonLeft(), ModifierKeys in_modifier_trigger = ModifierKeys());
4452  virtual HPS::UTF8 GetName() const { return "HPS_AxisTriadOperator"; }
4453 
4459  virtual bool OnMouseDown(MouseState const & in_state);
4464  virtual bool OnMouseUp(MouseState const & in_state);
4469  virtual bool OnMouseMove(MouseState const & in_state);
4470 
4475  virtual bool OnTouchDown(TouchState const & in_state);
4480  virtual bool OnTouchUp(TouchState const & in_state);
4485  virtual bool OnTouchMove(TouchState const & in_state);
4486 
4487  virtual void OnViewAttached(HPS::View const & in_attached_view);
4488 
4489 private:
4490 
4491  bool AxisOrbit(HPS::WindowPoint const & in_loc);
4492  void Transition(HPS::SelectionResults selection_results);
4493  void TranslatePoint(HPS::WindowPoint * point);
4494  bool IsEventRelevant(HPS::Point const & event_location);
4495 
4496  bool operator_active;
4497  HPS::WindowPoint start_point;
4498  HPS::Vector start_sphere_point;
4499  float axis_subwindow_width;
4500  float axis_subwindow_height;
4501  HPS::TouchID tracked_touch_ID;
4502  HPS::Rectangle axis_subwindow;
4503  HPS::IntRectangle axis_subwindow_offsets;
4504  HPS::SegmentKey axis_triad_segment;
4505 
4506 };
4507 
4510 {
4511 public:
4514  virtual ~SmoothTransitionCompleteEvent();
4515 
4518  SmoothTransitionCompleteEvent(HPS::View const & in_view) : view(in_view)
4519  { channel = HPS::Object::ClassID<SmoothTransitionCompleteEvent>(); }
4520 
4523  SmoothTransitionCompleteEvent(Event const & in_event) : Event(in_event)
4524  {
4525  if (in_event.GetChannel() == Object::ClassID<SmoothTransitionCompleteEvent>())
4526  {
4527  auto that = static_cast<SmoothTransitionCompleteEvent const &>(in_event);
4528  view = that.view;
4529  }
4530  else
4531  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
4532  }
4533 
4536  Event * Clone() const
4537  {
4539  return new_event;
4540  }
4541 
4545  virtual bool Drop(Event const * in_that_event) const
4546  {
4547  HPS_UNREFERENCED(in_that_event);
4548  return false;
4549  }
4550 
4551  HPS::View view;
4552 };
4553 
4572 class SPRK_API NavigationCubeOperator : public Operator
4573 {
4574 public:
4575  NavigationCubeOperator(MouseButtons in_mouse_trigger = MouseButtons::ButtonLeft(), ModifierKeys in_modifier_trigger = ModifierKeys());
4576  ~NavigationCubeOperator() { }
4577 
4579  virtual HPS::UTF8 GetName() const { return "HPS_NavigationCubeOperator"; }
4580 
4585  virtual bool OnMouseDown(MouseState const & in_state);
4590  virtual bool OnMouseUp(MouseState const & in_state);
4595  virtual bool OnMouseMove(MouseState const & in_state);
4596 
4600  virtual bool OnTouchDown(TouchState const & in_state);
4605  virtual bool OnTouchUp(TouchState const & in_state);
4610  virtual bool OnTouchMove(TouchState const & in_state);
4611 
4612  virtual void OnViewAttached(HPS::View const & in_attached_view);
4613  virtual void OnViewDetached(HPS::View const & in_attached_view);
4614 
4615  virtual void OnModelAttached();
4616 
4621  void SetReferenceSegment(HPS::KeyPath const & in_path_to_segment);
4622 
4627  void SetReferenceSegment(HPS::KeyPathArray const & in_path_to_segments);
4628 
4632  HPS::KeyPathArray ShowReferenceSegment();
4633 
4638  void SetTransitionTime(HPS::Time const & in_time);
4639 
4642  HPS::Time GetTransitionTime() const;
4643 
4644 private:
4645  void Transition(HPS::SelectionResults const & selection_results);
4646  bool Orbit(HPS::WindowPoint const & in_loc);
4647  void TranslatePoint(HPS::WindowPoint * point);
4648  bool IsEventRelevant(HPS::Point const & event_location, HPS::KeyPath const & event_path);
4649  bool AreCamerasEqual(HPS::CameraKit const & this_camera, HPS::CameraKit const & that_camera);
4650 
4651 
4652  bool operator_active;
4653  HPS::TouchID tracked_touch_ID;
4654  HPS::WindowPoint start_point;
4655  HPS::WindowPoint down_position;
4656  HPS::Vector start_sphere_point;
4657  HPS::KeyPathArray reference_segments; //rotation and zooming happen around these segments
4658 
4659  HPS::SegmentKey nav_cube_segment;
4660  SegmentKeyArray style_segments; //in order: left / right / bottom / top / front / back
4661  UTF8Array named_styles; //in order: left / right / bottom / top / front / back
4662  HighlightOptionsKit highlight_options_kit;
4663  std::unordered_map<intptr_t, UTF8> key_to_style_map;
4664  HPS::PortfolioKey portfolio;
4665  HPS::ReferenceKeyArrayArray groups;
4666  HPS::CameraKit previous_camera;
4667  int previous_face;
4668  bool suppress_mouse_over_highlights;
4669 
4670  HPS::Rectangle nav_cube_subwindow;
4671  HPS::IntRectangle nav_cube_subwindow_offsets;
4672  float nav_cube_subwindow_width;
4673  float nav_cube_subwindow_height;
4674 
4675  int highlighted_group;
4676 
4677  bool moving;
4678  HPS::Time transition_time;
4679  HPS::SelectionOptionsKit selection_options;
4680 
4681  class SmoothTransitionCompleteEventHandler : public EventHandler
4682  {
4683  public:
4684  SmoothTransitionCompleteEventHandler(View const & in_view, bool & in_moving)
4685  : handler_view(in_view), handler_moving(&in_moving) {}
4686 
4687  ~SmoothTransitionCompleteEventHandler() { Shutdown(); }
4688 
4689  virtual HandleResult Handle(HPS::Event const * in_event);
4690 
4691  private:
4692  View handler_view;
4693  bool * handler_moving;
4694  };
4695 
4696  SmoothTransitionCompleteEventHandler * handler;
4697 };
4698 
4699 
4700 
4701 
4702 class SceneTreeItem;
4703 typedef std::shared_ptr<SceneTreeItem> SceneTreeItemPtr;
4704 class SceneTree;
4705 typedef std::shared_ptr<SceneTree> SceneTreePtr;
4706 
4709 class SPRK_API SceneTree : public Sprocket
4710 {
4711 public:
4714  enum class ItemType : uint32_t
4715  {
4716  None = 0x00000000,
4717  GenericMask = 0xffff0000,
4718 
4719  Segment = 0x00000001,
4720  Include = 0x00000002,
4721  ConditionalExpression = 0x00000003,
4722  StaticModelSegment = 0x00000004,
4723  AttributeFilter = 0x00000005,
4724 
4725  Geometry = 0x00010000,
4726  CuttingSection = 0x00010001,
4727  Shell = 0x00010002,
4728  Mesh = 0x00010003,
4729  Grid = 0x00010004,
4730  NURBSSurface = 0x00010005,
4731  Cylinder = 0x00010006,
4732  Sphere = 0x00010007,
4733  Polygon = 0x00010008,
4734  Circle = 0x00010009,
4735  CircularWedge = 0x0001000a,
4736  Ellipse = 0x0001000b,
4737  Line = 0x0001000c,
4738  NURBSCurve = 0x0001000d,
4739  CircularArc = 0x0001000e,
4740  EllipticalArc = 0x0001000f,
4741  InfiniteLine = 0x00010010,
4742  InfiniteRay = 0x00010011,
4743  Marker = 0x00010012,
4744  Text = 0x00010013,
4745  Reference = 0x00010014,
4746  DistantLight = 0x00010015,
4747  Spotlight = 0x00010016,
4748 
4749  Attribute = 0x00020000,
4750  Portfolio = 0x00020001,
4751  SegmentStyle = 0x00020002,
4752  NamedStyle = 0x00020003,
4753  MaterialPalette = 0x00020004,
4754  Priority = 0x00020005,
4755  Material = 0x00020006,
4756  Camera = 0x00020007,
4757  ModellingMatrix = 0x00020008,
4758  UserData = 0x00020009,
4759  TextureMatrix = 0x0002000a,
4760  Culling = 0x0002000b,
4761  CurveAttribute = 0x0002000c,
4762  CylinderAttribute = 0x0002000d,
4763  EdgeAttribute = 0x0002000e,
4764  LightingAttribute = 0x0002000f,
4765  LineAttribute = 0x00020010,
4766  MarkerAttribute = 0x00020011,
4767  SurfaceAttribute = 0x00020012,
4768  Selectability = 0x00020013,
4769  SphereAttribute = 0x00020014,
4770  Subwindow = 0x00020015,
4771  TextAttribute = 0x00020016,
4772  Transparency = 0x00020017,
4773  Visibility = 0x00020018,
4774  VisualEffects = 0x00020019,
4775  Performance = 0x00020020,
4776  DrawingAttribute = 0x00020021,
4777  HiddenLineAttribute = 0x00020022,
4778  ContourLine = 0x00020023,
4779  Condition = 0x00020024,
4780  Bounding = 0x00020025,
4781  AttributeLock = 0x00020026,
4782  TransformMask = 0x00020027,
4783  ColorInterpolation = 0x00020028,
4784  CuttingSectionAttribute = 0x00020029,
4785 
4786  // window only attributes
4787  Debugging = 0x00020030,
4788  PostProcessEffects = 0x00020031,
4789  SelectionOptions = 0x00020032,
4790  UpdateOptions = 0x00020033,
4791 
4792  Definition = 0x00040000,
4793  NamedStyleDefinition = 0x00040001,
4794  TextureDefinition = 0x00040002,
4795  LinePatternDefinition = 0x00040003,
4796  GlyphDefinition = 0x00040004,
4797  CubeMapDefinition = 0x00040005,
4798  ImageDefinition = 0x00040006,
4799  MaterialPaletteDefinition = 0x00040007,
4800  ShaderDefinition = 0x00040008,
4801  ShapeDefinition = 0x00040009,
4802 
4803  Group = 0x00080000,
4804  SegmentGroup = 0x00080100,
4805  GeometryGroup = 0x00080200,
4806  AttributeGroup = 0x00080300,
4807  PortfolioGroup = 0x00080400,
4808  StyleGroup = 0x00080500,
4809  IncludeGroup = 0x00080600,
4810  DefinitionGroup = 0x00180000,
4811  NamedStyleDefinitionGroup = 0x00180700,
4812  TextureDefinitionGroup = 0x00180800,
4813  LinePatternDefinitionGroup = 0x00180900,
4814  GlyphDefinitionGroup = 0x00180a00,
4815  CubeMapDefinitionGroup = 0x00180b00,
4816  ImageDefinitionGroup = 0x00180c00,
4817  MaterialPaletteDefinitionGroup = 0x00180d00,
4818  ShaderDefinitionGroup = 0x00180e00,
4819  ShapeDefinitionGroup = 0x00180f00,
4820  GeometryGroupMask = 0x00280000,
4821  CuttingSectionGroup = 0x00280001,
4822  ShellGroup = 0x00280002,
4823  MeshGroup = 0x00280003,
4824  GridGroup = 0x00280004,
4825  NURBSSurfaceGroup = 0x00280005,
4826  CylinderGroup = 0x00280006,
4827  SphereGroup = 0x00280007,
4828  PolygonGroup = 0x00280008,
4829  CircleGroup = 0x00280009,
4830  CircularWedgeGroup = 0x0028000a,
4831  EllipseGroup = 0x0028000b,
4832  LineGroup = 0x0028000c,
4833  NURBSCurveGroup = 0x0028000d,
4834  CircularArcGroup = 0x0028000e,
4835  EllipticalArcGroup = 0x0028000f,
4836  InfiniteLineGroup = 0x00280010,
4837  InfiniteRayGroup = 0x00280011,
4838  MarkerGroup = 0x00280012,
4839  TextGroup = 0x00280013,
4840  ReferenceGroup = 0x00280014,
4841  DistantLightGroup = 0x00280015,
4842  SpotlightGroup = 0x00280016,
4843  };
4844 
4846  SceneTree();
4847 
4850  SceneTree(Canvas const & in_canvas);
4851 
4854  SceneTree(SceneTree const & in_that);
4855 
4858  SceneTree(SceneTree && in_that);
4859 
4860  virtual ~SceneTree();
4861 
4862  static const HPS::Type staticType = HPS::Type::SceneTree;
4863  virtual HPS::Type ObjectType() const { return staticType; }
4864 
4868  SceneTree & operator=(SceneTree const & in_that);
4869 
4873  SceneTree & operator=(SceneTree && in_that);
4874 
4878  virtual void Assign(SceneTree const & in_that);
4879 
4883  bool Equals(SceneTree const & in_that) const;
4884 
4888  bool operator!=(SceneTree const & in_that) const;
4889 
4893  bool operator==(SceneTree const & in_that) const;
4894 
4895 
4904  void SetHighlightOptions(HighlightOptionsKit const & in_options);
4905 
4915  void SetHighlightOptions(HighlightOptionsKitArray const & in_options);
4916 
4927  void SetHighlightOptions(size_t in_count, HighlightOptionsKit const in_options []);
4928 
4936  void AddHighlightOptions(HighlightOptionsKit const & in_options);
4937 
4940  HighlightOptionsKitArray GetHighlightOptions() const;
4941 
4942 
4947  void SetGroupingLimit(size_t in_limit);
4948 
4951  size_t GetGroupingLimit() const;
4952 
4953 
4960  void SetRoot(SceneTreeItemPtr const & in_root);
4961 
4964  SceneTreeItemPtr GetRoot() const;
4965 
4966 
4969  virtual void Flush();
4970 
4975  void SetHighlightEventHandling(bool in_state);
4976 
4980  bool GetHighlightEventHandling() const;
4981 
4984  void ReExpand();
4985 };
4986 
4987 
4990 class SPRK_API SceneTreeItem : public Sprocket
4991 {
4992 public:
4994  SceneTreeItem();
4995 
4998  SceneTreeItem(SceneTreeItem const & in_that);
4999 
5002  SceneTreeItem(SceneTreeItem && in_that);
5003 
5009  SceneTreeItem(SceneTreePtr const & in_tree, Model const & in_model);
5010 
5016  SceneTreeItem(SceneTreePtr const & in_tree, View const & in_view);
5017 
5023  SceneTreeItem(SceneTreePtr const & in_tree, Layout const & in_layout);
5024 
5030  SceneTreeItem(SceneTreePtr const & in_tree, Canvas const & in_canvas);
5031 
5039  SceneTreeItem(SceneTreePtr const & in_tree, Key const & in_key, SceneTree::ItemType in_type, char const * in_title = nullptr);
5040 
5041  virtual ~SceneTreeItem();
5042 
5043  static const HPS::Type staticType = HPS::Type::SceneTreeItem;
5044  HPS::Type ObjectType() const { return staticType; }
5045 
5049  SceneTreeItem & operator=(SceneTreeItem const & in_that);
5050 
5054  SceneTreeItem & operator=(SceneTreeItem && in_that);
5055 
5059  virtual void Assign(SceneTreeItem const & in_that);
5060 
5064  bool Equals(SceneTreeItem const & in_that) const;
5065 
5069  bool operator!=(SceneTreeItem const & in_that) const;
5070 
5074  bool operator==(SceneTreeItem const & in_that) const;
5075 
5076 
5079  SceneTreePtr GetTree() const;
5080 
5083  UTF8 GetTitle() const;
5084 
5087  SceneTree::ItemType GetItemType() const;
5088 
5092  bool HasItemType(SceneTree::ItemType in_mask) const;
5093 
5096  Key GetKey() const;
5097 
5100  KeyPath GetKeyPath() const;
5101 
5104  bool HasChildren() const;
5105 
5106 
5115  virtual SceneTreeItemPtr AddChild(Key const & in_key, SceneTree::ItemType in_type, char const * in_title = nullptr) = 0;
5116 
5117 
5120  virtual void Expand();
5121 
5124  virtual void Collapse();
5125 
5126 
5131  bool IsSelected() const;
5132 
5138  virtual void Select();
5139 
5145  virtual void Unselect();
5146 
5151  bool IsHighlightable() const;
5152 
5158  bool IsHighlighted() const;
5159 
5164  void Highlight(size_t in_highlight_options_index = 0);
5165 
5171  void Highlight(HighlightOptionsKit const & in_highlight_options);
5172 
5178  void Unhighlight(size_t in_highlight_options_index = 0);
5179 
5186  void Unhighlight(HighlightOptionsKit const & in_highlight_options);
5187 
5190  bool IsExpanded() const;
5191 
5194  void ReExpand();
5195 };
5196 
5197 
5198 
5199 class ComponentTreeItem;
5200 typedef std::shared_ptr<ComponentTreeItem> ComponentTreeItemPtr;
5201 class ComponentTree;
5202 typedef std::shared_ptr<ComponentTree> ComponentTreePtr;
5203 
5206 class SPRK_API ComponentTree : public Sprocket
5207 {
5208 public:
5211  enum class ItemType
5212  {
5213  None,
5214  ExchangeComponent,
5215  ExchangeModelFile,
5216 
5217  ExchangeViewGroup,
5218  ExchangeAnnotationViewGroup,
5219  ExchangePMIGroup,
5220  ExchangeModelGroup,
5221 
5222  ParasolidComponent,
5223  ParasolidModelFile,
5224 
5225  DWGComponent,
5226  DWGModelFile,
5227  };
5228 
5230  ComponentTree();
5231 
5235  ComponentTree(Canvas const & in_canvas, size_t in_layer = 0);
5236 
5239  ComponentTree(ComponentTree const & in_that);
5240 
5243  ComponentTree(ComponentTree && in_that);
5244 
5245  virtual ~ComponentTree();
5246 
5247  static const HPS::Type staticType = HPS::Type::ComponentTree;
5248  virtual HPS::Type ObjectType() const { return staticType; }
5249 
5253  ComponentTree & operator=(ComponentTree const & in_that);
5254 
5258  ComponentTree & operator=(ComponentTree && in_that);
5259 
5263  virtual void Assign(ComponentTree const & in_that);
5264 
5268  bool Equals(ComponentTree const & in_that) const;
5269 
5273  bool operator!=(ComponentTree const & in_that) const;
5274 
5278  bool operator==(ComponentTree const & in_that) const;
5279 
5280 
5289  void SetHighlightOptions(HighlightOptionsKit const & in_options);
5290 
5300  void SetHighlightOptions(HighlightOptionsKitArray const & in_options);
5301 
5312  void SetHighlightOptions(size_t in_count, HighlightOptionsKit const in_options []);
5313 
5323  void AddHighlightOptions(HighlightOptionsKit const & in_options);
5324 
5327  HighlightOptionsKitArray GetHighlightOptions() const;
5328 
5329 
5336  void SetRoot(ComponentTreeItemPtr const & in_root);
5337 
5340  ComponentTreeItemPtr GetRoot() const;
5341 
5342 
5345  virtual void Flush();
5346 
5349  void ReExpand();
5350 
5355  void SetHighlightEventHandling(bool in_state);
5356 
5360  bool GetHighlightEventHandling() const;
5361 };
5362 
5363 
5366 class SPRK_API ComponentTreeItem : public Sprocket
5367 {
5368 public:
5371 
5374  ComponentTreeItem(ComponentTreeItem const & in_that);
5375 
5379 
5385  ComponentTreeItem(ComponentTreePtr const & in_tree, CADModel const & in_cad_model);
5386 
5393  ComponentTreeItem(ComponentTreePtr const & in_tree, Component const & in_component, ComponentTree::ItemType in_type);
5394 
5395  virtual ~ComponentTreeItem();
5396 
5397  static const HPS::Type staticType = HPS::Type::ComponentTreeItem;
5398  HPS::Type ObjectType() const { return staticType; }
5399 
5403  ComponentTreeItem & operator=(ComponentTreeItem const & in_that);
5404 
5408  ComponentTreeItem & operator=(ComponentTreeItem && in_that);
5409 
5413  virtual void Assign(ComponentTreeItem const & in_that);
5414 
5418  bool Equals(ComponentTreeItem const & in_that) const;
5419 
5423  bool operator!=(ComponentTreeItem const & in_that) const;
5424 
5428  bool operator==(ComponentTreeItem const & in_that) const;
5429 
5430 
5431 
5434  ComponentTreePtr GetTree() const;
5435 
5438  UTF8 GetTitle() const;
5439 
5442  ComponentTree::ItemType GetItemType() const;
5443 
5446  Component GetComponent() const;
5447 
5450  bool HasChildren() const;
5451 
5454  ComponentPath GetPath() const;
5455 
5456 
5464  virtual ComponentTreeItemPtr AddChild(Component const & in_component, ComponentTree::ItemType in_type) = 0;
5465 
5466 
5469  virtual void Expand();
5470 
5473  virtual void Collapse();
5474 
5475 
5483  bool IsHighlighted() const;
5484 
5489  virtual void OnHighlight(HighlightOptionsKit const & in_options);
5490 
5495  virtual void OnUnhighlight(HighlightOptionsKit const & in_options);
5496 
5497 
5502  void Highlight(size_t in_highlight_options_index = 0);
5503 
5509  void Highlight(HighlightOptionsKit const & in_highlight_options);
5510 
5515  void Unhighlight(size_t in_highlight_options_index = 0);
5516 
5522  void Unhighlight(HighlightOptionsKit const & in_highlight_options);
5523 
5524 
5540  bool IsHidden() const;
5541 
5547  virtual void OnHide();
5548 
5554  virtual void OnShow();
5555 
5568  void Hide();
5569 
5582  void Show();
5583 
5596  void Isolate();
5597 
5606  void ResetVisibility();
5607 
5610  bool IsExpanded() const;
5611 
5614  void ReExpand();
5615 };
5616 
5619 class SPRK_API AnimationControl : public SprocketControl
5620 {
5621 public:
5623  explicit AnimationControl(View const & in_view);
5624 
5626  AnimationControl(AnimationControl const & in_that);
5627 
5631  AnimationControl(AnimationControl && in_that);
5632 
5636  AnimationControl & operator=(AnimationControl && in_that);
5637 
5639  ~AnimationControl();
5640 
5641  static const HPS::Type staticType = HPS::Type::AnimationControl;
5642  HPS::Type ObjectType() const {return staticType;};
5643 
5645  AnimationControl & operator=(AnimationControl const & in_that);
5646 
5650  void SetMillisecondsPerTick(Time const & in_duration);
5651 
5654  Time GetMillisecondsPerTick() const;
5655 
5663  void Play(uint32_t in_start_tick, uint32_t in_end_tick);
5664 
5670  void Play();
5671 
5674  void Stop();
5675 
5677  void Resume();
5678 
5680  void Wait();
5681 
5684  void Undo();
5685 
5690  void SetAnimation(Animation const & in_animation);
5691 
5698  void SetAnimations(size_t in_count, Animation const * const in_animations);
5699 
5700 
5706  void SetAnimations(AnimationArray const & in_animations);
5707 
5708 
5711  bool ShowAnimations(AnimationArray & out_animations);
5712 };
5713 
5714 }
5715 
5716 
5717 #endif
5718 
5719 
5720 
Definition: sprk.h:4255
Definition: hps.h:3488
Definition: hps.h:6418
Definition: hps.h:85
Definition: sprk.h:619
Definition: sprk.h:1843
ComponentIsolatedEvent(Event const &in_event)
Definition: sprk.h:3604
Definition: sprk.h:3584
Definition: sprk.h:148
Definition: sprk.h:4447
Definition: sprk.h:280
HPS::Type ObjectType() const
Definition: sprk.h:4336
Definition: sprk.h:1102
ChannelType
Definition: sprk.h:763
ComponentHighlightEvent(Event const &in_event)
Definition: sprk.h:3665
virtual bool OnTimerTick(HPS::TimerTickEvent const &in_event)
Definition: sprk.h:2042
Definition: hps.h:43571
HPS::Type ObjectType() const
Definition: sprk.h:483
ComponentHighlightEvent()
Definition: sprk.h:3645
void SetModifierTrigger(ModifierKeys in_modifiers)
Definition: sprk.h:2070
Definition: hps.h:473
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:6846
An InvalidSpecificationException is thrown when a method is called with non-sensical or contradictory...
Definition: hps.h:6022
Location
Definition: sprk.h:2301
Event * Clone() const override
Definition: sprk.h:3484
HPS::Type ObjectType() const
Definition: sprk.h:693
virtual bool OnKeyUp(KeyboardState const &in_state)
Definition: sprk.h:2032
ItemType
Definition: sprk.h:5211
Definition: hps.h:6062
Event * Clone() const
Definition: sprk.h:1552
CaptureActivationEvent()
Definition: sprk.h:3844
HPS::Type ObjectType() const
Definition: sprk.h:3033
Definition: sprk.h:68
Definition: sprk.h:1043
Definition: sprk.h:1518
PathType
Definition: sprk.h:2998
Definition: sprk.h:936
virtual bool OnMouseMove(MouseState const &in_state)
Definition: sprk.h:1992
Definition: sprk.h:126
Definition: sprk.h:5366
virtual bool OnMouseEnter(MouseState const &in_state)
Definition: sprk.h:2002
Definition: sprk.h:4309
Event * Clone() const
Definition: sprk.h:4536
intptr_t GetChannel() const
Definition: hps.h:6535
Definition: hps.h:43354
Event * Clone() const override
Definition: sprk.h:3621
virtual bool Drop(Event const *in_that_event) const
Definition: sprk.h:1875
Definition: hps.h:1372
Definition: hps.h:1067
Definition: hps.h:1766
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:3684
SmoothTransitionCompleteEvent(HPS::View const &in_view)
Definition: sprk.h:4518
std::vector< KeyPath, Allocator< KeyPath > > KeyPathArray
Array of type HPS::KeyPath.
Definition: hps.h:6884
Definition: sprk.h:5206
Definition: hps.h:49119
HPS::Type ObjectType() const
Definition: sprk.h:4015
Definition: sprk.h:1903
virtual bool OnTouchUp(TouchState const &in_state)
Definition: sprk.h:2017
Definition: hps.h:7929
virtual UTF8 GetName() const
Definition: sprk.h:1977
Definition: hps.h:3639
Definition: hps.h:2142
HPS::Type ObjectType() const
Definition: sprk.h:3912
Definition: sprk.h:1755
Definition: sprk.h:403
HPS::Type ObjectType() const
Definition: sprk.h:4135
Definition: hps.h:4969
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:1455
Definition: hps.h:887
Definition: hps.h:43474
virtual void OnModelDetached()
Definition: sprk.h:2058
SmoothTransitionCompleteEvent(Event const &in_event)
Definition: sprk.h:4523
Definition: hps.h:1824
Definition: sprk.h:689
Definition: hps.h:1590
Definition: hps.h:9173
Definition: hps.h:243
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:4579
Event * Clone() const override
Definition: sprk.h:3528
Definition: hps.h:1893
CameraChangedEvent()
Definition: sprk.h:1847
Definition: sprk.h:39
Definition: sprk.h:3540
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:4282
HPS::Type ObjectType() const
Definition: sprk.h:1954
HPS::Type ObjectType() const
Definition: sprk.h:1410
Definition: hps.h:49017
Definition: hps.h:42386
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:42433
HPS::Type ObjectType() const
Definition: sprk.h:5398
LayoutDeletedEvent()
Definition: sprk.h:1610
Definition: hps.h:41818
Definition: hps.h:45140
HPS::Type ObjectType() const
Definition: sprk.h:944
Definition: hps.h:1107
Definition: sprk.h:3994
HPS::Type ObjectType() const
Definition: sprk.h:3721
LayoutDetachedEvent()
Definition: sprk.h:1565
Event * Clone() const
Definition: sprk.h:3786
MouseButtons GetMouseTrigger() const
Definition: sprk.h:2065
Definition: sprk.h:4108
virtual bool OnMouseLeave(MouseState const &in_state)
Definition: sprk.h:2007
HPS::Type ObjectType() const
Definition: sprk.h:4184
Event * Clone() const
Definition: sprk.h:1790
Definition: hps.h:10145
Definition: hps.h:43518
Definition: hps.h:1543
SmoothTransitionCompleteEvent()
Definition: sprk.h:4513
Definition: hps.h:1475
HPS::Type ObjectType() const
Definition: sprk.h:1325
virtual bool OnMouseUp(MouseState const &in_state)
Definition: sprk.h:1987
FilterActivationEvent()
Definition: sprk.h:3755
Definition: hps.h:1494
virtual void OnModelAttached()
Definition: sprk.h:2054
Definition: hps.h:39401
FilterActivationEvent(Event const &in_event)
Definition: sprk.h:3769
HPS::Type ObjectType() const
Definition: sprk.h:3821
ModelDetachedEvent(Event const &in_event)
Definition: sprk.h:1774
Definition: sprk.h:214
Definition: hps.h:4546
Definition: sprk.h:5619
Definition: hps.h:7300
Definition: sprk.h:758
HPS::Type ObjectType() const
Definition: sprk.h:1914
Location
Definition: sprk.h:2485
Definition: hps.h:48488
HPS::Type ObjectType() const
Definition: sprk.h:1111
Definition: sprk.h:4059
Definition: sprk.h:2481
Definition: hps.h:45319
HPS::Type ObjectType() const
Definition: sprk.h:2742
SprocketControl & operator=(SprocketControl &&in_that)
Definition: sprk.h:1064
Definition: hps.h:47378
Definition: hps.h:44399
Definition: hps.h:48904
Definition: sprk.h:1561
CaptureActivationEvent(Event const &in_event)
Definition: sprk.h:3858
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:16019
HPS::Type ObjectType() const
Definition: sprk.h:5044
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:2621
Definition: hps.h:45606
Definition: hps.h:47995
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:2514
ViewDeletedEvent(Event const &in_event)
Definition: sprk.h:1731
Definition: hps.h:38904
ModifierKeys GetModifierTrigger() const
Definition: sprk.h:2073
Definition: sprk.h:4206
Event * Clone() const
Definition: sprk.h:1892
ViewDetachedEvent()
Definition: sprk.h:1660
Definition: hps.h:6502
Definition: hps.h:14267
HPS::Type ObjectType() const
Definition: sprk.h:1047
std::vector< UTF8, Allocator< UTF8 > > UTF8Array
Array of type HPS::UTF8.
Definition: hps.h:6852
Definition: sprk.h:192
Definition: sprk.h:2148
HPS::Type ObjectType() const
Definition: sprk.h:4086
Event * Clone() const
Definition: sprk.h:1596
Definition: hps.h:409
Definition: sprk.h:1317
CanvasDeletedEvent(Event const &in_event)
Definition: sprk.h:1537
HPS::Type ObjectType() const
Definition: sprk.h:1075
Definition: sprk.h:4572
Definition: sprk.h:2993
std::shared_ptr< Operator > OperatorPtr
Shared pointer to an Operator object.
Definition: sprk.h:308
ComponentType
Definition: sprk.h:2627
Definition: hps.h:47303
std::vector< Key, Allocator< Key > > KeyArray
Array of type HPS::Key.
Definition: hps.h:6856
Definition: hps.h:2161
Event * Clone() const
Definition: sprk.h:1834
Definition: sprk.h:3634
LayoutDetachedEvent(Event const &in_event)
Definition: sprk.h:1580
virtual bool OnMouseDown(MouseState const &in_state)
Definition: sprk.h:1982
ItemType
Definition: sprk.h:4714
HPS::Type ObjectType() const
Definition: sprk.h:2171
Definition: sprk.h:3699
Definition: sprk.h:4360
Event * Clone() const
Definition: sprk.h:1746
HPS::Type ObjectType() const
Definition: sprk.h:4233
DeleteMode
Definition: sprk.h:2719
Definition: sprk.h:1020
virtual void OnViewDetached(HPS::View const &in_detached_view)
Definition: sprk.h:2050
Definition: sprk.h:4509
Definition: hps.h:428
Definition: sprk.h:3799
Definition: hps.h:2181
HPS::Type ObjectType() const
Definition: sprk.h:407
ModelDetachedEvent()
Definition: sprk.h:1759
static MouseButtons ButtonLeft()
Definition: hps.h:48606
Definition: sprk.h:4709
HPS::Type ObjectType() const
Definition: sprk.h:776
Definition: sprk.h:3452
Definition: sprk.h:4157
Definition: sprk.h:80
UpdateType
Definition: hps.h:177
Definition: hps.h:9331
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:7847
Definition: sprk.h:3744
Definition: hps.h:38504
Definition: hps.h:354
Event * Clone() const
Definition: sprk.h:3874
ModelDeletedEvent(Event const &in_event)
Definition: sprk.h:1819
InterpolationType
Definition: sprk.h:353
ComponentIsolatedEvent()
Definition: sprk.h:3589
HPS::Type ObjectType() const
Definition: sprk.h:5642
LayoutDeletedEvent(Event const &in_event)
Definition: sprk.h:1625
Definition: hps.h:9560
Definition: hps.h:11250
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:4863
virtual bool Drop(Event const *in_that_event) const
Definition: sprk.h:4545
Definition: sprk.h:4990
Definition: sprk.h:258
Definition: sprk.h:3886
Definition: sprk.h:3496
Definition: hps.h:44050
HPS::Type ObjectType() const
Definition: sprk.h:836
Mode
Definition: sprk.h:1025
Definition: hps.h:514
Definition: sprk.h:1945
Definition: sprk.h:832
Definition: sprk.h:479
Definition: hps.h:1173
Definition: hps.h:43400
Definition: sprk.h:1712
Definition: sprk.h:3840
virtual HPS::Type ObjectType() const
Definition: sprk.h:5248
Definition: hps.h:41882
virtual HPS::UTF8 GetName() const
Definition: sprk.h:4452
Event * Clone() const override
Definition: sprk.h:3572
Definition: hps.h:7558