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 
967  void AttachViewAsLayout(View const & in_view);
968 
970  void DetachLayout();
971 
973  Layout GetAttachedLayout() const;
974 
976  IncludeKey GetAttachedLayoutIncludeLink() const;
977 
979  View GetFrontView() const;
980 
981  WindowKey const GetWindowKey() const;
982 
985  WindowKey GetWindowKey();
986 
987  PortfolioKey const GetPortfolioKey() const;
988 
990  PortfolioKey GetPortfolioKey();
991 
993  void Update() const;
994 
997  UpdateNotifier UpdateWithNotifier() const;
998 
1002  void Update(HPS::Window::UpdateType in_type, HPS::Time in_time_limit = -1.0) const;
1003 
1008  UpdateNotifier UpdateWithNotifier(HPS::Window::UpdateType in_type, HPS::Time in_time_limit = -1.0) const;
1009 
1013  void SetFrameRate(float in_frame_rate=20);
1014 
1018  float GetFrameRate() const;
1019 };
1020 
1021 class SPRK_API Rendering
1022 {
1023 public:
1026  enum class Mode
1027  {
1028  Gouraud,
1029  GouraudWithLines,
1030  Flat,
1031  FlatWithLines,
1032  Phong,
1033  PhongWithLines,
1034  HiddenLine,
1035  FastHiddenLine,
1036  Wireframe,
1037  Default = Phong
1038  };
1039 
1040 private:
1041  Rendering() {}
1042 };
1043 
1044 class SPRK_API SprocketControl : public Sprocket
1045 {
1046 public:
1047  static const HPS::Type staticType = HPS::Type::SprocketControl;
1048  HPS::Type ObjectType() const {return staticType;}
1049 
1050 #if !defined(_MSC_VER) || _MSC_VER >= 1900
1051  SprocketControl(HPS::SprocketControl const & in_that) = default;
1052 #endif
1053 
1054 protected:
1055  SprocketControl() {}
1056 
1060  SprocketControl(SprocketControl && in_that) : Sprocket(std::move(in_that)) {}
1061 
1066  {
1067  this->Object::operator=(std::move(in_that));
1068  return *this;
1069  }
1070 };
1071 
1072 class SPRK_API SprocketKit : public Sprocket
1073 {
1074 public:
1075  static const HPS::Type staticType = HPS::Type::SprocketKit;
1076  HPS::Type ObjectType() const { return staticType; }
1077 
1078 #if !defined(_MSC_VER) || _MSC_VER >= 1900
1079  SprocketKit(HPS::SprocketKit const & in_that) = default;
1080 #endif
1081 
1082 protected:
1083  SprocketKit() {}
1084 
1088  SprocketKit(SprocketKit && in_that) : Sprocket(std::move(in_that)) {}
1089 
1094  {
1095  this->Object::operator=(std::move(in_that));
1096  return *this;
1097  }
1098 };
1099 
1103 class SPRK_API View : public Sprocket
1104 {
1105 public:
1106  View();
1107  View(View const & that);
1108  explicit View(SprocketControl const & in_ctrl);
1109  ~View();
1110 
1111  static const HPS::Type staticType = HPS::Type::View;
1112  HPS::Type ObjectType() const { return staticType; }
1113 
1115  void Delete();
1116 
1117  View & operator=(View const & in_that);
1118  void Assign(View const & in_that);
1119 
1120  bool Equals(View const & in_that) const;
1121  bool operator!= (View const & in_that) const;
1122  bool operator== (View const & in_that) const;
1123 
1125  UTF8 GetName() const;
1126 
1127 
1130  HPS::View & ComputeFitWorldCamera(HPS::CameraKit & out_camera);
1131 
1135  HPS::View & ComputeFitWorldCamera(SegmentKey const & in_segment, HPS::CameraKit & out_camera);
1136 
1137 
1141  HPS::View & ComputeFitWorldCamera(BoundingKit const & in_bounding, HPS::CameraKit & out_camera);
1142 
1148  HPS::View & ComputeFitWorldCamera(SegmentKey const & in_segment, MatrixKit const & in_transform, HPS::CameraKit & out_camera);
1149 
1150 
1156  HPS::View & ComputeFitWorldCamera(BoundingKit const & in_bounding, MatrixKit const & in_transform, HPS::CameraKit & out_camera);
1157 
1158 
1160  HPS::View & FitWorld();
1161 
1167  HPS::View & FitWorld(SegmentKey const & in_segment);
1168 
1169 
1172  HPS::View & FitWorld(BoundingKit const & in_bounding);
1173 
1179  HPS::View & FitWorld(SegmentKey const & in_segment, MatrixKit const & in_transform);
1180 
1181 
1186  HPS::View & FitWorld(BoundingKit const & in_bounding, MatrixKit const & in_transform);
1187 
1192  void AttachModel(Model const & in_model);
1193 
1195  void DetachModel();
1196 
1198  Model GetAttachedModel() const;
1199 
1201  IncludeKey GetAttachedModelIncludeLink() const;
1202 
1206  void SetRenderingMode(Rendering::Mode in_mode);
1207 
1210  Rendering::Mode GetRenderingMode() const;
1211 
1213  OperatorPtrArray GetOperators() const;
1214 
1217  void SetOperators(OperatorPtrArray & in_operators);
1218 
1222  void SetOperators(size_t in_count, OperatorPtr in_operators []);
1223 
1226  void SetOperator(OperatorPtr const & in_operator);
1227 
1231  void SetOperator(Operator * in_operator);
1232 
1234  OperatorControl GetOperatorControl();
1235  OperatorControl const GetOperatorControl() const;
1236 
1238  AnimationControl GetAnimationControl();
1239  AnimationControl const GetAnimationControl() const;
1240 
1242  NavigationCubeControl GetNavigationCubeControl();
1243  NavigationCubeControl const GetNavigationCubeControl() const;
1244 
1246  AxisTriadControl GetAxisTriadControl();
1247  AxisTriadControl const GetAxisTriadControl() const;
1248 
1251  SegmentKey GetSegmentKey();
1252  SegmentKey const GetSegmentKey() const;
1253 
1256  SegmentKey GetModelOverrideSegmentKey();
1257  SegmentKey const GetModelOverrideSegmentKey() const;
1258 
1259 
1260  PortfolioKey const GetPortfolioKey() const;
1261 
1263  PortfolioKey GetPortfolioKey();
1264 
1269  void SetSimpleShadow(bool in_state, float in_percent_offset = 5.0f);
1270 
1272  bool GetSimpleShadow();
1273 
1278  void SetSimpleReflection(bool in_state, float in_percent_offset = 5.0f);
1279 
1281  bool GetSimpleReflection();
1282 
1284  void Update() const;
1285 
1288  UpdateNotifier UpdateWithNotifier() const;
1289 
1293  void Update(HPS::Window::UpdateType in_type, HPS::Time in_time_limit = -1.0) const;
1294 
1300  UpdateNotifier UpdateWithNotifier(HPS::Window::UpdateType in_type, HPS::Time in_time_limit = -1.0) const;
1301 
1305  void SmoothTransition(HPS::CameraKit const & in_camera_kit, HPS::Time in_duration = 0.5);
1306 
1308  KeyArray const GetNavigationKeys();
1309 
1311  LayoutArray GetOwningLayouts();
1312  LayoutArray const GetOwningLayouts() const;
1313 };
1314 
1318 class SPRK_API Model : public Sprocket
1319 {
1320 public:
1321  Model();
1322  Model(Model const & that);
1323  ~Model();
1324 
1325  static const HPS::Type staticType = HPS::Type::Model;
1326  HPS::Type ObjectType() const { return staticType; }
1327 
1329  void Delete();
1330 
1331  Model & operator=(Model const & in_that);
1332  void Assign(Model const & in_that);
1333 
1334  bool Equals(Model const & in_that) const;
1335  bool operator!= (Model const & in_that) const;
1336  bool operator== (Model const & in_that) const;
1337 
1339  UTF8 GetName() const;
1340 
1343  SegmentKey GetSegmentKey();
1344  SegmentKey const GetSegmentKey() const;
1345 
1347  SegmentKey GetLibraryKey();
1348  SegmentKey const GetLibraryKey() const;
1349 
1351  PortfolioKey GetPortfolioKey();
1352  PortfolioKey const GetPortfolioKey() const;
1353 
1355  HPS::Vector GetUpVector();
1356  HPS::Vector const GetUpVector() const;
1357 
1359  HPS::Vector GetFrontVector();
1360  HPS::Vector const GetFrontVector() const;
1361 
1363  HPS::ViewArray GetOwningViews();
1364  HPS::ViewArray const GetOwningViews() const;
1365 
1369  void SetOrientation(HPS::Vector const & in_up_vector, HPS::Vector const & in_front_vector);
1370 
1372  bool ShowOrientation(HPS::Vector & out_up_vector, HPS::Vector & out_front_vector) const;
1373 
1375  void Update() const;
1376 
1379  UpdateNotifier UpdateWithNotifier() const;
1380 
1384  void Update(HPS::Window::UpdateType in_type, HPS::Time in_time_limit = -1.0) const;
1385 
1391  UpdateNotifier UpdateWithNotifier(HPS::Window::UpdateType in_type, HPS::Time in_time_limit = -1.0) const;
1392 
1393  Animation CreateAnimation(const char * in_name);
1394 
1397  AnimationArray const & GetAnimations();
1398 };
1399 
1403 class SPRK_API Layout : public Sprocket
1404 {
1405 public:
1406  Layout();
1407  Layout(Layout const & that);
1408  ~Layout();
1409 
1410  static const HPS::Type staticType = HPS::Type::Layout;
1411  HPS::Type ObjectType() const { return staticType; }
1412 
1414  void Delete();
1415 
1416  Layout & operator=(Layout const & in_that);
1417  void Assign(Layout const & in_that);
1418 
1419  bool Equals(Layout const & in_that) const;
1420  bool operator!= (Layout const & in_that) const;
1421  bool operator== (Layout const & in_that) const;
1422 
1424  UTF8 GetName() const;
1425 
1427  size_t GetLayerCount() const;
1428 
1432  void AttachViewFront(View const & in_view, HPS::Rectangle const & in_position = HPS::Rectangle(-1.0f, 1.0f, -1.0f, 1.0f));
1436  void AttachViewBack(View const & in_view, HPS::Rectangle const & in_position = HPS::Rectangle(-1.0f, 1.0f, -1.0f, 1.0f));
1437 
1440  void DetachLayer(size_t in_layer);
1441 
1444  void DetachView(View const & in_view); // everywhere it occurs
1445 
1448  void BringToFront(size_t in_layer);
1449 
1453  void ReassignLayer(size_t in_layer, HPS::View in_view);
1454 
1458  void RepositionLayer(size_t in_layer, HPS::Rectangle const & in_position);
1459 
1461  View GetFrontView() const;
1462 
1466  View GetAttachedView(size_t in_layer = 0) const;
1467 
1471  Rectangle GetPosition(size_t in_layer) const;
1472 
1474  IncludeKey GetAttachedViewIncludeLink(size_t in_layer) const;
1475 
1477  SegmentKey GetLayerSegmentKey(size_t in_layer) const;
1478 
1482  size_t GetLayerAt(HPS::WindowPoint const & in_point) const;
1483 
1487  bool ShowLayerAt(HPS::WindowPoint const & in_point) const;
1488 
1491  SegmentKey GetSegmentKey();
1492  SegmentKey const GetSegmentKey() const;
1493 
1495  CanvasArray GetOwningCanvases();
1496  CanvasArray const GetOwningCanvases() const;
1497 
1499  void Update() const;
1500 
1503  UpdateNotifier UpdateWithNotifier() const;
1504 
1508  void Update(HPS::Window::UpdateType in_type, HPS::Time in_time_limit = -1.0) const;
1509 
1515  UpdateNotifier UpdateWithNotifier(HPS::Window::UpdateType in_type, HPS::Time in_time_limit = -1.0) const;
1516 
1517 };
1518 
1519 class SPRK_API CanvasDeletedEvent : public Event
1520 {
1521 public:
1524  {
1525  channel = GetClassID();
1526  consumable = false;
1527  }
1528 
1529  CanvasDeletedEvent(Canvas const & in_canvas)
1530  : Event(), canvas(in_canvas)
1531  {
1532  channel = GetClassID();
1533  consumable = false;
1534  }
1535 
1538  CanvasDeletedEvent(Event const & in_event) : Event(in_event)
1539  {
1540  if (in_event.GetChannel() == Object::ClassID<CanvasDeletedEvent>())
1541  {
1542  auto that = static_cast<CanvasDeletedEvent const &>(in_event);
1543  canvas = that.canvas;
1544  }
1545  else
1546  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
1547  }
1548 
1549  ~CanvasDeletedEvent();
1550 
1553  Event * Clone() const
1554  {
1555  CanvasDeletedEvent * new_event = new CanvasDeletedEvent(*this);
1556  return new_event;
1557  }
1558 
1559  Canvas canvas;
1560 };
1561 
1562 class SPRK_API LayoutDetachedEvent : public Event
1563 {
1564 public:
1567  {
1568  channel = GetClassID();
1569  consumable = false;
1570  }
1571 
1572  LayoutDetachedEvent(Canvas const & in_canvas, Layout const & in_layout)
1573  : Event(), canvas(in_canvas), layout(in_layout)
1574  {
1575  channel = GetClassID();
1576  consumable = false;
1577  }
1578 
1581  LayoutDetachedEvent(Event const & in_event) : Event(in_event)
1582  {
1583  if (in_event.GetChannel() == Object::ClassID<LayoutDetachedEvent>())
1584  {
1585  auto that = static_cast<LayoutDetachedEvent const &>(in_event);
1586  canvas = that.canvas;
1587  layout = that.layout;
1588  }
1589  else
1590  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
1591  }
1592 
1594 
1597  Event * Clone() const
1598  {
1599  LayoutDetachedEvent * new_event = new LayoutDetachedEvent(*this);
1600  return new_event;
1601  }
1602 
1603  Canvas canvas;
1604  Layout layout;
1605 };
1606 
1607 class SPRK_API LayoutDeletedEvent : public Event
1608 {
1609 public:
1612  {
1613  channel = GetClassID();
1614  consumable = false;
1615  }
1616 
1617  LayoutDeletedEvent(Layout const & in_layout)
1618  : Event(), layout(in_layout)
1619  {
1620  channel = GetClassID();
1621  consumable = false;
1622  }
1623 
1626  LayoutDeletedEvent(Event const & in_event) : Event(in_event)
1627  {
1628  if (in_event.GetChannel() == Object::ClassID<LayoutDeletedEvent>())
1629  {
1630  auto that = static_cast<LayoutDeletedEvent const &>(in_event);
1631  layout = that.layout;
1632  }
1633  else
1634  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
1635  }
1636 
1637  ~LayoutDeletedEvent();
1638 
1641  Event * Clone() const
1642  {
1643  LayoutDeletedEvent * new_event = new LayoutDeletedEvent(*this);
1644  return new_event;
1645  }
1646 
1647  Layout layout;
1648 };
1649 
1650 class SPRK_API ViewDetachedEvent : public Event
1651 {
1652 public:
1653  enum class Action
1654  {
1655  None = 0,
1656  SpecificLayer,
1657  AllLayers,
1658  };
1659 
1661  ViewDetachedEvent() : Event(), action(Action::None), layer(0)
1662  {
1663  channel = GetClassID();
1664  consumable = false;
1665  }
1666 
1667  ViewDetachedEvent(Layout const & in_layout, size_t in_layer, View const & in_view)
1668  : Event(), layout(in_layout), action(Action::SpecificLayer), layer(in_layer), view(in_view)
1669  {
1670  channel = GetClassID();
1671  consumable = false;
1672  }
1673 
1674  ViewDetachedEvent(Layout const & in_layout, View const & in_view)
1675  : Event(), layout(in_layout), action(Action::AllLayers), layer(std::numeric_limits<size_t>::max()), view(in_view)
1676  {
1677  channel = GetClassID();
1678  consumable = false;
1679  }
1680 
1683  ViewDetachedEvent(Event const & in_event) : Event(in_event)
1684  {
1685  if (in_event.GetChannel() == Object::ClassID<ViewDetachedEvent>())
1686  {
1687  auto that = static_cast<ViewDetachedEvent const &>(in_event);
1688  layout = that.layout;
1689  action = that.action;
1690  layer = that.layer;
1691  view = that.view;
1692  }
1693  else
1694  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
1695  }
1696 
1697  ~ViewDetachedEvent();
1698 
1701  Event * Clone() const
1702  {
1703  ViewDetachedEvent * new_event = new ViewDetachedEvent(*this);
1704  return new_event;
1705  }
1706 
1707  Layout layout;
1708  Action action;
1709  size_t layer;
1710  View view;
1711 };
1712 
1713 class SPRK_API ViewDeletedEvent : public Event
1714 {
1715 public:
1718  {
1719  channel = GetClassID();
1720  consumable = false;
1721  }
1722 
1723  ViewDeletedEvent(View const & in_view)
1724  : Event(), view(in_view)
1725  {
1726  channel = GetClassID();
1727  consumable = false;
1728  }
1729 
1732  ViewDeletedEvent(Event const & in_event) : Event(in_event)
1733  {
1734  if (in_event.GetChannel() == Object::ClassID<ViewDeletedEvent>())
1735  {
1736  auto that = static_cast<ViewDeletedEvent const &>(in_event);
1737  view = that.view;
1738  }
1739  else
1740  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
1741  }
1742 
1743  ~ViewDeletedEvent();
1744 
1747  Event * Clone() const
1748  {
1749  ViewDeletedEvent * new_event = new ViewDeletedEvent(*this);
1750  return new_event;
1751  }
1752 
1753  View view;
1754 };
1755 
1756 class SPRK_API ModelDetachedEvent : public Event
1757 {
1758 public:
1761  {
1762  channel = GetClassID();
1763  consumable = false;
1764  }
1765 
1766  ModelDetachedEvent(View const & in_view, Model const & in_model)
1767  : Event(), view(in_view), model(in_model)
1768  {
1769  channel = GetClassID();
1770  consumable = false;
1771  }
1772 
1775  ModelDetachedEvent(Event const & in_event) : Event(in_event)
1776  {
1777  if (in_event.GetChannel() == Object::ClassID<ModelDetachedEvent>())
1778  {
1779  auto that = static_cast<ModelDetachedEvent const &>(in_event);
1780  view = that.view;
1781  model = that.model;
1782  }
1783  else
1784  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
1785  }
1786 
1787  ~ModelDetachedEvent();
1788 
1791  Event * Clone() const
1792  {
1793  ModelDetachedEvent * new_event = new ModelDetachedEvent(*this);
1794  return new_event;
1795  }
1796 
1797  View view;
1798  Model model;
1799 };
1800 
1801 class SPRK_API ModelDeletedEvent : public Event
1802 {
1803 public:
1806  {
1807  channel = GetClassID();
1808  consumable = false;
1809  }
1810 
1811  ModelDeletedEvent(Model const & in_model)
1812  : Event(), model(in_model)
1813  {
1814  channel = GetClassID();
1815  consumable = false;
1816  }
1817 
1820  ModelDeletedEvent(Event const & in_event) : Event(in_event)
1821  {
1822  if (in_event.GetChannel() == Object::ClassID<ModelDeletedEvent>())
1823  {
1824  auto that = static_cast<ModelDeletedEvent const &>(in_event);
1825  model = that.model;
1826  }
1827  else
1828  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
1829  }
1830 
1831  ~ModelDeletedEvent();
1832 
1835  Event * Clone() const
1836  {
1837  ModelDeletedEvent * new_event = new ModelDeletedEvent(*this);
1838  return new_event;
1839  }
1840 
1841  Model model;
1842 };
1843 
1844 class SPRK_API CameraChangedEvent : public Event
1845 {
1846 public:
1849  {
1850  channel = GetClassID();
1851  consumable = false;
1852  }
1853 
1854  CameraChangedEvent(View const & in_view)
1855  : Event(), view(in_view)
1856  {
1857  channel = GetClassID();
1858  consumable = false;
1859  }
1860 
1863  CameraChangedEvent(Event const & in_event) : Event(in_event)
1864  {
1865  if (in_event.GetChannel() == Object::ClassID<CameraChangedEvent>())
1866  {
1867  auto that = static_cast<CameraChangedEvent const &>(in_event);
1868  view = that.view;
1869  }
1870  else
1871  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
1872  }
1873 
1874  ~CameraChangedEvent();
1875 
1876  virtual bool Drop(Event const * in_that_event) const
1877  {
1878  CameraChangedEvent const * that_event = static_cast<CameraChangedEvent const *>(in_that_event);
1879 
1880  if (view == that_event->view)
1881  return true;
1882 
1883  return false;
1884  }
1885 
1886  virtual intptr_t Freshen() const
1887  {
1888  return GetClassID();
1889  }
1890 
1893  Event * Clone() const
1894  {
1895  CameraChangedEvent * new_event = new CameraChangedEvent(*this);
1896  return new_event;
1897  }
1898 
1899  View view;
1900 };
1901 
1904 class SPRK_API SprocketPath : public Sprocket
1905 {
1906 public:
1907  SprocketPath();
1908  SprocketPath(Model const & in_model, View const & in_view, Layout const & in_layout, Canvas const & in_canvas);
1909  SprocketPath(Canvas const & in_canvas, Layout const & in_layout, View const & in_view, Model const & in_model);
1910  SprocketPath(Canvas const & in_canvas, size_t in_layer = 0);
1911  SprocketPath(SprocketPath const & that);
1912  ~SprocketPath();
1913 
1914  static const HPS::Type staticType = HPS::Type::SprocketPath;
1915  HPS::Type ObjectType() const { return staticType; }
1916 
1917  SprocketPath & operator=(SprocketPath const & in_that);
1918  void Set(SprocketPath const & in_that);
1919 
1920  bool Equals(SprocketPath const & in_that) const;
1921  bool operator!= (SprocketPath const & in_that) const;
1922  bool operator== (SprocketPath const & in_that) const;
1923 
1925  Canvas GetCanvas() const;
1926 
1928  Layout GetLayout() const;
1929 
1931  View GetView() const;
1932 
1934  Model GetModel() const;
1935 
1940  KeyPath GetKeyPath() const;
1941 };
1942 
1943 
1946 class SPRK_API Operator : public Sprocket
1947 {
1948 public:
1949  Operator(MouseButtons in_mouse_trigger = MouseButtons::ButtonLeft(), ModifierKeys in_modifier_trigger = ModifierKeys());
1950  Operator(Operator const & in_that);
1951 
1952  virtual ~Operator();
1953 
1954  static const HPS::Type staticType = HPS::Type::Operator;
1955  HPS::Type ObjectType() const { return staticType; }
1956 
1957  virtual Operator & operator= (Operator const & in_that);
1958 
1960  virtual void Assign(Operator const & in_that);
1961 
1963  virtual bool Equals(Operator const & in_that) const;
1964 
1966  virtual bool operator!= (Operator const & in_that) const;
1967 
1969  virtual bool operator== (Operator const & in_that) const;
1970 
1972  void DetachView();
1973 
1975  View GetAttachedView() const;
1976 
1978  virtual UTF8 GetName() const { return "Operator"; }
1979 
1983  virtual bool OnMouseDown(MouseState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
1984 
1988  virtual bool OnMouseUp(MouseState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
1989 
1993  virtual bool OnMouseMove(MouseState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
1994 
1998  virtual bool OnMouseWheel(MouseState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
1999 
2003  virtual bool OnMouseEnter(MouseState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
2004 
2008  virtual bool OnMouseLeave(MouseState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
2009 
2013  virtual bool OnTouchDown(TouchState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
2014 
2018  virtual bool OnTouchUp(TouchState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
2019 
2023  virtual bool OnTouchMove(TouchState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
2024 
2028  virtual bool OnKeyDown(KeyboardState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
2029 
2033  virtual bool OnKeyUp(KeyboardState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
2034 
2038  virtual bool OnTextInput(HPS::UTF8 const & in_text) { HPS_UNREFERENCED(in_text); return false; }
2039 
2043  virtual bool OnTimerTick(HPS::TimerTickEvent const & in_event) { HPS_UNREFERENCED(in_event); return false; }
2044 
2047  virtual void OnViewAttached(HPS::View const & in_attached_view) { HPS_UNREFERENCED(in_attached_view); return; }
2048 
2051  virtual void OnViewDetached(HPS::View const & in_detached_view) { HPS_UNREFERENCED(in_detached_view); return; }
2052 
2055  virtual void OnModelAttached() { return; }
2056 
2059  virtual void OnModelDetached() { return; }
2060 
2062  void SetMouseTrigger(MouseButtons in_buttons) { mouse_trigger = in_buttons; }
2063 
2066  MouseButtons GetMouseTrigger() const { return mouse_trigger; }
2067 
2071  void SetModifierTrigger(ModifierKeys in_modifiers) { modifier_trigger = in_modifiers; }
2072 
2074  ModifierKeys GetModifierTrigger() const { return modifier_trigger; }
2075 
2077  virtual bool IsMouseTriggered(MouseState const & in_state) { return in_state.HasAll(mouse_trigger, modifier_trigger); }
2078 
2079  enum class Priority
2080  {
2081  Low,
2082  Default,
2083  High
2084  };
2085 
2086 protected:
2087 
2088  HPS::MouseButtons mouse_trigger;
2089  HPS::ModifierKeys modifier_trigger;
2090 };
2091 
2092 class SPRK_API OperatorUtility
2093 {
2094  static double internal_acos(double x)
2095  {
2096  return (((x)<-1) ? (HPS::PI) : (((x)>1) ? (0) : (acos(x))));
2097  }
2098 
2099 public:
2100 
2101  enum ProjectedPlane
2102  {
2103  Plane_XY,
2104  Plane_YZ,
2105  Plane_XZ
2106  };
2107 
2108  static void ScreenToSphereMousePoint(HPS::Point const &in_pt, HPS::Vector &out_vec)
2109  {
2110  out_vec = HPS::Vector(in_pt);
2111  float len = static_cast<float>(out_vec.Length());
2112  if (len > 1.0f)
2113  {
2114  out_vec /= len;
2115  out_vec.z = 0;
2116  }
2117  else
2118  out_vec.z = (float)sqrt(1.0f - (len*len));
2119  }
2120 
2121  static float CalculateAngleOrbitOnPlane(HPS::Vector const &axis, ProjectedPlane plane)
2122  {
2123  float theta;
2124 
2125  HPS::Vector vtmp;
2126  if (plane == Plane_XY)
2127  vtmp = HPS::Vector(axis.x, axis.y, 0);
2128  else if (plane == Plane_YZ)
2129  vtmp = HPS::Vector(0, axis.y, axis.z);
2130  else
2131  vtmp = HPS::Vector(axis.x, 0, axis.z);
2132  Vector naxis = axis;
2133 
2134  naxis.Normalize();
2135  vtmp.Normalize();
2136 
2137  float tmp = naxis.Dot(vtmp);
2138  if (static_cast<float>(Abs(tmp)) > 1.001f || static_cast<float>(Abs(tmp)) < 0.999f)
2139  theta = static_cast<float>(internal_acos(tmp));
2140  else
2141  theta = 0.0f;
2142 
2143  return theta;
2144  }
2145 };
2146 
2149 class SPRK_API OperatorControl : public SprocketControl
2150 {
2151 public:
2153  explicit OperatorControl(View const & in_view);
2154 
2156  OperatorControl(OperatorControl const & in_that);
2157 
2161  OperatorControl(OperatorControl && in_that);
2162 
2166  OperatorControl & operator=(OperatorControl && in_that);
2167 
2169  ~OperatorControl();
2170 
2171  static const HPS::Type staticType = HPS::Type::OperatorControl;
2172  HPS::Type ObjectType() const {return staticType;};
2173 
2175  OperatorControl & operator=(OperatorControl const & in_that);
2176 
2177 
2179  size_t GetCount();
2180 
2183  size_t GetCount(Operator::Priority in_priority);
2184 
2185 
2191  OperatorControl & Push(OperatorPtr const & in_operator, Operator::Priority in_priority = Operator::Priority::Default);
2192 
2199  OperatorControl & Push(Operator * in_operator, Operator::Priority in_priority = Operator::Priority::Default);
2200 
2204  bool Pop(Operator::Priority in_priority = Operator::Priority::Default);
2205 
2210  bool Pop(OperatorPtr & out_operator);
2211 
2217  bool Pop(Operator::Priority in_priority, OperatorPtr & out_operator);
2218 
2219 
2225  OperatorControl & Set(OperatorPtr const & in_operator, Operator::Priority in_priority = Operator::Priority::Default);
2226 
2233  OperatorControl & Set(Operator * in_operator, Operator::Priority in_priority = Operator::Priority::Default);
2234 
2240  OperatorControl & Set(OperatorPtrArray & in_operators, Operator::Priority in_priority = Operator::Priority::Default);
2241 
2248  OperatorControl & Set(size_t in_count, OperatorPtr in_operators [], Operator::Priority in_priority = Operator::Priority::Default);
2249 
2250 
2254  OperatorControl & UnsetTop(Operator::Priority in_priority = Operator::Priority::Default);
2255 
2259  OperatorControl & UnsetEverything(Operator::Priority in_priority);
2260 
2263  OperatorControl & UnsetEverything();
2264 
2265 
2269  bool ShowTop(OperatorPtr & out_operator) const;
2270 
2275  bool ShowTop(Operator::Priority in_priority, OperatorPtr & out_operator) const;
2276 
2280  bool Show(OperatorPtrArray & out_operators) const;
2281 
2286  bool Show(Operator::Priority in_priority, OperatorPtrArray & out_operators) const;
2287 
2288 private:
2290  OperatorControl() {}
2291 };
2292 
2299 {
2300 public:
2301 
2302  enum class Location
2303  {
2304  TopRight,
2305  TopLeft,
2306  BottomRight,
2307  BottomLeft,
2308  Custom,
2309  };
2310 
2312  explicit NavigationCubeControl(View const & in_view);
2313 
2316 
2321 
2325  NavigationCubeControl & operator=(NavigationCubeControl && in_that);
2326 
2329 
2330  static const HPS::Type staticType = HPS::Type::NavigationCubeControl;
2331  HPS::Type ObjectType() const {return staticType;};
2332 
2334  NavigationCubeControl & operator=(NavigationCubeControl const & in_that);
2335 
2344  NavigationCubeControl & SetLocation(Location in_location, HPS::Rectangle const & in_rectangle = HPS::Rectangle(), HPS::IntRectangle in_offsets = HPS::IntRectangle::Zero());
2345 
2348  Location GetLocation() const;
2349 
2353  NavigationCubeControl & SetPosition(HPS::Rectangle const & in_rectangle);
2354 
2357  HPS::Rectangle GetPosition() const;
2358 
2362  NavigationCubeControl & SetPositionOffsets(HPS::IntRectangle const & in_offsets);
2363 
2366  HPS::IntRectangle GetPositionOffsets() const;
2367 
2372  NavigationCubeControl & SetVisibility(bool in_visibility);
2373 
2376  bool GetVisibility() const;
2377 
2381  NavigationCubeControl & SetTextVisibility(bool in_text_visibility);
2382 
2385  bool GetTextVisibility() const;
2386 
2401  NavigationCubeControl & SetMaterialPalette(char const * in_material_palette);
2402 
2405  HPS::UTF8 GetMaterialPalette() const;
2406 
2414  NavigationCubeControl & SetInteractivity(bool in_interactivity);
2415 
2416 
2419  bool GetInteractivity() const;
2420 
2425  NavigationCubeControl & SetSize(float in_size);
2426 
2429  float GetSize() const;
2430 
2431  /* Sets the text displayed on the navigation cube.
2432  * note that if you plan on using the navigation cube on a very large and pixel dense screen
2433  * (example: a large TV), if you wish to specify a custom text size, you should do so using
2434  * one of the window relative text sizes.
2435  * \param in_back_string The text to display on the back face of the navigation cube
2436  * \param in_top_string The text to display on the top face of the navigation cube
2437  * \param in_left_string The text to display on the left face of the navigation cube
2438  * \param in_front_string The text to display on the front face of the navigation cube
2439  * \param in_bottom_string The text to display on the bottom face of the navigation cube
2440  * \param in_right_string The text to display on the right face of the navigation cube
2441  * \param in_text_attributes The attributes applied to the text on the navigation cube
2442  * \param in_fallback_fonts An array of fonts to use in case the one specified in in_text_attributes cannot be found at runtime.
2443  * Generally this should be the same array passed to SetFallbackFonts.
2444  * If the font specified is not found at runtime, and no fallback fonts are specified, a stroked representation of the text will be
2445  * used. Non-Latin characters might render as boxes in this eventuality.
2446  * \return A reference to this object. */
2447  NavigationCubeControl & SetText(const char * in_back_string, const char * in_top_string, const char * in_left_string,
2448  const char * in_front_string, const char * in_bottom_string, const char * in_right_string,
2449  HPS::TextAttributeKit const & in_text_attributes, HPS::UTF8Array const & in_fallback_fonts = HPS::UTF8Array());
2450 
2451  /* Gets the text displayed on the navigation cube.
2452  * \param out_back_string The text displayed on the back face of the navigation cube
2453  * \param out_top_string The text displayed on the top face of the navigation cube
2454  * \param out_left_string The text displayed on the left face of the navigation cube
2455  * \param out_front_string The text displayed on the front face of the navigation cube
2456  * \param out_bottom_string The text displayed on the bottom face of the navigation cube
2457  * \param out_right_string The text displayed on the right face of the navigation cube
2458  * \param out_text_attributes The attributes applied to the text on the navigation cube
2459  * \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.
2460  * \return <span class='code'>true</span> if the navigation cube text was retrieved successfully, <span class='code'>false</span> otherwise. */
2461  bool GetText(UTF8 & out_back_string, UTF8 & out_top_string, UTF8 & out_left_string,
2462  UTF8 & out_front_string, UTF8 & out_bottom_string, UTF8 & out_right_string,
2463  HPS::TextAttributeKit & out_text_attributes, HPS::UTF8Array & out_fallback_fonts) const;
2464 
2467  HPS::SegmentKey GetSegmentKey() const;
2468 
2469 private:
2472 
2474  HPS::SegmentKey GetNavigationCubeSegment() const;
2475  void SetNavigationCubeVisibilityLink(bool in_visibility) const;
2476 
2477  bool IsTextVisible() const;
2478 };
2479 
2482 class SPRK_API AxisTriadControl : public SprocketControl
2483 {
2484 public:
2485 
2486  enum class Location
2487  {
2488  TopRight,
2489  TopLeft,
2490  BottomRight,
2491  BottomLeft,
2492  Custom,
2493  };
2494 
2496  explicit AxisTriadControl(View const & in_view);
2497 
2499  AxisTriadControl(AxisTriadControl const & in_that);
2500 
2504  AxisTriadControl(AxisTriadControl && in_that);
2505 
2509  AxisTriadControl & operator=(AxisTriadControl && in_that);
2510 
2512  ~AxisTriadControl();
2513 
2514  static const HPS::Type staticType = HPS::Type::AxisTriadControl;
2515  HPS::Type ObjectType() const {return staticType;};
2516 
2518  AxisTriadControl & operator=(AxisTriadControl const & in_that);
2519 
2528  HPS::AxisTriadControl & SetLocation(Location in_location, HPS::Rectangle const & in_position = HPS::Rectangle(), HPS::IntRectangle in_offsets = HPS::IntRectangle::Zero());
2529 
2532  Location GetLocation() const;
2533 
2537  AxisTriadControl & SetPosition(HPS::Rectangle const & in_position);
2538 
2541  HPS::Rectangle GetPosition() const;
2542 
2546  AxisTriadControl & SetPositionOffsets(HPS::IntRectangle const & in_offsets);
2547 
2550  HPS::IntRectangle GetPositionOffsets() const;
2551 
2556  HPS::AxisTriadControl & SetVisibility(bool in_visibility);
2557 
2560  bool GetVisibility() const;
2561 
2565  HPS::AxisTriadControl & SetTextVisibility(bool in_text_visibility);
2566 
2569  bool GetTextVisibility() const;
2570 
2579  HPS::AxisTriadControl & SetMaterialPalette(char const * in_material_palette);
2580 
2583  HPS::UTF8 GetMaterialPalette() const;
2584 
2591  HPS::AxisTriadControl & SetInteractivity(bool in_interactivity);
2592 
2595  bool GetInteractivity() const;
2596 
2601  AxisTriadControl & SetSize(float in_size);
2602 
2605  float GetSize() const;
2606 
2609  HPS::SegmentKey GetSegmentKey() const;
2610 
2611 private:
2613  AxisTriadControl(){};
2614 
2616  HPS::SegmentKey GetAxisTriadSegment() const;
2617 
2618  void SetAxisVisibilityLink(bool in_visibility) const;
2619 };
2620 
2622 class SPRK_API Component : public Sprocket
2623 {
2624 public:
2625 
2628  enum class ComponentType : uint32_t
2629  {
2630  None = 0x00000000,
2631  GenericMask = 0xfffff000,
2632 
2633  ExchangeComponentMask = 0x00001000,
2634  ExchangeModelFile = 0x00001001,
2635  ExchangeProductOccurrence = 0x00001002,
2636  ExchangePartDefinition = 0x00001003,
2637 
2638  ExchangeView = 0x00001004,
2639  ExchangeFilter = 0x00001005,
2640 
2641  ExchangeRepresentationItemMask = 0x00003000,
2642  ExchangeRIBRepModel = 0x00003001,
2643  ExchangeRICurve = 0x00003002,
2644  ExchangeRIDirection = 0x00003003,
2645  ExchangeRIPlane = 0x00003004,
2646  ExchangeRIPointSet = 0x00003005,
2647  ExchangeRIPolyBRepModel = 0x00003006,
2648  ExchangeRIPolyWire = 0x00003007,
2649  ExchangeRISet = 0x00003008,
2650  ExchangeRICoordinateSystem = 0x00003009,
2651 
2652  ExchangeTopologyMask = 0x00005000,
2653  ExchangeTopoBody = 0x00005001,
2654  ExchangeTopoConnex = 0x00005002,
2655  ExchangeTopoShell = 0x00005003,
2656  ExchangeTopoFace = 0x00005004,
2657  ExchangeTopoLoop = 0x00005005,
2658  ExchangeTopoCoEdge = 0x00005006,
2659  ExchangeTopoEdge = 0x00005007,
2660  ExchangeTopoVertex = 0x00005008,
2661  ExchangeTopoSingleWireBody = 0x00005009,
2662  ExchangeTopoWireEdge = 0x0000500a,
2663 
2664  ExchangeDrawingMask = 0x00009000,
2665  ExchangeDrawingModel = 0x00009001,
2666  ExchangeDrawingView = 0x00009002,
2667  ExchangeDrawingSheet = 0x00009003,
2668  ExchangeBasicDrawingBlock = 0x00009004,
2669  ExchangeOperatorDrawingBlock = 0x00009005,
2670 
2671  ExchangePMIMask = 0x00011000,
2672  ExchangePMI = ExchangePMIMask,
2673  ExchangePMIText = 0x00011100,
2674  ExchangePMIRichText = 0x00011200,
2675  ExchangePMIRoughness = 0x00011300,
2676  ExchangePMIGDT = 0x00011400,
2677  ExchangePMIDatum = 0x00011500,
2678  ExchangePMILineWelding = 0x00011600,
2679  ExchangePMISpotWelding = 0x00011700,
2680  ExchangePMIDimension = 0x00011800,
2681  ExchangePMIBalloon = 0x00011900,
2682  ExchangePMICoordinate = 0x00011a00,
2683  ExchangePMIFastener = 0x00011b00,
2684  ExchangePMILocator = 0x00011c00,
2685  ExchangePMIMeasurementPoint = 0x00011d00,
2686 
2687 
2688  ParasolidComponentMask = 0x00020000,
2689 
2690  ParasolidModelFile = 0x00020001,
2691  ParasolidAssembly = 0x00020002,
2692  ParasolidInstance = 0x00020003,
2693 
2694  ParasolidTopologyMask = 0x00060000,
2695  ParasolidTopoBody = 0x00060001,
2696  ParasolidTopoRegion = 0x00060002,
2697  ParasolidTopoShell = 0x00060003,
2698  ParasolidTopoFace = 0x00060004,
2699  ParasolidTopoLoop = 0x00060005,
2700  ParasolidTopoFin = 0x00060006,
2701  ParasolidTopoEdge = 0x00060007,
2702  ParasolidTopoVertex = 0x00060008,
2703 
2704 
2705  DWGComponentMask = 0x00100000,
2706  DWGModelFile = 0x00100001,
2707  DWGLayout = 0x00100002,
2708  DWGBlockTable = 0x00100003,
2709  DWGBlockTableRecord = 0x00100004,
2710  DWGEntity = 0x00100005,
2711  DWGLayerTable = 0x00100006,
2712  DWGLayer = 0x00100007,
2713 
2714 
2715  UserComponent = 0x01000000,
2716  };
2717 
2720  enum class DeleteMode
2721  {
2722  Standard, // subcomponents will be deleted if they don't have multiple owners, otherwise their reference count will be decremented
2723  Full, // subcomponents will always be deleted, even if they are shared
2724  StandardAndExchange // Subcomponent will deleted if they don't have multiple owners, otherwise their reference count will be decremented.
2725  // The Exchange Entity associated to the Component will be deleted.
2726  };
2727 
2729  Component();
2730 
2733  Component(Component const & in_that);
2734 
2737  Component(Component && in_that);
2738 
2740  virtual ~Component();
2741 
2742  static const HPS::Type staticType = HPS::Type::Component;
2743  HPS::Type ObjectType() const { return staticType; }
2744 
2745 
2749  Component & operator=(Component const & in_that);
2750 
2754  Component & operator=(Component && in_that);
2755 
2759  virtual void Assign(Component const & in_that);
2760 
2764  bool Equals(Component const & in_that) const;
2765 
2769  bool operator!=(Component const & in_that) const;
2770 
2774  bool operator==(Component const & in_that) const;
2775 
2776 
2779  ComponentType GetComponentType() const;
2780 
2784  bool HasComponentType(ComponentType in_mask) const;
2785 
2786 
2787 
2793  void AddKey(Key const & in_key);
2794 
2797  KeyArray GetKeys() const;
2798 
2799 
2800 
2805  void AddOwner(Component & in_owner, IncludeKey const & in_include = IncludeKey());
2806 
2811  ComponentArray GetOwners() const;
2812 
2815  ComponentArray GetSubcomponents() const;
2816 
2821  ComponentArray GetAllSubcomponents(ComponentType in_type) const;
2822 
2823 
2824 
2827  void AddReference(Component & in_reference);
2828 
2835  ComponentArray GetReferrers() const;
2836 
2840  ComponentArray GetReferences() const;
2841 
2842 
2843 
2846  MetadataArray GetAllMetadata() const;
2847 
2851  Metadata GetMetadata(char const * in_name) const;
2852 
2856  UTF8 GetName() const;
2857 
2858 
2859 
2912  void Delete(HPS::Component::DeleteMode mode = HPS::Component::DeleteMode::Standard);
2913 
2917  void Flush();
2918 
2919 
2927  static KeyPathArray GetKeyPath(Component const & in_component);
2928 
2938  static KeyPathArray GetKeyPath(size_t in_count, Component const in_components[]);
2939 
2948  static KeyPathArray GetKeyPath(ComponentArray const & in_components);
2949 
2955  bool SetTransform(MatrixKit const & in_transform);
2956 
2962  bool AddTransform(MatrixKit const & in_transform);
2963 
2984  Component CopyTo(HPS::Component const & in_new_owner);
2985 
2990  bool SetName(char const * in_new_name);
2991 };
2992 
2994 class SPRK_API ComponentPath : public Sprocket
2995 {
2996 public:
2999  enum class PathType : uint32_t
3000  {
3001  Complete,
3002  Unique,
3003  };
3004 
3006  ComponentPath();
3007 
3010  ComponentPath(ComponentArray const & in_components);
3011 
3015  ComponentPath(size_t in_count, Component const in_components[]);
3016 
3018  ComponentPath(ComponentPath const & in_that);
3019 
3023  ComponentPath(ComponentPath && in_that);
3024 
3028  ComponentPath & operator=(ComponentPath && in_that);
3029 
3031  virtual ~ComponentPath();
3032 
3033  static const HPS::Type staticType = HPS::Type::ComponentPath;
3034  HPS::Type ObjectType() const { return staticType; }
3035 
3038  bool Empty() const;
3039 
3043  ComponentPath & operator+=(Component const & in_component);
3044 
3048  ComponentPath & operator+=(ComponentPath const & in_path);
3049 
3053  ComponentPath & operator+=(ComponentArray const & in_components);
3054 
3059  ComponentPath & Append(Component const & in_component);
3060 
3065  ComponentPath & Append(ComponentPath const & in_path);
3066 
3071  ComponentPath & Append(ComponentArray const & in_components);
3072 
3076  ComponentPath & operator=(ComponentPath const & in_that);
3077 
3081  ComponentPath & operator=(ComponentArray const & in_path);
3082 
3085  void Set(ComponentPath const & in_that);
3086 
3090  bool Equals(ComponentPath const & in_that) const;
3091 
3095  bool operator!= (ComponentPath const & in_that) const;
3096 
3100  bool operator== (ComponentPath const & in_that) const;
3101 
3102 
3106  ComponentPath & SetComponents(ComponentArray const & in_components);
3107 
3112  ComponentPath & SetComponents(size_t in_count, Component const in_components[]);
3113 
3116  ComponentArray GetComponents() const;
3117 
3121  KeyPathArray GetKeyPaths() const;
3122 
3127  KeyPathArray GetKeyPaths(Canvas const & in_canvas, size_t in_layer = 0) const;
3128 
3129 
3136  void Highlight(Canvas const & in_canvas, HighlightOptionsKit const & in_options, bool in_remove_existing = true) const;
3137 
3144  void Highlight(Canvas const & in_canvas, size_t in_layer, HighlightOptionsKit const & in_options, bool in_remove_existing = true) const;
3145 
3149  void Unhighlight(Canvas const & in_canvas, HighlightOptionsKit const & in_options = HighlightOptionsKit()) const;
3150 
3155  void Unhighlight(Canvas const & in_canvas, size_t in_layer, HighlightOptionsKit const & in_options = HighlightOptionsKit()) const;
3156 
3157 
3169  void Hide(Canvas const & in_canvas, size_t in_layer = 0);
3170 
3182  void Show(Canvas const & in_canvas, size_t in_layer = 0);
3183 
3195  bool IsHidden(Canvas const & in_canvas, size_t in_layer = 0) const;
3196 
3207  void Isolate(Canvas const & in_canvas, size_t in_layer = 0);
3208 
3220  static void Isolate(HPS::ComponentPathArray & in_component_paths, Canvas const & in_canvas, size_t in_layer = 0);
3221 
3231  void ResetVisibility(Canvas const & in_canvas, size_t in_layer = 0);
3232 
3243  static void ResetVisibility(HPS::ComponentPathArray & in_component_paths, Canvas const & in_canvas, size_t in_layer = 0);
3244 
3245  /* Returns the number of Components contained in this ComponentPath object.
3246  * \return the number of Components in this ComponentPath.*/
3247  size_t Size() const;
3248 
3249  /* Access a Component in this ComponentPath object. An HPS::IndexOutOfRangeException exception is thrown if in_index is out of range.
3250  * \param in_index The index of the Component to access, zero based.
3251  * \return The Component at position in_index in this ComponentPath.*/
3252  Component & At(size_t in_index);
3253 
3254  /* Access a Component in this ComponentPath object. An HPS::IndexOutOfRangeException exception is thrown if in_index is out of range.
3255  * \param in_index The index of the Component to access, zero based.
3256  * \return The Component at position in_index in this ComponentPath.*/
3257  Component const & At(size_t in_index) const;
3258 
3259  /* Inserts in_item in the ComponentPath before the element at position in_index, increasing the size of the ComponentPath by one.
3260  * An HPS::IndexOutOfRangeException exception is thrown if in_index is out of range.
3261  * \param in_index The index where in_item will be inserted
3262  * \param in_item The component to insert in this key path. */
3263  void Insert(size_t in_index, Component const & in_item);
3264 
3265  /* Traverses the components in this ComponentPath and removes the first one which matches in_item
3266  * NOTE: A useful ComponentPath should not contain duplicate components.
3267  * \param in_item The item to remove from the ComponentPath. */
3268  void Remove(Component const & in_item);
3269 
3270  /* Removes the the component at position in_index from this ComponentPath. An HPS::IndexOutOfRangeException exception is thrown if in_index is out of range.
3271  * \param in_index The index of the component to remove, zero based. */
3272  void Remove(size_t in_index);
3273 
3274  /* Creates and returns a new ComponentPath object, with the components organized in the reverse order.
3275  * \return A new ComponentPath object, containing components organized in the reverse order. */
3276  ComponentPath Reverse() const;
3277 
3278  /* Returns the first component of this ComponentPath. An HPS::IndexOutOfRangeException exception is thrown if the ComponentPath is empty.
3279  * \return The first component of this ComponentPath.*/
3280  Component & Front();
3281 
3282  /* Returns the first component of this ComponentPath. An HPS::IndexOutOfRangeException exception is thrown if the ComponentPath is empty.
3283  * \return The first component of this ComponentPath.*/
3284  Component const & Front() const;
3285 
3286  /* Returns the last component of this ComponentPath. An HPS::IndexOutOfRangeException exception is thrown if the ComponentPath is empty.
3287  * \return The last component of this ComponentPath.*/
3288  Component & Back();
3289 
3290  /* Returns the last component of this ComponentPath. An HPS::IndexOutOfRangeException exception is thrown if the ComponentPath is empty.
3291  * \return The last component of this ComponentPath.*/
3292  Component const & Back() const;
3293 
3294  /* Returns the first component of this ComponentPath and returns it. An HPS::IndexOutOfRangeException exception is thrown if the ComponentPath is empty.
3295  * \return The first component of this ComponentPath.*/
3296  Component PopFront();
3297 
3298  /* Returns the last component of this ComponentPath and returns it. An HPS::IndexOutOfRangeException exception is thrown if the ComponentPath is empty.
3299  * \return The last component of this ComponentPath.*/
3300  Component PopBack();
3301 
3302  /* Adds in_component to the front of the ComponentPath.
3303  * \param in_component The component to add to the front of the ComponentPath.
3304  * \return A reference to this object.*/
3305  ComponentPath & PushFront(Component const & in_component);
3306 
3307  /* Adds in_component to the end of the ComponentPath.
3308  * \param in_component The component to add to the end of the ComponentPath.
3309  * \return A reference to this object.*/
3310  ComponentPath & PushBack(Component const & in_component);
3311 
3315  ComponentPath & PushBack(ComponentPath const & in_path);
3316 
3320  ComponentPath & PushBack(ComponentArray const & in_components);
3321 
3322 #ifndef HPS_GULP_CLANG
3323  using iterator = HPS::ComponentArray::iterator;
3324  using const_iterator = HPS::ComponentArray::const_iterator;
3325  using reverse_iterator = HPS::ComponentArray::reverse_iterator;
3326  using const_reverse_iterator = HPS::ComponentArray::const_reverse_iterator;
3327 
3328  /* Returns an iterator pointing to the first Component contained in this ComponentPath
3329  * \return An iterator pointing to the first Component contained in this ComponentPath. */
3330  iterator begin();
3331 
3332  /* Returns an iterator pointing to the first Component contained in this ComponentPath
3333  * \return An iterator pointing to the first Component contained in this ComponentPath. */
3334  const_iterator begin() const;
3335 
3336  /* Returns a constant iterator pointing to the last Component contained in this ComponentPath
3337  * \return A constant iterator pointing to the last Component contained in this ComponentPath. */
3338  iterator end();
3339 
3340  /* Returns a constant iterator pointing to the last Component contained in this ComponentPath
3341  * \return A constant iterator pointing to the last Component contained in this ComponentPath. */
3342  const_iterator end() const;
3343 
3344  /* Returns a constant iterator pointing to the first Component contained in this ComponentPath
3345  * \return A constant iterator pointing to the first Component contained in this ComponentPath. */
3346  const_iterator cbegin() const;
3347 
3348  /* Returns a constant iterator pointing to the last Component contained in this ComponentPath
3349  * \return A constant iterator pointing to the last Component contained in this ComponentPath. */
3350  const_iterator cend() const;
3351 
3352  /* Returns a reverse iterator pointing to the last Component contained in this ComponentPath
3353  * \return A reverse iterator pointing to the last Component contained in this ComponentPath. */
3354  reverse_iterator rbegin();
3355 
3356  /* Returns a reverse iterator pointing to the first Component contained in this ComponentPath
3357  * \return A reverse iterator pointing to the first Component contained in this ComponentPath. */
3358  reverse_iterator rend();
3359 
3360  /* Returns a constant reverse iterator pointing to the last Component contained in this ComponentPath
3361  * \return A constant reverse iterator pointing to the last Component contained in this ComponentPath. */
3362  const_reverse_iterator rbegin() const;
3363 
3364  /* Returns a constant iterator pointing to the first Component contained in this ComponentPath
3365  * \return A constant iterator pointing to the first Component contained in this ComponentPath. */
3366  const_reverse_iterator rend() const;
3367 #endif
3368 };
3369 
3370 
3375 inline ComponentPath operator+(Component const & in_lhs, Component const & in_rhs)
3376 {
3377  return HPS::ComponentPath().PushBack(in_lhs).PushBack(in_rhs);
3378 }
3379 
3384 inline ComponentPath operator+(Component const & in_lhs, ComponentArray const & in_rhs)
3385 {
3386  return HPS::ComponentPath().PushBack(in_lhs).PushBack(in_rhs);
3387 }
3388 
3393 inline ComponentPath operator+(Component const & in_lhs, ComponentPath const & in_rhs)
3394 {
3395  return HPS::ComponentPath().PushBack(in_lhs).PushBack(in_rhs);
3396 }
3397 
3402 inline ComponentPath operator+(ComponentArray const & in_lhs, Component const & in_rhs)
3403 {
3404  return HPS::ComponentPath().PushBack(in_lhs).PushBack(in_rhs);
3405 }
3406 
3411 inline ComponentPath operator+(ComponentArray const & in_lhs, ComponentArray const & in_rhs)
3412 {
3413  return HPS::ComponentPath().PushBack(in_lhs).PushBack(in_rhs);
3414 }
3415 
3420 inline ComponentPath operator+(ComponentArray const & in_lhs, ComponentPath const & in_rhs)
3421 {
3422  return HPS::ComponentPath().PushBack(in_lhs).PushBack(in_rhs);
3423 }
3424 
3429 inline ComponentPath operator+(ComponentPath const & in_lhs, Component const & in_rhs)
3430 {
3431  return HPS::ComponentPath().PushBack(in_lhs).PushBack(in_rhs);
3432 }
3433 
3438 inline ComponentPath operator+(ComponentPath const & in_lhs, ComponentArray const & in_rhs)
3439 {
3440  return HPS::ComponentPath().PushBack(in_lhs).PushBack(in_rhs);
3441 }
3442 
3447 inline ComponentPath operator+(ComponentPath const & in_lhs, ComponentPath const & in_rhs)
3448 {
3449  return HPS::ComponentPath().PushBack(in_lhs).PushBack(in_rhs);
3450 }
3451 
3453 class SPRK_API ComponentResetEvent : public HPS::Event
3454 {
3455 public:
3456 
3458  {
3459  channel = GetClassID();
3460  consumable = false;
3461  }
3462 
3463  ComponentResetEvent(HPS::ComponentPath const & in_path, HPS::Canvas const & in_canvas, size_t in_layer = 0)
3464  : Event(), path(in_path), canvas(in_canvas), layer(in_layer)
3465  {
3466  channel = GetClassID();
3467  consumable = false;
3468  }
3469 
3470  ComponentResetEvent(HPS::Event const & in_event) : Event(in_event)
3471  {
3472  if (in_event.GetChannel() == HPS::Object::ClassID<ComponentResetEvent>())
3473  {
3474  auto that = static_cast<ComponentResetEvent const &>(in_event);
3475  path = that.path;
3476  canvas = that.canvas;
3477  layer = that.layer;
3478  }
3479  else
3480  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
3481  }
3482 
3483  virtual ~ComponentResetEvent() {}
3484 
3485  Event * Clone() const override
3486  {
3487  ComponentResetEvent * new_event = new ComponentResetEvent(*this);
3488  return new_event;
3489  }
3490 
3491  HPS::ComponentPath path;
3492  HPS::Canvas canvas;
3493  size_t layer;
3494 };
3495 
3497 class SPRK_API ComponentShownEvent : public HPS::Event
3498 {
3499 public:
3500 
3502  {
3503  channel = GetClassID();
3504  consumable = false;
3505  }
3506 
3507  ComponentShownEvent(HPS::ComponentPath const & in_path, HPS::Canvas const & in_canvas, size_t in_layer = 0)
3508  : Event(), path(in_path), canvas(in_canvas), layer(in_layer)
3509  {
3510  channel = GetClassID();
3511  consumable = false;
3512  }
3513 
3514  ComponentShownEvent(HPS::Event const & in_event) : Event(in_event)
3515  {
3516  if (in_event.GetChannel() == HPS::Object::ClassID<ComponentShownEvent>())
3517  {
3518  auto that = static_cast<ComponentShownEvent const &>(in_event);
3519  path = that.path;
3520  canvas = that.canvas;
3521  layer = that.layer;
3522  }
3523  else
3524  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
3525  }
3526 
3527  virtual ~ComponentShownEvent() {}
3528 
3529  Event * Clone() const override
3530  {
3531  ComponentShownEvent * new_event = new ComponentShownEvent(*this);
3532  return new_event;
3533  }
3534 
3535  HPS::ComponentPath path;
3536  HPS::Canvas canvas;
3537  size_t layer;
3538 };
3539 
3541 class SPRK_API ComponentHiddenEvent : public HPS::Event
3542 {
3543 public:
3544 
3546  {
3547  channel = GetClassID();
3548  consumable = false;
3549  }
3550 
3551  ComponentHiddenEvent(HPS::ComponentPath const & in_path, HPS::Canvas const & in_canvas, size_t in_layer = 0)
3552  : Event(), path(in_path), canvas(in_canvas), layer(in_layer)
3553  {
3554  channel = GetClassID();
3555  consumable = false;
3556  }
3557 
3558  ComponentHiddenEvent(HPS::Event const & in_event) : Event(in_event)
3559  {
3560  if (in_event.GetChannel() == HPS::Object::ClassID<ComponentHiddenEvent>())
3561  {
3562  auto that = static_cast<ComponentHiddenEvent const &>(in_event);
3563  path = that.path;
3564  canvas = that.canvas;
3565  layer = that.layer;
3566  }
3567  else
3568  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
3569  }
3570 
3571  virtual ~ComponentHiddenEvent() {}
3572 
3573  Event * Clone() const override
3574  {
3575  ComponentHiddenEvent * new_event = new ComponentHiddenEvent(*this);
3576  return new_event;
3577  }
3578 
3579  HPS::ComponentPath path;
3580  HPS::Canvas canvas;
3581  size_t layer;
3582 };
3583 
3585 class SPRK_API ComponentIsolatedEvent : public Event
3586 {
3587 public:
3588 
3591  {
3592  channel = GetClassID();
3593  consumable = false;
3594  }
3595 
3596  ComponentIsolatedEvent(HPS::ComponentPath const & in_path, HPS::Canvas const & in_canvas, size_t in_layer = 0)
3597  : Event(), path(in_path), canvas(in_canvas), layer(in_layer)
3598  {
3599  channel = GetClassID();
3600  consumable = false;
3601  }
3602 
3605  ComponentIsolatedEvent(Event const & in_event) : Event(in_event)
3606  {
3607  if (in_event.GetChannel() == Object::ClassID<ComponentIsolatedEvent>())
3608  {
3609  auto that = static_cast<ComponentIsolatedEvent const &>(in_event);
3610  path = that.path;
3611  canvas = that.canvas;
3612  layer = that.layer;
3613  }
3614  else
3615  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
3616  }
3617 
3618  virtual ~ComponentIsolatedEvent();
3619 
3622  Event * Clone() const override
3623  {
3624  ComponentIsolatedEvent * new_event = new ComponentIsolatedEvent(*this);
3625  return new_event;
3626  }
3627 
3628  ComponentPath path;
3629  HPS::Canvas canvas;
3630  size_t layer;
3631 };
3632 
3633 
3635 class SPRK_API ComponentHighlightEvent : public Event
3636 {
3637 public:
3638  enum class Action
3639  {
3640  None = 0,
3641  Highlight,
3642  Unhighlight,
3643  };
3644 
3647  {
3648  channel = GetClassID();
3649  consumable = false;
3650  action = Action::None;
3651  }
3652 
3653  ComponentHighlightEvent(Action in_action,
3654  HPS::Canvas const & in_canvas,
3655  size_t in_layer = 0,
3656  ComponentPath const & in_path = ComponentPath(),
3657  HighlightOptionsKit const & in_options = HighlightOptionsKit())
3658  : Event(), action(in_action), path(in_path), options(in_options), canvas(in_canvas), layer(in_layer)
3659  {
3660  channel = GetClassID();
3661  consumable = false;
3662  }
3663 
3666  ComponentHighlightEvent(Event const & in_event) : Event(in_event)
3667  {
3668  if (in_event.GetChannel() == Object::ClassID<ComponentHighlightEvent>())
3669  {
3670  auto that = static_cast<ComponentHighlightEvent const &>(in_event);
3671  action = that.action;
3672  path = that.path;
3673  options = that.options;
3674  canvas = that.canvas;
3675  layer = that.layer;
3676  }
3677  else
3678  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
3679  }
3680 
3681  virtual ~ComponentHighlightEvent();
3682 
3685  Event * Clone() const override
3686  {
3687  ComponentHighlightEvent * new_event = new ComponentHighlightEvent(*this);
3688  return new_event;
3689  }
3690 
3691  Action action;
3692  ComponentPath path;
3693  HighlightOptionsKit options;
3694  HPS::Canvas canvas;
3695  size_t layer;
3696 };
3697 
3698 
3700 class SPRK_API Filter : public Component
3701 {
3702 public:
3704  Filter();
3705 
3709  Filter(Component const & in_that);
3710 
3713  Filter(Filter const & in_that);
3714 
3717  Filter(Filter && in_that);
3718 
3719  virtual ~Filter();
3720 
3721  static const HPS::Type staticType = HPS::Type::Filter;
3722  HPS::Type ObjectType() const { return staticType; }
3723 
3724 
3725 #if !defined(_MSC_VER) || _MSC_VER >= 1900
3726  Filter & operator=(Filter const & in_that) = default;
3727 #endif
3728 
3732  Filter & operator=(Filter && in_that);
3733 
3734 
3737  void Activate(View const & in_view);
3738 
3741  void Deactivate(View const & in_view);
3742 };
3743 
3744 
3745 class SPRK_API FilterActivationEvent : public Event
3746 {
3747 public:
3748  enum class Action
3749  {
3750  None = 0,
3751  Activate,
3752  Deactivate,
3753  };
3754 
3757  {
3758  channel = GetClassID();
3759  consumable = false;
3760  }
3761 
3762  FilterActivationEvent(Filter in_filter, Action in_action, View in_view) : Event(), filter(in_filter), action(in_action), view(in_view)
3763  {
3764  channel = GetClassID();
3765  consumable = false;
3766  }
3767 
3770  FilterActivationEvent(Event const & in_event) : Event(in_event)
3771  {
3772  if (in_event.GetChannel() == Object::ClassID<FilterActivationEvent>())
3773  {
3774  auto that = static_cast<FilterActivationEvent const &>(in_event);
3775  filter = that.filter;
3776  action = that.action;
3777  view = that.view;
3778  }
3779  else
3780  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
3781  }
3782 
3784 
3787  Event * Clone() const
3788  {
3789  FilterActivationEvent * new_event = new FilterActivationEvent(*this);
3790  return new_event;
3791  }
3792 
3793  Filter filter;
3794  Action action;
3795  View view;
3796 };
3797 
3798 
3800 class SPRK_API Capture : public Component
3801 {
3802 public:
3804  Capture();
3805 
3809  Capture(Component const & in_that);
3810 
3813  Capture(Capture const & in_that);
3814 
3817  Capture(Capture && in_that);
3818 
3819  virtual ~Capture();
3820 
3821  static const HPS::Type staticType = HPS::Type::Capture;
3822  HPS::Type ObjectType() const { return staticType; }
3823 
3824 #if !defined(_MSC_VER) || _MSC_VER >= 1900
3825  Capture & operator=(Capture const & in_that) = default;
3826 #endif
3827 
3831  Capture & operator=(Capture && in_that);
3832 
3833 
3837  View Activate();
3838 };
3839 
3840 
3841 class SPRK_API CaptureActivationEvent : public Event
3842 {
3843 public:
3846  {
3847  channel = GetClassID();
3848  consumable = false;
3849  }
3850 
3851  CaptureActivationEvent(Capture in_capture, View in_view) : Event(), capture(in_capture), view(in_view)
3852  {
3853  channel = GetClassID();
3854  consumable = false;
3855  }
3856 
3859  CaptureActivationEvent(Event const & in_event) : Event(in_event)
3860  {
3861  if (in_event.GetChannel() == Object::ClassID<CaptureActivationEvent>())
3862  {
3863  auto that = static_cast<CaptureActivationEvent const &>(in_event);
3864  capture = that.capture;
3865  view = that.view;
3866  }
3867  else
3868  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
3869  }
3870 
3872 
3875  Event * Clone() const
3876  {
3877  CaptureActivationEvent * new_event = new CaptureActivationEvent(*this);
3878  return new_event;
3879  }
3880 
3881  Capture capture;
3882  View view;
3883 };
3884 
3885 
3887 class SPRK_API CADModel : public Component
3888 {
3889 public:
3891  CADModel();
3892 
3896  CADModel(Component const & in_that);
3897 
3900  CADModel(CADModel const & in_that);
3901 
3904  CADModel(CADModel && in_that);
3905 
3908  CADModel(Model const & in_that);
3909 
3910  virtual ~CADModel();
3911 
3912  static const HPS::Type staticType = HPS::Type::CADModel;
3913  HPS::Type ObjectType() const { return staticType; }
3914 
3915 #if !defined(_MSC_VER) || _MSC_VER >= 1900
3916  CADModel & operator=(CADModel const & in_that) = default;
3917 #endif
3918 
3922  CADModel & operator=(CADModel && in_that);
3923 
3924 
3928  Component GetComponentFromKey(Key const & in_key) const;
3929 
3941  ComponentPath GetComponentPath(KeyPath const & in_key_path, ComponentPath::PathType in_path_type = ComponentPath::PathType::Unique) const;
3942 
3954  ComponentPath GetComponentPath(SelectionItem const & in_item, ComponentPath::PathType in_path_type = ComponentPath::PathType::Unique) const;
3955 
3956 
3959  Model GetModel() const;
3960 
3963  FilterArray GetAllFilters() const;
3964 
3967  CaptureArray GetAllCaptures() const;
3968 
3972  FilterArray GetActiveFilters(View const & in_view) const;
3973 
3974 
3978  View ActivateDefaultCapture();
3979 
3980 
3988  void ResetVisibility(Canvas const & in_canvas, size_t in_layer = 0);
3989 };
3990 
3991 
3992 
3995 class SPRK_API Metadata : public Sprocket
3996 {
3997 public:
3999  Metadata();
4000 
4003  Metadata(Metadata const & in_that);
4004 
4007  Metadata(Metadata && in_that);
4008 
4011  Metadata(char const * in_name);
4012 
4013  virtual ~Metadata();
4014 
4015  static const HPS::Type staticType = HPS::Type::Metadata;
4016  HPS::Type ObjectType() const { return staticType; }
4017 
4018 
4022  Metadata & operator=(Metadata const & in_that);
4023 
4027  Metadata & operator=(Metadata && in_that);
4028 
4032  virtual void Assign(Metadata const & in_that);
4033 
4037  bool Equals(Metadata const & in_that) const;
4038 
4042  bool operator!=(Metadata const & in_that) const;
4043 
4047  bool operator==(Metadata const & in_that) const;
4048 
4049 
4052  HPS::UTF8 GetName() const;
4053 
4056  void SetName(char const * in_name);
4057 };
4058 
4060 class SPRK_API IntegerMetadata : public Metadata
4061 {
4062 public:
4064  IntegerMetadata();
4065 
4069  IntegerMetadata(Metadata const & in_that);
4070 
4073  IntegerMetadata(IntegerMetadata const & in_that);
4074 
4077  IntegerMetadata(IntegerMetadata && in_that);
4078 
4082  IntegerMetadata(char const * in_name, int in_value);
4083 
4084  virtual ~IntegerMetadata();
4085 
4086  static const HPS::Type staticType = HPS::Type::IntegerMetadata;
4087  HPS::Type ObjectType() const { return staticType; }
4088 
4089 #if !defined(_MSC_VER) || _MSC_VER >= 1900
4090  IntegerMetadata & operator=(IntegerMetadata const & in_that) = default;
4091 #endif
4092 
4096  IntegerMetadata & operator=(IntegerMetadata && in_that);
4097 
4098 
4101  int GetValue() const;
4102 
4105  void SetValue(int in_value);
4106 };
4107 
4109 class SPRK_API UnsignedIntegerMetadata : public Metadata
4110 {
4111 public:
4114 
4118  UnsignedIntegerMetadata(Metadata const & in_that);
4119 
4123 
4127 
4131  UnsignedIntegerMetadata(char const * in_name, unsigned int in_value);
4132 
4133  virtual ~UnsignedIntegerMetadata();
4134 
4135  static const HPS::Type staticType = HPS::Type::UnsignedIntegerMetadata;
4136  HPS::Type ObjectType() const { return staticType; }
4137 
4138 #if !defined(_MSC_VER) || _MSC_VER >= 1900
4139  UnsignedIntegerMetadata & operator=(UnsignedIntegerMetadata const & in_that) = default;
4140 #endif
4141 
4145  UnsignedIntegerMetadata & operator=(UnsignedIntegerMetadata && in_that);
4146 
4147 
4150  unsigned int GetValue() const;
4151 
4154  void SetValue(unsigned int in_value);
4155 };
4156 
4158 class SPRK_API DoubleMetadata : public Metadata
4159 {
4160 public:
4162  DoubleMetadata();
4163 
4167  DoubleMetadata(Metadata const & in_that);
4168 
4171  DoubleMetadata(DoubleMetadata const & in_that);
4172 
4175  DoubleMetadata(DoubleMetadata && in_that);
4176 
4180  DoubleMetadata(char const * in_name, double in_value);
4181 
4182  virtual ~DoubleMetadata();
4183 
4184  static const HPS::Type staticType = HPS::Type::DoubleMetadata;
4185  HPS::Type ObjectType() const { return staticType; }
4186 
4187 #if !defined(_MSC_VER) || _MSC_VER >= 1900
4188  DoubleMetadata & operator=(DoubleMetadata const & in_that) = default;
4189 #endif
4190 
4194  DoubleMetadata & operator=(DoubleMetadata && in_that);
4195 
4196 
4199  double GetValue() const;
4200 
4203  void SetValue(double in_value);
4204 };
4205 
4207 class SPRK_API StringMetadata : public Metadata
4208 {
4209 public:
4211  StringMetadata();
4212 
4216  StringMetadata(Metadata const & in_that);
4217 
4220  StringMetadata(StringMetadata const & in_that);
4221 
4224  StringMetadata(StringMetadata && in_that);
4225 
4229  StringMetadata(char const * in_name, char const * in_value);
4230 
4231  virtual ~StringMetadata();
4232 
4233  static const HPS::Type staticType = HPS::Type::StringMetadata;
4234  HPS::Type ObjectType() const { return staticType; }
4235 
4236 #if !defined(_MSC_VER) || _MSC_VER >= 1900
4237  StringMetadata & operator=(StringMetadata const & in_that) = default;
4238 #endif
4239 
4243  StringMetadata & operator=(StringMetadata && in_that);
4244 
4245 
4248  UTF8 GetValue() const;
4249 
4252  void SetValue(char const * in_value);
4253 };
4254 
4256 class SPRK_API TimeMetadata : public Metadata
4257 {
4258 public:
4260  TimeMetadata();
4261 
4265  TimeMetadata(Metadata const & in_that);
4266 
4269  TimeMetadata(TimeMetadata const & in_that);
4270 
4273  TimeMetadata(TimeMetadata && in_that);
4274 
4278  TimeMetadata(char const * in_name, unsigned int in_value);
4279 
4280  virtual ~TimeMetadata();
4281 
4282  static const HPS::Type staticType = HPS::Type::TimeMetadata;
4283  HPS::Type ObjectType() const { return staticType; }
4284 
4285 #if !defined(_MSC_VER) || _MSC_VER >= 1900
4286  TimeMetadata & operator=(TimeMetadata const & in_that) = default;
4287 #endif
4288 
4292  TimeMetadata & operator=(TimeMetadata && in_that);
4293 
4294 
4297  unsigned int GetValue() const;
4298 
4301  HPS::UTF8 GetValueAsString() const;
4302 
4305  void SetValue(unsigned int in_value);
4306 };
4307 
4308 
4310 class SPRK_API BooleanMetadata : public Metadata
4311 {
4312 public:
4314  BooleanMetadata();
4315 
4319  BooleanMetadata(Metadata const & in_that);
4320 
4323  BooleanMetadata(BooleanMetadata const & in_that);
4324 
4327  BooleanMetadata(BooleanMetadata && in_that);
4328 
4332  BooleanMetadata(char const * in_name, bool in_value);
4333 
4334  virtual ~BooleanMetadata();
4335 
4336  static const HPS::Type staticType = HPS::Type::BooleanMetadata;
4337  HPS::Type ObjectType() const { return staticType; }
4338 
4339 #if !defined(_MSC_VER) || _MSC_VER >= 1900
4340  BooleanMetadata & operator=(BooleanMetadata const & in_that) = default;
4341 #endif
4342 
4346  BooleanMetadata & operator=(BooleanMetadata && in_that);
4347 
4348 
4351  bool GetValue() const;
4352 
4355  void SetValue(bool in_value);
4356 };
4357 
4358 
4359 
4361 class SPRK_API Factory : public Sprocket
4362 {
4363 public:
4366  static CanvasArray GetCanvases();
4367 
4370  static LayoutArray GetLayouts();
4371 
4374  static ViewArray GetViews();
4375 
4378  static ModelArray GetModels();
4379 
4382  static CADModelArray GetCADModels();
4383 
4389  static Canvas CreateCanvas(HPS::WindowHandle in_window_handle, char const * in_name = "", HPS::ApplicationWindowOptionsKit const & in_options = HPS::ApplicationWindowOptionsKit());
4390 
4391 #if TARGET_OS_ANDROID == 0 && !defined(__APPLE__)
4392 
4397  static Canvas CreateCanvas(char const * in_name = "", HPS::StandAloneWindowOptionsKit const & in_options = HPS::StandAloneWindowOptionsKit());
4398 #endif
4399 
4405  static Canvas CreateCanvas(HPS::WindowKey const & in_window_key, HPS::PortfolioKey const & in_portfolio_key = HPS::PortfolioKey(), char const * in_name = "");
4406 
4410  static Layout CreateLayout(char const * in_name = "");
4411 
4415  static View CreateView(char const * in_name = "");
4416 
4420  static Model CreateModel(char const * in_name = "");
4421 
4426  static Component CreateComponent(Component const & in_owner, char const * in_name = "");
4427 
4433  static Component DeInstanceComponent(ComponentPath const & in_component_path);
4434 
4435 private:
4436  Factory() {}
4437 };
4438 
4448 class SPRK_API AxisTriadOperator : public Operator
4449 {
4450 public:
4451  AxisTriadOperator(MouseButtons in_mouse_trigger = MouseButtons::ButtonLeft(), ModifierKeys in_modifier_trigger = ModifierKeys());
4453  virtual HPS::UTF8 GetName() const { return "HPS_AxisTriadOperator"; }
4454 
4460  virtual bool OnMouseDown(MouseState const & in_state);
4465  virtual bool OnMouseUp(MouseState const & in_state);
4470  virtual bool OnMouseMove(MouseState const & in_state);
4471 
4476  virtual bool OnTouchDown(TouchState const & in_state);
4481  virtual bool OnTouchUp(TouchState const & in_state);
4486  virtual bool OnTouchMove(TouchState const & in_state);
4487 
4488  virtual void OnViewAttached(HPS::View const & in_attached_view);
4489 
4490 private:
4491 
4492  bool AxisOrbit(HPS::WindowPoint const & in_loc);
4493  void Transition(HPS::SelectionResults selection_results);
4494  void TranslatePoint(HPS::WindowPoint * point);
4495  bool IsEventRelevant(HPS::Point const & event_location);
4496 
4497  bool operator_active;
4498  HPS::WindowPoint start_point;
4499  HPS::Vector start_sphere_point;
4500  float axis_subwindow_width;
4501  float axis_subwindow_height;
4502  HPS::TouchID tracked_touch_ID;
4503  HPS::Rectangle axis_subwindow;
4504  HPS::IntRectangle axis_subwindow_offsets;
4505  HPS::SegmentKey axis_triad_segment;
4506 
4507 };
4508 
4511 {
4512 public:
4515  virtual ~SmoothTransitionCompleteEvent();
4516 
4519  SmoothTransitionCompleteEvent(HPS::View const & in_view) : view(in_view)
4520  { channel = HPS::Object::ClassID<SmoothTransitionCompleteEvent>(); }
4521 
4524  SmoothTransitionCompleteEvent(Event const & in_event) : Event(in_event)
4525  {
4526  if (in_event.GetChannel() == Object::ClassID<SmoothTransitionCompleteEvent>())
4527  {
4528  auto that = static_cast<SmoothTransitionCompleteEvent const &>(in_event);
4529  view = that.view;
4530  }
4531  else
4532  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
4533  }
4534 
4537  Event * Clone() const
4538  {
4540  return new_event;
4541  }
4542 
4546  virtual bool Drop(Event const * in_that_event) const
4547  {
4548  HPS_UNREFERENCED(in_that_event);
4549  return false;
4550  }
4551 
4552  HPS::View view;
4553 };
4554 
4573 class SPRK_API NavigationCubeOperator : public Operator
4574 {
4575 public:
4576  NavigationCubeOperator(MouseButtons in_mouse_trigger = MouseButtons::ButtonLeft(), ModifierKeys in_modifier_trigger = ModifierKeys());
4577  ~NavigationCubeOperator() { }
4578 
4580  virtual HPS::UTF8 GetName() const { return "HPS_NavigationCubeOperator"; }
4581 
4586  virtual bool OnMouseDown(MouseState const & in_state);
4591  virtual bool OnMouseUp(MouseState const & in_state);
4596  virtual bool OnMouseMove(MouseState const & in_state);
4597 
4601  virtual bool OnTouchDown(TouchState const & in_state);
4606  virtual bool OnTouchUp(TouchState const & in_state);
4611  virtual bool OnTouchMove(TouchState const & in_state);
4612 
4613  virtual void OnViewAttached(HPS::View const & in_attached_view);
4614  virtual void OnViewDetached(HPS::View const & in_attached_view);
4615 
4616  virtual void OnModelAttached();
4617 
4622  void SetReferenceSegment(HPS::KeyPath const & in_path_to_segment);
4623 
4628  void SetReferenceSegment(HPS::KeyPathArray const & in_path_to_segments);
4629 
4633  HPS::KeyPathArray ShowReferenceSegment();
4634 
4639  void SetTransitionTime(HPS::Time const & in_time);
4640 
4643  HPS::Time GetTransitionTime() const;
4644 
4645 private:
4646  void Transition(HPS::SelectionResults const & selection_results);
4647  bool Orbit(HPS::WindowPoint const & in_loc);
4648  void TranslatePoint(HPS::WindowPoint * point);
4649  bool IsEventRelevant(HPS::Point const & event_location, HPS::KeyPath const & event_path);
4650  bool AreCamerasEqual(HPS::CameraKit const & this_camera, HPS::CameraKit const & that_camera);
4651 
4652 
4653  bool operator_active;
4654  HPS::TouchID tracked_touch_ID;
4655  HPS::WindowPoint start_point;
4656  HPS::WindowPoint down_position;
4657  HPS::Vector start_sphere_point;
4658  HPS::KeyPathArray reference_segments; //rotation and zooming happen around these segments
4659 
4660  HPS::SegmentKey nav_cube_segment;
4661  SegmentKeyArray style_segments; //in order: left / right / bottom / top / front / back
4662  UTF8Array named_styles; //in order: left / right / bottom / top / front / back
4663  HighlightOptionsKit highlight_options_kit;
4664  std::unordered_map<intptr_t, UTF8> key_to_style_map;
4665  HPS::PortfolioKey portfolio;
4666  HPS::ReferenceKeyArrayArray groups;
4667  HPS::CameraKit previous_camera;
4668  int previous_face;
4669  bool suppress_mouse_over_highlights;
4670 
4671  HPS::Rectangle nav_cube_subwindow;
4672  HPS::IntRectangle nav_cube_subwindow_offsets;
4673  float nav_cube_subwindow_width;
4674  float nav_cube_subwindow_height;
4675 
4676  int highlighted_group;
4677 
4678  bool moving;
4679  HPS::Time transition_time;
4680  HPS::SelectionOptionsKit selection_options;
4681 
4682  class SmoothTransitionCompleteEventHandler : public EventHandler
4683  {
4684  public:
4685  SmoothTransitionCompleteEventHandler(View const & in_view, bool & in_moving)
4686  : handler_view(in_view), handler_moving(&in_moving) {}
4687 
4688  ~SmoothTransitionCompleteEventHandler() { Shutdown(); }
4689 
4690  virtual HandleResult Handle(HPS::Event const * in_event);
4691 
4692  private:
4693  View handler_view;
4694  bool * handler_moving;
4695  };
4696 
4697  SmoothTransitionCompleteEventHandler * handler;
4698 };
4699 
4700 
4701 
4702 
4703 class SceneTreeItem;
4704 typedef std::shared_ptr<SceneTreeItem> SceneTreeItemPtr;
4705 class SceneTree;
4706 typedef std::shared_ptr<SceneTree> SceneTreePtr;
4707 
4710 class SPRK_API SceneTree : public Sprocket
4711 {
4712 public:
4715  enum class ItemType : uint32_t
4716  {
4717  None = 0x00000000,
4718  GenericMask = 0xffff0000,
4719 
4720  Segment = 0x00000001,
4721  Include = 0x00000002,
4722  ConditionalExpression = 0x00000003,
4723  StaticModelSegment = 0x00000004,
4724  AttributeFilter = 0x00000005,
4725 
4726  Geometry = 0x00010000,
4727  CuttingSection = 0x00010001,
4728  Shell = 0x00010002,
4729  Mesh = 0x00010003,
4730  Grid = 0x00010004,
4731  NURBSSurface = 0x00010005,
4732  Cylinder = 0x00010006,
4733  Sphere = 0x00010007,
4734  Polygon = 0x00010008,
4735  Circle = 0x00010009,
4736  CircularWedge = 0x0001000a,
4737  Ellipse = 0x0001000b,
4738  Line = 0x0001000c,
4739  NURBSCurve = 0x0001000d,
4740  CircularArc = 0x0001000e,
4741  EllipticalArc = 0x0001000f,
4742  InfiniteLine = 0x00010010,
4743  InfiniteRay = 0x00010011,
4744  Marker = 0x00010012,
4745  Text = 0x00010013,
4746  Reference = 0x00010014,
4747  DistantLight = 0x00010015,
4748  Spotlight = 0x00010016,
4749 
4750  Attribute = 0x00020000,
4751  Portfolio = 0x00020001,
4752  SegmentStyle = 0x00020002,
4753  NamedStyle = 0x00020003,
4754  MaterialPalette = 0x00020004,
4755  Priority = 0x00020005,
4756  Material = 0x00020006,
4757  Camera = 0x00020007,
4758  ModellingMatrix = 0x00020008,
4759  UserData = 0x00020009,
4760  TextureMatrix = 0x0002000a,
4761  Culling = 0x0002000b,
4762  CurveAttribute = 0x0002000c,
4763  CylinderAttribute = 0x0002000d,
4764  EdgeAttribute = 0x0002000e,
4765  LightingAttribute = 0x0002000f,
4766  LineAttribute = 0x00020010,
4767  MarkerAttribute = 0x00020011,
4768  SurfaceAttribute = 0x00020012,
4769  Selectability = 0x00020013,
4770  SphereAttribute = 0x00020014,
4771  Subwindow = 0x00020015,
4772  TextAttribute = 0x00020016,
4773  Transparency = 0x00020017,
4774  Visibility = 0x00020018,
4775  VisualEffects = 0x00020019,
4776  Performance = 0x00020020,
4777  DrawingAttribute = 0x00020021,
4778  HiddenLineAttribute = 0x00020022,
4779  ContourLine = 0x00020023,
4780  Condition = 0x00020024,
4781  Bounding = 0x00020025,
4782  AttributeLock = 0x00020026,
4783  TransformMask = 0x00020027,
4784  ColorInterpolation = 0x00020028,
4785  CuttingSectionAttribute = 0x00020029,
4786 
4787  // window only attributes
4788  Debugging = 0x00020030,
4789  PostProcessEffects = 0x00020031,
4790  SelectionOptions = 0x00020032,
4791  UpdateOptions = 0x00020033,
4792 
4793  Definition = 0x00040000,
4794  NamedStyleDefinition = 0x00040001,
4795  TextureDefinition = 0x00040002,
4796  LinePatternDefinition = 0x00040003,
4797  GlyphDefinition = 0x00040004,
4798  CubeMapDefinition = 0x00040005,
4799  ImageDefinition = 0x00040006,
4800  MaterialPaletteDefinition = 0x00040007,
4801  ShaderDefinition = 0x00040008,
4802  ShapeDefinition = 0x00040009,
4803 
4804  Group = 0x00080000,
4805  SegmentGroup = 0x00080100,
4806  GeometryGroup = 0x00080200,
4807  AttributeGroup = 0x00080300,
4808  PortfolioGroup = 0x00080400,
4809  StyleGroup = 0x00080500,
4810  IncludeGroup = 0x00080600,
4811  DefinitionGroup = 0x00180000,
4812  NamedStyleDefinitionGroup = 0x00180700,
4813  TextureDefinitionGroup = 0x00180800,
4814  LinePatternDefinitionGroup = 0x00180900,
4815  GlyphDefinitionGroup = 0x00180a00,
4816  CubeMapDefinitionGroup = 0x00180b00,
4817  ImageDefinitionGroup = 0x00180c00,
4818  MaterialPaletteDefinitionGroup = 0x00180d00,
4819  ShaderDefinitionGroup = 0x00180e00,
4820  ShapeDefinitionGroup = 0x00180f00,
4821  GeometryGroupMask = 0x00280000,
4822  CuttingSectionGroup = 0x00280001,
4823  ShellGroup = 0x00280002,
4824  MeshGroup = 0x00280003,
4825  GridGroup = 0x00280004,
4826  NURBSSurfaceGroup = 0x00280005,
4827  CylinderGroup = 0x00280006,
4828  SphereGroup = 0x00280007,
4829  PolygonGroup = 0x00280008,
4830  CircleGroup = 0x00280009,
4831  CircularWedgeGroup = 0x0028000a,
4832  EllipseGroup = 0x0028000b,
4833  LineGroup = 0x0028000c,
4834  NURBSCurveGroup = 0x0028000d,
4835  CircularArcGroup = 0x0028000e,
4836  EllipticalArcGroup = 0x0028000f,
4837  InfiniteLineGroup = 0x00280010,
4838  InfiniteRayGroup = 0x00280011,
4839  MarkerGroup = 0x00280012,
4840  TextGroup = 0x00280013,
4841  ReferenceGroup = 0x00280014,
4842  DistantLightGroup = 0x00280015,
4843  SpotlightGroup = 0x00280016,
4844  };
4845 
4847  SceneTree();
4848 
4851  SceneTree(Canvas const & in_canvas);
4852 
4855  SceneTree(SceneTree const & in_that);
4856 
4859  SceneTree(SceneTree && in_that);
4860 
4861  virtual ~SceneTree();
4862 
4863  static const HPS::Type staticType = HPS::Type::SceneTree;
4864  virtual HPS::Type ObjectType() const { return staticType; }
4865 
4869  SceneTree & operator=(SceneTree const & in_that);
4870 
4874  SceneTree & operator=(SceneTree && in_that);
4875 
4879  virtual void Assign(SceneTree const & in_that);
4880 
4884  bool Equals(SceneTree const & in_that) const;
4885 
4889  bool operator!=(SceneTree const & in_that) const;
4890 
4894  bool operator==(SceneTree const & in_that) const;
4895 
4896 
4905  void SetHighlightOptions(HighlightOptionsKit const & in_options);
4906 
4916  void SetHighlightOptions(HighlightOptionsKitArray const & in_options);
4917 
4928  void SetHighlightOptions(size_t in_count, HighlightOptionsKit const in_options []);
4929 
4937  void AddHighlightOptions(HighlightOptionsKit const & in_options);
4938 
4941  HighlightOptionsKitArray GetHighlightOptions() const;
4942 
4943 
4948  void SetGroupingLimit(size_t in_limit);
4949 
4952  size_t GetGroupingLimit() const;
4953 
4954 
4961  void SetRoot(SceneTreeItemPtr const & in_root);
4962 
4965  SceneTreeItemPtr GetRoot() const;
4966 
4967 
4970  virtual void Flush();
4971 
4976  void SetHighlightEventHandling(bool in_state);
4977 
4981  bool GetHighlightEventHandling() const;
4982 
4985  void ReExpand();
4986 };
4987 
4988 
4991 class SPRK_API SceneTreeItem : public Sprocket
4992 {
4993 public:
4995  SceneTreeItem();
4996 
4999  SceneTreeItem(SceneTreeItem const & in_that);
5000 
5003  SceneTreeItem(SceneTreeItem && in_that);
5004 
5010  SceneTreeItem(SceneTreePtr const & in_tree, Model const & in_model);
5011 
5017  SceneTreeItem(SceneTreePtr const & in_tree, View const & in_view);
5018 
5024  SceneTreeItem(SceneTreePtr const & in_tree, Layout const & in_layout);
5025 
5031  SceneTreeItem(SceneTreePtr const & in_tree, Canvas const & in_canvas);
5032 
5040  SceneTreeItem(SceneTreePtr const & in_tree, Key const & in_key, SceneTree::ItemType in_type, char const * in_title = nullptr);
5041 
5042  virtual ~SceneTreeItem();
5043 
5044  static const HPS::Type staticType = HPS::Type::SceneTreeItem;
5045  HPS::Type ObjectType() const { return staticType; }
5046 
5050  SceneTreeItem & operator=(SceneTreeItem const & in_that);
5051 
5055  SceneTreeItem & operator=(SceneTreeItem && in_that);
5056 
5060  virtual void Assign(SceneTreeItem const & in_that);
5061 
5065  bool Equals(SceneTreeItem const & in_that) const;
5066 
5070  bool operator!=(SceneTreeItem const & in_that) const;
5071 
5075  bool operator==(SceneTreeItem const & in_that) const;
5076 
5077 
5080  SceneTreePtr GetTree() const;
5081 
5084  UTF8 GetTitle() const;
5085 
5088  SceneTree::ItemType GetItemType() const;
5089 
5093  bool HasItemType(SceneTree::ItemType in_mask) const;
5094 
5097  Key GetKey() const;
5098 
5101  KeyPath GetKeyPath() const;
5102 
5105  bool HasChildren() const;
5106 
5107 
5116  virtual SceneTreeItemPtr AddChild(Key const & in_key, SceneTree::ItemType in_type, char const * in_title = nullptr) = 0;
5117 
5118 
5121  virtual void Expand();
5122 
5125  virtual void Collapse();
5126 
5127 
5132  bool IsSelected() const;
5133 
5139  virtual void Select();
5140 
5146  virtual void Unselect();
5147 
5152  bool IsHighlightable() const;
5153 
5159  bool IsHighlighted() const;
5160 
5165  void Highlight(size_t in_highlight_options_index = 0);
5166 
5172  void Highlight(HighlightOptionsKit const & in_highlight_options);
5173 
5179  void Unhighlight(size_t in_highlight_options_index = 0);
5180 
5187  void Unhighlight(HighlightOptionsKit const & in_highlight_options);
5188 
5191  bool IsExpanded() const;
5192 
5195  void ReExpand();
5196 };
5197 
5198 
5199 
5200 class ComponentTreeItem;
5201 typedef std::shared_ptr<ComponentTreeItem> ComponentTreeItemPtr;
5202 class ComponentTree;
5203 typedef std::shared_ptr<ComponentTree> ComponentTreePtr;
5204 
5207 class SPRK_API ComponentTree : public Sprocket
5208 {
5209 public:
5212  enum class ItemType
5213  {
5214  None,
5215  ExchangeComponent,
5216  ExchangeModelFile,
5217 
5218  ExchangeViewGroup,
5219  ExchangeAnnotationViewGroup,
5220  ExchangePMIGroup,
5221  ExchangeModelGroup,
5222 
5223  ParasolidComponent,
5224  ParasolidModelFile,
5225 
5226  DWGComponent,
5227  DWGModelFile,
5228  };
5229 
5231  ComponentTree();
5232 
5236  ComponentTree(Canvas const & in_canvas, size_t in_layer = 0);
5237 
5240  ComponentTree(ComponentTree const & in_that);
5241 
5244  ComponentTree(ComponentTree && in_that);
5245 
5246  virtual ~ComponentTree();
5247 
5248  static const HPS::Type staticType = HPS::Type::ComponentTree;
5249  virtual HPS::Type ObjectType() const { return staticType; }
5250 
5254  ComponentTree & operator=(ComponentTree const & in_that);
5255 
5259  ComponentTree & operator=(ComponentTree && in_that);
5260 
5264  virtual void Assign(ComponentTree const & in_that);
5265 
5269  bool Equals(ComponentTree const & in_that) const;
5270 
5274  bool operator!=(ComponentTree const & in_that) const;
5275 
5279  bool operator==(ComponentTree const & in_that) const;
5280 
5281 
5290  void SetHighlightOptions(HighlightOptionsKit const & in_options);
5291 
5301  void SetHighlightOptions(HighlightOptionsKitArray const & in_options);
5302 
5313  void SetHighlightOptions(size_t in_count, HighlightOptionsKit const in_options []);
5314 
5324  void AddHighlightOptions(HighlightOptionsKit const & in_options);
5325 
5328  HighlightOptionsKitArray GetHighlightOptions() const;
5329 
5330 
5337  void SetRoot(ComponentTreeItemPtr const & in_root);
5338 
5341  ComponentTreeItemPtr GetRoot() const;
5342 
5343 
5346  virtual void Flush();
5347 
5350  void ReExpand();
5351 
5356  void SetHighlightEventHandling(bool in_state);
5357 
5361  bool GetHighlightEventHandling() const;
5362 };
5363 
5364 
5367 class SPRK_API ComponentTreeItem : public Sprocket
5368 {
5369 public:
5372 
5375  ComponentTreeItem(ComponentTreeItem const & in_that);
5376 
5380 
5386  ComponentTreeItem(ComponentTreePtr const & in_tree, CADModel const & in_cad_model);
5387 
5394  ComponentTreeItem(ComponentTreePtr const & in_tree, Component const & in_component, ComponentTree::ItemType in_type);
5395 
5396  virtual ~ComponentTreeItem();
5397 
5398  static const HPS::Type staticType = HPS::Type::ComponentTreeItem;
5399  HPS::Type ObjectType() const { return staticType; }
5400 
5404  ComponentTreeItem & operator=(ComponentTreeItem const & in_that);
5405 
5409  ComponentTreeItem & operator=(ComponentTreeItem && in_that);
5410 
5414  virtual void Assign(ComponentTreeItem const & in_that);
5415 
5419  bool Equals(ComponentTreeItem const & in_that) const;
5420 
5424  bool operator!=(ComponentTreeItem const & in_that) const;
5425 
5429  bool operator==(ComponentTreeItem const & in_that) const;
5430 
5431 
5432 
5435  ComponentTreePtr GetTree() const;
5436 
5439  UTF8 GetTitle() const;
5440 
5443  ComponentTree::ItemType GetItemType() const;
5444 
5447  Component GetComponent() const;
5448 
5451  bool HasChildren() const;
5452 
5455  ComponentPath GetPath() const;
5456 
5457 
5465  virtual ComponentTreeItemPtr AddChild(Component const & in_component, ComponentTree::ItemType in_type) = 0;
5466 
5467 
5470  virtual void Expand();
5471 
5474  virtual void Collapse();
5475 
5476 
5484  bool IsHighlighted() const;
5485 
5490  virtual void OnHighlight(HighlightOptionsKit const & in_options);
5491 
5496  virtual void OnUnhighlight(HighlightOptionsKit const & in_options);
5497 
5498 
5503  void Highlight(size_t in_highlight_options_index = 0);
5504 
5510  void Highlight(HighlightOptionsKit const & in_highlight_options);
5511 
5516  void Unhighlight(size_t in_highlight_options_index = 0);
5517 
5523  void Unhighlight(HighlightOptionsKit const & in_highlight_options);
5524 
5525 
5541  bool IsHidden() const;
5542 
5548  virtual void OnHide();
5549 
5555  virtual void OnShow();
5556 
5569  void Hide();
5570 
5583  void Show();
5584 
5597  void Isolate();
5598 
5607  void ResetVisibility();
5608 
5611  bool IsExpanded() const;
5612 
5615  void ReExpand();
5616 };
5617 
5620 class SPRK_API AnimationControl : public SprocketControl
5621 {
5622 public:
5624  explicit AnimationControl(View const & in_view);
5625 
5627  AnimationControl(AnimationControl const & in_that);
5628 
5632  AnimationControl(AnimationControl && in_that);
5633 
5637  AnimationControl & operator=(AnimationControl && in_that);
5638 
5640  ~AnimationControl();
5641 
5642  static const HPS::Type staticType = HPS::Type::AnimationControl;
5643  HPS::Type ObjectType() const {return staticType;};
5644 
5646  AnimationControl & operator=(AnimationControl const & in_that);
5647 
5651  void SetMillisecondsPerTick(Time const & in_duration);
5652 
5655  Time GetMillisecondsPerTick() const;
5656 
5664  void Play(uint32_t in_start_tick, uint32_t in_end_tick);
5665 
5671  void Play();
5672 
5675  void Stop();
5676 
5678  void Resume();
5679 
5681  void Wait();
5682 
5685  void Undo();
5686 
5691  void SetAnimation(Animation const & in_animation);
5692 
5699  void SetAnimations(size_t in_count, Animation const * const in_animations);
5700 
5701 
5707  void SetAnimations(AnimationArray const & in_animations);
5708 
5709 
5712  bool ShowAnimations(AnimationArray & out_animations);
5713 };
5714 
5715 }
5716 
5717 
5718 #endif
5719 
5720 
5721 
Definition: sprk.h:4256
Definition: hps.h:3488
Definition: hps.h:6418
Definition: hps.h:85
Definition: sprk.h:619
Definition: sprk.h:1844
ComponentIsolatedEvent(Event const &in_event)
Definition: sprk.h:3605
Definition: sprk.h:3585
Definition: sprk.h:148
Definition: sprk.h:4448
Definition: sprk.h:280
HPS::Type ObjectType() const
Definition: sprk.h:4337
Definition: sprk.h:1103
ChannelType
Definition: sprk.h:763
ComponentHighlightEvent(Event const &in_event)
Definition: sprk.h:3666
virtual bool OnTimerTick(HPS::TimerTickEvent const &in_event)
Definition: sprk.h:2043
Definition: hps.h:43571
HPS::Type ObjectType() const
Definition: sprk.h:483
ComponentHighlightEvent()
Definition: sprk.h:3646
void SetModifierTrigger(ModifierKeys in_modifiers)
Definition: sprk.h:2071
Definition: hps.h:473
CameraChangedEvent(Event const &in_event)
Definition: sprk.h:1863
virtual bool OnKeyDown(KeyboardState const &in_state)
Definition: sprk.h:2028
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:2302
Event * Clone() const override
Definition: sprk.h:3485
HPS::Type ObjectType() const
Definition: sprk.h:693
virtual bool OnKeyUp(KeyboardState const &in_state)
Definition: sprk.h:2033
ItemType
Definition: sprk.h:5212
Definition: hps.h:6062
Event * Clone() const
Definition: sprk.h:1553
CaptureActivationEvent()
Definition: sprk.h:3845
HPS::Type ObjectType() const
Definition: sprk.h:3034
Definition: sprk.h:68
Definition: sprk.h:1044
Definition: sprk.h:1519
PathType
Definition: sprk.h:2999
Definition: sprk.h:936
virtual bool OnMouseMove(MouseState const &in_state)
Definition: sprk.h:1993
Definition: sprk.h:126
Definition: sprk.h:5367
virtual bool OnMouseEnter(MouseState const &in_state)
Definition: sprk.h:2003
Definition: sprk.h:4310
Event * Clone() const
Definition: sprk.h:4537
intptr_t GetChannel() const
Definition: hps.h:6535
Definition: hps.h:43354
Event * Clone() const override
Definition: sprk.h:3622
virtual bool Drop(Event const *in_that_event) const
Definition: sprk.h:1876
Definition: hps.h:1372
Definition: hps.h:1067
Definition: hps.h:1766
Definition: sprk.h:1072
virtual intptr_t Freshen() const
Definition: sprk.h:1886
ModelDeletedEvent()
Definition: sprk.h:1805
Event * Clone() const override
Definition: sprk.h:3685
SmoothTransitionCompleteEvent(HPS::View const &in_view)
Definition: sprk.h:4519
std::vector< KeyPath, Allocator< KeyPath > > KeyPathArray
Array of type HPS::KeyPath.
Definition: hps.h:6884
Definition: sprk.h:5207
Definition: hps.h:49119
HPS::Type ObjectType() const
Definition: sprk.h:4016
Definition: sprk.h:1904
virtual bool OnTouchUp(TouchState const &in_state)
Definition: sprk.h:2018
Definition: hps.h:7929
virtual UTF8 GetName() const
Definition: sprk.h:1978
Definition: hps.h:3639
Definition: hps.h:2142
HPS::Type ObjectType() const
Definition: sprk.h:3913
Definition: sprk.h:1756
Definition: sprk.h:403
HPS::Type ObjectType() const
Definition: sprk.h:4136
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:1607
Definition: hps.h:1455
Definition: hps.h:887
Definition: hps.h:43474
virtual void OnModelDetached()
Definition: sprk.h:2059
SmoothTransitionCompleteEvent(Event const &in_event)
Definition: sprk.h:4524
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:2062
HPS::Type ObjectType() const
Definition: sprk.h:623
virtual HPS::UTF8 GetName() const
Definition: sprk.h:4580
Event * Clone() const override
Definition: sprk.h:3529
Definition: hps.h:1893
CameraChangedEvent()
Definition: sprk.h:1848
Definition: sprk.h:39
Definition: sprk.h:3541
SprocketKit & operator=(SprocketKit &&in_that)
Definition: sprk.h:1093
virtual void OnViewAttached(HPS::View const &in_attached_view)
Definition: sprk.h:2047
HPS::Type ObjectType() const
Definition: sprk.h:4283
HPS::Type ObjectType() const
Definition: sprk.h:1955
HPS::Type ObjectType() const
Definition: sprk.h:1411
Definition: hps.h:49017
Definition: hps.h:42386
Definition: sprk.h:2298
Definition: sprk.h:549
Definition: sprk.h:1801
Definition: sprk.h:1403
ViewDetachedEvent(Event const &in_event)
Definition: sprk.h:1683
Definition: sprk.h:170
Definition: hps.h:42433
HPS::Type ObjectType() const
Definition: sprk.h:5399
LayoutDeletedEvent()
Definition: sprk.h:1611
Definition: hps.h:41818
Definition: hps.h:45140
HPS::Type ObjectType() const
Definition: sprk.h:944
Definition: hps.h:1107
Definition: sprk.h:3995
HPS::Type ObjectType() const
Definition: sprk.h:3722
LayoutDetachedEvent()
Definition: sprk.h:1566
Event * Clone() const
Definition: sprk.h:3787
MouseButtons GetMouseTrigger() const
Definition: sprk.h:2066
Definition: sprk.h:4109
virtual bool OnMouseLeave(MouseState const &in_state)
Definition: sprk.h:2008
HPS::Type ObjectType() const
Definition: sprk.h:4185
Event * Clone() const
Definition: sprk.h:1791
Definition: hps.h:10145
Definition: hps.h:43518
Definition: hps.h:1543
SmoothTransitionCompleteEvent()
Definition: sprk.h:4514
Definition: hps.h:1475
HPS::Type ObjectType() const
Definition: sprk.h:1326
virtual bool OnMouseUp(MouseState const &in_state)
Definition: sprk.h:1988
FilterActivationEvent()
Definition: sprk.h:3756
Definition: hps.h:1494
virtual void OnModelAttached()
Definition: sprk.h:2055
Definition: hps.h:39401
FilterActivationEvent(Event const &in_event)
Definition: sprk.h:3770
HPS::Type ObjectType() const
Definition: sprk.h:3822
ModelDetachedEvent(Event const &in_event)
Definition: sprk.h:1775
Definition: sprk.h:214
Definition: hps.h:4546
Definition: sprk.h:5620
Definition: hps.h:7300
Definition: sprk.h:758
HPS::Type ObjectType() const
Definition: sprk.h:1915
Location
Definition: sprk.h:2486
Definition: hps.h:48488
HPS::Type ObjectType() const
Definition: sprk.h:1112
Definition: sprk.h:4060
Definition: sprk.h:2482
Definition: hps.h:45319
HPS::Type ObjectType() const
Definition: sprk.h:2743
SprocketControl & operator=(SprocketControl &&in_that)
Definition: sprk.h:1065
Definition: hps.h:47378
Definition: hps.h:44399
Definition: hps.h:48904
Definition: sprk.h:1562
CaptureActivationEvent(Event const &in_event)
Definition: sprk.h:3859
virtual bool OnTouchDown(TouchState const &in_state)
Definition: sprk.h:2013
CanvasDeletedEvent()
Definition: sprk.h:1523
Definition: sprk.h:348
virtual bool OnMouseWheel(MouseState const &in_state)
Definition: sprk.h:1998
SprocketControl(SprocketControl &&in_that)
Definition: sprk.h:1060
Definition: hps.h:16019
HPS::Type ObjectType() const
Definition: sprk.h:5045
Event * Clone() const
Definition: sprk.h:1701
ViewDeletedEvent()
Definition: sprk.h:1717
Definition: sprk.h:1650
SprocketKit(SprocketKit &&in_that)
Definition: sprk.h:1088
Definition: sprk.h:2622
Definition: hps.h:45606
Definition: hps.h:47995
virtual bool OnTextInput(HPS::UTF8 const &in_text)
Definition: sprk.h:2038
The ComponentPath contains only components which are unique to this request, omitting ambiguous entri...
HPS::Type ObjectType() const
Definition: sprk.h:2331
HPS::Type ObjectType() const
Definition: sprk.h:2515
ViewDeletedEvent(Event const &in_event)
Definition: sprk.h:1732
Definition: hps.h:38904
ModifierKeys GetModifierTrigger() const
Definition: sprk.h:2074
Definition: sprk.h:4207
Event * Clone() const
Definition: sprk.h:1893
ViewDetachedEvent()
Definition: sprk.h:1661
Definition: hps.h:6502
Definition: hps.h:14267
HPS::Type ObjectType() const
Definition: sprk.h:1048
std::vector< UTF8, Allocator< UTF8 > > UTF8Array
Array of type HPS::UTF8.
Definition: hps.h:6852
Definition: sprk.h:192
Definition: sprk.h:2149
HPS::Type ObjectType() const
Definition: sprk.h:4087
Event * Clone() const
Definition: sprk.h:1597
Definition: hps.h:409
Definition: sprk.h:1318
CanvasDeletedEvent(Event const &in_event)
Definition: sprk.h:1538
HPS::Type ObjectType() const
Definition: sprk.h:1076
Definition: sprk.h:4573
Definition: sprk.h:2994
std::shared_ptr< Operator > OperatorPtr
Shared pointer to an Operator object.
Definition: sprk.h:308
ComponentType
Definition: sprk.h:2628
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:1835
Definition: sprk.h:3635
LayoutDetachedEvent(Event const &in_event)
Definition: sprk.h:1581
virtual bool OnMouseDown(MouseState const &in_state)
Definition: sprk.h:1983
ItemType
Definition: sprk.h:4715
HPS::Type ObjectType() const
Definition: sprk.h:2172
Definition: sprk.h:3700
Definition: sprk.h:4361
Event * Clone() const
Definition: sprk.h:1747
HPS::Type ObjectType() const
Definition: sprk.h:4234
DeleteMode
Definition: sprk.h:2720
Definition: sprk.h:1021
virtual void OnViewDetached(HPS::View const &in_detached_view)
Definition: sprk.h:2051
Definition: sprk.h:4510
Definition: hps.h:428
Definition: sprk.h:3800
Definition: hps.h:2181
HPS::Type ObjectType() const
Definition: sprk.h:407
ModelDetachedEvent()
Definition: sprk.h:1760
static MouseButtons ButtonLeft()
Definition: hps.h:48606
Definition: sprk.h:4710
HPS::Type ObjectType() const
Definition: sprk.h:776
Definition: sprk.h:3453
Definition: sprk.h:4158
Definition: sprk.h:80
UpdateType
Definition: hps.h:177
Definition: hps.h:9331
Event * Clone() const
Definition: sprk.h:1641
Definition: sprk.h:104
virtual bool IsMouseTriggered(MouseState const &in_state)
Definition: sprk.h:2077
Definition: hps.h:7847
Definition: sprk.h:3745
Definition: hps.h:38504
Definition: hps.h:354
Event * Clone() const
Definition: sprk.h:3875
ModelDeletedEvent(Event const &in_event)
Definition: sprk.h:1820
InterpolationType
Definition: sprk.h:353
ComponentIsolatedEvent()
Definition: sprk.h:3590
HPS::Type ObjectType() const
Definition: sprk.h:5643
LayoutDeletedEvent(Event const &in_event)
Definition: sprk.h:1626
Definition: hps.h:9560
Definition: hps.h:11250
HPS::Type ObjectType() const
Definition: sprk.h:362
Definition: sprk.h:2092
virtual bool OnTouchMove(TouchState const &in_state)
Definition: sprk.h:2023
virtual HPS::Type ObjectType() const
Definition: sprk.h:4864
virtual bool Drop(Event const *in_that_event) const
Definition: sprk.h:4546
Definition: sprk.h:4991
Definition: sprk.h:258
Definition: sprk.h:3887
Definition: sprk.h:3497
Definition: hps.h:44050
HPS::Type ObjectType() const
Definition: sprk.h:836
Mode
Definition: sprk.h:1026
Definition: hps.h:514
Definition: sprk.h:1946
Definition: sprk.h:832
Definition: sprk.h:479
Definition: hps.h:1173
Definition: hps.h:43400
Definition: sprk.h:1713
Definition: sprk.h:3841
virtual HPS::Type ObjectType() const
Definition: sprk.h:5249
Definition: hps.h:41882
virtual HPS::UTF8 GetName() const
Definition: sprk.h:4453
Event * Clone() const override
Definition: sprk.h:3573
Definition: hps.h:7558