API Search || Global Search
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 NavigationCubeControl;
55 class AxisTriadControl;
56 class Component;
57 class ComponentPath;
58 class ComponentHighlightEvent;
59 class Filter;
60 class Capture;
61 class CADModel;
62 class Metadata;
63 
64 
65 
66 
67 class SPRK_API Sprocket : public HPS::Object
68 {
69 public:
70  Sprocket() {}
71 #if !defined(_MSC_VER) || _MSC_VER >= 1900
72  Sprocket(HPS::Sprocket const & in_that) = default;
73 #endif
74  Sprocket(Sprocket && in_that) : HPS::Object(std::move(in_that)) {}
75 
76  virtual ~Sprocket() {}
77 };
84 typedef std::shared_ptr<Operator> OperatorPtr;
85 
86 typedef std::vector<OperatorPtr, Allocator<OperatorPtr> > OperatorPtrArray;
87 
88 typedef std::vector<Canvas, Allocator<Canvas> > CanvasArray;
89 typedef std::vector<Layout, Allocator<Layout> > LayoutArray;
90 typedef std::vector<View, Allocator<View> > ViewArray;
91 typedef std::vector<Model, Allocator<Model> > ModelArray;
92 
93 typedef std::vector<Component, Allocator<Component> > ComponentArray;
94 typedef std::vector<Metadata, Allocator<Metadata> > MetadataArray;
95 typedef std::vector<Filter, Allocator<Filter> > FilterArray;
96 typedef std::vector<Capture, Allocator<Capture> > CaptureArray;
97 typedef std::vector<CADModel, Allocator<CADModel> > CADModelArray;
98 typedef std::vector<ReferenceKeyArray, Allocator<ReferenceKeyArray>> ReferenceKeyArrayArray;
99 typedef std::vector<ComponentPath, Allocator<ComponentPath>> ComponentPathArray;
100 typedef std::vector<HighlightOptionsKit, Allocator<HighlightOptionsKit>> HighlightOptionsKitArray;
106 class SPRK_API Canvas : public Sprocket
107 {
108 public:
109  Canvas();
110  Canvas(Canvas const & that);
111  ~Canvas();
112 
113  static const HPS::Type staticType = HPS::Type::Canvas;
114  HPS::Type ObjectType() const { return staticType; }
115 
117  void Delete();
118 
119  Canvas & operator=(Canvas const & in_that);
120  void Assign(Canvas const & in_that);
121 
122  bool Equals(Canvas const & in_that) const;
123  bool operator!= (Canvas const & in_that) const;
124  bool operator== (Canvas const & in_that) const;
125 
127  UTF8 GetName() const;
128 
132  void AttachLayout(Layout const & in_layout);
133 
137  void AttachViewAsLayout(View const & in_view);
138 
140  void DetachLayout();
141 
143  Layout GetAttachedLayout() const;
144 
146  IncludeKey GetAttachedLayoutIncludeLink() const;
147 
149  View GetFrontView() const;
150 
151  WindowKey const GetWindowKey() const;
152 
155  WindowKey GetWindowKey();
156 
157  PortfolioKey const GetPortfolioKey() const;
158 
160  PortfolioKey GetPortfolioKey();
161 
163  void Update() const;
164 
167  UpdateNotifier UpdateWithNotifier() const;
168 
172  void Update(HPS::Window::UpdateType in_type, HPS::Time in_time_limit = -1.0) const;
173 
178  UpdateNotifier UpdateWithNotifier(HPS::Window::UpdateType in_type, HPS::Time in_time_limit = -1.0) const;
179 
183  void SetFrameRate(float in_frame_rate=20);
184 
188  float GetFrameRate() const;
189 };
190 
191 class SPRK_API Rendering
192 {
193 public:
196  enum class Mode
197  {
198  Gouraud,
199  GouraudWithLines,
200  Flat,
201  FlatWithLines,
202  Phong,
203  PhongWithLines,
204  HiddenLine,
205  FastHiddenLine,
206  Wireframe,
207  Default = Phong
208  };
209 
210 private:
211  Rendering() {}
212 };
213 
214 class SPRK_API SprocketControl : public Sprocket
215 {
216 public:
217  static const HPS::Type staticType = HPS::Type::SprocketControl;
218  HPS::Type ObjectType() const {return staticType;}
219 
220 #if !defined(_MSC_VER) || _MSC_VER >= 1900
221  SprocketControl(HPS::SprocketControl const & in_that) = default;
222 #endif
223 
224 protected:
225  SprocketControl() {}
226 
230  SprocketControl(SprocketControl && in_that) : Sprocket(std::move(in_that)) {}
231 
236  {
237  this->Object::operator=(std::move(in_that));
238  return *this;
239  }
240 };
241 
242 class SPRK_API SprocketKit : public Sprocket
243 {
244 public:
245  static const HPS::Type staticType = HPS::Type::SprocketKit;
246  HPS::Type ObjectType() const { return staticType; }
247 
248 #if !defined(_MSC_VER) || _MSC_VER >= 1900
249  SprocketKit(HPS::SprocketKit const & in_that) = default;
250 #endif
251 
252 protected:
253  SprocketKit() {}
254 
258  SprocketKit(SprocketKit && in_that) : Sprocket(std::move(in_that)) {}
259 
264  {
265  this->Object::operator=(std::move(in_that));
266  return *this;
267  }
268 };
269 
273 class SPRK_API View : public Sprocket
274 {
275 public:
276  View();
277  View(View const & that);
278  explicit View(SprocketControl const & in_ctrl);
279  ~View();
280 
281  static const HPS::Type staticType = HPS::Type::View;
282  HPS::Type ObjectType() const { return staticType; }
283 
285  void Delete();
286 
287  View & operator=(View const & in_that);
288  void Assign(View const & in_that);
289 
290  bool Equals(View const & in_that) const;
291  bool operator!= (View const & in_that) const;
292  bool operator== (View const & in_that) const;
293 
295  UTF8 GetName() const;
296 
297 
300  HPS::View & ComputeFitWorldCamera(HPS::CameraKit & out_camera);
301 
305  HPS::View & ComputeFitWorldCamera(SegmentKey const & in_segment, HPS::CameraKit & out_camera);
306 
307 
311  HPS::View & ComputeFitWorldCamera(BoundingKit const & in_bounding, HPS::CameraKit & out_camera);
312 
318  HPS::View & ComputeFitWorldCamera(SegmentKey const & in_segment, MatrixKit const & in_transform, HPS::CameraKit & out_camera);
319 
320 
326  HPS::View & ComputeFitWorldCamera(BoundingKit const & in_bounding, MatrixKit const & in_transform, HPS::CameraKit & out_camera);
327 
328 
330  HPS::View & FitWorld();
331 
337  HPS::View & FitWorld(SegmentKey const & in_segment);
338 
339 
342  HPS::View & FitWorld(BoundingKit const & in_bounding);
343 
349  HPS::View & FitWorld(SegmentKey const & in_segment, MatrixKit const & in_transform);
350 
351 
356  HPS::View & FitWorld(BoundingKit const & in_bounding, MatrixKit const & in_transform);
357 
362  void AttachModel(Model const & in_model);
363 
365  void DetachModel();
366 
368  Model GetAttachedModel() const;
369 
371  IncludeKey GetAttachedModelIncludeLink() const;
372 
376  void SetRenderingMode(Rendering::Mode in_mode);
377 
380  Rendering::Mode GetRenderingMode() const;
381 
383  OperatorPtrArray GetOperators() const;
384 
387  void SetOperators(OperatorPtrArray & in_operators);
388 
392  void SetOperators(size_t in_count, OperatorPtr in_operators []);
393 
396  void SetOperator(OperatorPtr const & in_operator);
397 
401  void SetOperator(Operator * in_operator);
402 
404  OperatorControl GetOperatorControl();
405  OperatorControl const GetOperatorControl() const;
406 
408  NavigationCubeControl GetNavigationCubeControl();
409  NavigationCubeControl const GetNavigationCubeControl() const;
410 
412  AxisTriadControl GetAxisTriadControl();
413  AxisTriadControl const GetAxisTriadControl() const;
414 
417  SegmentKey GetSegmentKey();
418  SegmentKey const GetSegmentKey() const;
419 
422  SegmentKey GetModelOverrideSegmentKey();
423  SegmentKey const GetModelOverrideSegmentKey() const;
424 
425 
426  PortfolioKey const GetPortfolioKey() const;
427 
429  PortfolioKey GetPortfolioKey();
430 
435  void SetSimpleShadow(bool in_state, float in_percent_offset = 5.0f);
436 
438  bool GetSimpleShadow();
439 
444  void SetSimpleReflection(bool in_state, float in_percent_offset = 5.0f);
445 
447  bool GetSimpleReflection();
448 
450  void Update() const;
451 
454  UpdateNotifier UpdateWithNotifier() const;
455 
459  void Update(HPS::Window::UpdateType in_type, HPS::Time in_time_limit = -1.0) const;
460 
466  UpdateNotifier UpdateWithNotifier(HPS::Window::UpdateType in_type, HPS::Time in_time_limit = -1.0) const;
467 
471  void SmoothTransition(HPS::CameraKit const & in_camera_kit, HPS::Time in_duration = 0.5);
472 
473  static UTF8 GetHideStyleName();
474  static UTF8 GetShowStyleName();
475 
477  KeyArray const GetNavigationKeys();
478 
480  LayoutArray GetOwningLayouts();
481  LayoutArray const GetOwningLayouts() const;
482 };
483 
487 class SPRK_API Model : public Sprocket
488 {
489 public:
490  Model();
491  Model(Model const & that);
492  ~Model();
493 
494  static const HPS::Type staticType = HPS::Type::Model;
495  HPS::Type ObjectType() const { return staticType; }
496 
498  void Delete();
499 
500  Model & operator=(Model const & in_that);
501  void Assign(Model const & in_that);
502 
503  bool Equals(Model const & in_that) const;
504  bool operator!= (Model const & in_that) const;
505  bool operator== (Model const & in_that) const;
506 
508  UTF8 GetName() const;
509 
512  SegmentKey GetSegmentKey();
513  SegmentKey const GetSegmentKey() const;
514 
516  SegmentKey GetLibraryKey();
517  SegmentKey const GetLibraryKey() const;
518 
520  PortfolioKey GetPortfolioKey();
521  PortfolioKey const GetPortfolioKey() const;
522 
524  HPS::Vector GetUpVector();
525  HPS::Vector const GetUpVector() const;
526 
528  HPS::Vector GetFrontVector();
529  HPS::Vector const GetFrontVector() const;
530 
532  HPS::ViewArray GetOwningViews();
533  HPS::ViewArray const GetOwningViews() const;
534 
538  void SetOrientation(HPS::Vector & in_up_vector, HPS::Vector & in_front_vector);
539 
541  bool ShowOrientation(HPS::Vector & out_up_vector, HPS::Vector & out_front_vector) const;
542 
544  void Update() const;
545 
548  UpdateNotifier UpdateWithNotifier() const;
549 
553  void Update(HPS::Window::UpdateType in_type, HPS::Time in_time_limit = -1.0) const;
554 
560  UpdateNotifier UpdateWithNotifier(HPS::Window::UpdateType in_type, HPS::Time in_time_limit = -1.0) const;
561 
562 };
563 
567 class SPRK_API Layout : public Sprocket
568 {
569 public:
570  Layout();
571  Layout(Layout const & that);
572  ~Layout();
573 
574  static const HPS::Type staticType = HPS::Type::Layout;
575  HPS::Type ObjectType() const { return staticType; }
576 
578  void Delete();
579 
580  Layout & operator=(Layout const & in_that);
581  void Assign(Layout const & in_that);
582 
583  bool Equals(Layout const & in_that) const;
584  bool operator!= (Layout const & in_that) const;
585  bool operator== (Layout const & in_that) const;
586 
588  UTF8 GetName() const;
589 
591  size_t GetLayerCount() const;
592 
596  void AttachViewFront(View const & in_view, HPS::Rectangle const & in_position = HPS::Rectangle(-1.0f, 1.0f, -1.0f, 1.0f));
600  void AttachViewBack(View const & in_view, HPS::Rectangle const & in_position = HPS::Rectangle(-1.0f, 1.0f, -1.0f, 1.0f));
601 
604  void DetachLayer(size_t in_layer);
605 
608  void DetachView(View const & in_view); // everywhere it occurs
609 
612  void BringToFront(size_t in_layer);
613 
617  void ReassignLayer(size_t in_layer, HPS::View in_view);
618 
622  void RepositionLayer(size_t in_layer, HPS::Rectangle const & in_position);
623 
625  View GetFrontView() const;
626 
630  View GetAttachedView(size_t in_layer = 0) const;
631 
635  Rectangle GetPosition(size_t in_layer) const;
636 
638  IncludeKey GetAttachedViewIncludeLink(size_t in_layer) const;
639 
641  SegmentKey GetLayerSegmentKey(size_t in_layer) const;
642 
646  size_t GetLayerAt(HPS::WindowPoint const & in_point) const;
647 
651  bool ShowLayerAt(HPS::WindowPoint const & in_point) const;
652 
655  SegmentKey GetSegmentKey();
656  SegmentKey const GetSegmentKey() const;
657 
659  CanvasArray GetOwningCanvases();
660  CanvasArray const GetOwningCanvases() const;
661 
663  void Update() const;
664 
667  UpdateNotifier UpdateWithNotifier() const;
668 
672  void Update(HPS::Window::UpdateType in_type, HPS::Time in_time_limit = -1.0) const;
673 
679  UpdateNotifier UpdateWithNotifier(HPS::Window::UpdateType in_type, HPS::Time in_time_limit = -1.0) const;
680 
681 };
682 
683 class SPRK_API CanvasDeletedEvent : public Event
684 {
685 public:
688  {
689  channel = GetClassID();
690  consumable = false;
691  }
692 
693  CanvasDeletedEvent(Canvas const & in_canvas)
694  : Event(), canvas(in_canvas)
695  {
696  channel = GetClassID();
697  consumable = false;
698  }
699 
702  CanvasDeletedEvent(Event const & in_event) : Event(in_event)
703  {
704  if (in_event.GetChannel() == Object::ClassID<CanvasDeletedEvent>())
705  {
706  auto that = static_cast<CanvasDeletedEvent const &>(in_event);
707  canvas = that.canvas;
708  }
709  else
710  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
711  }
712 
714 
717  Event * Clone() const
718  {
719  CanvasDeletedEvent * new_event = new CanvasDeletedEvent(*this);
720  return new_event;
721  }
722 
723  Canvas canvas;
724 };
725 
726 class SPRK_API LayoutDetachedEvent : public Event
727 {
728 public:
731  {
732  channel = GetClassID();
733  consumable = false;
734  }
735 
736  LayoutDetachedEvent(Canvas const & in_canvas, Layout const & in_layout)
737  : Event(), canvas(in_canvas), layout(in_layout)
738  {
739  channel = GetClassID();
740  consumable = false;
741  }
742 
745  LayoutDetachedEvent(Event const & in_event) : Event(in_event)
746  {
747  if (in_event.GetChannel() == Object::ClassID<LayoutDetachedEvent>())
748  {
749  auto that = static_cast<LayoutDetachedEvent const &>(in_event);
750  canvas = that.canvas;
751  layout = that.layout;
752  }
753  else
754  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
755  }
756 
758 
761  Event * Clone() const
762  {
763  LayoutDetachedEvent * new_event = new LayoutDetachedEvent(*this);
764  return new_event;
765  }
766 
767  Canvas canvas;
768  Layout layout;
769 };
770 
771 class SPRK_API LayoutDeletedEvent : public Event
772 {
773 public:
776  {
777  channel = GetClassID();
778  consumable = false;
779  }
780 
781  LayoutDeletedEvent(Layout const & in_layout)
782  : Event(), layout(in_layout)
783  {
784  channel = GetClassID();
785  consumable = false;
786  }
787 
790  LayoutDeletedEvent(Event const & in_event) : Event(in_event)
791  {
792  if (in_event.GetChannel() == Object::ClassID<LayoutDeletedEvent>())
793  {
794  auto that = static_cast<LayoutDeletedEvent const &>(in_event);
795  layout = that.layout;
796  }
797  else
798  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
799  }
800 
802 
805  Event * Clone() const
806  {
807  LayoutDeletedEvent * new_event = new LayoutDeletedEvent(*this);
808  return new_event;
809  }
810 
811  Layout layout;
812 };
813 
814 class SPRK_API ViewDetachedEvent : public Event
815 {
816 public:
817  enum class Action
818  {
819  None = 0,
820  SpecificLayer,
821  AllLayers,
822  };
823 
825  ViewDetachedEvent() : Event(), action(Action::None), layer(0)
826  {
827  channel = GetClassID();
828  consumable = false;
829  }
830 
831  ViewDetachedEvent(Layout const & in_layout, size_t in_layer, View const & in_view)
832  : Event(), layout(in_layout), action(Action::SpecificLayer), layer(in_layer), view(in_view)
833  {
834  channel = GetClassID();
835  consumable = false;
836  }
837 
838  ViewDetachedEvent(Layout const & in_layout, View const & in_view)
839  : Event(), layout(in_layout), action(Action::AllLayers), layer(std::numeric_limits<size_t>::max()), view(in_view)
840  {
841  channel = GetClassID();
842  consumable = false;
843  }
844 
847  ViewDetachedEvent(Event const & in_event) : Event(in_event)
848  {
849  if (in_event.GetChannel() == Object::ClassID<ViewDetachedEvent>())
850  {
851  auto that = static_cast<ViewDetachedEvent const &>(in_event);
852  layout = that.layout;
853  action = that.action;
854  layer = that.layer;
855  view = that.view;
856  }
857  else
858  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
859  }
860 
862 
865  Event * Clone() const
866  {
867  ViewDetachedEvent * new_event = new ViewDetachedEvent(*this);
868  return new_event;
869  }
870 
871  Layout layout;
872  Action action;
873  size_t layer;
874  View view;
875 };
876 
877 class SPRK_API ViewDeletedEvent : public Event
878 {
879 public:
882  {
883  channel = GetClassID();
884  consumable = false;
885  }
886 
887  ViewDeletedEvent(View const & in_view)
888  : Event(), view(in_view)
889  {
890  channel = GetClassID();
891  consumable = false;
892  }
893 
896  ViewDeletedEvent(Event const & in_event) : Event(in_event)
897  {
898  if (in_event.GetChannel() == Object::ClassID<ViewDeletedEvent>())
899  {
900  auto that = static_cast<ViewDeletedEvent const &>(in_event);
901  view = that.view;
902  }
903  else
904  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
905  }
906 
907  ~ViewDeletedEvent();
908 
911  Event * Clone() const
912  {
913  ViewDeletedEvent * new_event = new ViewDeletedEvent(*this);
914  return new_event;
915  }
916 
917  View view;
918 };
919 
920 class SPRK_API ModelDetachedEvent : public Event
921 {
922 public:
925  {
926  channel = GetClassID();
927  consumable = false;
928  }
929 
930  ModelDetachedEvent(View const & in_view, Model const & in_model)
931  : Event(), view(in_view), model(in_model)
932  {
933  channel = GetClassID();
934  consumable = false;
935  }
936 
939  ModelDetachedEvent(Event const & in_event) : Event(in_event)
940  {
941  if (in_event.GetChannel() == Object::ClassID<ModelDetachedEvent>())
942  {
943  auto that = static_cast<ModelDetachedEvent const &>(in_event);
944  view = that.view;
945  model = that.model;
946  }
947  else
948  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
949  }
950 
952 
955  Event * Clone() const
956  {
957  ModelDetachedEvent * new_event = new ModelDetachedEvent(*this);
958  return new_event;
959  }
960 
961  View view;
962  Model model;
963 };
964 
965 class SPRK_API ModelDeletedEvent : public Event
966 {
967 public:
970  {
971  channel = GetClassID();
972  consumable = false;
973  }
974 
975  ModelDeletedEvent(Model const & in_model)
976  : Event(), model(in_model)
977  {
978  channel = GetClassID();
979  consumable = false;
980  }
981 
984  ModelDeletedEvent(Event const & in_event) : Event(in_event)
985  {
986  if (in_event.GetChannel() == Object::ClassID<ModelDeletedEvent>())
987  {
988  auto that = static_cast<ModelDeletedEvent const &>(in_event);
989  model = that.model;
990  }
991  else
992  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
993  }
994 
996 
999  Event * Clone() const
1000  {
1001  ModelDeletedEvent * new_event = new ModelDeletedEvent(*this);
1002  return new_event;
1003  }
1004 
1005  Model model;
1006 };
1007 
1008 class SPRK_API CameraChangedEvent : public Event
1009 {
1010 public:
1013  {
1014  channel = GetClassID();
1015  consumable = false;
1016  }
1017 
1018  CameraChangedEvent(View const & in_view)
1019  : Event(), view(in_view)
1020  {
1021  channel = GetClassID();
1022  consumable = false;
1023  }
1024 
1027  CameraChangedEvent(Event const & in_event) : Event(in_event)
1028  {
1029  if (in_event.GetChannel() == Object::ClassID<CameraChangedEvent>())
1030  {
1031  auto that = static_cast<CameraChangedEvent const &>(in_event);
1032  view = that.view;
1033  }
1034  else
1035  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
1036  }
1037 
1038  ~CameraChangedEvent();
1039 
1040  virtual bool Drop(Event const * in_that_event) const
1041  {
1042  CameraChangedEvent const * that_event = static_cast<CameraChangedEvent const *>(in_that_event);
1043 
1044  if (view == that_event->view)
1045  return true;
1046 
1047  return false;
1048  }
1049 
1050  virtual intptr_t Freshen() const
1051  {
1052  return GetClassID();
1053  }
1054 
1057  Event * Clone() const
1058  {
1059  CameraChangedEvent * new_event = new CameraChangedEvent(*this);
1060  return new_event;
1061  }
1062 
1063  View view;
1064 };
1065 
1068 class SPRK_API SprocketPath : public Sprocket
1069 {
1070 public:
1071  SprocketPath();
1072  SprocketPath(Model const & in_model, View const & in_view, Layout const & in_layout, Canvas const & in_canvas);
1073  SprocketPath(Canvas const & in_canvas, Layout const & in_layout, View const & in_view, Model const & in_model);
1074  SprocketPath(Canvas const & in_canvas, size_t in_layer = 0);
1075  SprocketPath(SprocketPath const & that);
1076  ~SprocketPath();
1077 
1078  static const HPS::Type staticType = HPS::Type::SprocketPath;
1079  HPS::Type ObjectType() const { return staticType; }
1080 
1081  SprocketPath & operator=(SprocketPath const & in_that);
1082  void Set(SprocketPath const & in_that);
1083 
1084  bool Equals(SprocketPath const & in_that) const;
1085  bool operator!= (SprocketPath const & in_that) const;
1086  bool operator== (SprocketPath const & in_that) const;
1087 
1089  Canvas GetCanvas() const;
1090 
1092  Layout GetLayout() const;
1093 
1095  View GetView() const;
1096 
1098  Model GetModel() const;
1099 
1104  KeyPath GetKeyPath() const;
1105 };
1106 
1107 
1110 class SPRK_API Operator : public Sprocket
1111 {
1112 public:
1113  Operator(MouseButtons in_mouse_trigger = MouseButtons::ButtonLeft(), ModifierKeys in_modifier_trigger = ModifierKeys());
1114  Operator(Operator const & in_that);
1115 
1116  virtual ~Operator();
1117 
1118  static const HPS::Type staticType = HPS::Type::Operator;
1119  HPS::Type ObjectType() const { return staticType; }
1120 
1121  virtual Operator & operator= (Operator const & in_that);
1122 
1124  virtual void Assign(Operator const & in_that);
1125 
1127  virtual bool Equals(Operator const & in_that) const;
1128 
1130  virtual bool operator!= (Operator const & in_that) const;
1131 
1133  virtual bool operator== (Operator const & in_that) const;
1134 
1136  void DetachView();
1137 
1139  View GetAttachedView() const;
1140 
1142  virtual UTF8 GetName() const { return "Operator"; }
1143 
1147  virtual bool OnMouseDown(MouseState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
1148 
1152  virtual bool OnMouseUp(MouseState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
1153 
1157  virtual bool OnMouseMove(MouseState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
1158 
1162  virtual bool OnMouseWheel(MouseState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
1163 
1167  virtual bool OnMouseEnter(MouseState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
1168 
1172  virtual bool OnMouseLeave(MouseState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
1173 
1177  virtual bool OnTouchDown(TouchState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
1178 
1182  virtual bool OnTouchUp(TouchState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
1183 
1187  virtual bool OnTouchMove(TouchState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
1188 
1192  virtual bool OnKeyDown(KeyboardState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
1193 
1197  virtual bool OnKeyUp(KeyboardState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
1198 
1202  virtual bool OnTextInput(HPS::UTF8 const & in_text) { HPS_UNREFERENCED(in_text); return false; }
1203 
1207  virtual bool OnTimerTick(HPS::TimerTickEvent const & in_event) { HPS_UNREFERENCED(in_event); return false; }
1208 
1211  virtual void OnViewAttached(HPS::View const & in_attached_view) { HPS_UNREFERENCED(in_attached_view); return; }
1212 
1215  virtual void OnViewDetached(HPS::View const & in_detached_view) { HPS_UNREFERENCED(in_detached_view); return; }
1216 
1219  virtual void OnModelAttached() { return; }
1220 
1223  virtual void OnModelDetached() { return; }
1224 
1226  void SetMouseTrigger(MouseButtons in_buttons) { mouse_trigger = in_buttons; }
1227 
1230  MouseButtons GetMouseTrigger() const { return mouse_trigger; }
1231 
1235  void SetModifierTrigger(ModifierKeys in_modifiers) { modifier_trigger = in_modifiers; }
1236 
1238  ModifierKeys GetModifierTrigger() const { return modifier_trigger; }
1239 
1241  virtual bool IsMouseTriggered(MouseState const & in_state) { return in_state.HasAll(mouse_trigger, modifier_trigger); }
1242 
1243  enum class Priority
1244  {
1245  Low,
1246  Default,
1247  High
1248  };
1249 
1250 protected:
1251 
1252  HPS::MouseButtons mouse_trigger;
1253  HPS::ModifierKeys modifier_trigger;
1254 };
1255 
1256 class SPRK_API OperatorUtility
1257 {
1258  static double internal_acos(double x)
1259  {
1260  return (((x)<-1) ? (HPS::PI) : (((x)>1) ? (0) : (acos(x))));
1261  }
1262 
1263 public:
1264 
1265  enum ProjectedPlane
1266  {
1267  Plane_XY,
1268  Plane_YZ,
1269  Plane_XZ
1270  };
1271 
1272  static void ScreenToSphereMousePoint(HPS::Point const &in_pt, HPS::Vector &out_vec)
1273  {
1274  out_vec = HPS::Vector(in_pt);
1275  float len = static_cast<float>(out_vec.Length());
1276  if (len > 1.0f)
1277  {
1278  out_vec /= len;
1279  out_vec.z = 0;
1280  }
1281  else
1282  out_vec.z = (float)sqrt(1.0f - (len*len));
1283  }
1284 
1285  static float CalculateAngleOrbitOnPlane(HPS::Vector const &axis, ProjectedPlane plane)
1286  {
1287  float theta;
1288 
1289  HPS::Vector vtmp;
1290  if (plane == Plane_XY)
1291  vtmp = HPS::Vector(axis.x, axis.y, 0);
1292  else if (plane == Plane_YZ)
1293  vtmp = HPS::Vector(0, axis.y, axis.z);
1294  else
1295  vtmp = HPS::Vector(axis.x, 0, axis.z);
1296  Vector naxis = axis;
1297 
1298  naxis.Normalize();
1299  vtmp.Normalize();
1300 
1301  float tmp = naxis.Dot(vtmp);
1302  if (static_cast<float>(Abs(tmp)) > 1.001f || static_cast<float>(Abs(tmp)) < 0.999f)
1303  theta = static_cast<float>(internal_acos(tmp));
1304  else
1305  theta = 0.0f;
1306 
1307  return theta;
1308  }
1309 };
1310 
1313 class SPRK_API OperatorControl : public SprocketControl
1314 {
1315 public:
1317  explicit OperatorControl(View const & in_view);
1318 
1320  OperatorControl(OperatorControl const & in_that);
1321 
1325  OperatorControl(OperatorControl && in_that);
1326 
1330  OperatorControl & operator=(OperatorControl && in_that);
1331 
1333  ~OperatorControl();
1334 
1335  static const HPS::Type staticType = HPS::Type::OperatorControl;
1336  HPS::Type ObjectType() const {return staticType;};
1337 
1339  OperatorControl & operator=(OperatorControl const & in_that);
1340 
1341 
1343  size_t GetCount();
1344 
1347  size_t GetCount(Operator::Priority in_priority);
1348 
1349 
1355  OperatorControl & Push(OperatorPtr const & in_operator, Operator::Priority in_priority = Operator::Priority::Default);
1356 
1363  OperatorControl & Push(Operator * in_operator, Operator::Priority in_priority = Operator::Priority::Default);
1364 
1368  bool Pop(Operator::Priority in_priority = Operator::Priority::Default);
1369 
1374  bool Pop(OperatorPtr & out_operator);
1375 
1381  bool Pop(Operator::Priority in_priority, OperatorPtr & out_operator);
1382 
1383 
1389  OperatorControl & Set(OperatorPtr const & in_operator, Operator::Priority in_priority = Operator::Priority::Default);
1390 
1397  OperatorControl & Set(Operator * in_operator, Operator::Priority in_priority = Operator::Priority::Default);
1398 
1404  OperatorControl & Set(OperatorPtrArray & in_operators, Operator::Priority in_priority = Operator::Priority::Default);
1405 
1412  OperatorControl & Set(size_t in_count, OperatorPtr in_operators [], Operator::Priority in_priority = Operator::Priority::Default);
1413 
1414 
1418  OperatorControl & UnsetTop(Operator::Priority in_priority = Operator::Priority::Default);
1419 
1423  OperatorControl & UnsetEverything(Operator::Priority in_priority);
1424 
1427  OperatorControl & UnsetEverything();
1428 
1429 
1433  bool ShowTop(OperatorPtr & out_operator) const;
1434 
1439  bool ShowTop(Operator::Priority in_priority, OperatorPtr & out_operator) const;
1440 
1444  bool Show(OperatorPtrArray & out_operators) const;
1445 
1450  bool Show(Operator::Priority in_priority, OperatorPtrArray & out_operators) const;
1451 
1452 private:
1454  OperatorControl() {}
1455 };
1456 
1463 {
1464 public:
1465 
1466  enum class Location
1467  {
1468  TopRight,
1469  TopLeft,
1470  BottomRight,
1471  BottomLeft,
1472  Custom,
1473  };
1474 
1476  explicit NavigationCubeControl(View const & in_view);
1477 
1480 
1485 
1489  NavigationCubeControl & operator=(NavigationCubeControl && in_that);
1490 
1493 
1494  static const HPS::Type staticType = HPS::Type::NavigationCubeControl;
1495  HPS::Type ObjectType() const {return staticType;};
1496 
1498  NavigationCubeControl & operator=(NavigationCubeControl const & in_that);
1499 
1508  NavigationCubeControl & SetLocation(Location in_location, HPS::Rectangle const & in_rectangle = HPS::Rectangle(), HPS::IntRectangle in_offsets = HPS::IntRectangle::Zero());
1509 
1512  Location GetLocation() const;
1513 
1517  NavigationCubeControl & SetPosition(HPS::Rectangle const & in_rectangle);
1518 
1521  HPS::Rectangle GetPosition() const;
1522 
1526  NavigationCubeControl & SetPositionOffsets(HPS::IntRectangle const & in_offsets);
1527 
1530  HPS::IntRectangle GetPositionOffsets() const;
1531 
1536  NavigationCubeControl & SetVisibility(bool in_visibility);
1537 
1540  bool GetVisibility() const;
1541 
1545  NavigationCubeControl & SetTextVisibility(bool in_text_visibility);
1546 
1549  bool GetTextVisibility() const;
1550 
1565  NavigationCubeControl & SetMaterialPalette(char const * in_material_palette);
1566 
1569  HPS::UTF8 GetMaterialPalette() const;
1570 
1578  NavigationCubeControl & SetInteractivity(bool in_interactivity);
1579 
1580 
1583  bool GetInteractivity() const;
1584 
1589  NavigationCubeControl & SetSize(float in_size);
1590 
1593  float GetSize() const;
1594 
1595  /* Sets the text displayed on the navigation cube.
1596  * note that if you plan on using the navigation cube on a very large and pixel dense screen
1597  * (example: a large TV), if you wish to specify a custom text size, you should do so using
1598  * one of the window relative text sizes.
1599  * \param in_back_string The text to display on the back face of the navigation cube
1600  * \param in_top_string The text to display on the top face of the navigation cube
1601  * \param in_left_string The text to display on the left face of the navigation cube
1602  * \param in_front_string The text to display on the front face of the navigation cube
1603  * \param in_bottom_string The text to display on the bottom face of the navigation cube
1604  * \param in_right_string The text to display on the right face of the navigation cube
1605  * \param in_text_attributes The attributes applied to the text on the navigation cube
1606  * \return A reference to this object. */
1607  NavigationCubeControl & SetText(const char * in_back_string, const char * in_top_string, const char * in_left_string,
1608  const char * in_front_string, const char * in_bottom_string, const char * in_right_string,
1609  HPS::TextAttributeKit const & in_text_attributes);
1610 
1611  /* Gets the text displayed on the navigation cube.
1612  * \param out_back_string The text displayed on the back face of the navigation cube
1613  * \param out_top_string The text displayed on the top face of the navigation cube
1614  * \param out_left_string The text displayed on the left face of the navigation cube
1615  * \param out_front_string The text displayed on the front face of the navigation cube
1616  * \param out_bottom_string The text displayed on the bottom face of the navigation cube
1617  * \param out_right_string The text displayed on the right face of the navigation cube
1618  * \param out_text_attributes The attributes applied to the text on the navigation cube
1619  * \return <span class='code'>true</span> if the navigation cube text was retrieved successfully, <span class='code'>false</span> otherwise. */
1620  bool GetText(UTF8 & out_back_string, UTF8 & out_top_string, UTF8 & out_left_string,
1621  UTF8 & out_front_string, UTF8 & out_bottom_string, UTF8 & out_right_string,
1622  HPS::TextAttributeKit & out_text_attributes) const;
1623 
1626  HPS::SegmentKey GetSegmentKey() const;
1627 
1628 private:
1631 
1633  HPS::SegmentKey GetNavigationCubeSegment() const;
1634  void SetNavigationCubeVisibilityLink(bool in_visibility) const;
1635 
1636  bool IsTextVisible() const;
1637 };
1638 
1641 class SPRK_API AxisTriadControl : public SprocketControl
1642 {
1643 public:
1644 
1645  enum class Location
1646  {
1647  TopRight,
1648  TopLeft,
1649  BottomRight,
1650  BottomLeft,
1651  Custom,
1652  };
1653 
1655  explicit AxisTriadControl(View const & in_view);
1656 
1658  AxisTriadControl(AxisTriadControl const & in_that);
1659 
1663  AxisTriadControl(AxisTriadControl && in_that);
1664 
1668  AxisTriadControl & operator=(AxisTriadControl && in_that);
1669 
1671  ~AxisTriadControl();
1672 
1673  static const HPS::Type staticType = HPS::Type::AxisTriadControl;
1674  HPS::Type ObjectType() const {return staticType;};
1675 
1677  AxisTriadControl & operator=(AxisTriadControl const & in_that);
1678 
1687  HPS::AxisTriadControl & SetLocation(Location in_location, HPS::Rectangle const & in_position = HPS::Rectangle(), HPS::IntRectangle in_offsets = HPS::IntRectangle::Zero());
1688 
1691  Location GetLocation() const;
1692 
1696  AxisTriadControl & SetPosition(HPS::Rectangle const & in_position);
1697 
1700  HPS::Rectangle GetPosition() const;
1701 
1705  AxisTriadControl & SetPositionOffsets(HPS::IntRectangle const & in_offsets);
1706 
1709  HPS::IntRectangle GetPositionOffsets() const;
1710 
1715  HPS::AxisTriadControl & SetVisibility(bool in_visibility);
1716 
1719  bool GetVisibility() const;
1720 
1724  HPS::AxisTriadControl & SetTextVisibility(bool in_text_visibility);
1725 
1728  bool GetTextVisibility() const;
1729 
1738  HPS::AxisTriadControl & SetMaterialPalette(char const * in_material_palette);
1739 
1742  HPS::UTF8 GetMaterialPalette() const;
1743 
1750  HPS::AxisTriadControl & SetInteractivity(bool in_interactivity);
1751 
1754  bool GetInteractivity() const;
1755 
1760  AxisTriadControl & SetSize(float in_size);
1761 
1764  float GetSize() const;
1765 
1768  HPS::SegmentKey GetSegmentKey() const;
1769 
1770 private:
1772  AxisTriadControl(){};
1773 
1775  HPS::SegmentKey GetAxisTriadSegment() const;
1776 
1777  void SetAxisVisibilityLink(bool in_visibility) const;
1778 };
1779 
1781 class SPRK_API Component : public Sprocket
1782 {
1783 public:
1784 
1787  enum class Visibility : uint32_t
1788  {
1789  PreserveUserDefined,
1790  PreserveModelDefined,
1791  PreserveNone,
1792  PreserveAll,
1793  };
1794 
1797  enum class ComponentType : uint32_t
1798  {
1799  None = 0x00000000,
1800  GenericMask = 0xfffff000,
1801 
1802  ExchangeComponentMask = 0x00001000,
1803  ExchangeModelFile = 0x00001001,
1804  ExchangeProductOccurrence = 0x00001002,
1805  ExchangePartDefinition = 0x00001003,
1806 
1807  ExchangeView = 0x00001004,
1808  ExchangeFilter = 0x00001005,
1809 
1810  ExchangeRepresentationItemMask = 0x00003000,
1811  ExchangeRIBRepModel = 0x00003001,
1812  ExchangeRICurve = 0x00003002,
1813  ExchangeRIDirection = 0x00003003,
1814  ExchangeRIPlane = 0x00003004,
1815  ExchangeRIPointSet = 0x00003005,
1816  ExchangeRIPolyBRepModel = 0x00003006,
1817  ExchangeRIPolyWire = 0x00003007,
1818  ExchangeRISet = 0x00003008,
1819  ExchangeRICoordinateSystem = 0x00003009,
1820 
1821  ExchangeTopologyMask = 0x00005000,
1822  ExchangeTopoBody = 0x00005001,
1823  ExchangeTopoConnex = 0x00005002,
1824  ExchangeTopoShell = 0x00005003,
1825  ExchangeTopoFace = 0x00005004,
1826  ExchangeTopoLoop = 0x00005005,
1827  ExchangeTopoCoEdge = 0x00005006,
1828  ExchangeTopoEdge = 0x00005007,
1829  ExchangeTopoVertex = 0x00005008,
1830  ExchangeTopoSingleWireBody = 0x00005009,
1831  ExchangeTopoWireEdge = 0x0000500a,
1832 
1833  ExchangeDrawingMask = 0x00009000,
1834  ExchangeDrawingModel = 0x00009001,
1835  ExchangeDrawingView = 0x00009002,
1836  ExchangeDrawingSheet = 0x00009003,
1837  ExchangeBasicDrawingBlock = 0x00009004,
1838  ExchangeOperatorDrawingBlock = 0x00009005,
1839 
1840  ExchangePMIMask = 0x00011000,
1841  ExchangePMI = ExchangePMIMask,
1842  ExchangePMIText = 0x00011100,
1843  ExchangePMIRichText = 0x00011200,
1844  ExchangePMIRoughness = 0x00011300,
1845  ExchangePMIGDT = 0x00011400,
1846  ExchangePMIDatum = 0x00011500,
1847  ExchangePMILineWelding = 0x00011600,
1848  ExchangePMISpotWelding = 0x00011700,
1849  ExchangePMIDimension = 0x00011800,
1850  ExchangePMIBalloon = 0x00011900,
1851  ExchangePMICoordinate = 0x00011a00,
1852  ExchangePMIFastener = 0x00011b00,
1853  ExchangePMILocator = 0x00011c00,
1854  ExchangePMIMeasurementPoint = 0x00011d00,
1855 
1856 
1857  ParasolidComponentMask = 0x00020000,
1858 
1859  ParasolidModelFile = 0x00020001,
1860  ParasolidAssembly = 0x00020002,
1861  ParasolidInstance = 0x00020003,
1862 
1863  ParasolidTopologyMask = 0x00060000,
1864  ParasolidTopoBody = 0x00060001,
1865  ParasolidTopoRegion = 0x00060002,
1866  ParasolidTopoShell = 0x00060003,
1867  ParasolidTopoFace = 0x00060004,
1868  ParasolidTopoLoop = 0x00060005,
1869  ParasolidTopoFin = 0x00060006,
1870  ParasolidTopoEdge = 0x00060007,
1871  ParasolidTopoVertex = 0x00060008,
1872 
1873 
1874  DWGComponentMask = 0x00100000,
1875  DWGModelFile = 0x00100001,
1876  DWGLayout = 0x00100002,
1877  DWGBlockTable = 0x00100003,
1878  DWGBlockTableRecord = 0x00100004,
1879  DWGEntity = 0x00100005,
1880  DWGLayerTable = 0x00100006,
1881  DWGLayer = 0x00100007,
1882 
1883 
1884  UserComponent = 0x01000000,
1885  };
1886 
1889  enum class DeleteMode
1890  {
1891  Standard, // subcomponents will be deleted if they don't have multiple owners, otherwise their reference count will be decremented
1892  Full, // subcomponents will always be deleted, even if they are shared
1893  StandardAndExchange // Subcomponent will deleted if they don't have multiple owners, otherwise their reference count will be decremented.
1894  // The Exchange Entity associated to the Component will be deleted.
1895  };
1896 
1898  Component();
1899 
1902  Component(Component const & in_that);
1903 
1906  Component(Component && in_that);
1907 
1909  virtual ~Component();
1910 
1911  static const HPS::Type staticType = HPS::Type::Component;
1912  HPS::Type ObjectType() const { return staticType; }
1913 
1914 
1918  Component & operator=(Component const & in_that);
1919 
1923  Component & operator=(Component && in_that);
1924 
1928  virtual void Assign(Component const & in_that);
1929 
1933  bool Equals(Component const & in_that) const;
1934 
1938  bool operator!=(Component const & in_that) const;
1939 
1943  bool operator==(Component const & in_that) const;
1944 
1945 
1948  ComponentType GetComponentType() const;
1949 
1953  bool HasComponentType(ComponentType in_mask) const;
1954 
1955 
1956 
1962  void AddKey(Key const & in_key);
1963 
1966  KeyArray GetKeys() const;
1967 
1968 
1969 
1974  void AddOwner(Component & in_owner, IncludeKey const & in_include = IncludeKey());
1975 
1980  ComponentArray GetOwners() const;
1981 
1984  ComponentArray GetSubcomponents() const;
1985 
1990  ComponentArray GetAllSubcomponents(ComponentType in_type) const;
1991 
1992 
1993 
1996  void AddReference(Component & in_reference);
1997 
2004  ComponentArray GetReferrers() const;
2005 
2009  ComponentArray GetReferences() const;
2010 
2011 
2012 
2015  MetadataArray GetAllMetadata() const;
2016 
2020  Metadata GetMetadata(char const * in_name) const;
2021 
2025  UTF8 GetName() const;
2026 
2027 
2028 
2079  void Delete(HPS::Component::DeleteMode mode = HPS::Component::DeleteMode::Standard);
2080 
2084  void Flush();
2085 
2086 
2094  static KeyPathArray GetKeyPath(Component const & in_component);
2095 
2105  static KeyPathArray GetKeyPath(size_t in_count, Component const in_components[]);
2106 
2115  static KeyPathArray GetKeyPath(ComponentArray const & in_components);
2116 
2122  bool SetTransform(MatrixKit const & in_transform);
2123 
2129  bool AddTransform(MatrixKit const & in_transform);
2130 
2151  Component CopyTo(HPS::Component const & in_new_owner);
2152 
2157  bool SetName(char const * in_new_name);
2158 };
2159 
2161 class SPRK_API ComponentPath : public Sprocket
2162 {
2163 public:
2166  enum class PathType : uint32_t
2167  {
2168  Complete,
2169  Unique,
2170  };
2171 
2173  ComponentPath();
2174 
2177  ComponentPath(ComponentArray const & in_components);
2178 
2182  ComponentPath(size_t in_count, Component const in_components[]);
2183 
2185  ComponentPath(ComponentPath const & in_that);
2186 
2190  ComponentPath(ComponentPath && in_that);
2191 
2195  ComponentPath & operator=(ComponentPath && in_that);
2196 
2198  virtual ~ComponentPath();
2199 
2200  static const HPS::Type staticType = HPS::Type::ComponentPath;
2201  HPS::Type ObjectType() const { return staticType; }
2202 
2205  bool Empty() const;
2206 
2210  ComponentPath & operator+=(Component const & in_component);
2211 
2215  ComponentPath & operator+=(ComponentPath const & in_path);
2216 
2220  ComponentPath & operator+=(ComponentArray const & in_components);
2221 
2226  ComponentPath & Append(Component const & in_component);
2227 
2232  ComponentPath & Append(ComponentPath const & in_path);
2233 
2238  ComponentPath & Append(ComponentArray const & in_components);
2239 
2243  ComponentPath & operator=(ComponentPath const & in_that);
2244 
2248  ComponentPath & operator=(ComponentArray const & in_path);
2249 
2252  void Set(ComponentPath const & in_that);
2253 
2257  bool Equals(ComponentPath const & in_that) const;
2258 
2262  bool operator!= (ComponentPath const & in_that) const;
2263 
2267  bool operator== (ComponentPath const & in_that) const;
2268 
2269 
2273  ComponentPath & SetComponents(ComponentArray const & in_components);
2274 
2279  ComponentPath & SetComponents(size_t in_count, Component const in_components[]);
2280 
2283  ComponentArray GetComponents() const;
2284 
2288  KeyPathArray GetKeyPaths() const;
2289 
2294  KeyPathArray GetKeyPaths(Canvas const & in_canvas, size_t in_layer = 0) const;
2295 
2296 
2303  void Highlight(Canvas const & in_canvas, HighlightOptionsKit const & in_options, bool in_remove_existing = true) const;
2304 
2311  void Highlight(Canvas const & in_canvas, size_t in_layer, HighlightOptionsKit const & in_options, bool in_remove_existing = true) const;
2312 
2316  void Unhighlight(Canvas const & in_canvas, HighlightOptionsKit const & in_options = HighlightOptionsKit()) const;
2317 
2322  void Unhighlight(Canvas const & in_canvas, size_t in_layer, HighlightOptionsKit const & in_options = HighlightOptionsKit()) const;
2323 
2324 
2329  void Hide(Canvas const & in_canvas, size_t in_layer = 0);
2330 
2335  void Show(Canvas const & in_canvas, size_t in_layer = 0, Component::Visibility in_subtree_visibility = Component::Visibility::PreserveNone);
2336 
2342  bool IsHidden(Canvas const & in_canvas, size_t in_layer = 0);
2343 
2350  void Isolate(Canvas const & in_canvas, size_t in_layer = 0, Component::Visibility in_subtree_visibility = Component::Visibility::PreserveNone);
2351 
2359  static void Isolate(HPS::ComponentPathArray & in_components_to_be_isolated, Canvas const & in_canvas, size_t in_layer = 0, Component::Visibility in_subtree_visibility = Component::Visibility::PreserveNone);
2360 
2361  /* Returns the number of Components contained in this ComponentPath object.
2362  * \return the number of Components in this ComponentPath.*/
2363  size_t Size() const;
2364 
2365  /* Access a Component in this ComponentPath object. An HPS::IndexOutOfRangeException exception is thrown if in_index is out of range.
2366  * \param in_index The index of the Component to access, zero based.
2367  * \return The Component at position in_index in this ComponentPath.*/
2368  Component & At(size_t in_index);
2369 
2370  /* Access a Component in this ComponentPath object. An HPS::IndexOutOfRangeException exception is thrown if in_index is out of range.
2371  * \param in_index The index of the Component to access, zero based.
2372  * \return The Component at position in_index in this ComponentPath.*/
2373  Component const & At(size_t in_index) const;
2374 
2375  /* Inserts in_item in the ComponentPath before the element at position in_index, increasing the size of the ComponentPath by one.
2376  * An HPS::IndexOutOfRangeException exception is thrown if in_index is out of range.
2377  * \param in_index The index where in_item will be inserted
2378  * \param in_item The component to insert in this key path. */
2379  void Insert(size_t in_index, Component const & in_item);
2380 
2381  /* Traverses the components in this ComponentPath and removes the first one which matches in_item
2382  * NOTE: A useful ComponentPath should not contain duplicate components.
2383  * \param in_item The item to remove from the ComponentPath. */
2384  void Remove(Component const & in_item);
2385 
2386  /* Removes the the component at position in_index from this ComponentPath. An HPS::IndexOutOfRangeException exception is thrown if in_index is out of range.
2387  * \param in_index The index of the component to remove, zero based. */
2388  void Remove(size_t in_index);
2389 
2390  /* Creates and returns a new ComponentPath object, with the components organized in the reverse order.
2391  * \return A new ComponentPath object, containing components organized in the reverse order. */
2392  ComponentPath Reverse() const;
2393 
2394  /* Returns the first component of this ComponentPath. An HPS::IndexOutOfRangeException exception is thrown if the ComponentPath is empty.
2395  * \return The first component of this ComponentPath.*/
2396  Component & Front();
2397 
2398  /* Returns the first component of this ComponentPath. An HPS::IndexOutOfRangeException exception is thrown if the ComponentPath is empty.
2399  * \return The first component of this ComponentPath.*/
2400  Component const & Front() const;
2401 
2402  /* Returns the last component of this ComponentPath. An HPS::IndexOutOfRangeException exception is thrown if the ComponentPath is empty.
2403  * \return The last component of this ComponentPath.*/
2404  Component & Back();
2405 
2406  /* Returns the last component of this ComponentPath. An HPS::IndexOutOfRangeException exception is thrown if the ComponentPath is empty.
2407  * \return The last component of this ComponentPath.*/
2408  Component const & Back() const;
2409 
2410  /* Returns the first component of this ComponentPath and returns it. An HPS::IndexOutOfRangeException exception is thrown if the ComponentPath is empty.
2411  * \return The first component of this ComponentPath.*/
2412  Component PopFront();
2413 
2414  /* Returns the last component of this ComponentPath and returns it. An HPS::IndexOutOfRangeException exception is thrown if the ComponentPath is empty.
2415  * \return The last component of this ComponentPath.*/
2416  Component PopBack();
2417 
2418  /* Adds in_component to the front of the ComponentPath.
2419  * \param in_component The component to add to the front of the ComponentPath.
2420  * \return A reference to this object.*/
2421  ComponentPath & PushFront(Component const & in_component);
2422 
2423  /* Adds in_component to the end of the ComponentPath.
2424  * \param in_component The component to add to the end of the ComponentPath.
2425  * \return A reference to this object.*/
2426  ComponentPath & PushBack(Component const & in_component);
2427 
2431  ComponentPath & PushBack(ComponentPath const & in_path);
2432 
2436  ComponentPath & PushBack(ComponentArray const & in_components);
2437 
2438 #ifndef HPS_GULP_CLANG
2439  using iterator = HPS::ComponentArray::iterator;
2440  using const_iterator = HPS::ComponentArray::const_iterator;
2441 
2442  /* Returns an iterator pointing to the first Component contained in this ComponentPath
2443  * \return An iterator pointing to the first Component contained in this ComponentPath. */
2444  iterator begin();
2445 
2446  /* Returns an iterator pointing to the first Component contained in this ComponentPath
2447  * \return An iterator pointing to the first Component contained in this ComponentPath. */
2448  const_iterator begin() const;
2449 
2450  /* Returns a constant iterator pointing to the last Component contained in this ComponentPath
2451  * \return A constant iterator pointing to the last Component contained in this ComponentPath. */
2452  iterator end();
2453 
2454  /* Returns a constant iterator pointing to the last Component contained in this ComponentPath
2455  * \return A constant iterator pointing to the last Component contained in this ComponentPath. */
2456  const_iterator end() const;
2457 
2458  /* Returns a constant iterator pointing to the first Component contained in this ComponentPath
2459  * \return A constant iterator pointing to the first Component contained in this ComponentPath. */
2460  const_iterator cbegin() const;
2461 
2462  /* Returns a constant iterator pointing to the last Component contained in this ComponentPath
2463  * \return A constant iterator pointing to the last Component contained in this ComponentPath. */
2464  const_iterator cend() const;
2465 #endif
2466 };
2467 
2468 
2473 inline ComponentPath operator+(Component const & in_lhs, Component const & in_rhs)
2474 {
2475  return HPS::ComponentPath().PushBack(in_lhs).PushBack(in_rhs);
2476 }
2477 
2482 inline ComponentPath operator+(Component const & in_lhs, ComponentArray const & in_rhs)
2483 {
2484  return HPS::ComponentPath().PushBack(in_lhs).PushBack(in_rhs);
2485 }
2486 
2491 inline ComponentPath operator+(Component const & in_lhs, ComponentPath const & in_rhs)
2492 {
2493  return HPS::ComponentPath().PushBack(in_lhs).PushBack(in_rhs);
2494 }
2495 
2500 inline ComponentPath operator+(ComponentArray const & in_lhs, Component const & in_rhs)
2501 {
2502  return HPS::ComponentPath().PushBack(in_lhs).PushBack(in_rhs);
2503 }
2504 
2509 inline ComponentPath operator+(ComponentArray const & in_lhs, ComponentArray const & in_rhs)
2510 {
2511  return HPS::ComponentPath().PushBack(in_lhs).PushBack(in_rhs);
2512 }
2513 
2518 inline ComponentPath operator+(ComponentArray const & in_lhs, ComponentPath const & in_rhs)
2519 {
2520  return HPS::ComponentPath().PushBack(in_lhs).PushBack(in_rhs);
2521 }
2522 
2527 inline ComponentPath operator+(ComponentPath const & in_lhs, Component const & in_rhs)
2528 {
2529  return HPS::ComponentPath().PushBack(in_lhs).PushBack(in_rhs);
2530 }
2531 
2536 inline ComponentPath operator+(ComponentPath const & in_lhs, ComponentArray const & in_rhs)
2537 {
2538  return HPS::ComponentPath().PushBack(in_lhs).PushBack(in_rhs);
2539 }
2540 
2545 inline ComponentPath operator+(ComponentPath const & in_lhs, ComponentPath const & in_rhs)
2546 {
2547  return HPS::ComponentPath().PushBack(in_lhs).PushBack(in_rhs);
2548 }
2549 
2551 class SPRK_API ComponentIsolateEvent : public Event
2552 {
2553 public:
2554 
2557  {
2558  channel = GetClassID();
2559  consumable = false;
2560  subcomponent_visibility = Component::Visibility::PreserveNone;
2561  }
2562 
2563  ComponentIsolateEvent(ComponentPath const & in_path,
2564  Component::Visibility in_subcomponent_visibility)
2565  : Event(), path(in_path), subcomponent_visibility(in_subcomponent_visibility)
2566  {
2567  channel = GetClassID();
2568  consumable = false;
2569  }
2570 
2573  ComponentIsolateEvent(Event const & in_event) : Event(in_event)
2574  {
2575  if (in_event.GetChannel() == Object::ClassID<ComponentIsolateEvent>())
2576  {
2577  auto that = static_cast<ComponentIsolateEvent const &>(in_event);
2578  subcomponent_visibility = that.subcomponent_visibility;
2579  path = that.path;
2580  }
2581  else
2582  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
2583  }
2584 
2586 
2589  Event * Clone() const
2590  {
2591  ComponentIsolateEvent * new_event = new ComponentIsolateEvent(*this);
2592  return new_event;
2593  }
2594 
2595  ComponentPath path;
2596  Component::Visibility subcomponent_visibility;
2597 };
2598 
2599 
2601 class SPRK_API ComponentHighlightEvent : public Event
2602 {
2603 public:
2604  enum class Action
2605  {
2606  None = 0,
2607  Highlight,
2608  Unhighlight,
2609  };
2610 
2613  {
2614  channel = GetClassID();
2615  consumable = false;
2616  action = Action::None;
2617  }
2618 
2619  ComponentHighlightEvent(Action in_action,
2620  ComponentPath const & in_path = ComponentPath(),
2621  HighlightOptionsKit const & in_options = HighlightOptionsKit())
2622  : Event(), action(in_action), path(in_path), options(in_options)
2623  {
2624  channel = GetClassID();
2625  consumable = false;
2626  }
2627 
2630  ComponentHighlightEvent(Event const & in_event) : Event(in_event)
2631  {
2632  if (in_event.GetChannel() == Object::ClassID<ComponentHighlightEvent>())
2633  {
2634  auto that = static_cast<ComponentHighlightEvent const &>(in_event);
2635  action = that.action;
2636  path = that.path;
2637  options = that.options;
2638  }
2639  else
2640  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
2641  }
2642 
2644 
2647  Event * Clone() const
2648  {
2649  ComponentHighlightEvent * new_event = new ComponentHighlightEvent(*this);
2650  return new_event;
2651  }
2652 
2653  Action action;
2654  ComponentPath path;
2655  HighlightOptionsKit options;
2656 };
2657 
2658 
2660 class SPRK_API Filter : public Component
2661 {
2662 public:
2664  Filter();
2665 
2669  Filter(Component const & in_that);
2670 
2673  Filter(Filter const & in_that);
2674 
2677  Filter(Filter && in_that);
2678 
2679  virtual ~Filter();
2680 
2681  static const HPS::Type staticType = HPS::Type::Filter;
2682  HPS::Type ObjectType() const { return staticType; }
2683 
2684 
2685 #if !defined(_MSC_VER) || _MSC_VER >= 1900
2686  Filter & operator=(Filter const & in_that) = default;
2687 #endif
2688 
2692  Filter & operator=(Filter && in_that);
2693 
2694 
2697  void Activate(View const & in_view);
2698 
2701  void Deactivate(View const & in_view);
2702 };
2703 
2704 
2705 class SPRK_API FilterActivationEvent : public Event
2706 {
2707 public:
2708  enum class Action
2709  {
2710  None = 0,
2711  Activate,
2712  Deactivate,
2713  };
2714 
2717  {
2718  channel = GetClassID();
2719  consumable = false;
2720  }
2721 
2722  FilterActivationEvent(Filter in_filter, Action in_action, View in_view) : Event(), filter(in_filter), action(in_action), view(in_view)
2723  {
2724  channel = GetClassID();
2725  consumable = false;
2726  }
2727 
2730  FilterActivationEvent(Event const & in_event) : Event(in_event)
2731  {
2732  if (in_event.GetChannel() == Object::ClassID<FilterActivationEvent>())
2733  {
2734  auto that = static_cast<FilterActivationEvent const &>(in_event);
2735  filter = that.filter;
2736  action = that.action;
2737  view = that.view;
2738  }
2739  else
2740  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
2741  }
2742 
2744 
2747  Event * Clone() const
2748  {
2749  FilterActivationEvent * new_event = new FilterActivationEvent(*this);
2750  return new_event;
2751  }
2752 
2753  Filter filter;
2754  Action action;
2755  View view;
2756 };
2757 
2758 
2760 class SPRK_API Capture : public Component
2761 {
2762 public:
2764  Capture();
2765 
2769  Capture(Component const & in_that);
2770 
2773  Capture(Capture const & in_that);
2774 
2777  Capture(Capture && in_that);
2778 
2779  virtual ~Capture();
2780 
2781  static const HPS::Type staticType = HPS::Type::Capture;
2782  HPS::Type ObjectType() const { return staticType; }
2783 
2784 #if !defined(_MSC_VER) || _MSC_VER >= 1900
2785  Capture & operator=(Capture const & in_that) = default;
2786 #endif
2787 
2791  Capture & operator=(Capture && in_that);
2792 
2793 
2797  View Activate();
2798 };
2799 
2800 
2801 class SPRK_API CaptureActivationEvent : public Event
2802 {
2803 public:
2806  {
2807  channel = GetClassID();
2808  consumable = false;
2809  }
2810 
2811  CaptureActivationEvent(Capture in_capture, View in_view) : Event(), capture(in_capture), view(in_view)
2812  {
2813  channel = GetClassID();
2814  consumable = false;
2815  }
2816 
2819  CaptureActivationEvent(Event const & in_event) : Event(in_event)
2820  {
2821  if (in_event.GetChannel() == Object::ClassID<CaptureActivationEvent>())
2822  {
2823  auto that = static_cast<CaptureActivationEvent const &>(in_event);
2824  capture = that.capture;
2825  view = that.view;
2826  }
2827  else
2828  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
2829  }
2830 
2832 
2835  Event * Clone() const
2836  {
2837  CaptureActivationEvent * new_event = new CaptureActivationEvent(*this);
2838  return new_event;
2839  }
2840 
2841  Capture capture;
2842  View view;
2843 };
2844 
2845 
2847 class SPRK_API CADModel : public Component
2848 {
2849 public:
2851  CADModel();
2852 
2856  CADModel(Component const & in_that);
2857 
2860  CADModel(CADModel const & in_that);
2861 
2864  CADModel(CADModel && in_that);
2865 
2868  CADModel(Model const & in_that);
2869 
2870  virtual ~CADModel();
2871 
2872  static const HPS::Type staticType = HPS::Type::CADModel;
2873  HPS::Type ObjectType() const { return staticType; }
2874 
2875 #if !defined(_MSC_VER) || _MSC_VER >= 1900
2876  CADModel & operator=(CADModel const & in_that) = default;
2877 #endif
2878 
2882  CADModel & operator=(CADModel && in_that);
2883 
2884 
2888  Component GetComponentFromKey(Key const & in_key) const;
2889 
2901  ComponentPath GetComponentPath(KeyPath const & in_key_path, ComponentPath::PathType in_path_type = ComponentPath::PathType::Unique) const;
2902 
2914  ComponentPath GetComponentPath(SelectionItem const & in_item, ComponentPath::PathType in_path_type = ComponentPath::PathType::Unique) const;
2915 
2916 
2919  Model GetModel() const;
2920 
2923  FilterArray GetAllFilters() const;
2924 
2927  CaptureArray GetAllCaptures() const;
2928 
2932  FilterArray GetActiveFilters(View const & in_view) const;
2933 
2934 
2938  View ActivateDefaultCapture();
2939 
2940 
2948  void ResetVisibility(Canvas & in_canvas, size_t in_layer = 0);
2949 };
2950 
2951 
2952 
2955 class SPRK_API Metadata : public Sprocket
2956 {
2957 public:
2959  Metadata();
2960 
2963  Metadata(Metadata const & in_that);
2964 
2967  Metadata(Metadata && in_that);
2968 
2971  Metadata(char const * in_name);
2972 
2973  virtual ~Metadata();
2974 
2975  static const HPS::Type staticType = HPS::Type::Metadata;
2976  HPS::Type ObjectType() const { return staticType; }
2977 
2978 
2982  Metadata & operator=(Metadata const & in_that);
2983 
2987  Metadata & operator=(Metadata && in_that);
2988 
2992  virtual void Assign(Metadata const & in_that);
2993 
2997  bool Equals(Metadata const & in_that) const;
2998 
3002  bool operator!=(Metadata const & in_that) const;
3003 
3007  bool operator==(Metadata const & in_that) const;
3008 
3009 
3012  HPS::UTF8 GetName() const;
3013 
3016  void SetName(char const * in_name);
3017 };
3018 
3020 class SPRK_API IntegerMetadata : public Metadata
3021 {
3022 public:
3024  IntegerMetadata();
3025 
3029  IntegerMetadata(Metadata const & in_that);
3030 
3033  IntegerMetadata(IntegerMetadata const & in_that);
3034 
3037  IntegerMetadata(IntegerMetadata && in_that);
3038 
3042  IntegerMetadata(char const * in_name, int in_value);
3043 
3044  virtual ~IntegerMetadata();
3045 
3046  static const HPS::Type staticType = HPS::Type::IntegerMetadata;
3047  HPS::Type ObjectType() const { return staticType; }
3048 
3049 #if !defined(_MSC_VER) || _MSC_VER >= 1900
3050  IntegerMetadata & operator=(IntegerMetadata const & in_that) = default;
3051 #endif
3052 
3056  IntegerMetadata & operator=(IntegerMetadata && in_that);
3057 
3058 
3061  int GetValue() const;
3062 
3065  void SetValue(int in_value);
3066 };
3067 
3069 class SPRK_API UnsignedIntegerMetadata : public Metadata
3070 {
3071 public:
3074 
3078  UnsignedIntegerMetadata(Metadata const & in_that);
3079 
3083 
3087 
3091  UnsignedIntegerMetadata(char const * in_name, unsigned int in_value);
3092 
3093  virtual ~UnsignedIntegerMetadata();
3094 
3095  static const HPS::Type staticType = HPS::Type::UnsignedIntegerMetadata;
3096  HPS::Type ObjectType() const { return staticType; }
3097 
3098 #if !defined(_MSC_VER) || _MSC_VER >= 1900
3099  UnsignedIntegerMetadata & operator=(UnsignedIntegerMetadata const & in_that) = default;
3100 #endif
3101 
3105  UnsignedIntegerMetadata & operator=(UnsignedIntegerMetadata && in_that);
3106 
3107 
3110  unsigned int GetValue() const;
3111 
3114  void SetValue(unsigned int in_value);
3115 };
3116 
3118 class SPRK_API DoubleMetadata : public Metadata
3119 {
3120 public:
3122  DoubleMetadata();
3123 
3127  DoubleMetadata(Metadata const & in_that);
3128 
3131  DoubleMetadata(DoubleMetadata const & in_that);
3132 
3135  DoubleMetadata(DoubleMetadata && in_that);
3136 
3140  DoubleMetadata(char const * in_name, double in_value);
3141 
3142  virtual ~DoubleMetadata();
3143 
3144  static const HPS::Type staticType = HPS::Type::DoubleMetadata;
3145  HPS::Type ObjectType() const { return staticType; }
3146 
3147 #if !defined(_MSC_VER) || _MSC_VER >= 1900
3148  DoubleMetadata & operator=(DoubleMetadata const & in_that) = default;
3149 #endif
3150 
3154  DoubleMetadata & operator=(DoubleMetadata && in_that);
3155 
3156 
3159  double GetValue() const;
3160 
3163  void SetValue(double in_value);
3164 };
3165 
3167 class SPRK_API StringMetadata : public Metadata
3168 {
3169 public:
3171  StringMetadata();
3172 
3176  StringMetadata(Metadata const & in_that);
3177 
3180  StringMetadata(StringMetadata const & in_that);
3181 
3184  StringMetadata(StringMetadata && in_that);
3185 
3189  StringMetadata(char const * in_name, char const * in_value);
3190 
3191  virtual ~StringMetadata();
3192 
3193  static const HPS::Type staticType = HPS::Type::StringMetadata;
3194  HPS::Type ObjectType() const { return staticType; }
3195 
3196 #if !defined(_MSC_VER) || _MSC_VER >= 1900
3197  StringMetadata & operator=(StringMetadata const & in_that) = default;
3198 #endif
3199 
3203  StringMetadata & operator=(StringMetadata && in_that);
3204 
3205 
3208  UTF8 GetValue() const;
3209 
3212  void SetValue(char const * in_value);
3213 };
3214 
3216 class SPRK_API TimeMetadata : public Metadata
3217 {
3218 public:
3220  TimeMetadata();
3221 
3225  TimeMetadata(Metadata const & in_that);
3226 
3229  TimeMetadata(TimeMetadata const & in_that);
3230 
3233  TimeMetadata(TimeMetadata && in_that);
3234 
3238  TimeMetadata(char const * in_name, unsigned int in_value);
3239 
3240  virtual ~TimeMetadata();
3241 
3242  static const HPS::Type staticType = HPS::Type::TimeMetadata;
3243  HPS::Type ObjectType() const { return staticType; }
3244 
3245 #if !defined(_MSC_VER) || _MSC_VER >= 1900
3246  TimeMetadata & operator=(TimeMetadata const & in_that) = default;
3247 #endif
3248 
3252  TimeMetadata & operator=(TimeMetadata && in_that);
3253 
3254 
3257  unsigned int GetValue() const;
3258 
3261  HPS::UTF8 GetValueAsString() const;
3262 
3265  void SetValue(unsigned int in_value);
3266 };
3267 
3268 
3270 class SPRK_API BooleanMetadata : public Metadata
3271 {
3272 public:
3274  BooleanMetadata();
3275 
3279  BooleanMetadata(Metadata const & in_that);
3280 
3283  BooleanMetadata(BooleanMetadata const & in_that);
3284 
3287  BooleanMetadata(BooleanMetadata && in_that);
3288 
3292  BooleanMetadata(char const * in_name, bool in_value);
3293 
3294  virtual ~BooleanMetadata();
3295 
3296  static const HPS::Type staticType = HPS::Type::BooleanMetadata;
3297  HPS::Type ObjectType() const { return staticType; }
3298 
3299 #if !defined(_MSC_VER) || _MSC_VER >= 1900
3300  BooleanMetadata & operator=(BooleanMetadata const & in_that) = default;
3301 #endif
3302 
3306  BooleanMetadata & operator=(BooleanMetadata && in_that);
3307 
3308 
3311  bool GetValue() const;
3312 
3315  void SetValue(bool in_value);
3316 };
3317 
3318 
3319 
3321 class SPRK_API Factory : public Sprocket
3322 {
3323 public:
3324 
3327  static CanvasArray GetCanvases();
3328 
3331  static LayoutArray GetLayouts();
3332 
3335  static ViewArray GetViews();
3336 
3339  static ModelArray GetModels();
3340 
3343  static CADModelArray GetCADModels();
3344 
3350  static Canvas CreateCanvas(HPS::WindowHandle in_window_handle, char const * in_name = "", HPS::ApplicationWindowOptionsKit const & in_options = HPS::ApplicationWindowOptionsKit());
3351 
3356  static Canvas CreateCanvas(char const * in_name = "", HPS::StandAloneWindowOptionsKit const & in_options = HPS::StandAloneWindowOptionsKit());
3357 
3363  static Canvas CreateCanvas(HPS::WindowKey const & in_window_key, HPS::PortfolioKey const & in_portfolio_key = HPS::PortfolioKey(), char const * in_name = "");
3364 
3368  static Layout CreateLayout(char const * in_name = "");
3369 
3373  static View CreateView(char const * in_name = "");
3374 
3378  static Model CreateModel(char const * in_name = "");
3379 
3384  static Component CreateComponent(Component const & in_owner, char const * in_name = "");
3385 
3391  static Component DeInstanceComponent(ComponentPath const & in_component_path);
3392 
3393 private:
3394  Factory() {}
3395 };
3396 
3406 class SPRK_API AxisTriadOperator : public Operator
3407 {
3408 public:
3409  AxisTriadOperator(MouseButtons in_mouse_trigger = MouseButtons::ButtonLeft(), ModifierKeys in_modifier_trigger = ModifierKeys());
3411  virtual HPS::UTF8 GetName() const { return "HPS_AxisTriadOperator"; }
3412 
3418  virtual bool OnMouseDown(MouseState const & in_state);
3423  virtual bool OnMouseUp(MouseState const & in_state);
3428  virtual bool OnMouseMove(MouseState const & in_state);
3429 
3434  virtual bool OnTouchDown(TouchState const & in_state);
3439  virtual bool OnTouchUp(TouchState const & in_state);
3444  virtual bool OnTouchMove(TouchState const & in_state);
3445 
3446  virtual void OnViewAttached(HPS::View const & in_attached_view);
3447 
3448 private:
3449 
3450  bool AxisOrbit(HPS::WindowPoint const & in_loc);
3451  void Transition(HPS::SelectionResults selection_results);
3452  void TranslatePoint(HPS::WindowPoint * point);
3453  bool IsEventRelevant(HPS::Point const & event_location);
3454 
3455  bool operator_active;
3456  HPS::WindowPoint start_point;
3457  HPS::Vector start_sphere_point;
3458  float axis_subwindow_width;
3459  float axis_subwindow_height;
3460  HPS::TouchID tracked_touch_ID;
3461  HPS::Rectangle axis_subwindow;
3462  HPS::IntRectangle axis_subwindow_offsets;
3463  HPS::SegmentKey axis_triad_segment;
3464 
3465 };
3466 
3469 {
3470 public:
3473  virtual ~SmoothTransitionCompleteEvent();
3474 
3477  SmoothTransitionCompleteEvent(HPS::View const & in_view) : view(in_view)
3478  { channel = HPS::Object::ClassID<SmoothTransitionCompleteEvent>(); }
3479 
3482  SmoothTransitionCompleteEvent(Event const & in_event) : Event(in_event)
3483  {
3484  if (in_event.GetChannel() == Object::ClassID<SmoothTransitionCompleteEvent>())
3485  {
3486  auto that = static_cast<SmoothTransitionCompleteEvent const &>(in_event);
3487  view = that.view;
3488  }
3489  else
3490  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
3491  }
3492 
3495  Event * Clone() const
3496  {
3498  return new_event;
3499  }
3500 
3504  virtual bool Drop(Event const * in_that_event) const
3505  {
3506  HPS_UNREFERENCED(in_that_event);
3507  return false;
3508  }
3509 
3510  HPS::View view;
3511 };
3512 
3531 class SPRK_API NavigationCubeOperator : public Operator
3532 {
3533 public:
3534  NavigationCubeOperator(MouseButtons in_mouse_trigger = MouseButtons::ButtonLeft(), ModifierKeys in_modifier_trigger = ModifierKeys());
3535  ~NavigationCubeOperator() { }
3536 
3538  virtual HPS::UTF8 GetName() const { return "HPS_NavigationCubeOperator"; }
3539 
3544  virtual bool OnMouseDown(MouseState const & in_state);
3549  virtual bool OnMouseUp(MouseState const & in_state);
3554  virtual bool OnMouseMove(MouseState const & in_state);
3555 
3559  virtual bool OnTouchDown(TouchState const & in_state);
3564  virtual bool OnTouchUp(TouchState const & in_state);
3569  virtual bool OnTouchMove(TouchState const & in_state);
3570 
3571  virtual void OnViewAttached(HPS::View const & in_attached_view);
3572  virtual void OnViewDetached(HPS::View const & in_attached_view);
3573 
3574  virtual void OnModelAttached();
3575 
3580  void SetReferenceSegment(HPS::KeyPath const & in_path_to_segment);
3581 
3586  void SetReferenceSegment(HPS::KeyPathArray const & in_path_to_segments);
3587 
3591  HPS::KeyPathArray ShowReferenceSegment();
3592 
3597  void SetTransitionTime(HPS::Time const & in_time);
3598 
3601  HPS::Time GetTransitionTime() const;
3602 
3603 private:
3604  void Transition(HPS::SelectionResults const & selection_results);
3605  bool Orbit(HPS::WindowPoint const & in_loc);
3606  void TranslatePoint(HPS::WindowPoint * point);
3607  bool IsEventRelevant(HPS::Point const & event_location, HPS::KeyPath const & event_path);
3608  bool AreCamerasEqual(HPS::CameraKit const & this_camera, HPS::CameraKit const & that_camera);
3609 
3610 
3611  bool operator_active;
3612  HPS::TouchID tracked_touch_ID;
3613  HPS::WindowPoint start_point;
3614  HPS::WindowPoint down_position;
3615  HPS::Vector start_sphere_point;
3616  HPS::KeyPathArray reference_segments; //rotation and zooming happen around these segments
3617 
3618  HPS::SegmentKey nav_cube_segment;
3619  SegmentKeyArray style_segments; //in order: left / right / bottom / top / front / back
3620  UTF8Array named_styles; //in order: left / right / bottom / top / front / back
3621  HighlightOptionsKit highlight_options_kit;
3622  std::unordered_map<intptr_t, UTF8> key_to_style_map;
3623  HPS::PortfolioKey portfolio;
3624  HPS::ReferenceKeyArrayArray groups;
3625  HPS::CameraKit previous_camera;
3626  int previous_face;
3627  bool suppress_mouse_over_highlights;
3628 
3629  HPS::Rectangle nav_cube_subwindow;
3630  HPS::IntRectangle nav_cube_subwindow_offsets;
3631  float nav_cube_subwindow_width;
3632  float nav_cube_subwindow_height;
3633 
3634  int highlighted_group;
3635 
3636  bool moving;
3637  HPS::Time transition_time;
3638 
3639  class SmoothTransitionCompleteEventHandler : public EventHandler
3640  {
3641  public:
3642  SmoothTransitionCompleteEventHandler(View const & in_view, bool & in_moving)
3643  : handler_view(in_view), handler_moving(&in_moving) {}
3644 
3645  ~SmoothTransitionCompleteEventHandler() { Shutdown(); }
3646 
3647  virtual HandleResult Handle(HPS::Event const * in_event);
3648 
3649  private:
3650  View handler_view;
3651  bool * handler_moving;
3652  };
3653 
3654  SmoothTransitionCompleteEventHandler * handler;
3655 };
3656 
3657 
3658 
3659 
3660 class SceneTreeItem;
3661 typedef std::shared_ptr<SceneTreeItem> SceneTreeItemPtr;
3662 class SceneTree;
3663 typedef std::shared_ptr<SceneTree> SceneTreePtr;
3664 
3667 class SPRK_API SceneTree : public Sprocket
3668 {
3669 public:
3672  enum class ItemType : uint32_t
3673  {
3674  None = 0x00000000,
3675  GenericMask = 0xffff0000,
3676 
3677  Segment = 0x00000001,
3678  Include = 0x00000002,
3679  ConditionalExpression = 0x00000003,
3680  StaticModelSegment = 0x00000004,
3681  AttributeFilter = 0x00000005,
3682 
3683  Geometry = 0x00010000,
3684  CuttingSection = 0x00010001,
3685  Shell = 0x00010002,
3686  Mesh = 0x00010003,
3687  Grid = 0x00010004,
3688  NURBSSurface = 0x00010005,
3689  Cylinder = 0x00010006,
3690  Sphere = 0x00010007,
3691  Polygon = 0x00010008,
3692  Circle = 0x00010009,
3693  CircularWedge = 0x0001000a,
3694  Ellipse = 0x0001000b,
3695  Line = 0x0001000c,
3696  NURBSCurve = 0x0001000d,
3697  CircularArc = 0x0001000e,
3698  EllipticalArc = 0x0001000f,
3699  InfiniteLine = 0x00010010,
3700  InfiniteRay = 0x00010011,
3701  Marker = 0x00010012,
3702  Text = 0x00010013,
3703  Reference = 0x00010014,
3704  DistantLight = 0x00010015,
3705  Spotlight = 0x00010016,
3706 
3707  Attribute = 0x00020000,
3708  Portfolio = 0x00020001,
3709  SegmentStyle = 0x00020002,
3710  NamedStyle = 0x00020003,
3711  MaterialPalette = 0x00020004,
3712  Priority = 0x00020005,
3713  Material = 0x00020006,
3714  Camera = 0x00020007,
3715  ModellingMatrix = 0x00020008,
3716  UserData = 0x00020009,
3717  TextureMatrix = 0x0002000a,
3718  Culling = 0x0002000b,
3719  CurveAttribute = 0x0002000c,
3720  CylinderAttribute = 0x0002000d,
3721  EdgeAttribute = 0x0002000e,
3722  LightingAttribute = 0x0002000f,
3723  LineAttribute = 0x00020010,
3724  MarkerAttribute = 0x00020011,
3725  SurfaceAttribute = 0x00020012,
3726  Selectability = 0x00020013,
3727  SphereAttribute = 0x00020014,
3728  Subwindow = 0x00020015,
3729  TextAttribute = 0x00020016,
3730  Transparency = 0x00020017,
3731  Visibility = 0x00020018,
3732  VisualEffects = 0x00020019,
3733  Performance = 0x00020020,
3734  DrawingAttribute = 0x00020021,
3735  HiddenLineAttribute = 0x00020022,
3736  ContourLine = 0x00020023,
3737  Condition = 0x00020024,
3738  Bounding = 0x00020025,
3739  AttributeLock = 0x00020026,
3740  TransformMask = 0x00020027,
3741  ColorInterpolation = 0x00020028,
3742  CuttingSectionAttribute = 0x00020029,
3743 
3744  // window only attributes
3745  Debugging = 0x00020030,
3746  PostProcessEffects = 0x00020031,
3747  SelectionOptions = 0x00020032,
3748  UpdateOptions = 0x00020033,
3749 
3750  Definition = 0x00040000,
3751  NamedStyleDefinition = 0x00040001,
3752  TextureDefinition = 0x00040002,
3753  LinePatternDefinition = 0x00040003,
3754  GlyphDefinition = 0x00040004,
3755  CubeMapDefinition = 0x00040005,
3756  ImageDefinition = 0x00040006,
3757  MaterialPaletteDefinition = 0x00040007,
3758  ShaderDefinition = 0x00040008,
3759  ShapeDefinition = 0x00040009,
3760 
3761  Group = 0x00080000,
3762  SegmentGroup = 0x00080100,
3763  GeometryGroup = 0x00080200,
3764  AttributeGroup = 0x00080300,
3765  PortfolioGroup = 0x00080400,
3766  StyleGroup = 0x00080500,
3767  IncludeGroup = 0x00080600,
3768  DefinitionGroup = 0x00180000,
3769  NamedStyleDefinitionGroup = 0x00180700,
3770  TextureDefinitionGroup = 0x00180800,
3771  LinePatternDefinitionGroup = 0x00180900,
3772  GlyphDefinitionGroup = 0x00180a00,
3773  CubeMapDefinitionGroup = 0x00180b00,
3774  ImageDefinitionGroup = 0x00180c00,
3775  MaterialPaletteDefinitionGroup = 0x00180d00,
3776  ShaderDefinitionGroup = 0x00180e00,
3777  ShapeDefinitionGroup = 0x00180f00,
3778  GeometryGroupMask = 0x00280000,
3779  CuttingSectionGroup = 0x00280001,
3780  ShellGroup = 0x00280002,
3781  MeshGroup = 0x00280003,
3782  GridGroup = 0x00280004,
3783  NURBSSurfaceGroup = 0x00280005,
3784  CylinderGroup = 0x00280006,
3785  SphereGroup = 0x00280007,
3786  PolygonGroup = 0x00280008,
3787  CircleGroup = 0x00280009,
3788  CircularWedgeGroup = 0x0028000a,
3789  EllipseGroup = 0x0028000b,
3790  LineGroup = 0x0028000c,
3791  NURBSCurveGroup = 0x0028000d,
3792  CircularArcGroup = 0x0028000e,
3793  EllipticalArcGroup = 0x0028000f,
3794  InfiniteLineGroup = 0x00280010,
3795  InfiniteRayGroup = 0x00280011,
3796  MarkerGroup = 0x00280012,
3797  TextGroup = 0x00280013,
3798  ReferenceGroup = 0x00280014,
3799  DistantLightGroup = 0x00280015,
3800  SpotlightGroup = 0x00280016,
3801  };
3802 
3804  SceneTree();
3805 
3808  SceneTree(Canvas const & in_canvas);
3809 
3812  SceneTree(SceneTree const & in_that);
3813 
3816  SceneTree(SceneTree && in_that);
3817 
3818  virtual ~SceneTree();
3819 
3820  static const HPS::Type staticType = HPS::Type::SceneTree;
3821  virtual HPS::Type ObjectType() const { return staticType; }
3822 
3826  SceneTree & operator=(SceneTree const & in_that);
3827 
3831  SceneTree & operator=(SceneTree && in_that);
3832 
3836  virtual void Assign(SceneTree const & in_that);
3837 
3841  bool Equals(SceneTree const & in_that) const;
3842 
3846  bool operator!=(SceneTree const & in_that) const;
3847 
3851  bool operator==(SceneTree const & in_that) const;
3852 
3853 
3862  void SetHighlightOptions(HighlightOptionsKit const & in_options);
3863 
3873  void SetHighlightOptions(HighlightOptionsKitArray const & in_options);
3874 
3885  void SetHighlightOptions(size_t in_count, HighlightOptionsKit const in_options []);
3886 
3894  void AddHighlightOptions(HighlightOptionsKit const & in_options);
3895 
3898  HighlightOptionsKitArray GetHighlightOptions() const;
3899 
3900 
3905  void SetGroupingLimit(size_t in_limit);
3906 
3909  size_t GetGroupingLimit() const;
3910 
3911 
3918  void SetRoot(SceneTreeItemPtr const & in_root);
3919 
3922  SceneTreeItemPtr GetRoot() const;
3923 
3924 
3927  virtual void Flush();
3928 
3933  void SetHighlightEventHandling(bool in_state);
3934 
3938  bool GetHighlightEventHandling() const;
3939 
3942  void ReExpand();
3943 };
3944 
3945 
3948 class SPRK_API SceneTreeItem : public Sprocket
3949 {
3950 public:
3952  SceneTreeItem();
3953 
3956  SceneTreeItem(SceneTreeItem const & in_that);
3957 
3960  SceneTreeItem(SceneTreeItem && in_that);
3961 
3967  SceneTreeItem(SceneTreePtr const & in_tree, Model const & in_model);
3968 
3974  SceneTreeItem(SceneTreePtr const & in_tree, View const & in_view);
3975 
3981  SceneTreeItem(SceneTreePtr const & in_tree, Layout const & in_layout);
3982 
3988  SceneTreeItem(SceneTreePtr const & in_tree, Canvas const & in_canvas);
3989 
3997  SceneTreeItem(SceneTreePtr const & in_tree, Key const & in_key, SceneTree::ItemType in_type, char const * in_title = nullptr);
3998 
3999  virtual ~SceneTreeItem();
4000 
4001  static const HPS::Type staticType = HPS::Type::SceneTreeItem;
4002  HPS::Type ObjectType() const { return staticType; }
4003 
4007  SceneTreeItem & operator=(SceneTreeItem const & in_that);
4008 
4012  SceneTreeItem & operator=(SceneTreeItem && in_that);
4013 
4017  virtual void Assign(SceneTreeItem const & in_that);
4018 
4022  bool Equals(SceneTreeItem const & in_that) const;
4023 
4027  bool operator!=(SceneTreeItem const & in_that) const;
4028 
4032  bool operator==(SceneTreeItem const & in_that) const;
4033 
4034 
4037  SceneTreePtr GetTree() const;
4038 
4041  UTF8 GetTitle() const;
4042 
4045  SceneTree::ItemType GetItemType() const;
4046 
4050  bool HasItemType(SceneTree::ItemType in_mask) const;
4051 
4054  Key GetKey() const;
4055 
4058  KeyPath GetKeyPath() const;
4059 
4062  bool HasChildren() const;
4063 
4064 
4073  virtual SceneTreeItemPtr AddChild(Key const & in_key, SceneTree::ItemType in_type, char const * in_title = nullptr) = 0;
4074 
4075 
4078  virtual void Expand();
4079 
4082  virtual void Collapse();
4083 
4084 
4089  bool IsSelected() const;
4090 
4096  virtual void Select();
4097 
4103  virtual void Unselect();
4104 
4109  bool IsHighlightable() const;
4110 
4116  bool IsHighlighted() const;
4117 
4122  void Highlight(size_t in_highlight_options_index = 0);
4123 
4129  void Highlight(HighlightOptionsKit const & in_highlight_options);
4130 
4136  void Unhighlight(size_t in_highlight_options_index = 0);
4137 
4144  void Unhighlight(HighlightOptionsKit const & in_highlight_options);
4145 
4148  bool IsExpanded() const;
4149 
4152  void ReExpand();
4153 };
4154 
4155 
4156 
4157 class ComponentTreeItem;
4158 typedef std::shared_ptr<ComponentTreeItem> ComponentTreeItemPtr;
4159 class ComponentTree;
4160 typedef std::shared_ptr<ComponentTree> ComponentTreePtr;
4161 
4164 class SPRK_API ComponentTree : public Sprocket
4165 {
4166 public:
4169  enum class ItemType
4170  {
4171  None,
4172  ExchangeComponent,
4173  ExchangeModelFile,
4174 
4175  ExchangeViewGroup,
4176  ExchangeAnnotationViewGroup,
4177  ExchangePMIGroup,
4178  ExchangeModelGroup,
4179 
4180  ParasolidComponent,
4181  ParasolidModelFile,
4182 
4183  DWGComponent,
4184  DWGModelFile,
4185  };
4186 
4188  ComponentTree();
4189 
4193  ComponentTree(Canvas const & in_canvas, size_t in_layer = 0);
4194 
4197  ComponentTree(ComponentTree const & in_that);
4198 
4201  ComponentTree(ComponentTree && in_that);
4202 
4203  virtual ~ComponentTree();
4204 
4205  static const HPS::Type staticType = HPS::Type::ComponentTree;
4206  virtual HPS::Type ObjectType() const { return staticType; }
4207 
4211  ComponentTree & operator=(ComponentTree const & in_that);
4212 
4216  ComponentTree & operator=(ComponentTree && in_that);
4217 
4221  virtual void Assign(ComponentTree const & in_that);
4222 
4226  bool Equals(ComponentTree const & in_that) const;
4227 
4231  bool operator!=(ComponentTree const & in_that) const;
4232 
4236  bool operator==(ComponentTree const & in_that) const;
4237 
4238 
4247  void SetHighlightOptions(HighlightOptionsKit const & in_options);
4248 
4258  void SetHighlightOptions(HighlightOptionsKitArray const & in_options);
4259 
4270  void SetHighlightOptions(size_t in_count, HighlightOptionsKit const in_options []);
4271 
4281  void AddHighlightOptions(HighlightOptionsKit const & in_options);
4282 
4285  HighlightOptionsKitArray GetHighlightOptions() const;
4286 
4287 
4294  void SetRoot(ComponentTreeItemPtr const & in_root);
4295 
4298  ComponentTreeItemPtr GetRoot() const;
4299 
4300 
4303  virtual void Flush();
4304 
4307  void ReExpand();
4308 
4313  void SetHighlightEventHandling(bool in_state);
4314 
4318  bool GetHighlightEventHandling() const;
4319 };
4320 
4321 
4324 class SPRK_API ComponentTreeItem : public Sprocket
4325 {
4326 public:
4329 
4332  ComponentTreeItem(ComponentTreeItem const & in_that);
4333 
4337 
4343  ComponentTreeItem(ComponentTreePtr const & in_tree, CADModel const & in_cad_model);
4344 
4351  ComponentTreeItem(ComponentTreePtr const & in_tree, Component const & in_component, ComponentTree::ItemType in_type);
4352 
4353  virtual ~ComponentTreeItem();
4354 
4355  static const HPS::Type staticType = HPS::Type::ComponentTreeItem;
4356  HPS::Type ObjectType() const { return staticType; }
4357 
4361  ComponentTreeItem & operator=(ComponentTreeItem const & in_that);
4362 
4366  ComponentTreeItem & operator=(ComponentTreeItem && in_that);
4367 
4371  virtual void Assign(ComponentTreeItem const & in_that);
4372 
4376  bool Equals(ComponentTreeItem const & in_that) const;
4377 
4381  bool operator!=(ComponentTreeItem const & in_that) const;
4382 
4386  bool operator==(ComponentTreeItem const & in_that) const;
4387 
4388 
4389 
4392  ComponentTreePtr GetTree() const;
4393 
4396  UTF8 GetTitle() const;
4397 
4400  ComponentTree::ItemType GetItemType() const;
4401 
4404  Component GetComponent() const;
4405 
4408  bool HasChildren() const;
4409 
4412  ComponentPath GetPath() const;
4413 
4414 
4422  virtual ComponentTreeItemPtr AddChild(Component const & in_component, ComponentTree::ItemType in_type) = 0;
4423 
4424 
4427  virtual void Expand();
4428 
4431  virtual void Collapse();
4432 
4433 
4441  bool IsHighlighted() const;
4442 
4447  virtual void OnHighlight(HighlightOptionsKit const & in_options);
4448 
4453  virtual void OnUnhighlight(HighlightOptionsKit const & in_options);
4454 
4455 
4460  void Highlight(size_t in_highlight_options_index = 0);
4461 
4467  void Highlight(HighlightOptionsKit const & in_highlight_options);
4468 
4473  void Unhighlight(size_t in_highlight_options_index = 0);
4474 
4480  void Unhighlight(HighlightOptionsKit const & in_highlight_options);
4481 
4482 
4494  bool IsHidden() const;
4495 
4499  virtual void OnHide();
4500 
4504  virtual void OnShow();
4505 
4510  void Hide();
4511 
4517  void Show(Component::Visibility in_subtree_visibility = Component::Visibility::PreserveNone);
4518 
4524  void Isolate(Component::Visibility in_subtree_visibility = Component::Visibility::PreserveNone);
4525 
4528  bool IsExpanded() const;
4529 
4532  void ReExpand();
4533 };
4534 
4535 
4536 
4537 
4538 }
4539 #endif
4540 
4541 
4542 
Definition: sprk.h:3216
HPS::Type ObjectType() const
Definition: sprk.h:3047
Definition: hps.h:3420
Definition: hps.h:6261
Definition: sprk.h:1008
HPS::Type ObjectType() const
Definition: sprk.h:495
Event * Clone() const
Definition: sprk.h:761
Definition: sprk.h:3406
Definition: sprk.h:273
ComponentHighlightEvent(Event const &in_event)
Definition: sprk.h:2630
HPS::Type ObjectType() const
Definition: sprk.h:282
virtual bool OnTimerTick(HPS::TimerTickEvent const &in_event)
Definition: sprk.h:1207
Definition: hps.h:43156
ComponentHighlightEvent()
Definition: sprk.h:2612
void SetModifierTrigger(ModifierKeys in_modifiers)
Definition: sprk.h:1235
Definition: hps.h:472
CameraChangedEvent(Event const &in_event)
Definition: sprk.h:1027
HPS::Type ObjectType() const
Definition: sprk.h:218
HPS::Type ObjectType() const
Definition: sprk.h:1119
virtual bool OnKeyDown(KeyboardState const &in_state)
Definition: sprk.h:1192
std::vector< SegmentKey, Allocator< SegmentKey > > SegmentKeyArray
Array of type HPS::SegmentKey.
Definition: hps.h:6689
HPS::Type ObjectType() const
Definition: sprk.h:2682
An InvalidSpecificationException is thrown when a method is called with non-sensical or contradictory...
Definition: hps.h:5865
Location
Definition: sprk.h:1466
ModifierKeys GetModifierTrigger() const
Definition: sprk.h:1238
virtual bool OnKeyUp(KeyboardState const &in_state)
Definition: sprk.h:1197
ItemType
Definition: sprk.h:4169
Definition: hps.h:5905
virtual intptr_t Freshen() const
Definition: sprk.h:1050
CaptureActivationEvent()
Definition: sprk.h:2805
Definition: sprk.h:67
Definition: sprk.h:214
ComponentIsolateEvent(Event const &in_event)
Definition: sprk.h:2573
Definition: sprk.h:683
PathType
Definition: sprk.h:2166
Definition: sprk.h:106
virtual bool OnMouseMove(MouseState const &in_state)
Definition: sprk.h:1157
Definition: sprk.h:4324
virtual bool OnMouseEnter(MouseState const &in_state)
Definition: sprk.h:1167
Definition: sprk.h:3270
HPS::Type ObjectType() const
Definition: sprk.h:2873
Definition: hps.h:42939
ComponentIsolateEvent()
Definition: sprk.h:2556
Definition: hps.h:1346
Definition: hps.h:1064
HPS::Type ObjectType() const
Definition: sprk.h:2201
Definition: hps.h:1740
Visibility
Definition: sprk.h:1787
Definition: sprk.h:242
ModelDeletedEvent()
Definition: sprk.h:969
SmoothTransitionCompleteEvent(HPS::View const &in_view)
Definition: sprk.h:3477
std::vector< KeyPath, Allocator< KeyPath > > KeyPathArray
Array of type HPS::KeyPath.
Definition: hps.h:6727
Definition: sprk.h:4164
Definition: hps.h:48690
Definition: sprk.h:1068
virtual bool OnTouchUp(TouchState const &in_state)
Definition: sprk.h:1182
Definition: hps.h:7768
MouseButtons GetMouseTrigger() const
Definition: sprk.h:1230
virtual HPS::Type ObjectType() const
Definition: sprk.h:3821
Definition: hps.h:3571
Definition: hps.h:2107
Definition: sprk.h:920
bool HasAll(MouseButtons in_mouse_trigger, ModifierKeys in_modifier_trigger) const
Event * Clone() const
Definition: sprk.h:805
Definition: sprk.h:2551
Definition: sprk.h:771
Definition: hps.h:1429
Definition: hps.h:884
HPS::Type ObjectType() const
Definition: sprk.h:1674
Definition: hps.h:43059
virtual void OnModelDetached()
Definition: sprk.h:1223
SmoothTransitionCompleteEvent(Event const &in_event)
Definition: sprk.h:3482
Definition: hps.h:1798
Definition: hps.h:1564
Definition: hps.h:9012
Definition: hps.h:246
void SetMouseTrigger(MouseButtons in_buttons)
Definition: sprk.h:1226
Definition: hps.h:1858
Event * Clone() const
Definition: sprk.h:911
CameraChangedEvent()
Definition: sprk.h:1012
SprocketKit & operator=(SprocketKit &&in_that)
Definition: sprk.h:263
virtual void OnViewAttached(HPS::View const &in_attached_view)
Definition: sprk.h:1211
Definition: hps.h:48588
Definition: hps.h:41976
Definition: sprk.h:1462
Definition: sprk.h:965
Definition: sprk.h:567
HPS::Type ObjectType() const
Definition: sprk.h:114
ViewDetachedEvent(Event const &in_event)
Definition: sprk.h:847
Definition: hps.h:42023
HPS::Type ObjectType() const
Definition: sprk.h:4002
LayoutDeletedEvent()
Definition: sprk.h:775
Event * Clone() const
Definition: sprk.h:955
Definition: hps.h:41408
Definition: hps.h:44725
Definition: hps.h:1104
Definition: sprk.h:2955
LayoutDetachedEvent()
Definition: sprk.h:730
Definition: sprk.h:3069
virtual bool OnMouseLeave(MouseState const &in_state)
Definition: sprk.h:1172
Definition: hps.h:9959
Definition: hps.h:43103
Definition: hps.h:1517
SmoothTransitionCompleteEvent()
Definition: sprk.h:3472
Definition: hps.h:1449
Event * Clone() const
Definition: sprk.h:2589
HPS::Type ObjectType() const
Definition: sprk.h:575
virtual bool OnMouseUp(MouseState const &in_state)
Definition: sprk.h:1152
FilterActivationEvent()
Definition: sprk.h:2716
Definition: hps.h:1468
virtual void OnModelAttached()
Definition: sprk.h:1219
Definition: hps.h:39006
FilterActivationEvent(Event const &in_event)
Definition: sprk.h:2730
ModelDetachedEvent(Event const &in_event)
Definition: sprk.h:939
HPS::Type ObjectType() const
Definition: sprk.h:1495
HPS::Type ObjectType() const
Definition: sprk.h:1912
Definition: hps.h:7139
Location
Definition: sprk.h:1645
HPS::Type ObjectType() const
Definition: sprk.h:246
Definition: hps.h:48059
Definition: sprk.h:3020
Definition: sprk.h:1641
Definition: hps.h:44904
HPS::Type ObjectType() const
Definition: sprk.h:1336
SprocketControl & operator=(SprocketControl &&in_that)
Definition: sprk.h:235
Definition: hps.h:46954
virtual UTF8 GetName() const
Definition: sprk.h:1142
Definition: hps.h:48475
Definition: sprk.h:726
Event * Clone() const
Definition: sprk.h:2747
CaptureActivationEvent(Event const &in_event)
Definition: sprk.h:2819
virtual bool OnTouchDown(TouchState const &in_state)
Definition: sprk.h:1177
HPS::Type ObjectType() const
Definition: sprk.h:3145
CanvasDeletedEvent()
Definition: sprk.h:687
virtual bool OnMouseWheel(MouseState const &in_state)
Definition: sprk.h:1162
HPS::Type ObjectType() const
Definition: sprk.h:2976
HPS::Type ObjectType() const
Definition: sprk.h:3096
SprocketControl(SprocketControl &&in_that)
Definition: sprk.h:230
Event * Clone() const
Definition: sprk.h:2835
Definition: hps.h:15804
ViewDeletedEvent()
Definition: sprk.h:881
intptr_t GetChannel() const
Definition: hps.h:6378
Definition: sprk.h:814
SprocketKit(SprocketKit &&in_that)
Definition: sprk.h:258
virtual bool Drop(Event const *in_that_event) const
Definition: sprk.h:3504
virtual HPS::UTF8 GetName() const
Definition: sprk.h:3411
Definition: sprk.h:1781
Definition: hps.h:45183
Definition: hps.h:47566
virtual bool OnTextInput(HPS::UTF8 const &in_text)
Definition: sprk.h:1202
The ComponentPath contains only components which are unique to this request, omitting ambiguous entri...
ViewDeletedEvent(Event const &in_event)
Definition: sprk.h:896
Definition: hps.h:38535
Definition: sprk.h:3167
ViewDetachedEvent()
Definition: sprk.h:825
Definition: hps.h:6345
Override the visibility for any components in the subtree under the ComponentPath specified regardles...
Definition: hps.h:14052
std::vector< UTF8, Allocator< UTF8 > > UTF8Array
Array of type HPS::UTF8.
Definition: hps.h:6695
Definition: sprk.h:1313
Definition: hps.h:408
HPS::Type ObjectType() const
Definition: sprk.h:3194
Event * Clone() const
Definition: sprk.h:2647
Definition: sprk.h:487
CanvasDeletedEvent(Event const &in_event)
Definition: sprk.h:702
Definition: sprk.h:3531
Definition: sprk.h:2161
std::shared_ptr< Operator > OperatorPtr
Shared pointer to an Operator object.
Definition: sprk.h:84
virtual bool Drop(Event const *in_that_event) const
Definition: sprk.h:1040
ComponentType
Definition: sprk.h:1797
Definition: hps.h:46879
std::vector< Key, Allocator< Key > > KeyArray
Array of type HPS::Key.
Definition: hps.h:6699
Definition: hps.h:2126
Definition: sprk.h:2601
Event * Clone() const
Definition: sprk.h:717
LayoutDetachedEvent(Event const &in_event)
Definition: sprk.h:745
HPS::Type ObjectType() const
Definition: sprk.h:4356
virtual bool OnMouseDown(MouseState const &in_state)
Definition: sprk.h:1147
ItemType
Definition: sprk.h:3672
Definition: sprk.h:2660
Definition: sprk.h:3321
virtual HPS::UTF8 GetName() const
Definition: sprk.h:3538
DeleteMode
Definition: sprk.h:1889
Definition: sprk.h:191
virtual void OnViewDetached(HPS::View const &in_detached_view)
Definition: sprk.h:1215
Definition: sprk.h:3468
Definition: hps.h:427
Event * Clone() const
Definition: sprk.h:999
Definition: sprk.h:2760
Definition: hps.h:2146
ModelDetachedEvent()
Definition: sprk.h:924
static MouseButtons ButtonLeft()
Definition: hps.h:48177
virtual HPS::Type ObjectType() const
Definition: sprk.h:4206
Definition: sprk.h:3667
Definition: sprk.h:3118
UpdateType
Definition: hps.h:180
Definition: hps.h:9170
HPS::Type ObjectType() const
Definition: sprk.h:1079
virtual bool IsMouseTriggered(MouseState const &in_state)
Definition: sprk.h:1241
Definition: hps.h:7686
Definition: sprk.h:2705
Definition: hps.h:38148
Definition: hps.h:353
Event * Clone() const
Definition: sprk.h:3495
ModelDeletedEvent(Event const &in_event)
Definition: sprk.h:984
Event * Clone() const
Definition: sprk.h:865
LayoutDeletedEvent(Event const &in_event)
Definition: sprk.h:790
Definition: hps.h:9399
Definition: hps.h:11064
Definition: sprk.h:1256
virtual bool OnTouchMove(TouchState const &in_state)
Definition: sprk.h:1187
Definition: sprk.h:3948
Definition: sprk.h:2847
Definition: hps.h:43635
Mode
Definition: sprk.h:196
Definition: hps.h:513
Definition: sprk.h:1110
Definition: hps.h:1147
Definition: hps.h:42985
Definition: sprk.h:877
Definition: sprk.h:2801
Definition: hps.h:41472
HPS::Type ObjectType() const
Definition: sprk.h:3243
HPS::Type ObjectType() const
Definition: sprk.h:2782
HPS::Type ObjectType() const
Definition: sprk.h:3297
Definition: hps.h:7397
Event * Clone() const
Definition: sprk.h:1057