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 
17 #ifdef _MSC_VER
18 # pragma warning(disable: 4251) //Not an issue as long as debug and release libraries aren't mixed
19 #ifndef STATIC_APP
20 # ifdef SPRK
21 # define SPRK_API __declspec (dllexport)
22 # else
23 # define SPRK_API __declspec (dllimport)
24 # endif
25 #endif
26 #else
27 # include <stddef.h>
28 # if defined(LINUX_SYSTEM) && defined(SPRK)
29 # ifndef STATIC_APP
30 # define SPRK_API __attribute__ ((visibility ("default")))
31 # endif
32 # endif
33 #endif
34 
35 #ifndef SPRK_API
36 # define SPRK_API
37 #endif
38 namespace SPRKI
39 {
40  class X;
41 };
42 
43 namespace HPS
44 {
45 
46 class Factory;
47 class Canvas;
48 class Layout;
49 class View;
50 class Model;
51 class Operator;
52 class OperatorControl;
53 class NavigationCubeControl;
54 class AxisTriadControl;
55 class Component;
56 class ComponentPath;
57 class ComponentHighlightEvent;
58 class Filter;
59 class Capture;
60 class CADModel;
61 class Metadata;
62 
63 
64 
65 
66 class SPRK_API Sprocket : public HPS::Object
67 {
68 public:
69  Sprocket() {}
70 #if !defined(_MSC_VER) || _MSC_VER >= 1900
71  Sprocket(HPS::Sprocket const & in_that) = default;
72 #endif
73  Sprocket(Sprocket && in_that) : HPS::Object(std::move(in_that)) {}
74 
75  virtual ~Sprocket() {}
76 };
83 typedef std::shared_ptr<Operator> OperatorPtr;
84 
85 typedef std::vector<OperatorPtr, Allocator<OperatorPtr> > OperatorPtrArray;
86 
87 typedef std::vector<Canvas, Allocator<Canvas> > CanvasArray;
88 typedef std::vector<Layout, Allocator<Layout> > LayoutArray;
89 typedef std::vector<View, Allocator<View> > ViewArray;
90 typedef std::vector<Model, Allocator<Model> > ModelArray;
91 
92 typedef std::vector<Component, Allocator<Component> > ComponentArray;
93 typedef std::vector<Metadata, Allocator<Metadata> > MetadataArray;
94 typedef std::vector<Filter, Allocator<Filter> > FilterArray;
95 typedef std::vector<Capture, Allocator<Capture> > CaptureArray;
96 typedef std::vector<CADModel, Allocator<CADModel> > CADModelArray;
97 typedef std::vector<ReferenceKeyArray, Allocator<ReferenceKeyArray>> ReferenceKeyArrayArray;
98 typedef std::vector<ComponentPath, Allocator<ComponentPath>> ComponentPathArray;
99 typedef std::vector<HighlightOptionsKit, Allocator<HighlightOptionsKit>> HighlightOptionsKitArray;
105 class SPRK_API Canvas : public Sprocket
106 {
107 public:
108  Canvas();
109  Canvas(Canvas const & that);
110  ~Canvas();
111 
112  static const HPS::Type staticType = HPS::Type::Canvas;
113  HPS::Type ObjectType() const { return staticType; }
114 
116  void Delete();
117 
118  Canvas & operator=(Canvas const & in_that);
119  void Assign(Canvas const & in_that);
120 
121  bool Equals(Canvas const & in_that) const;
122  bool operator!= (Canvas const & in_that) const;
123  bool operator== (Canvas const & in_that) const;
124 
126  UTF8 GetName() const;
127 
131  void AttachLayout(Layout const & in_layout);
132 
136  void AttachViewAsLayout(View const & in_view);
137 
139  void DetachLayout();
140 
142  Layout GetAttachedLayout() const;
143 
145  IncludeKey GetAttachedLayoutIncludeLink() const;
146 
148  View GetFrontView() const;
149 
150  WindowKey const GetWindowKey() const;
151 
154  WindowKey GetWindowKey();
155 
156  PortfolioKey const GetPortfolioKey() const;
157 
159  PortfolioKey GetPortfolioKey();
160 
162  void Update() const;
163 
166  UpdateNotifier UpdateWithNotifier() const;
167 
171  void Update(HPS::Window::UpdateType in_type, HPS::Time in_time_limit = -1.0) const;
172 
177  UpdateNotifier UpdateWithNotifier(HPS::Window::UpdateType in_type, HPS::Time in_time_limit = -1.0) const;
178 
182  void SetFrameRate(float in_frame_rate=20);
183 
187  float GetFrameRate() const;
188 };
189 
190 class SPRK_API Rendering
191 {
192 public:
195  enum class Mode
196  {
197  Gouraud,
198  GouraudWithLines,
199  Flat,
200  FlatWithLines,
201  Phong,
202  PhongWithLines,
203  HiddenLine,
204  FastHiddenLine,
205  Wireframe,
206  Default = Phong
207  };
208 
209 private:
210  Rendering() {}
211 };
212 
213 class SPRK_API SprocketControl : public Sprocket
214 {
215 public:
216  static const HPS::Type staticType = HPS::Type::SprocketControl;
217  HPS::Type ObjectType() const {return staticType;}
218 
219 #if !defined(_MSC_VER) || _MSC_VER >= 1900
220  SprocketControl(HPS::SprocketControl const & in_that) = default;
221 #endif
222 
223 protected:
224  SprocketControl() {}
225 
229  SprocketControl(SprocketControl && in_that) : Sprocket(std::move(in_that)) {}
230 
235  {
236  this->Object::operator=(std::move(in_that));
237  return *this;
238  }
239 };
240 
241 class SPRK_API SprocketKit : public Sprocket
242 {
243 public:
244  static const HPS::Type staticType = HPS::Type::SprocketKit;
245  HPS::Type ObjectType() const { return staticType; }
246 
247 #if !defined(_MSC_VER) || _MSC_VER >= 1900
248  SprocketKit(HPS::SprocketKit const & in_that) = default;
249 #endif
250 
251 protected:
252  SprocketKit() {}
253 
257  SprocketKit(SprocketKit && in_that) : Sprocket(std::move(in_that)) {}
258 
263  {
264  this->Object::operator=(std::move(in_that));
265  return *this;
266  }
267 };
268 
272 class SPRK_API View : public Sprocket
273 {
274 public:
275  View();
276  View(View const & that);
277  explicit View(SprocketControl const & in_ctrl);
278  ~View();
279 
280  static const HPS::Type staticType = HPS::Type::View;
281  HPS::Type ObjectType() const { return staticType; }
282 
284  void Delete();
285 
286  View & operator=(View const & in_that);
287  void Assign(View const & in_that);
288 
289  bool Equals(View const & in_that) const;
290  bool operator!= (View const & in_that) const;
291  bool operator== (View const & in_that) const;
292 
294  UTF8 GetName() const;
295 
296 
299  HPS::View & ComputeFitWorldCamera(HPS::CameraKit & out_camera);
300 
304  HPS::View & ComputeFitWorldCamera(SegmentKey const & in_segment, HPS::CameraKit & out_camera);
305 
306 
310  HPS::View & ComputeFitWorldCamera(BoundingKit const & in_bounding, HPS::CameraKit & out_camera);
311 
317  HPS::View & ComputeFitWorldCamera(SegmentKey const & in_segment, MatrixKit const & in_transform, HPS::CameraKit & out_camera);
318 
319 
325  HPS::View & ComputeFitWorldCamera(BoundingKit const & in_bounding, MatrixKit const & in_transform, HPS::CameraKit & out_camera);
326 
327 
329  HPS::View & FitWorld();
330 
336  HPS::View & FitWorld(SegmentKey const & in_segment);
337 
338 
341  HPS::View & FitWorld(BoundingKit const & in_bounding);
342 
348  HPS::View & FitWorld(SegmentKey const & in_segment, MatrixKit const & in_transform);
349 
350 
355  HPS::View & FitWorld(BoundingKit const & in_bounding, MatrixKit const & in_transform);
356 
361  void AttachModel(Model const & in_model);
362 
364  void DetachModel();
365 
367  Model GetAttachedModel() const;
368 
370  IncludeKey GetAttachedModelIncludeLink() const;
371 
375  void SetRenderingMode(Rendering::Mode in_mode);
376 
379  Rendering::Mode GetRenderingMode() const;
380 
382  OperatorPtrArray GetOperators() const;
383 
386  void SetOperators(OperatorPtrArray & in_operators);
387 
391  void SetOperators(size_t in_count, OperatorPtr in_operators []);
392 
395  void SetOperator(OperatorPtr const & in_operator);
396 
400  void SetOperator(Operator * in_operator);
401 
403  OperatorControl GetOperatorControl();
404  OperatorControl const GetOperatorControl() const;
405 
407  NavigationCubeControl GetNavigationCubeControl();
408  NavigationCubeControl const GetNavigationCubeControl() const;
409 
411  AxisTriadControl GetAxisTriadControl();
412  AxisTriadControl const GetAxisTriadControl() const;
413 
416  SegmentKey GetSegmentKey();
417  SegmentKey const GetSegmentKey() const;
418 
421  SegmentKey GetModelOverrideSegmentKey();
422  SegmentKey const GetModelOverrideSegmentKey() const;
423 
424 
425  PortfolioKey const GetPortfolioKey() const;
426 
428  PortfolioKey GetPortfolioKey();
429 
434  void SetSimpleShadow(bool in_state, float in_percent_offset = 5.0f);
435 
437  bool GetSimpleShadow();
438 
443  void SetSimpleReflection(bool in_state, float in_percent_offset = 5.0f);
444 
446  bool GetSimpleReflection();
447 
449  void Update() const;
450 
453  UpdateNotifier UpdateWithNotifier() const;
454 
458  void Update(HPS::Window::UpdateType in_type, HPS::Time in_time_limit = -1.0) const;
459 
465  UpdateNotifier UpdateWithNotifier(HPS::Window::UpdateType in_type, HPS::Time in_time_limit = -1.0) const;
466 
470  void SmoothTransition(HPS::CameraKit const & in_camera_kit, HPS::Time in_duration = 0.5);
471 
472  static UTF8 GetHideStyleName();
473  static UTF8 GetShowStyleName();
474 
476  KeyArray const GetNavigationKeys();
477 
479  LayoutArray GetOwningLayouts();
480  LayoutArray const GetOwningLayouts() const;
481 };
482 
486 class SPRK_API Model : public Sprocket
487 {
488 public:
489  Model();
490  Model(Model const & that);
491  ~Model();
492 
493  static const HPS::Type staticType = HPS::Type::Model;
494  HPS::Type ObjectType() const { return staticType; }
495 
497  void Delete();
498 
499  Model & operator=(Model const & in_that);
500  void Assign(Model const & in_that);
501 
502  bool Equals(Model const & in_that) const;
503  bool operator!= (Model const & in_that) const;
504  bool operator== (Model const & in_that) const;
505 
507  UTF8 GetName() const;
508 
511  SegmentKey GetSegmentKey();
512  SegmentKey const GetSegmentKey() const;
513 
515  SegmentKey GetLibraryKey();
516  SegmentKey const GetLibraryKey() const;
517 
519  PortfolioKey GetPortfolioKey();
520  PortfolioKey const GetPortfolioKey() const;
521 
523  HPS::Vector GetUpVector();
524  HPS::Vector const GetUpVector() const;
525 
527  HPS::Vector GetFrontVector();
528  HPS::Vector const GetFrontVector() const;
529 
531  HPS::ViewArray GetOwningViews();
532  HPS::ViewArray const GetOwningViews() const;
533 
537  void SetOrientation(HPS::Vector & in_up_vector, HPS::Vector & in_front_vector);
538 
540  bool ShowOrientation(HPS::Vector & out_up_vector, HPS::Vector & out_front_vector) const;
541 
543  void Update() const;
544 
547  UpdateNotifier UpdateWithNotifier() const;
548 
552  void Update(HPS::Window::UpdateType in_type, HPS::Time in_time_limit = -1.0) const;
553 
559  UpdateNotifier UpdateWithNotifier(HPS::Window::UpdateType in_type, HPS::Time in_time_limit = -1.0) const;
560 
561 };
562 
566 class SPRK_API Layout : public Sprocket
567 {
568 public:
569  Layout();
570  Layout(Layout const & that);
571  ~Layout();
572 
573  static const HPS::Type staticType = HPS::Type::Layout;
574  HPS::Type ObjectType() const { return staticType; }
575 
577  void Delete();
578 
579  Layout & operator=(Layout const & in_that);
580  void Assign(Layout const & in_that);
581 
582  bool Equals(Layout const & in_that) const;
583  bool operator!= (Layout const & in_that) const;
584  bool operator== (Layout const & in_that) const;
585 
587  UTF8 GetName() const;
588 
590  size_t GetLayerCount() const;
591 
595  void AttachViewFront(View const & in_view, HPS::Rectangle const & in_position = HPS::Rectangle(-1.0f, 1.0f, -1.0f, 1.0f));
599  void AttachViewBack(View const & in_view, HPS::Rectangle const & in_position = HPS::Rectangle(-1.0f, 1.0f, -1.0f, 1.0f));
600 
603  void DetachLayer(size_t in_layer);
604 
607  void DetachView(View const & in_view); // everywhere it occurs
608 
611  void BringToFront(size_t in_layer);
612 
616  void ReassignLayer(size_t in_layer, HPS::View in_view);
617 
621  void RepositionLayer(size_t in_layer, HPS::Rectangle const & in_position);
622 
624  View GetFrontView() const;
625 
629  View GetAttachedView(size_t in_layer = 0) const;
630 
634  Rectangle GetPosition(size_t in_layer) const;
635 
637  IncludeKey GetAttachedViewIncludeLink(size_t in_layer) const;
638 
640  SegmentKey GetLayerSegmentKey(size_t in_layer) const;
641 
645  size_t GetLayerAt(HPS::WindowPoint const & in_point) const;
646 
650  bool ShowLayerAt(HPS::WindowPoint const & in_point) const;
651 
654  SegmentKey GetSegmentKey();
655  SegmentKey const GetSegmentKey() const;
656 
658  CanvasArray GetOwningCanvases();
659  CanvasArray const GetOwningCanvases() const;
660 
662  void Update() const;
663 
666  UpdateNotifier UpdateWithNotifier() const;
667 
671  void Update(HPS::Window::UpdateType in_type, HPS::Time in_time_limit = -1.0) const;
672 
678  UpdateNotifier UpdateWithNotifier(HPS::Window::UpdateType in_type, HPS::Time in_time_limit = -1.0) const;
679 
680 };
681 
682 class SPRK_API CanvasDeletedEvent : public Event
683 {
684 public:
687  {
688  channel = GetClassID();
689  consumable = false;
690  }
691 
692  CanvasDeletedEvent(Canvas const & in_canvas)
693  : Event(), canvas(in_canvas)
694  {
695  channel = GetClassID();
696  consumable = false;
697  }
698 
701  CanvasDeletedEvent(Event const & in_event) : Event(in_event)
702  {
703  if (in_event.GetChannel() == Object::ClassID<CanvasDeletedEvent>())
704  {
705  auto that = static_cast<CanvasDeletedEvent const &>(in_event);
706  canvas = that.canvas;
707  }
708  else
709  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
710  }
711 
713 
716  Event * Clone() const
717  {
718  CanvasDeletedEvent * new_event = new CanvasDeletedEvent(*this);
719  return new_event;
720  }
721 
722  Canvas canvas;
723 };
724 
725 class SPRK_API LayoutDetachedEvent : public Event
726 {
727 public:
730  {
731  channel = GetClassID();
732  consumable = false;
733  }
734 
735  LayoutDetachedEvent(Canvas const & in_canvas, Layout const & in_layout)
736  : Event(), canvas(in_canvas), layout(in_layout)
737  {
738  channel = GetClassID();
739  consumable = false;
740  }
741 
744  LayoutDetachedEvent(Event const & in_event) : Event(in_event)
745  {
746  if (in_event.GetChannel() == Object::ClassID<LayoutDetachedEvent>())
747  {
748  auto that = static_cast<LayoutDetachedEvent const &>(in_event);
749  canvas = that.canvas;
750  layout = that.layout;
751  }
752  else
753  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
754  }
755 
757 
760  Event * Clone() const
761  {
762  LayoutDetachedEvent * new_event = new LayoutDetachedEvent(*this);
763  return new_event;
764  }
765 
766  Canvas canvas;
767  Layout layout;
768 };
769 
770 class SPRK_API LayoutDeletedEvent : public Event
771 {
772 public:
775  {
776  channel = GetClassID();
777  consumable = false;
778  }
779 
780  LayoutDeletedEvent(Layout const & in_layout)
781  : Event(), layout(in_layout)
782  {
783  channel = GetClassID();
784  consumable = false;
785  }
786 
789  LayoutDeletedEvent(Event const & in_event) : Event(in_event)
790  {
791  if (in_event.GetChannel() == Object::ClassID<LayoutDeletedEvent>())
792  {
793  auto that = static_cast<LayoutDeletedEvent const &>(in_event);
794  layout = that.layout;
795  }
796  else
797  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
798  }
799 
801 
804  Event * Clone() const
805  {
806  LayoutDeletedEvent * new_event = new LayoutDeletedEvent(*this);
807  return new_event;
808  }
809 
810  Layout layout;
811 };
812 
813 class SPRK_API ViewDetachedEvent : public Event
814 {
815 public:
816  enum class Action
817  {
818  None = 0,
819  SpecificLayer,
820  AllLayers,
821  };
822 
824  ViewDetachedEvent() : Event(), action(Action::None), layer(0)
825  {
826  channel = GetClassID();
827  consumable = false;
828  }
829 
830  ViewDetachedEvent(Layout const & in_layout, size_t in_layer, View const & in_view)
831  : Event(), layout(in_layout), action(Action::SpecificLayer), layer(in_layer), view(in_view)
832  {
833  channel = GetClassID();
834  consumable = false;
835  }
836 
837  ViewDetachedEvent(Layout const & in_layout, View const & in_view)
838  : Event(), layout(in_layout), action(Action::AllLayers), layer(std::numeric_limits<size_t>::max()), view(in_view)
839  {
840  channel = GetClassID();
841  consumable = false;
842  }
843 
846  ViewDetachedEvent(Event const & in_event) : Event(in_event)
847  {
848  if (in_event.GetChannel() == Object::ClassID<ViewDetachedEvent>())
849  {
850  auto that = static_cast<ViewDetachedEvent const &>(in_event);
851  layout = that.layout;
852  action = that.action;
853  layer = that.layer;
854  view = that.view;
855  }
856  else
857  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
858  }
859 
861 
864  Event * Clone() const
865  {
866  ViewDetachedEvent * new_event = new ViewDetachedEvent(*this);
867  return new_event;
868  }
869 
870  Layout layout;
871  Action action;
872  size_t layer;
873  View view;
874 };
875 
876 class SPRK_API ViewDeletedEvent : public Event
877 {
878 public:
881  {
882  channel = GetClassID();
883  consumable = false;
884  }
885 
886  ViewDeletedEvent(View const & in_view)
887  : Event(), view(in_view)
888  {
889  channel = GetClassID();
890  consumable = false;
891  }
892 
895  ViewDeletedEvent(Event const & in_event) : Event(in_event)
896  {
897  if (in_event.GetChannel() == Object::ClassID<ViewDeletedEvent>())
898  {
899  auto that = static_cast<ViewDeletedEvent const &>(in_event);
900  view = that.view;
901  }
902  else
903  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
904  }
905 
906  ~ViewDeletedEvent();
907 
910  Event * Clone() const
911  {
912  ViewDeletedEvent * new_event = new ViewDeletedEvent(*this);
913  return new_event;
914  }
915 
916  View view;
917 };
918 
919 class SPRK_API ModelDetachedEvent : public Event
920 {
921 public:
924  {
925  channel = GetClassID();
926  consumable = false;
927  }
928 
929  ModelDetachedEvent(View const & in_view, Model const & in_model)
930  : Event(), view(in_view), model(in_model)
931  {
932  channel = GetClassID();
933  consumable = false;
934  }
935 
938  ModelDetachedEvent(Event const & in_event) : Event(in_event)
939  {
940  if (in_event.GetChannel() == Object::ClassID<ModelDetachedEvent>())
941  {
942  auto that = static_cast<ModelDetachedEvent const &>(in_event);
943  view = that.view;
944  model = that.model;
945  }
946  else
947  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
948  }
949 
951 
954  Event * Clone() const
955  {
956  ModelDetachedEvent * new_event = new ModelDetachedEvent(*this);
957  return new_event;
958  }
959 
960  View view;
961  Model model;
962 };
963 
964 class SPRK_API ModelDeletedEvent : public Event
965 {
966 public:
969  {
970  channel = GetClassID();
971  consumable = false;
972  }
973 
974  ModelDeletedEvent(Model const & in_model)
975  : Event(), model(in_model)
976  {
977  channel = GetClassID();
978  consumable = false;
979  }
980 
983  ModelDeletedEvent(Event const & in_event) : Event(in_event)
984  {
985  if (in_event.GetChannel() == Object::ClassID<ModelDeletedEvent>())
986  {
987  auto that = static_cast<ModelDeletedEvent const &>(in_event);
988  model = that.model;
989  }
990  else
991  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
992  }
993 
995 
998  Event * Clone() const
999  {
1000  ModelDeletedEvent * new_event = new ModelDeletedEvent(*this);
1001  return new_event;
1002  }
1003 
1004  Model model;
1005 };
1006 
1007 class SPRK_API CameraChangedEvent : public Event
1008 {
1009 public:
1012  {
1013  channel = GetClassID();
1014  consumable = false;
1015  }
1016 
1017  CameraChangedEvent(View const & in_view)
1018  : Event(), view(in_view)
1019  {
1020  channel = GetClassID();
1021  consumable = false;
1022  }
1023 
1026  CameraChangedEvent(Event const & in_event) : Event(in_event)
1027  {
1028  if (in_event.GetChannel() == Object::ClassID<CameraChangedEvent>())
1029  {
1030  auto that = static_cast<CameraChangedEvent const &>(in_event);
1031  view = that.view;
1032  }
1033  else
1034  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
1035  }
1036 
1037  ~CameraChangedEvent();
1038 
1039  virtual bool Drop(Event const * in_that_event) const
1040  {
1041  CameraChangedEvent const * that_event = static_cast<CameraChangedEvent const *>(in_that_event);
1042 
1043  if (view == that_event->view)
1044  return true;
1045 
1046  return false;
1047  }
1048 
1049  virtual intptr_t Freshen() const
1050  {
1051  return GetClassID();
1052  }
1053 
1056  Event * Clone() const
1057  {
1058  CameraChangedEvent * new_event = new CameraChangedEvent(*this);
1059  return new_event;
1060  }
1061 
1062  View view;
1063 };
1064 
1067 class SPRK_API SprocketPath : public Sprocket
1068 {
1069 public:
1070  SprocketPath();
1071  SprocketPath(Model const & in_model, View const & in_view, Layout const & in_layout, Canvas const & in_canvas);
1072  SprocketPath(Canvas const & in_canvas, Layout const & in_layout, View const & in_view, Model const & in_model);
1073  SprocketPath(Canvas const & in_canvas, size_t in_layer = 0);
1074  SprocketPath(SprocketPath const & that);
1075  ~SprocketPath();
1076 
1077  static const HPS::Type staticType = HPS::Type::SprocketPath;
1078  HPS::Type ObjectType() const { return staticType; }
1079 
1080  SprocketPath & operator=(SprocketPath const & in_that);
1081  void Set(SprocketPath const & in_that);
1082 
1083  bool Equals(SprocketPath const & in_that) const;
1084  bool operator!= (SprocketPath const & in_that) const;
1085  bool operator== (SprocketPath const & in_that) const;
1086 
1088  Canvas GetCanvas() const;
1089 
1091  Layout GetLayout() const;
1092 
1094  View GetView() const;
1095 
1097  Model GetModel() const;
1098 
1103  KeyPath GetKeyPath() const;
1104 };
1105 
1106 
1109 class SPRK_API Operator : public Sprocket
1110 {
1111 public:
1112  Operator(MouseButtons in_mouse_trigger = MouseButtons::ButtonLeft(), ModifierKeys in_modifier_trigger = ModifierKeys());
1113  Operator(Operator const & in_that);
1114 
1115  virtual ~Operator();
1116 
1117  static const HPS::Type staticType = HPS::Type::Operator;
1118  HPS::Type ObjectType() const { return staticType; }
1119 
1120  virtual Operator & operator= (Operator const & in_that);
1121 
1123  virtual void Assign(Operator const & in_that);
1124 
1126  virtual bool Equals(Operator const & in_that) const;
1127 
1129  virtual bool operator!= (Operator const & in_that) const;
1130 
1132  virtual bool operator== (Operator const & in_that) const;
1133 
1135  void DetachView();
1136 
1138  View GetAttachedView() const;
1139 
1141  virtual UTF8 GetName() const { return "Operator"; }
1142 
1146  virtual bool OnMouseDown(MouseState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
1147 
1151  virtual bool OnMouseUp(MouseState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
1152 
1156  virtual bool OnMouseMove(MouseState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
1157 
1161  virtual bool OnMouseWheel(MouseState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
1162 
1166  virtual bool OnMouseEnter(MouseState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
1167 
1171  virtual bool OnMouseLeave(MouseState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
1172 
1176  virtual bool OnTouchDown(TouchState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
1177 
1181  virtual bool OnTouchUp(TouchState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
1182 
1186  virtual bool OnTouchMove(TouchState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
1187 
1191  virtual bool OnKeyDown(KeyboardState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
1192 
1196  virtual bool OnKeyUp(KeyboardState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
1197 
1201  virtual bool OnTextInput(HPS::UTF8 const & in_text) { HPS_UNREFERENCED(in_text); return false; }
1202 
1206  virtual bool OnTimerTick(HPS::TimerTickEvent const & in_event) { HPS_UNREFERENCED(in_event); return false; }
1207 
1210  virtual void OnViewAttached(HPS::View const & in_attached_view) { HPS_UNREFERENCED(in_attached_view); return; }
1211 
1214  virtual void OnViewDetached(HPS::View const & in_detached_view) { HPS_UNREFERENCED(in_detached_view); return; }
1215 
1218  virtual void OnModelAttached() { return; }
1219 
1222  virtual void OnModelDetached() { return; }
1223 
1225  void SetMouseTrigger(MouseButtons in_buttons) { mouse_trigger = in_buttons; }
1226 
1229  MouseButtons GetMouseTrigger() const { return mouse_trigger; }
1230 
1234  void SetModifierTrigger(ModifierKeys in_modifiers) { modifier_trigger = in_modifiers; }
1235 
1237  ModifierKeys GetModifierTrigger() const { return modifier_trigger; }
1238 
1240  virtual bool IsMouseTriggered(MouseState const & in_state) { return in_state.HasAll(mouse_trigger, modifier_trigger); }
1241 
1242  enum class Priority
1243  {
1244  Low,
1245  Default,
1246  High
1247  };
1248 
1249 protected:
1250 
1251  HPS::MouseButtons mouse_trigger;
1252  HPS::ModifierKeys modifier_trigger;
1253 };
1254 
1255 class SPRK_API OperatorUtility
1256 {
1257  static double internal_acos(double x)
1258  {
1259  return (((x)<-1) ? (HPS::PI) : (((x)>1) ? (0) : (acos(x))));
1260  }
1261 
1262 public:
1263 
1264  enum ProjectedPlane
1265  {
1266  Plane_XY,
1267  Plane_YZ,
1268  Plane_XZ
1269  };
1270 
1271  static void ScreenToSphereMousePoint(HPS::Point const &in_pt, HPS::Vector &out_vec)
1272  {
1273  out_vec = HPS::Vector(in_pt);
1274  float len = static_cast<float>(out_vec.Length());
1275  if (len > 1.0f)
1276  {
1277  out_vec /= len;
1278  out_vec.z = 0;
1279  }
1280  else
1281  out_vec.z = (float)sqrt(1.0f - (len*len));
1282  }
1283 
1284  static float CalculateAngleOrbitOnPlane(HPS::Vector const &axis, ProjectedPlane plane)
1285  {
1286  float theta;
1287 
1288  HPS::Vector vtmp;
1289  if (plane == Plane_XY)
1290  vtmp = HPS::Vector(axis.x, axis.y, 0);
1291  else if (plane == Plane_YZ)
1292  vtmp = HPS::Vector(0, axis.y, axis.z);
1293  else
1294  vtmp = HPS::Vector(axis.x, 0, axis.z);
1295  Vector naxis = axis;
1296 
1297  naxis.Normalize();
1298  vtmp.Normalize();
1299 
1300  float tmp = naxis.Dot(vtmp);
1301  if (static_cast<float>(Abs(tmp)) > 1.001f || static_cast<float>(Abs(tmp)) < 0.999f)
1302  theta = static_cast<float>(internal_acos(tmp));
1303  else
1304  theta = 0.0f;
1305 
1306  return theta;
1307  }
1308 };
1309 
1312 class SPRK_API OperatorControl : public SprocketControl
1313 {
1314 public:
1316  explicit OperatorControl(View const & in_view);
1317 
1319  OperatorControl(OperatorControl const & in_that);
1320 
1324  OperatorControl(OperatorControl && in_that);
1325 
1329  OperatorControl & operator=(OperatorControl && in_that);
1330 
1332  ~OperatorControl();
1333 
1334  static const HPS::Type staticType = HPS::Type::OperatorControl;
1335  HPS::Type ObjectType() const {return staticType;};
1336 
1338  OperatorControl & operator=(OperatorControl const & in_that);
1339 
1340 
1342  size_t GetCount();
1343 
1346  size_t GetCount(Operator::Priority in_priority);
1347 
1348 
1354  OperatorControl & Push(OperatorPtr const & in_operator, Operator::Priority in_priority = Operator::Priority::Default);
1355 
1362  OperatorControl & Push(Operator * in_operator, Operator::Priority in_priority = Operator::Priority::Default);
1363 
1367  bool Pop(Operator::Priority in_priority = Operator::Priority::Default);
1368 
1373  bool Pop(OperatorPtr & out_operator);
1374 
1380  bool Pop(Operator::Priority in_priority, OperatorPtr & out_operator);
1381 
1382 
1388  OperatorControl & Set(OperatorPtr const & in_operator, Operator::Priority in_priority = Operator::Priority::Default);
1389 
1396  OperatorControl & Set(Operator * in_operator, Operator::Priority in_priority = Operator::Priority::Default);
1397 
1403  OperatorControl & Set(OperatorPtrArray & in_operators, Operator::Priority in_priority = Operator::Priority::Default);
1404 
1411  OperatorControl & Set(size_t in_count, OperatorPtr in_operators [], Operator::Priority in_priority = Operator::Priority::Default);
1412 
1413 
1417  OperatorControl & UnsetTop(Operator::Priority in_priority = Operator::Priority::Default);
1418 
1422  OperatorControl & UnsetEverything(Operator::Priority in_priority);
1423 
1426  OperatorControl & UnsetEverything();
1427 
1428 
1432  bool ShowTop(OperatorPtr & out_operator) const;
1433 
1438  bool ShowTop(Operator::Priority in_priority, OperatorPtr & out_operator) const;
1439 
1443  bool Show(OperatorPtrArray & out_operators) const;
1444 
1449  bool Show(Operator::Priority in_priority, OperatorPtrArray & out_operators) const;
1450 
1451 private:
1453  OperatorControl() {}
1454 };
1455 
1462 {
1463 public:
1464 
1465  enum class Location
1466  {
1467  TopRight,
1468  TopLeft,
1469  BottomRight,
1470  BottomLeft,
1471  Custom,
1472  };
1473 
1475  explicit NavigationCubeControl(View const & in_view);
1476 
1479 
1484 
1488  NavigationCubeControl & operator=(NavigationCubeControl && in_that);
1489 
1492 
1493  static const HPS::Type staticType = HPS::Type::NavigationCubeControl;
1494  HPS::Type ObjectType() const {return staticType;};
1495 
1497  NavigationCubeControl & operator=(NavigationCubeControl const & in_that);
1498 
1507  NavigationCubeControl & SetLocation(Location in_location, HPS::Rectangle const & in_rectangle = HPS::Rectangle(), HPS::IntRectangle in_offsets = HPS::IntRectangle::Zero());
1508 
1511  Location GetLocation() const;
1512 
1516  NavigationCubeControl & SetPosition(HPS::Rectangle const & in_rectangle);
1517 
1520  HPS::Rectangle GetPosition() const;
1521 
1525  NavigationCubeControl & SetPositionOffsets(HPS::IntRectangle const & in_offsets);
1526 
1529  HPS::IntRectangle GetPositionOffsets() const;
1530 
1535  NavigationCubeControl & SetVisibility(bool in_visibility);
1536 
1539  bool GetVisibility() const;
1540 
1544  NavigationCubeControl & SetTextVisibility(bool in_text_visibility);
1545 
1548  bool GetTextVisibility() const;
1549 
1564  NavigationCubeControl & SetMaterialPalette(char const * in_material_palette);
1565 
1568  HPS::UTF8 GetMaterialPalette() const;
1569 
1577  NavigationCubeControl & SetInteractivity(bool in_interactivity);
1578 
1579 
1582  bool GetInteractivity() const;
1583 
1588  NavigationCubeControl & SetSize(float in_size);
1589 
1592  float GetSize() const;
1593 
1596  HPS::SegmentKey GetSegmentKey() const;
1597 
1598 private:
1600  NavigationCubeControl() {}
1601 
1603  HPS::SegmentKey GetNavigationCubeSegment() const;
1604 };
1605 
1608 class SPRK_API AxisTriadControl : public SprocketControl
1609 {
1610 public:
1611 
1612  enum class Location
1613  {
1614  TopRight,
1615  TopLeft,
1616  BottomRight,
1617  BottomLeft,
1618  Custom,
1619  };
1620 
1622  explicit AxisTriadControl(View const & in_view);
1623 
1625  AxisTriadControl(AxisTriadControl const & in_that);
1626 
1630  AxisTriadControl(AxisTriadControl && in_that);
1631 
1635  AxisTriadControl & operator=(AxisTriadControl && in_that);
1636 
1638  ~AxisTriadControl();
1639 
1640  static const HPS::Type staticType = HPS::Type::AxisTriadControl;
1641  HPS::Type ObjectType() const {return staticType;};
1642 
1644  AxisTriadControl & operator=(AxisTriadControl const & in_that);
1645 
1654  HPS::AxisTriadControl & SetLocation(Location in_location, HPS::Rectangle const & in_position = HPS::Rectangle(), HPS::IntRectangle in_offsets = HPS::IntRectangle::Zero());
1655 
1658  Location GetLocation() const;
1659 
1663  AxisTriadControl & SetPosition(HPS::Rectangle const & in_position);
1664 
1667  HPS::Rectangle GetPosition() const;
1668 
1672  AxisTriadControl & SetPositionOffsets(HPS::IntRectangle const & in_offsets);
1673 
1676  HPS::IntRectangle GetPositionOffsets() const;
1677 
1682  HPS::AxisTriadControl & SetVisibility(bool in_visibility);
1683 
1686  bool GetVisibility() const;
1687 
1691  HPS::AxisTriadControl & SetTextVisibility(bool in_text_visibility);
1692 
1695  bool GetTextVisibility() const;
1696 
1705  HPS::AxisTriadControl & SetMaterialPalette(char const * in_material_palette);
1706 
1709  HPS::UTF8 GetMaterialPalette() const;
1710 
1717  HPS::AxisTriadControl & SetInteractivity(bool in_interactivity);
1718 
1721  bool GetInteractivity() const;
1722 
1727  AxisTriadControl & SetSize(float in_size);
1728 
1731  float GetSize() const;
1732 
1735  HPS::SegmentKey GetSegmentKey() const;
1736 
1737 private:
1739  AxisTriadControl(){};
1740 
1742  HPS::SegmentKey GetAxisTriadSegment() const;
1743 };
1744 
1746 class SPRK_API Component : public Sprocket
1747 {
1748 public:
1749 
1752  enum class Visibility : uint32_t
1753  {
1754  PreserveUserDefined,
1755  PreserveModelDefined,
1756  PreserveNone,
1757  PreserveAll,
1758  };
1759 
1762  enum class ComponentType : uint32_t
1763  {
1764  None = 0x00000000,
1765  GenericMask = 0xfffff000,
1766 
1767  ExchangeComponentMask = 0x00001000,
1768  ExchangeModelFile = 0x00001001,
1769  ExchangeProductOccurrence = 0x00001002,
1770  ExchangePartDefinition = 0x00001003,
1771 
1772  ExchangeView = 0x00001004,
1773  ExchangeFilter = 0x00001005,
1774 
1775  ExchangeRepresentationItemMask = 0x00003000,
1776  ExchangeRIBRepModel = 0x00003001,
1777  ExchangeRICurve = 0x00003002,
1778  ExchangeRIDirection = 0x00003003,
1779  ExchangeRIPlane = 0x00003004,
1780  ExchangeRIPointSet = 0x00003005,
1781  ExchangeRIPolyBRepModel = 0x00003006,
1782  ExchangeRIPolyWire = 0x00003007,
1783  ExchangeRISet = 0x00003008,
1784  ExchangeRICoordinateSystem = 0x00003009,
1785 
1786  ExchangeTopologyMask = 0x00005000,
1787  ExchangeTopoBody = 0x00005001,
1788  ExchangeTopoConnex = 0x00005002,
1789  ExchangeTopoShell = 0x00005003,
1790  ExchangeTopoFace = 0x00005004,
1791  ExchangeTopoLoop = 0x00005005,
1792  ExchangeTopoCoEdge = 0x00005006,
1793  ExchangeTopoEdge = 0x00005007,
1794  ExchangeTopoVertex = 0x00005008,
1795  ExchangeTopoSingleWireBody = 0x00005009,
1796  ExchangeTopoWireEdge = 0x0000500a,
1797 
1798  ExchangeDrawingMask = 0x00009000,
1799  ExchangeDrawingModel = 0x00009001,
1800  ExchangeDrawingView = 0x00009002,
1801  ExchangeDrawingSheet = 0x00009003,
1802  ExchangeBasicDrawingBlock = 0x00009004,
1803  ExchangeOperatorDrawingBlock = 0x00009005,
1804 
1805  ExchangePMIMask = 0x00011000,
1806  ExchangePMI = ExchangePMIMask,
1807  ExchangePMIText = 0x00011100,
1808  ExchangePMIRichText = 0x00011200,
1809  ExchangePMIRoughness = 0x00011300,
1810  ExchangePMIGDT = 0x00011400,
1811  ExchangePMIDatum = 0x00011500,
1812  ExchangePMILineWelding = 0x00011600,
1813  ExchangePMISpotWelding = 0x00011700,
1814  ExchangePMIDimension = 0x00011800,
1815  ExchangePMIBalloon = 0x00011900,
1816  ExchangePMICoordinate = 0x00011a00,
1817  ExchangePMIFastener = 0x00011b00,
1818  ExchangePMILocator = 0x00011c00,
1819  ExchangePMIMeasurementPoint = 0x00011d00,
1820 
1821 
1822  ParasolidComponentMask = 0x00020000,
1823 
1824  ParasolidModelFile = 0x00020001,
1825  ParasolidAssembly = 0x00020002,
1826  ParasolidInstance = 0x00020003,
1827 
1828  ParasolidTopologyMask = 0x00060000,
1829  ParasolidTopoBody = 0x00060001,
1830  ParasolidTopoRegion = 0x00060002,
1831  ParasolidTopoShell = 0x00060003,
1832  ParasolidTopoFace = 0x00060004,
1833  ParasolidTopoLoop = 0x00060005,
1834  ParasolidTopoFin = 0x00060006,
1835  ParasolidTopoEdge = 0x00060007,
1836  ParasolidTopoVertex = 0x00060008,
1837 
1838 
1839  DWGComponentMask = 0x00100000,
1840  DWGModelFile = 0x00100001,
1841  DWGLayout = 0x00100002,
1842  DWGBlockTable = 0x00100003,
1843  DWGBlockTableRecord = 0x00100004,
1844  DWGEntity = 0x00100005,
1845  DWGLayerTable = 0x00100006,
1846  DWGLayer = 0x00100007,
1847 
1848 
1849  UserComponent = 0x01000000,
1850  };
1851 
1852 
1854  Component();
1855 
1858  Component(Component const & in_that);
1859 
1862  Component(Component && in_that);
1863 
1865  virtual ~Component();
1866 
1867  static const HPS::Type staticType = HPS::Type::Component;
1868  HPS::Type ObjectType() const { return staticType; }
1869 
1870 
1874  Component & operator=(Component const & in_that);
1875 
1879  Component & operator=(Component && in_that);
1880 
1884  virtual void Assign(Component const & in_that);
1885 
1889  bool Equals(Component const & in_that) const;
1890 
1894  bool operator!=(Component const & in_that) const;
1895 
1899  bool operator==(Component const & in_that) const;
1900 
1901 
1904  ComponentType GetComponentType() const;
1905 
1909  bool HasComponentType(ComponentType in_mask) const;
1910 
1911 
1912 
1918  void AddKey(Key const & in_key);
1919 
1922  KeyArray GetKeys() const;
1923 
1924 
1925 
1930  void AddOwner(Component & in_owner, IncludeKey const & in_include = IncludeKey());
1931 
1936  ComponentArray GetOwners() const;
1937 
1940  ComponentArray GetSubcomponents() const;
1941 
1946  ComponentArray GetAllSubcomponents(ComponentType in_type) const;
1947 
1948 
1949 
1952  void AddReference(Component & in_reference);
1953 
1960  ComponentArray GetReferrers() const;
1961 
1965  ComponentArray GetReferences() const;
1966 
1967 
1968 
1971  MetadataArray GetAllMetadata() const;
1972 
1976  Metadata GetMetadata(char const * in_name) const;
1977 
1981  UTF8 GetName() const;
1982 
1983 
1984 
2037  void Delete();
2038 
2042  void Flush();
2043 
2044 
2052  static KeyPathArray GetKeyPath(Component const & in_component);
2053 
2063  static KeyPathArray GetKeyPath(size_t in_count, Component const in_components[]);
2064 
2073  static KeyPathArray GetKeyPath(ComponentArray const & in_components);
2074 
2080  bool SetTransform(MatrixKit const & in_transform);
2081 };
2082 
2084 class SPRK_API ComponentPath : public Sprocket
2085 {
2086 public:
2089  enum class PathType : uint32_t
2090  {
2091  Complete,
2092  Unique,
2093  };
2094 
2096  ComponentPath();
2097 
2100  ComponentPath(ComponentArray const & in_components);
2101 
2105  ComponentPath(size_t in_count, Component const in_components[]);
2106 
2108  ComponentPath(ComponentPath const & in_that);
2109 
2113  ComponentPath(ComponentPath && in_that);
2114 
2118  ComponentPath & operator=(ComponentPath && in_that);
2119 
2121  virtual ~ComponentPath();
2122 
2123  static const HPS::Type staticType = HPS::Type::ComponentPath;
2124  HPS::Type ObjectType() const { return staticType; }
2125 
2128  bool Empty() const;
2129 
2133  ComponentPath & operator+=(Component const & in_component);
2134 
2138  ComponentPath & operator+=(ComponentPath const & in_path);
2139 
2143  ComponentPath & operator+=(ComponentArray const & in_components);
2144 
2149  ComponentPath & Append(Component const & in_component);
2150 
2155  ComponentPath & Append(ComponentPath const & in_path);
2156 
2161  ComponentPath & Append(ComponentArray const & in_components);
2162 
2166  ComponentPath & operator=(ComponentPath const & in_that);
2167 
2171  ComponentPath & operator=(ComponentArray const & in_path);
2172 
2175  void Set(ComponentPath const & in_that);
2176 
2180  bool Equals(ComponentPath const & in_that) const;
2181 
2185  bool operator!= (ComponentPath const & in_that) const;
2186 
2190  bool operator== (ComponentPath const & in_that) const;
2191 
2192 
2196  ComponentPath & SetComponents(ComponentArray const & in_components);
2197 
2202  ComponentPath & SetComponents(size_t in_count, Component const in_components[]);
2203 
2206  ComponentArray GetComponents() const;
2207 
2211  KeyPathArray GetKeyPaths() const;
2212 
2217  KeyPathArray GetKeyPaths(Canvas const & in_canvas, size_t in_layer = 0) const;
2218 
2219 
2226  void Highlight(Canvas const & in_canvas, HighlightOptionsKit const & in_options, bool in_remove_existing = true) const;
2227 
2234  void Highlight(Canvas const & in_canvas, size_t in_layer, HighlightOptionsKit const & in_options, bool in_remove_existing = true) const;
2235 
2239  void Unhighlight(Canvas const & in_canvas, HighlightOptionsKit const & in_options = HighlightOptionsKit()) const;
2240 
2245  void Unhighlight(Canvas const & in_canvas, size_t in_layer, HighlightOptionsKit const & in_options = HighlightOptionsKit()) const;
2246 
2247 
2252  void Hide(Canvas const & in_canvas, size_t in_layer = 0);
2253 
2258  void Show(Canvas const & in_canvas, size_t in_layer = 0, Component::Visibility in_subtree_visibility = Component::Visibility::PreserveNone);
2259 
2265  bool IsHidden(Canvas const & in_canvas, size_t in_layer = 0);
2266 
2273  void Isolate(Canvas const & in_canvas, size_t in_layer = 0, Component::Visibility in_subtree_visibility = Component::Visibility::PreserveNone);
2274 
2282  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);
2283 
2284  /* Returns the number of Components contained in this ComponentPath object.
2285  * \return the number of Components in this ComponentPath.*/
2286  size_t Size() const;
2287 
2288  /* Access a Component in this ComponentPath object. An HPS::IndexOutOfRangeException exception is thrown if in_index is out of range.
2289  * \param in_index The index of the Component to access, zero based.
2290  * \return The Component at position in_index in this ComponentPath.*/
2291  Component & At(size_t in_index);
2292 
2293  /* Access a Component in this ComponentPath object. An HPS::IndexOutOfRangeException exception is thrown if in_index is out of range.
2294  * \param in_index The index of the Component to access, zero based.
2295  * \return The Component at position in_index in this ComponentPath.*/
2296  Component const & At(size_t in_index) const;
2297 
2298  /* Inserts in_item in the ComponentPath before the element at position in_index, increasing the size of the ComponentPath by one.
2299  * An HPS::IndexOutOfRangeException exception is thrown if in_index is out of range.
2300  * \param in_index The index where in_item will be inserted
2301  * \param in_item The component to insert in this key path. */
2302  void Insert(size_t in_index, Component const & in_item);
2303 
2304  /* Traverses the components in this ComponentPath and removes the first one which matches in_item
2305  * NOTE: A useful ComponentPath should not contain duplicate components.
2306  * \param in_item The item to remove from the ComponentPath. */
2307  void Remove(Component const & in_item);
2308 
2309  /* Removes the the component at position in_index from this ComponentPath. An HPS::IndexOutOfRangeException exception is thrown if in_index is out of range.
2310  * \param in_index The index of the component to remove, zero based. */
2311  void Remove(size_t in_index);
2312 
2313  /* Creates and returns a new ComponentPath object, with the components organized in the reverse order.
2314  * \return A new ComponentPath object, containing components organized in the reverse order. */
2315  ComponentPath Reverse() const;
2316 
2317  /* Returns the first component of this ComponentPath. An HPS::IndexOutOfRangeException exception is thrown if the ComponentPath is empty.
2318  * \return The first component of this ComponentPath.*/
2319  Component & Front();
2320 
2321  /* Returns the first component of this ComponentPath. An HPS::IndexOutOfRangeException exception is thrown if the ComponentPath is empty.
2322  * \return The first component of this ComponentPath.*/
2323  Component const & Front() const;
2324 
2325  /* Returns the last component of this ComponentPath. An HPS::IndexOutOfRangeException exception is thrown if the ComponentPath is empty.
2326  * \return The last component of this ComponentPath.*/
2327  Component & Back();
2328 
2329  /* Returns the last component of this ComponentPath. An HPS::IndexOutOfRangeException exception is thrown if the ComponentPath is empty.
2330  * \return The last component of this ComponentPath.*/
2331  Component const & Back() const;
2332 
2333  /* Returns the first component of this ComponentPath and returns it. An HPS::IndexOutOfRangeException exception is thrown if the ComponentPath is empty.
2334  * \return The first component of this ComponentPath.*/
2335  Component PopFront();
2336 
2337  /* Returns the last component of this ComponentPath and returns it. An HPS::IndexOutOfRangeException exception is thrown if the ComponentPath is empty.
2338  * \return The last component of this ComponentPath.*/
2339  Component PopBack();
2340 
2341  /* Adds in_component to the front of the ComponentPath.
2342  * \param in_component The component to add to the front of the ComponentPath.
2343  * \return A reference to this object.*/
2344  ComponentPath & PushFront(Component const & in_component);
2345 
2346  /* Adds in_component to the end of the ComponentPath.
2347  * \param in_component The component to add to the end of the ComponentPath.
2348  * \return A reference to this object.*/
2349  ComponentPath & PushBack(Component const & in_component);
2350 
2354  ComponentPath & PushBack(ComponentPath const & in_path);
2355 
2359  ComponentPath & PushBack(ComponentArray const & in_components);
2360 
2361 #ifndef HPS_GULP_CLANG
2362  using iterator = HPS::ComponentArray::iterator;
2363  using const_iterator = HPS::ComponentArray::const_iterator;
2364 
2365  /* Returns an iterator pointing to the first Component contained in this ComponentPath
2366  * \return An iterator pointing to the first Component contained in this ComponentPath. */
2367  iterator begin();
2368 
2369  /* Returns an iterator pointing to the first Component contained in this ComponentPath
2370  * \return An iterator pointing to the first Component contained in this ComponentPath. */
2371  const_iterator begin() const;
2372 
2373  /* Returns a constant iterator pointing to the last Component contained in this ComponentPath
2374  * \return A constant iterator pointing to the last Component contained in this ComponentPath. */
2375  iterator end();
2376 
2377  /* Returns a constant iterator pointing to the last Component contained in this ComponentPath
2378  * \return A constant iterator pointing to the last Component contained in this ComponentPath. */
2379  const_iterator end() const;
2380 
2381  /* Returns a constant iterator pointing to the first Component contained in this ComponentPath
2382  * \return A constant iterator pointing to the first Component contained in this ComponentPath. */
2383  const_iterator cbegin() const;
2384 
2385  /* Returns a constant iterator pointing to the last Component contained in this ComponentPath
2386  * \return A constant iterator pointing to the last Component contained in this ComponentPath. */
2387  const_iterator cend() const;
2388 #endif
2389 };
2390 
2391 
2396 inline ComponentPath operator+(Component const & in_lhs, Component const & in_rhs)
2397 {
2398  return HPS::ComponentPath().PushBack(in_lhs).PushBack(in_rhs);
2399 }
2400 
2405 inline ComponentPath operator+(Component const & in_lhs, ComponentArray const & in_rhs)
2406 {
2407  return HPS::ComponentPath().PushBack(in_lhs).PushBack(in_rhs);
2408 }
2409 
2414 inline ComponentPath operator+(Component const & in_lhs, ComponentPath const & in_rhs)
2415 {
2416  return HPS::ComponentPath().PushBack(in_lhs).PushBack(in_rhs);
2417 }
2418 
2423 inline ComponentPath operator+(ComponentArray const & in_lhs, Component const & in_rhs)
2424 {
2425  return HPS::ComponentPath().PushBack(in_lhs).PushBack(in_rhs);
2426 }
2427 
2432 inline ComponentPath operator+(ComponentArray const & in_lhs, ComponentArray const & in_rhs)
2433 {
2434  return HPS::ComponentPath().PushBack(in_lhs).PushBack(in_rhs);
2435 }
2436 
2441 inline ComponentPath operator+(ComponentArray const & in_lhs, ComponentPath const & in_rhs)
2442 {
2443  return HPS::ComponentPath().PushBack(in_lhs).PushBack(in_rhs);
2444 }
2445 
2450 inline ComponentPath operator+(ComponentPath const & in_lhs, Component const & in_rhs)
2451 {
2452  return HPS::ComponentPath().PushBack(in_lhs).PushBack(in_rhs);
2453 }
2454 
2459 inline ComponentPath operator+(ComponentPath const & in_lhs, ComponentArray const & in_rhs)
2460 {
2461  return HPS::ComponentPath().PushBack(in_lhs).PushBack(in_rhs);
2462 }
2463 
2468 inline ComponentPath operator+(ComponentPath const & in_lhs, ComponentPath const & in_rhs)
2469 {
2470  return HPS::ComponentPath().PushBack(in_lhs).PushBack(in_rhs);
2471 }
2472 
2474 class SPRK_API ComponentIsolateEvent : public Event
2475 {
2476 public:
2477 
2480  {
2481  channel = GetClassID();
2482  consumable = false;
2483  subcomponent_visibility = Component::Visibility::PreserveNone;
2484  }
2485 
2486  ComponentIsolateEvent(ComponentPath const & in_path,
2487  Component::Visibility in_subcomponent_visibility)
2488  : Event(), path(in_path), subcomponent_visibility(in_subcomponent_visibility)
2489  {
2490  channel = GetClassID();
2491  consumable = false;
2492  }
2493 
2496  ComponentIsolateEvent(Event const & in_event) : Event(in_event)
2497  {
2498  if (in_event.GetChannel() == Object::ClassID<ComponentIsolateEvent>())
2499  {
2500  auto that = static_cast<ComponentIsolateEvent const &>(in_event);
2501  subcomponent_visibility = that.subcomponent_visibility;
2502  path = that.path;
2503  }
2504  else
2505  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
2506  }
2507 
2509 
2512  Event * Clone() const
2513  {
2514  ComponentIsolateEvent * new_event = new ComponentIsolateEvent(*this);
2515  return new_event;
2516  }
2517 
2518  ComponentPath path;
2519  Component::Visibility subcomponent_visibility;
2520 };
2521 
2522 
2524 class SPRK_API ComponentHighlightEvent : public Event
2525 {
2526 public:
2527  enum class Action
2528  {
2529  None = 0,
2530  Highlight,
2531  Unhighlight,
2532  };
2533 
2536  {
2537  channel = GetClassID();
2538  consumable = false;
2539  action = Action::None;
2540  }
2541 
2542  ComponentHighlightEvent(Action in_action,
2543  ComponentPath const & in_path = ComponentPath(),
2544  HighlightOptionsKit const & in_options = HighlightOptionsKit())
2545  : Event(), action(in_action), path(in_path), options(in_options)
2546  {
2547  channel = GetClassID();
2548  consumable = false;
2549  }
2550 
2553  ComponentHighlightEvent(Event const & in_event) : Event(in_event)
2554  {
2555  if (in_event.GetChannel() == Object::ClassID<ComponentHighlightEvent>())
2556  {
2557  auto that = static_cast<ComponentHighlightEvent const &>(in_event);
2558  action = that.action;
2559  path = that.path;
2560  options = that.options;
2561  }
2562  else
2563  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
2564  }
2565 
2567 
2570  Event * Clone() const
2571  {
2572  ComponentHighlightEvent * new_event = new ComponentHighlightEvent(*this);
2573  return new_event;
2574  }
2575 
2576  Action action;
2577  ComponentPath path;
2578  HighlightOptionsKit options;
2579 };
2580 
2581 
2583 class SPRK_API Filter : public Component
2584 {
2585 public:
2587  Filter();
2588 
2592  Filter(Component const & in_that);
2593 
2596  Filter(Filter const & in_that);
2597 
2600  Filter(Filter && in_that);
2601 
2602  virtual ~Filter();
2603 
2604  static const HPS::Type staticType = HPS::Type::Filter;
2605  HPS::Type ObjectType() const { return staticType; }
2606 
2607 
2608 #if !defined(_MSC_VER) || _MSC_VER >= 1900
2609  Filter & operator=(Filter const & in_that) = default;
2610 #endif
2611 
2615  Filter & operator=(Filter && in_that);
2616 
2617 
2620  void Activate(View const & in_view);
2621 
2624  void Deactivate(View const & in_view);
2625 };
2626 
2627 
2628 class SPRK_API FilterActivationEvent : public Event
2629 {
2630 public:
2631  enum class Action
2632  {
2633  None = 0,
2634  Activate,
2635  Deactivate,
2636  };
2637 
2640  {
2641  channel = GetClassID();
2642  consumable = false;
2643  }
2644 
2645  FilterActivationEvent(Filter in_filter, Action in_action, View in_view) : Event(), filter(in_filter), action(in_action), view(in_view)
2646  {
2647  channel = GetClassID();
2648  consumable = false;
2649  }
2650 
2653  FilterActivationEvent(Event const & in_event) : Event(in_event)
2654  {
2655  if (in_event.GetChannel() == Object::ClassID<FilterActivationEvent>())
2656  {
2657  auto that = static_cast<FilterActivationEvent const &>(in_event);
2658  filter = that.filter;
2659  action = that.action;
2660  view = that.view;
2661  }
2662  else
2663  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
2664  }
2665 
2667 
2670  Event * Clone() const
2671  {
2672  FilterActivationEvent * new_event = new FilterActivationEvent(*this);
2673  return new_event;
2674  }
2675 
2676  Filter filter;
2677  Action action;
2678  View view;
2679 };
2680 
2681 
2683 class SPRK_API Capture : public Component
2684 {
2685 public:
2687  Capture();
2688 
2692  Capture(Component const & in_that);
2693 
2696  Capture(Capture const & in_that);
2697 
2700  Capture(Capture && in_that);
2701 
2702  virtual ~Capture();
2703 
2704  static const HPS::Type staticType = HPS::Type::Capture;
2705  HPS::Type ObjectType() const { return staticType; }
2706 
2707 #if !defined(_MSC_VER) || _MSC_VER >= 1900
2708  Capture & operator=(Capture const & in_that) = default;
2709 #endif
2710 
2714  Capture & operator=(Capture && in_that);
2715 
2716 
2720  View Activate();
2721 };
2722 
2723 
2724 class SPRK_API CaptureActivationEvent : public Event
2725 {
2726 public:
2729  {
2730  channel = GetClassID();
2731  consumable = false;
2732  }
2733 
2734  CaptureActivationEvent(Capture in_capture, View in_view) : Event(), capture(in_capture), view(in_view)
2735  {
2736  channel = GetClassID();
2737  consumable = false;
2738  }
2739 
2742  CaptureActivationEvent(Event const & in_event) : Event(in_event)
2743  {
2744  if (in_event.GetChannel() == Object::ClassID<CaptureActivationEvent>())
2745  {
2746  auto that = static_cast<CaptureActivationEvent const &>(in_event);
2747  capture = that.capture;
2748  view = that.view;
2749  }
2750  else
2751  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
2752  }
2753 
2755 
2758  Event * Clone() const
2759  {
2760  CaptureActivationEvent * new_event = new CaptureActivationEvent(*this);
2761  return new_event;
2762  }
2763 
2764  Capture capture;
2765  View view;
2766 };
2767 
2768 
2770 class SPRK_API CADModel : public Component
2771 {
2772 public:
2774  CADModel();
2775 
2779  CADModel(Component const & in_that);
2780 
2783  CADModel(CADModel const & in_that);
2784 
2787  CADModel(CADModel && in_that);
2788 
2791  CADModel(Model const & in_that);
2792 
2793  virtual ~CADModel();
2794 
2795  static const HPS::Type staticType = HPS::Type::CADModel;
2796  HPS::Type ObjectType() const { return staticType; }
2797 
2798 #if !defined(_MSC_VER) || _MSC_VER >= 1900
2799  CADModel & operator=(CADModel const & in_that) = default;
2800 #endif
2801 
2805  CADModel & operator=(CADModel && in_that);
2806 
2807 
2811  Component GetComponentFromKey(Key const & in_key) const;
2812 
2824  ComponentPath GetComponentPath(KeyPath const & in_key_path, ComponentPath::PathType in_path_type = ComponentPath::PathType::Unique) const;
2825 
2837  ComponentPath GetComponentPath(SelectionItem const & in_item, ComponentPath::PathType in_path_type = ComponentPath::PathType::Unique) const;
2838 
2839 
2842  Model GetModel() const;
2843 
2846  FilterArray GetAllFilters() const;
2847 
2850  CaptureArray GetAllCaptures() const;
2851 
2855  FilterArray GetActiveFilters(View const & in_view) const;
2856 
2857 
2861  View ActivateDefaultCapture();
2862 
2863 
2871  void ResetVisibility(Canvas & in_canvas, size_t in_layer = 0);
2872 };
2873 
2874 
2875 
2878 class SPRK_API Metadata : public Sprocket
2879 {
2880 public:
2882  Metadata();
2883 
2886  Metadata(Metadata const & in_that);
2887 
2890  Metadata(Metadata && in_that);
2891 
2894  Metadata(char const * in_name);
2895 
2896  virtual ~Metadata();
2897 
2898  static const HPS::Type staticType = HPS::Type::Metadata;
2899  HPS::Type ObjectType() const { return staticType; }
2900 
2901 
2905  Metadata & operator=(Metadata const & in_that);
2906 
2910  Metadata & operator=(Metadata && in_that);
2911 
2915  virtual void Assign(Metadata const & in_that);
2916 
2920  bool Equals(Metadata const & in_that) const;
2921 
2925  bool operator!=(Metadata const & in_that) const;
2926 
2930  bool operator==(Metadata const & in_that) const;
2931 
2932 
2935  HPS::UTF8 GetName() const;
2936 
2939  void SetName(char const * in_name);
2940 };
2941 
2943 class SPRK_API IntegerMetadata : public Metadata
2944 {
2945 public:
2947  IntegerMetadata();
2948 
2952  IntegerMetadata(Metadata const & in_that);
2953 
2956  IntegerMetadata(IntegerMetadata const & in_that);
2957 
2960  IntegerMetadata(IntegerMetadata && in_that);
2961 
2965  IntegerMetadata(char const * in_name, int in_value);
2966 
2967  virtual ~IntegerMetadata();
2968 
2969  static const HPS::Type staticType = HPS::Type::IntegerMetadata;
2970  HPS::Type ObjectType() const { return staticType; }
2971 
2972 #if !defined(_MSC_VER) || _MSC_VER >= 1900
2973  IntegerMetadata & operator=(IntegerMetadata const & in_that) = default;
2974 #endif
2975 
2979  IntegerMetadata & operator=(IntegerMetadata && in_that);
2980 
2981 
2984  int GetValue() const;
2985 
2988  void SetValue(int in_value);
2989 };
2990 
2992 class SPRK_API UnsignedIntegerMetadata : public Metadata
2993 {
2994 public:
2997 
3001  UnsignedIntegerMetadata(Metadata const & in_that);
3002 
3006 
3010 
3014  UnsignedIntegerMetadata(char const * in_name, unsigned int in_value);
3015 
3016  virtual ~UnsignedIntegerMetadata();
3017 
3018  static const HPS::Type staticType = HPS::Type::UnsignedIntegerMetadata;
3019  HPS::Type ObjectType() const { return staticType; }
3020 
3021 #if !defined(_MSC_VER) || _MSC_VER >= 1900
3022  UnsignedIntegerMetadata & operator=(UnsignedIntegerMetadata const & in_that) = default;
3023 #endif
3024 
3028  UnsignedIntegerMetadata & operator=(UnsignedIntegerMetadata && in_that);
3029 
3030 
3033  unsigned int GetValue() const;
3034 
3037  void SetValue(unsigned int in_value);
3038 };
3039 
3041 class SPRK_API DoubleMetadata : public Metadata
3042 {
3043 public:
3045  DoubleMetadata();
3046 
3050  DoubleMetadata(Metadata const & in_that);
3051 
3054  DoubleMetadata(DoubleMetadata const & in_that);
3055 
3058  DoubleMetadata(DoubleMetadata && in_that);
3059 
3063  DoubleMetadata(char const * in_name, double in_value);
3064 
3065  virtual ~DoubleMetadata();
3066 
3067  static const HPS::Type staticType = HPS::Type::DoubleMetadata;
3068  HPS::Type ObjectType() const { return staticType; }
3069 
3070 #if !defined(_MSC_VER) || _MSC_VER >= 1900
3071  DoubleMetadata & operator=(DoubleMetadata const & in_that) = default;
3072 #endif
3073 
3077  DoubleMetadata & operator=(DoubleMetadata && in_that);
3078 
3079 
3082  double GetValue() const;
3083 
3086  void SetValue(double in_value);
3087 };
3088 
3090 class SPRK_API StringMetadata : public Metadata
3091 {
3092 public:
3094  StringMetadata();
3095 
3099  StringMetadata(Metadata const & in_that);
3100 
3103  StringMetadata(StringMetadata const & in_that);
3104 
3107  StringMetadata(StringMetadata && in_that);
3108 
3112  StringMetadata(char const * in_name, char const * in_value);
3113 
3114  virtual ~StringMetadata();
3115 
3116  static const HPS::Type staticType = HPS::Type::StringMetadata;
3117  HPS::Type ObjectType() const { return staticType; }
3118 
3119 #if !defined(_MSC_VER) || _MSC_VER >= 1900
3120  StringMetadata & operator=(StringMetadata const & in_that) = default;
3121 #endif
3122 
3126  StringMetadata & operator=(StringMetadata && in_that);
3127 
3128 
3131  UTF8 GetValue() const;
3132 
3135  void SetValue(char const * in_value);
3136 };
3137 
3139 class SPRK_API TimeMetadata : public Metadata
3140 {
3141 public:
3143  TimeMetadata();
3144 
3148  TimeMetadata(Metadata const & in_that);
3149 
3152  TimeMetadata(TimeMetadata const & in_that);
3153 
3156  TimeMetadata(TimeMetadata && in_that);
3157 
3161  TimeMetadata(char const * in_name, unsigned int in_value);
3162 
3163  virtual ~TimeMetadata();
3164 
3165  static const HPS::Type staticType = HPS::Type::TimeMetadata;
3166  HPS::Type ObjectType() const { return staticType; }
3167 
3168 #if !defined(_MSC_VER) || _MSC_VER >= 1900
3169  TimeMetadata & operator=(TimeMetadata const & in_that) = default;
3170 #endif
3171 
3175  TimeMetadata & operator=(TimeMetadata && in_that);
3176 
3177 
3180  unsigned int GetValue() const;
3181 
3184  HPS::UTF8 GetValueAsString() const;
3185 
3188  void SetValue(unsigned int in_value);
3189 };
3190 
3191 
3193 class SPRK_API BooleanMetadata : public Metadata
3194 {
3195 public:
3197  BooleanMetadata();
3198 
3202  BooleanMetadata(Metadata const & in_that);
3203 
3206  BooleanMetadata(BooleanMetadata const & in_that);
3207 
3210  BooleanMetadata(BooleanMetadata && in_that);
3211 
3215  BooleanMetadata(char const * in_name, bool in_value);
3216 
3217  virtual ~BooleanMetadata();
3218 
3219  static const HPS::Type staticType = HPS::Type::BooleanMetadata;
3220  HPS::Type ObjectType() const { return staticType; }
3221 
3222 #if !defined(_MSC_VER) || _MSC_VER >= 1900
3223  BooleanMetadata & operator=(BooleanMetadata const & in_that) = default;
3224 #endif
3225 
3229  BooleanMetadata & operator=(BooleanMetadata && in_that);
3230 
3231 
3234  bool GetValue() const;
3235 
3238  void SetValue(bool in_value);
3239 };
3240 
3241 
3242 
3244 class SPRK_API Factory : public Sprocket
3245 {
3246 public:
3247 
3250  static CanvasArray GetCanvases();
3251 
3254  static LayoutArray GetLayouts();
3255 
3258  static ViewArray GetViews();
3259 
3262  static ModelArray GetModels();
3263 
3266  static CADModelArray GetCADModels();
3267 
3273  static Canvas CreateCanvas(HPS::WindowHandle in_window_handle, char const * in_name = "", HPS::ApplicationWindowOptionsKit const & in_options = HPS::ApplicationWindowOptionsKit());
3274 
3279  static Canvas CreateCanvas(char const * in_name = "", HPS::StandAloneWindowOptionsKit const & in_options = HPS::StandAloneWindowOptionsKit());
3280 
3286  static Canvas CreateCanvas(HPS::WindowKey const & in_window_key, HPS::PortfolioKey const & in_portfolio_key = HPS::PortfolioKey(), char const * in_name = "");
3287 
3291  static Layout CreateLayout(char const * in_name = "");
3292 
3296  static View CreateView(char const * in_name = "");
3297 
3301  static Model CreateModel(char const * in_name = "");
3302 
3307  static Component CreateComponent(Component const & in_owner, char const * in_name = "");
3308 
3314  static Component DeInstanceComponent(ComponentPath const & in_component_path);
3315 
3316 private:
3317  Factory() {}
3318 };
3319 
3329 class SPRK_API AxisTriadOperator : public Operator
3330 {
3331 public:
3332  AxisTriadOperator(MouseButtons in_mouse_trigger = MouseButtons::ButtonLeft(), ModifierKeys in_modifier_trigger = ModifierKeys());
3334  virtual HPS::UTF8 GetName() const { return "HPS_AxisTriadOperator"; }
3335 
3341  virtual bool OnMouseDown(MouseState const & in_state);
3346  virtual bool OnMouseUp(MouseState const & in_state);
3351  virtual bool OnMouseMove(MouseState const & in_state);
3352 
3357  virtual bool OnTouchDown(TouchState const & in_state);
3362  virtual bool OnTouchUp(TouchState const & in_state);
3367  virtual bool OnTouchMove(TouchState const & in_state);
3368 
3369  virtual void OnViewAttached(HPS::View const & in_attached_view);
3370 
3371 private:
3372 
3373  bool AxisOrbit(HPS::WindowPoint const & in_loc);
3374  void Transition(HPS::SelectionResults selection_results);
3375  void TranslatePoint(HPS::WindowPoint * point);
3376  bool IsEventRelevant(HPS::Point const & event_location);
3377 
3378  bool operator_active;
3379  HPS::WindowPoint start_point;
3380  HPS::Vector start_sphere_point;
3381  float axis_subwindow_width;
3382  float axis_subwindow_height;
3383  HPS::TouchID tracked_touch_ID;
3384  HPS::Rectangle axis_subwindow;
3385  HPS::IntRectangle axis_subwindow_offsets;
3386  HPS::SegmentKey axis_triad_segment;
3387 
3388 };
3389 
3392 {
3393 public:
3396  virtual ~SmoothTransitionCompleteEvent();
3397 
3400  SmoothTransitionCompleteEvent(HPS::View const & in_view) : view(in_view)
3401  { channel = HPS::Object::ClassID<SmoothTransitionCompleteEvent>(); }
3402 
3405  SmoothTransitionCompleteEvent(Event const & in_event) : Event(in_event)
3406  {
3407  if (in_event.GetChannel() == Object::ClassID<SmoothTransitionCompleteEvent>())
3408  {
3409  auto that = static_cast<SmoothTransitionCompleteEvent const &>(in_event);
3410  view = that.view;
3411  }
3412  else
3413  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
3414  }
3415 
3418  Event * Clone() const
3419  {
3421  return new_event;
3422  }
3423 
3427  virtual bool Drop(Event const * in_that_event) const
3428  {
3429  HPS_UNREFERENCED(in_that_event);
3430  return false;
3431  }
3432 
3433  HPS::View view;
3434 };
3435 
3454 class SPRK_API NavigationCubeOperator : public Operator
3455 {
3456 public:
3457  NavigationCubeOperator(MouseButtons in_mouse_trigger = MouseButtons::ButtonLeft(), ModifierKeys in_modifier_trigger = ModifierKeys());
3458  ~NavigationCubeOperator() { }
3459 
3461  virtual HPS::UTF8 GetName() const { return "HPS_NavigationCubeOperator"; }
3462 
3467  virtual bool OnMouseDown(MouseState const & in_state);
3472  virtual bool OnMouseUp(MouseState const & in_state);
3477  virtual bool OnMouseMove(MouseState const & in_state);
3478 
3482  virtual bool OnTouchDown(TouchState const & in_state);
3487  virtual bool OnTouchUp(TouchState const & in_state);
3492  virtual bool OnTouchMove(TouchState const & in_state);
3493 
3494  virtual void OnViewAttached(HPS::View const & in_attached_view);
3495  virtual void OnViewDetached(HPS::View const & in_attached_view);
3496 
3497  virtual void OnModelAttached();
3498 
3499  void UpdateHighlightColor();
3500 
3505  void SetReferenceSegment(HPS::KeyPath const & in_path_to_segment);
3506 
3511  void SetReferenceSegment(HPS::KeyPathArray const & in_path_to_segments);
3512 
3516  HPS::KeyPathArray ShowReferenceSegment();
3517 
3522  void SetTransitionTime(HPS::Time const & in_time);
3523 
3526  HPS::Time GetTransitionTime() const;
3527 
3528 private:
3529  void Transition(HPS::SelectionResults const & selection_results);
3530  bool Orbit(HPS::WindowPoint const & in_loc);
3531  void TranslatePoint(HPS::WindowPoint * point);
3532  bool IsEventRelevant(HPS::Point const & event_location, HPS::KeyPath const & event_path);
3533  bool AreCamerasEqual(HPS::CameraKit const & this_camera, HPS::CameraKit const & that_camera);
3534 
3535  bool operator_active;
3536  HPS::TouchID tracked_touch_ID;
3537  HPS::WindowPoint start_point;
3538  HPS::WindowPoint down_position;
3539  HPS::Vector start_sphere_point;
3540  HPS::KeyPathArray reference_segments; //rotation and zooming happen around these segments
3541 
3542  HPS::SegmentKey nav_cube_segment;
3543  HPS::SegmentKey style_segment;
3544  HPS::PortfolioKey portfolio;
3545  HPS::ReferenceKeyArrayArray groups;
3546  HPS::HighlightOptionsKit highlight_options_kit;
3547  HPS::CameraKit previous_camera;
3548  int previous_face;
3549  bool suppress_mouse_over_highlights;
3550 
3551  HPS::Rectangle nav_cube_subwindow;
3552  HPS::IntRectangle nav_cube_subwindow_offsets;
3553  float nav_cube_subwindow_width;
3554  float nav_cube_subwindow_height;
3555 
3556  int highlighted_group;
3557 
3558  bool moving;
3559  HPS::Time transition_time;
3560 
3561  class SmoothTransitionCompleteEventHandler : public EventHandler
3562  {
3563  public:
3564  SmoothTransitionCompleteEventHandler(View const & in_view, bool & in_moving)
3565  : handler_view(in_view), handler_moving(&in_moving) {}
3566 
3567  ~SmoothTransitionCompleteEventHandler() { Shutdown(); }
3568 
3569  virtual HandleResult Handle(HPS::Event const * in_event);
3570 
3571  private:
3572  View handler_view;
3573  bool * handler_moving;
3574  };
3575 
3576  SmoothTransitionCompleteEventHandler * handler;
3577 };
3578 
3579 
3580 
3581 
3582 class SceneTreeItem;
3583 typedef std::shared_ptr<SceneTreeItem> SceneTreeItemPtr;
3584 class SceneTree;
3585 typedef std::shared_ptr<SceneTree> SceneTreePtr;
3586 
3589 class SPRK_API SceneTree : public Sprocket
3590 {
3591 public:
3594  enum class ItemType : uint32_t
3595  {
3596  None = 0x00000000,
3597  GenericMask = 0xffff0000,
3598 
3599  Segment = 0x00000001,
3600  Include = 0x00000002,
3601  ConditionalExpression = 0x00000003,
3602  StaticModelSegment = 0x00000004,
3603  AttributeFilter = 0x00000005,
3604 
3605  Geometry = 0x00010000,
3606  CuttingSection = 0x00010001,
3607  Shell = 0x00010002,
3608  Mesh = 0x00010003,
3609  Grid = 0x00010004,
3610  NURBSSurface = 0x00010005,
3611  Cylinder = 0x00010006,
3612  Sphere = 0x00010007,
3613  Polygon = 0x00010008,
3614  Circle = 0x00010009,
3615  CircularWedge = 0x0001000a,
3616  Ellipse = 0x0001000b,
3617  Line = 0x0001000c,
3618  NURBSCurve = 0x0001000d,
3619  CircularArc = 0x0001000e,
3620  EllipticalArc = 0x0001000f,
3621  InfiniteLine = 0x00010010,
3622  InfiniteRay = 0x00010011,
3623  Marker = 0x00010012,
3624  Text = 0x00010013,
3625  Reference = 0x00010014,
3626  DistantLight = 0x00010015,
3627  Spotlight = 0x00010016,
3628 
3629  Attribute = 0x00020000,
3630  Portfolio = 0x00020001,
3631  SegmentStyle = 0x00020002,
3632  NamedStyle = 0x00020003,
3633  MaterialPalette = 0x00020004,
3634  Priority = 0x00020005,
3635  Material = 0x00020006,
3636  Camera = 0x00020007,
3637  ModellingMatrix = 0x00020008,
3638  UserData = 0x00020009,
3639  TextureMatrix = 0x0002000a,
3640  Culling = 0x0002000b,
3641  CurveAttribute = 0x0002000c,
3642  CylinderAttribute = 0x0002000d,
3643  EdgeAttribute = 0x0002000e,
3644  LightingAttribute = 0x0002000f,
3645  LineAttribute = 0x00020010,
3646  MarkerAttribute = 0x00020011,
3647  SurfaceAttribute = 0x00020012,
3648  Selectability = 0x00020013,
3649  SphereAttribute = 0x00020014,
3650  Subwindow = 0x00020015,
3651  TextAttribute = 0x00020016,
3652  Transparency = 0x00020017,
3653  Visibility = 0x00020018,
3654  VisualEffects = 0x00020019,
3655  Performance = 0x00020020,
3656  DrawingAttribute = 0x00020021,
3657  HiddenLineAttribute = 0x00020022,
3658  ContourLine = 0x00020023,
3659  Condition = 0x00020024,
3660  Bounding = 0x00020025,
3661  AttributeLock = 0x00020026,
3662  TransformMask = 0x00020027,
3663  ColorInterpolation = 0x00020028,
3664  CuttingSectionAttribute = 0x00020029,
3665 
3666  // window only attributes
3667  Debugging = 0x00020030,
3668  PostProcessEffects = 0x00020031,
3669  SelectionOptions = 0x00020032,
3670  UpdateOptions = 0x00020033,
3671 
3672  Definition = 0x00040000,
3673  NamedStyleDefinition = 0x00040001,
3674  TextureDefinition = 0x00040002,
3675  LinePatternDefinition = 0x00040003,
3676  GlyphDefinition = 0x00040004,
3677  CubeMapDefinition = 0x00040005,
3678  ImageDefinition = 0x00040006,
3679  MaterialPaletteDefinition = 0x00040007,
3680  ShaderDefinition = 0x00040008,
3681  ShapeDefinition = 0x00040009,
3682 
3683  Group = 0x00080000,
3684  SegmentGroup = 0x00080100,
3685  GeometryGroup = 0x00080200,
3686  AttributeGroup = 0x00080300,
3687  PortfolioGroup = 0x00080400,
3688  StyleGroup = 0x00080500,
3689  IncludeGroup = 0x00080600,
3690  DefinitionGroup = 0x00180000,
3691  NamedStyleDefinitionGroup = 0x00180700,
3692  TextureDefinitionGroup = 0x00180800,
3693  LinePatternDefinitionGroup = 0x00180900,
3694  GlyphDefinitionGroup = 0x00180a00,
3695  CubeMapDefinitionGroup = 0x00180b00,
3696  ImageDefinitionGroup = 0x00180c00,
3697  MaterialPaletteDefinitionGroup = 0x00180d00,
3698  ShaderDefinitionGroup = 0x00180e00,
3699  ShapeDefinitionGroup = 0x00180f00,
3700  GeometryGroupMask = 0x00280000,
3701  CuttingSectionGroup = 0x00280001,
3702  ShellGroup = 0x00280002,
3703  MeshGroup = 0x00280003,
3704  GridGroup = 0x00280004,
3705  NURBSSurfaceGroup = 0x00280005,
3706  CylinderGroup = 0x00280006,
3707  SphereGroup = 0x00280007,
3708  PolygonGroup = 0x00280008,
3709  CircleGroup = 0x00280009,
3710  CircularWedgeGroup = 0x0028000a,
3711  EllipseGroup = 0x0028000b,
3712  LineGroup = 0x0028000c,
3713  NURBSCurveGroup = 0x0028000d,
3714  CircularArcGroup = 0x0028000e,
3715  EllipticalArcGroup = 0x0028000f,
3716  InfiniteLineGroup = 0x00280010,
3717  InfiniteRayGroup = 0x00280011,
3718  MarkerGroup = 0x00280012,
3719  TextGroup = 0x00280013,
3720  ReferenceGroup = 0x00280014,
3721  DistantLightGroup = 0x00280015,
3722  SpotlightGroup = 0x00280016,
3723  };
3724 
3726  SceneTree();
3727 
3730  SceneTree(Canvas const & in_canvas);
3731 
3734  SceneTree(SceneTree const & in_that);
3735 
3738  SceneTree(SceneTree && in_that);
3739 
3740  virtual ~SceneTree();
3741 
3742  static const HPS::Type staticType = HPS::Type::SceneTree;
3743  virtual HPS::Type ObjectType() const { return staticType; }
3744 
3748  SceneTree & operator=(SceneTree const & in_that);
3749 
3753  SceneTree & operator=(SceneTree && in_that);
3754 
3758  virtual void Assign(SceneTree const & in_that);
3759 
3763  bool Equals(SceneTree const & in_that) const;
3764 
3768  bool operator!=(SceneTree const & in_that) const;
3769 
3773  bool operator==(SceneTree const & in_that) const;
3774 
3775 
3784  void SetHighlightOptions(HighlightOptionsKit const & in_options);
3785 
3795  void SetHighlightOptions(HighlightOptionsKitArray const & in_options);
3796 
3807  void SetHighlightOptions(size_t in_count, HighlightOptionsKit const in_options []);
3808 
3816  void AddHighlightOptions(HighlightOptionsKit const & in_options);
3817 
3820  HighlightOptionsKitArray GetHighlightOptions() const;
3821 
3822 
3827  void SetGroupingLimit(size_t in_limit);
3828 
3831  size_t GetGroupingLimit() const;
3832 
3833 
3840  void SetRoot(SceneTreeItemPtr const & in_root);
3841 
3844  SceneTreeItemPtr GetRoot() const;
3845 
3846 
3849  virtual void Flush();
3850 
3855  void SetHighlightEventHandling(bool in_state);
3856 
3860  bool GetHighlightEventHandling() const;
3861 
3864  void ReExpand();
3865 };
3866 
3867 
3870 class SPRK_API SceneTreeItem : public Sprocket
3871 {
3872 public:
3874  SceneTreeItem();
3875 
3878  SceneTreeItem(SceneTreeItem const & in_that);
3879 
3882  SceneTreeItem(SceneTreeItem && in_that);
3883 
3889  SceneTreeItem(SceneTreePtr const & in_tree, Model const & in_model);
3890 
3896  SceneTreeItem(SceneTreePtr const & in_tree, View const & in_view);
3897 
3903  SceneTreeItem(SceneTreePtr const & in_tree, Layout const & in_layout);
3904 
3910  SceneTreeItem(SceneTreePtr const & in_tree, Canvas const & in_canvas);
3911 
3919  SceneTreeItem(SceneTreePtr const & in_tree, Key const & in_key, SceneTree::ItemType in_type, char const * in_title = nullptr);
3920 
3921  virtual ~SceneTreeItem();
3922 
3923  static const HPS::Type staticType = HPS::Type::SceneTreeItem;
3924  HPS::Type ObjectType() const { return staticType; }
3925 
3929  SceneTreeItem & operator=(SceneTreeItem const & in_that);
3930 
3934  SceneTreeItem & operator=(SceneTreeItem && in_that);
3935 
3939  virtual void Assign(SceneTreeItem const & in_that);
3940 
3944  bool Equals(SceneTreeItem const & in_that) const;
3945 
3949  bool operator!=(SceneTreeItem const & in_that) const;
3950 
3954  bool operator==(SceneTreeItem const & in_that) const;
3955 
3956 
3959  SceneTreePtr GetTree() const;
3960 
3963  UTF8 GetTitle() const;
3964 
3967  SceneTree::ItemType GetItemType() const;
3968 
3972  bool HasItemType(SceneTree::ItemType in_mask) const;
3973 
3976  Key GetKey() const;
3977 
3980  KeyPath GetKeyPath() const;
3981 
3984  bool HasChildren() const;
3985 
3986 
3995  virtual SceneTreeItemPtr AddChild(Key const & in_key, SceneTree::ItemType in_type, char const * in_title = nullptr) = 0;
3996 
3997 
4000  virtual void Expand();
4001 
4004  virtual void Collapse();
4005 
4006 
4011  bool IsSelected() const;
4012 
4018  virtual void Select();
4019 
4025  virtual void Unselect();
4026 
4031  bool IsHighlightable() const;
4032 
4038  bool IsHighlighted() const;
4039 
4044  void Highlight(size_t in_highlight_options_index = 0);
4045 
4051  void Highlight(HighlightOptionsKit const & in_highlight_options);
4052 
4058  void Unhighlight(size_t in_highlight_options_index = 0);
4059 
4066  void Unhighlight(HighlightOptionsKit const & in_highlight_options);
4067 
4070  bool IsExpanded() const;
4071 
4074  void ReExpand();
4075 };
4076 
4077 
4078 
4079 class ComponentTreeItem;
4080 typedef std::shared_ptr<ComponentTreeItem> ComponentTreeItemPtr;
4081 class ComponentTree;
4082 typedef std::shared_ptr<ComponentTree> ComponentTreePtr;
4083 
4086 class SPRK_API ComponentTree : public Sprocket
4087 {
4088 public:
4091  enum class ItemType
4092  {
4093  None,
4094  ExchangeComponent,
4095  ExchangeModelFile,
4096 
4097  ExchangeViewGroup,
4098  ExchangeAnnotationViewGroup,
4099  ExchangePMIGroup,
4100  ExchangeModelGroup,
4101 
4102  ParasolidComponent,
4103  ParasolidModelFile,
4104 
4105  DWGComponent,
4106  DWGModelFile,
4107  };
4108 
4110  ComponentTree();
4111 
4115  ComponentTree(Canvas const & in_canvas, size_t in_layer = 0);
4116 
4119  ComponentTree(ComponentTree const & in_that);
4120 
4123  ComponentTree(ComponentTree && in_that);
4124 
4125  virtual ~ComponentTree();
4126 
4127  static const HPS::Type staticType = HPS::Type::ComponentTree;
4128  virtual HPS::Type ObjectType() const { return staticType; }
4129 
4133  ComponentTree & operator=(ComponentTree const & in_that);
4134 
4138  ComponentTree & operator=(ComponentTree && in_that);
4139 
4143  virtual void Assign(ComponentTree const & in_that);
4144 
4148  bool Equals(ComponentTree const & in_that) const;
4149 
4153  bool operator!=(ComponentTree const & in_that) const;
4154 
4158  bool operator==(ComponentTree const & in_that) const;
4159 
4160 
4169  void SetHighlightOptions(HighlightOptionsKit const & in_options);
4170 
4180  void SetHighlightOptions(HighlightOptionsKitArray const & in_options);
4181 
4192  void SetHighlightOptions(size_t in_count, HighlightOptionsKit const in_options []);
4193 
4203  void AddHighlightOptions(HighlightOptionsKit const & in_options);
4204 
4207  HighlightOptionsKitArray GetHighlightOptions() const;
4208 
4209 
4216  void SetRoot(ComponentTreeItemPtr const & in_root);
4217 
4220  ComponentTreeItemPtr GetRoot() const;
4221 
4222 
4225  virtual void Flush();
4226 
4229  void ReExpand();
4230 
4235  void SetHighlightEventHandling(bool in_state);
4236 
4240  bool GetHighlightEventHandling() const;
4241 };
4242 
4243 
4246 class SPRK_API ComponentTreeItem : public Sprocket
4247 {
4248 public:
4251 
4254  ComponentTreeItem(ComponentTreeItem const & in_that);
4255 
4259 
4265  ComponentTreeItem(ComponentTreePtr const & in_tree, CADModel const & in_cad_model);
4266 
4273  ComponentTreeItem(ComponentTreePtr const & in_tree, Component const & in_component, ComponentTree::ItemType in_type);
4274 
4275  virtual ~ComponentTreeItem();
4276 
4277  static const HPS::Type staticType = HPS::Type::ComponentTreeItem;
4278  HPS::Type ObjectType() const { return staticType; }
4279 
4283  ComponentTreeItem & operator=(ComponentTreeItem const & in_that);
4284 
4288  ComponentTreeItem & operator=(ComponentTreeItem && in_that);
4289 
4293  virtual void Assign(ComponentTreeItem const & in_that);
4294 
4298  bool Equals(ComponentTreeItem const & in_that) const;
4299 
4303  bool operator!=(ComponentTreeItem const & in_that) const;
4304 
4308  bool operator==(ComponentTreeItem const & in_that) const;
4309 
4310 
4311 
4314  ComponentTreePtr GetTree() const;
4315 
4318  UTF8 GetTitle() const;
4319 
4322  ComponentTree::ItemType GetItemType() const;
4323 
4326  Component GetComponent() const;
4327 
4330  bool HasChildren() const;
4331 
4334  ComponentPath GetPath() const;
4335 
4336 
4344  virtual ComponentTreeItemPtr AddChild(Component const & in_component, ComponentTree::ItemType in_type) = 0;
4345 
4346 
4349  virtual void Expand();
4350 
4353  virtual void Collapse();
4354 
4355 
4363  bool IsHighlighted() const;
4364 
4369  virtual void OnHighlight(HighlightOptionsKit const & in_options);
4370 
4375  virtual void OnUnhighlight(HighlightOptionsKit const & in_options);
4376 
4377 
4382  void Highlight(size_t in_highlight_options_index = 0);
4383 
4389  void Highlight(HighlightOptionsKit const & in_highlight_options);
4390 
4395  void Unhighlight(size_t in_highlight_options_index = 0);
4396 
4402  void Unhighlight(HighlightOptionsKit const & in_highlight_options);
4403 
4404 
4416  bool IsHidden() const;
4417 
4421  virtual void OnHide();
4422 
4426  virtual void OnShow();
4427 
4432  void Hide();
4433 
4439  void Show(Component::Visibility in_subtree_visibility = Component::Visibility::PreserveNone);
4440 
4446  void Isolate(Component::Visibility in_subtree_visibility = Component::Visibility::PreserveNone);
4447 
4450  bool IsExpanded() const;
4451 
4454  void ReExpand();
4455 };
4456 
4457 
4458 
4459 
4460 }
4461 #endif
4462 
4463 
4464 
Definition: sprk.h:3139
Definition: hps.h:3412
Definition: hps.h:6241
Definition: sprk.h:1007
Event * Clone() const
Definition: sprk.h:760
Definition: sprk.h:3329
Definition: sprk.h:272
ComponentHighlightEvent(Event const &in_event)
Definition: sprk.h:2553
virtual bool OnTimerTick(HPS::TimerTickEvent const &in_event)
Definition: sprk.h:1206
Definition: hps.h:42726
ComponentHighlightEvent()
Definition: sprk.h:2535
void SetModifierTrigger(ModifierKeys in_modifiers)
Definition: sprk.h:1234
Definition: hps.h:470
CameraChangedEvent(Event const &in_event)
Definition: sprk.h:1026
virtual bool OnKeyDown(KeyboardState const &in_state)
Definition: sprk.h:1191
An InvalidSpecificationException is thrown when a method is called with non-sensical or contradictory...
Definition: hps.h:5852
Location
Definition: sprk.h:1465
ModifierKeys GetModifierTrigger() const
Definition: sprk.h:1237
virtual bool OnKeyUp(KeyboardState const &in_state)
Definition: sprk.h:1196
ItemType
Definition: sprk.h:4091
Definition: hps.h:5892
virtual intptr_t Freshen() const
Definition: sprk.h:1049
CaptureActivationEvent()
Definition: sprk.h:2728
Definition: sprk.h:66
Definition: sprk.h:213
ComponentIsolateEvent(Event const &in_event)
Definition: sprk.h:2496
Definition: sprk.h:682
PathType
Definition: sprk.h:2089
Definition: sprk.h:105
virtual bool OnMouseMove(MouseState const &in_state)
Definition: sprk.h:1156
Definition: sprk.h:4246
virtual bool OnMouseEnter(MouseState const &in_state)
Definition: sprk.h:1166
Definition: sprk.h:3193
Definition: hps.h:42509
ComponentIsolateEvent()
Definition: sprk.h:2479
Definition: hps.h:1340
Definition: hps.h:1058
Definition: hps.h:1734
Visibility
Definition: sprk.h:1752
Definition: sprk.h:241
ModelDeletedEvent()
Definition: sprk.h:968
SmoothTransitionCompleteEvent(HPS::View const &in_view)
Definition: sprk.h:3400
std::vector< KeyPath, Allocator< KeyPath > > KeyPathArray
Array of type HPS::KeyPath.
Definition: hps.h:6707
Definition: sprk.h:4086
Definition: hps.h:48118
Definition: sprk.h:1067
virtual bool OnTouchUp(TouchState const &in_state)
Definition: sprk.h:1181
Definition: hps.h:7747
MouseButtons GetMouseTrigger() const
Definition: sprk.h:1229
Definition: hps.h:3563
Definition: hps.h:2100
Definition: sprk.h:919
bool HasAll(MouseButtons in_mouse_trigger, ModifierKeys in_modifier_trigger) const
Event * Clone() const
Definition: sprk.h:804
Definition: sprk.h:2474
Definition: sprk.h:770
Definition: hps.h:1423
Definition: hps.h:879
Definition: hps.h:42629
virtual void OnModelDetached()
Definition: sprk.h:1222
SmoothTransitionCompleteEvent(Event const &in_event)
Definition: sprk.h:3405
Definition: hps.h:1792
Definition: hps.h:1558
Definition: hps.h:8983
Definition: hps.h:244
void SetMouseTrigger(MouseButtons in_buttons)
Definition: sprk.h:1225
Definition: hps.h:1852
Event * Clone() const
Definition: sprk.h:910
CameraChangedEvent()
Definition: sprk.h:1011
SprocketKit & operator=(SprocketKit &&in_that)
Definition: sprk.h:262
virtual void OnViewAttached(HPS::View const &in_attached_view)
Definition: sprk.h:1210
Definition: hps.h:48016
Definition: hps.h:41562
Definition: sprk.h:1461
Definition: sprk.h:964
Definition: sprk.h:566
ViewDetachedEvent(Event const &in_event)
Definition: sprk.h:846
Definition: hps.h:41609
LayoutDeletedEvent()
Definition: sprk.h:774
Event * Clone() const
Definition: sprk.h:954
Definition: hps.h:40994
Definition: hps.h:44295
Definition: hps.h:1098
Definition: sprk.h:2878
LayoutDetachedEvent()
Definition: sprk.h:729
Definition: sprk.h:2992
virtual bool OnMouseLeave(MouseState const &in_state)
Definition: sprk.h:1171
Definition: hps.h:9926
Definition: hps.h:42673
Definition: hps.h:1511
SmoothTransitionCompleteEvent()
Definition: sprk.h:3395
Definition: hps.h:1443
Event * Clone() const
Definition: sprk.h:2512
virtual bool OnMouseUp(MouseState const &in_state)
Definition: sprk.h:1151
FilterActivationEvent()
Definition: sprk.h:2639
Definition: hps.h:1462
virtual void OnModelAttached()
Definition: sprk.h:1218
Definition: hps.h:38728
FilterActivationEvent(Event const &in_event)
Definition: sprk.h:2653
ModelDetachedEvent(Event const &in_event)
Definition: sprk.h:938
Definition: hps.h:7118
Location
Definition: sprk.h:1612
Definition: hps.h:47487
Definition: sprk.h:2943
Definition: sprk.h:1608
Definition: hps.h:44474
SprocketControl & operator=(SprocketControl &&in_that)
Definition: sprk.h:234
Definition: hps.h:46382
virtual UTF8 GetName() const
Definition: sprk.h:1141
Definition: hps.h:47903
Definition: sprk.h:725
Event * Clone() const
Definition: sprk.h:2670
CaptureActivationEvent(Event const &in_event)
Definition: sprk.h:2742
virtual bool OnTouchDown(TouchState const &in_state)
Definition: sprk.h:1176
CanvasDeletedEvent()
Definition: sprk.h:686
virtual bool OnMouseWheel(MouseState const &in_state)
Definition: sprk.h:1161
SprocketControl(SprocketControl &&in_that)
Definition: sprk.h:229
Event * Clone() const
Definition: sprk.h:2758
Definition: hps.h:15741
ViewDeletedEvent()
Definition: sprk.h:880
intptr_t GetChannel() const
Definition: hps.h:6358
Definition: sprk.h:813
SprocketKit(SprocketKit &&in_that)
Definition: sprk.h:257
virtual bool Drop(Event const *in_that_event) const
Definition: sprk.h:3427
virtual HPS::UTF8 GetName() const
Definition: sprk.h:3334
Definition: sprk.h:1746
Definition: hps.h:44753
Definition: hps.h:46994
virtual bool OnTextInput(HPS::UTF8 const &in_text)
Definition: sprk.h:1201
The ComponentPath contains only components which are unique to this request, omitting ambiguous entri...
ViewDeletedEvent(Event const &in_event)
Definition: sprk.h:895
Definition: hps.h:38257
Definition: sprk.h:3090
ViewDetachedEvent()
Definition: sprk.h:824
Definition: hps.h:6325
Override the visibility for any components in the subtree under the ComponentPath specified regardles...
Definition: sprk.h:1312
Definition: hps.h:406
Event * Clone() const
Definition: sprk.h:2570
Definition: sprk.h:486
CanvasDeletedEvent(Event const &in_event)
Definition: sprk.h:701
Definition: sprk.h:3454
Definition: sprk.h:2084
std::shared_ptr< Operator > OperatorPtr
Shared pointer to an Operator object.
Definition: sprk.h:83
virtual bool Drop(Event const *in_that_event) const
Definition: sprk.h:1039
ComponentType
Definition: sprk.h:1762
Definition: hps.h:46307
std::vector< Key, Allocator< Key > > KeyArray
Array of type HPS::Key.
Definition: hps.h:6679
Definition: hps.h:2119
Definition: sprk.h:2524
Event * Clone() const
Definition: sprk.h:716
LayoutDetachedEvent(Event const &in_event)
Definition: sprk.h:744
virtual bool OnMouseDown(MouseState const &in_state)
Definition: sprk.h:1146
ItemType
Definition: sprk.h:3594
Definition: sprk.h:2583
Definition: sprk.h:3244
virtual HPS::UTF8 GetName() const
Definition: sprk.h:3461
Definition: sprk.h:190
virtual void OnViewDetached(HPS::View const &in_detached_view)
Definition: sprk.h:1214
Definition: sprk.h:3391
Definition: hps.h:425
Event * Clone() const
Definition: sprk.h:998
Definition: sprk.h:2683
Definition: hps.h:2139
ModelDetachedEvent()
Definition: sprk.h:923
static MouseButtons ButtonLeft()
Definition: hps.h:47605
Definition: sprk.h:3589
Definition: sprk.h:3041
UpdateType
Definition: hps.h:178
Definition: hps.h:9141
virtual bool IsMouseTriggered(MouseState const &in_state)
Definition: sprk.h:1240
Definition: hps.h:7665
Definition: sprk.h:2628
Definition: hps.h:37870
Definition: hps.h:351
Event * Clone() const
Definition: sprk.h:3418
ModelDeletedEvent(Event const &in_event)
Definition: sprk.h:983
Event * Clone() const
Definition: sprk.h:864
LayoutDeletedEvent(Event const &in_event)
Definition: sprk.h:789
Definition: hps.h:9370
Definition: hps.h:11031
Definition: sprk.h:1255
virtual bool OnTouchMove(TouchState const &in_state)
Definition: sprk.h:1186
Definition: sprk.h:3870
Definition: sprk.h:2770
Definition: hps.h:43205
Mode
Definition: sprk.h:195
Definition: hps.h:511
Definition: sprk.h:1109
Definition: hps.h:1141
Definition: hps.h:42555
Definition: sprk.h:876
Definition: sprk.h:2724
Definition: hps.h:41058
Definition: hps.h:7376
Event * Clone() const
Definition: sprk.h:1056