sprk.h
1 // Copyright (c) 1998-2014 by 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 <list>
16 #include <stack>
17 #include <memory>
18 #include <map>
19 
20 #ifdef _MSC_VER
21 # pragma warning(disable: 4251) //Not an issue as long as debug and release libraries aren't mixed
22 #ifndef STATIC_APP
23 # ifdef SPROCKETS
24 # define SPRK_API __declspec (dllexport)
25 # else
26 # define SPRK_API __declspec (dllimport)
27 # endif
28 #endif
29 #else
30 # include <stddef.h>
31 # if defined(LINUX_SYSTEM) && defined(SPROCKETS)
32 # ifndef STATIC_APP
33 # define SPRK_API __attribute__ ((visibility ("default")))
34 # endif
35 # endif
36 #endif
37 
38 #ifndef SPRK_API
39 # define SPRK_API
40 #endif
41 namespace SPRKI
42 {
43  class X;
44 };
45 
46 namespace HPS
47 {
48 
49 class Factory;
50 class Canvas;
51 class Layout;
52 class View;
53 class Model;
54 class Operator;
55 class OperatorControl;
56 class NavigationCubeControl;
57 class AxisTriadControl;
58 class Component;
59 class ComponentPath;
60 class ComponentHighlightEvent;
61 class Filter;
62 class Capture;
63 class CADModel;
64 class Metadata;
65 
66 
67 
68 
69 class SPRK_API Sprocket : public HPS::Object
70 {
71 public:
72  Sprocket() {}
73  Sprocket(Sprocket && in_that) : HPS::Object(std::move(in_that)) {}
74 
75  virtual ~Sprocket() {}
76 
78  enum class UpdateType
79  {
80  Synchronous,
81  Asynchronous
82  };
83 };
84 
85 typedef std::shared_ptr<Operator> OperatorPtr;
86 
87 typedef std::vector<OperatorPtr, Allocator<OperatorPtr> > OperatorPtrArray;
88 
89 typedef std::vector<Canvas, Allocator<Canvas> > CanvasArray;
90 typedef std::vector<Layout, Allocator<Layout> > LayoutArray;
91 typedef std::vector<View, Allocator<View> > ViewArray;
92 typedef std::vector<Model, Allocator<Model> > ModelArray;
93 
94 typedef std::vector<Component, Allocator<Component> > ComponentArray;
95 typedef std::vector<Metadata, Allocator<Metadata> > MetadataArray;
96 typedef std::vector<Filter, Allocator<Filter> > FilterArray;
97 typedef std::vector<Capture, Allocator<Capture> > CaptureArray;
98 typedef std::vector<CADModel, Allocator<CADModel> > CADModelArray;
99 typedef std::vector<ReferenceKeyArray, Allocator<ReferenceKeyArray>> ReferenceKeyArrayArray;
100 typedef std::vector<ComponentPath, Allocator<ComponentPath>> ComponentPathArray;
101 
102 
106 class SPRK_API Canvas : public Sprocket
107 {
108 public:
109  Canvas();
110  Canvas(Canvas const & that);
111  ~Canvas();
112 
113  HPS::Type ObjectType() const { return HPS::Type::Canvas; }
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(HPS::Sprocket::UpdateType in_update_type = Sprocket::UpdateType::Asynchronous) const;
163 
166  UpdateNotifier UpdateWithNotifier() const;
167 
171  void Update(HPS::Window::UpdateControl const in_control, HPS::Time const time_limit = -1.) const;
172 
177  UpdateNotifier UpdateWithNotifier(HPS::Window::UpdateControl const in_control, HPS::Time const time_limit = -1.) 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  HPS::Type ObjectType() const {return HPS::Type::SprocketControl;}
217 
218 protected:
219  SprocketControl() {}
220 
224  SprocketControl(SprocketControl && in_that) : Sprocket(std::move(in_that)) {}
225 
230  {
231  this->Object::operator=(std::move(in_that));
232  return *this;
233  }
234 };
235 
239 class SPRK_API View : public Sprocket
240 {
241 public:
242  View();
243  View(View const & that);
244  explicit View(SprocketControl const & in_ctrl);
245  ~View();
246 
247  HPS::Type ObjectType() const { return HPS::Type::View; }
248 
250  void Delete();
251 
252  View & operator=(View const & in_that);
253  void Assign(View const & in_that);
254 
255  bool Equals(View const & in_that) const;
256  bool operator!= (View const & in_that) const;
257  bool operator== (View const & in_that) const;
258 
260  UTF8 GetName() const;
261 
262 
264  HPS::View & ComputeFitWorldCamera(HPS::CameraKit & out_camera);
265 
268  HPS::View & ComputeFitWorldCamera(SegmentKey const & in_segment, HPS::CameraKit & out_camera);
269 
270 
273  HPS::View & ComputeFitWorldCamera(BoundingKit const & in_bounding, HPS::CameraKit & out_camera);
274 
279  HPS::View & ComputeFitWorldCamera(SegmentKey const & in_segment, MatrixKit const & in_transform, HPS::CameraKit & out_camera);
280 
281 
286  HPS::View & ComputeFitWorldCamera(BoundingKit const & in_bounding, MatrixKit const & in_transform, HPS::CameraKit & out_camera);
287 
288 
290  HPS::View & FitWorld();
291 
294  HPS::View & FitWorld(SegmentKey const & in_segment);
295 
296 
299  HPS::View & FitWorld(BoundingKit const & in_bounding);
300 
305  HPS::View & FitWorld(SegmentKey const & in_segment, MatrixKit const & in_transform);
306 
307 
312  HPS::View & FitWorld(BoundingKit const & in_bounding, MatrixKit const & in_transform);
313 
318  void AttachModel(Model const & in_model);
319 
321  void DetachModel();
322 
324  Model GetAttachedModel() const;
325 
327  IncludeKey GetAttachedModelIncludeLink() const;
328 
332  void SetRenderingMode(Rendering::Mode in_mode);
333 
336  Rendering::Mode GetRenderingMode() const;
337 
339  OperatorPtrArray GetOperators() const;
340 
343  void SetOperators(OperatorPtrArray & in_operators);
344 
348  void SetOperators(size_t in_count, OperatorPtr in_operators []);
349 
352  void SetOperator(OperatorPtr const & in_operator);
353 
356  void SetOperator(Operator * in_operator);
357 
359  OperatorControl GetOperatorControl();
360  OperatorControl const GetOperatorControl() const;
361 
363  NavigationCubeControl GetNavigationCubeControl();
364  NavigationCubeControl const GetNavigationCubeControl() const;
365 
367  AxisTriadControl GetAxisTriadControl();
368  AxisTriadControl const GetAxisTriadControl() const;
369 
372  SegmentKey GetSegmentKey();
373  SegmentKey const GetSegmentKey() const;
374 
377  SegmentKey GetModelOverrideSegmentKey();
378  SegmentKey const GetModelOverrideSegmentKey() const;
379 
380 
381  PortfolioKey const GetPortfolioKey() const;
382 
384  PortfolioKey GetPortfolioKey();
385 
390  void SetSimpleShadow(bool in_state, float in_percent_offset = 5.0f);
391 
393  bool GetSimpleShadow();
394 
399  void SetSimpleReflection(bool in_state, float in_percent_offset = 5.0f);
400 
402  bool GetSimpleReflection();
403 
405  void Update(HPS::Sprocket::UpdateType in_update_type = Sprocket::UpdateType::Asynchronous) const;
406 
410  void Update(HPS::Window::UpdateControl const in_control, HPS::Time const time_limit=-1.) const;
411 
415  void SmoothTransition(HPS::CameraKit const & in_camera_kit, HPS::Time in_duration = 0.5);
416 
417  static UTF8 GetHideStyleName();
418  static UTF8 GetShowStyleName();
419 
421  KeyArray const GetNavigationKeys();
422 
424  LayoutArray GetOwningLayouts();
425  LayoutArray const GetOwningLayouts() const;
426 };
427 
431 class SPRK_API Model : public Sprocket
432 {
433 public:
434  Model();
435  Model(Model const & that);
436  ~Model();
437 
438  HPS::Type ObjectType() const { return HPS::Type::Model; }
439 
441  void Delete();
442 
443  Model & operator=(Model const & in_that);
444  void Assign(Model const & in_that);
445 
446  bool Equals(Model const & in_that) const;
447  bool operator!= (Model const & in_that) const;
448  bool operator== (Model const & in_that) const;
449 
451  UTF8 GetName() const;
452 
455  SegmentKey GetSegmentKey();
456  SegmentKey const GetSegmentKey() const;
457 
459  SegmentKey GetLibraryKey();
460  SegmentKey const GetLibraryKey() const;
461 
463  PortfolioKey GetPortfolioKey();
464  PortfolioKey const GetPortfolioKey() const;
465 
467  HPS::Vector GetUpVector();
468  HPS::Vector const GetUpVector() const;
469 
471  HPS::Vector GetFrontVector();
472  HPS::Vector const GetFrontVector() const;
473 
475  HPS::ViewArray GetOwningViews();
476  HPS::ViewArray const GetOwningViews() const;
477 
481  void SetOrientation(HPS::Vector & in_up_vector, HPS::Vector & in_front_vector);
482 
484  bool ShowOrientation(HPS::Vector & out_up_vector, HPS::Vector & out_front_vector);
485 
487  void Update(HPS::Sprocket::UpdateType in_update_type = Sprocket::UpdateType::Asynchronous) const;
488 
492  void Update(HPS::Window::UpdateControl const in_control, HPS::Time const time_limit=-1.) const;
493 };
494 
498 class SPRK_API Layout : public Sprocket
499 {
500 public:
501  Layout();
502  Layout(Layout const & that);
503  ~Layout();
504 
505  HPS::Type ObjectType() const { return HPS::Type::Layout; }
506 
508  void Delete();
509 
510  Layout & operator=(Layout const & in_that);
511  void Assign(Layout const & in_that);
512 
513  bool Equals(Layout const & in_that) const;
514  bool operator!= (Layout const & in_that) const;
515  bool operator== (Layout const & in_that) const;
516 
518  UTF8 GetName() const;
519 
521  size_t GetLayerCount() const;
522 
526  void AttachViewFront(View const & in_view, HPS::Rectangle const & in_position = HPS::Rectangle(-1.0f, 1.0f, -1.0f, 1.0f));
530  void AttachViewBack(View const & in_view, HPS::Rectangle const & in_position = HPS::Rectangle(-1.0f, 1.0f, -1.0f, 1.0f));
531 
534  void DetachLayer(size_t in_layer);
535 
538  void DetachView(View const & in_view); // everywhere it occurs
539 
542  void BringToFront(size_t in_layer);
543 
547  void ReassignLayer(size_t in_layer, HPS::View in_view);
548 
552  void RepositionLayer(size_t in_layer, HPS::Rectangle const & in_position);
553 
555  View GetFrontView() const;
556 
560  View GetAttachedView(size_t in_layer = 0) const;
561 
565  Rectangle GetPosition(size_t in_layer) const;
566 
568  IncludeKey GetAttachedViewIncludeLink(size_t in_layer) const;
569 
571  SegmentKey GetLayerSegmentKey(size_t in_layer) const;
572 
576  size_t GetLayerAt(HPS::WindowPoint const & in_point) const;
577 
581  bool ShowLayerAt(HPS::WindowPoint const & in_point) const;
582 
585  SegmentKey GetSegmentKey();
586  SegmentKey const GetSegmentKey() const;
587 
589  CanvasArray GetOwningCanvases();
590  CanvasArray const GetOwningCanvases() const;
591 
593  void Update(HPS::Sprocket::UpdateType in_update_type = Sprocket::UpdateType::Asynchronous) const;
594 
598  void Update(HPS::Window::UpdateControl const in_control, HPS::Time const time_limit=-1.) const;
599 };
600 
601 class SPRK_API CanvasDeletedEvent : public Event
602 {
603 public:
606  {
607  channel = GetClassID();
608  consumable = false;
609  }
610 
611  CanvasDeletedEvent(Canvas const & in_canvas)
612  : Event(), canvas(in_canvas)
613  {
614  channel = GetClassID();
615  consumable = false;
616  }
617 
620  CanvasDeletedEvent(Event const & in_event) : Event(in_event)
621  {
622  if (in_event.GetChannel() == Object::ClassID<CanvasDeletedEvent>())
623  {
624  auto that = static_cast<CanvasDeletedEvent const &>(in_event);
625  canvas = that.canvas;
626  }
627  else
628  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
629  }
630 
632 
635  Event * Clone() const
636  {
637  CanvasDeletedEvent * new_event = new CanvasDeletedEvent(*this);
638  return new_event;
639  }
640 
641  Canvas canvas;
642 };
643 
644 class SPRK_API LayoutDetachedEvent : public Event
645 {
646 public:
649  {
650  channel = GetClassID();
651  consumable = false;
652  }
653 
654  LayoutDetachedEvent(Canvas const & in_canvas, Layout const & in_layout)
655  : Event(), canvas(in_canvas), layout(in_layout)
656  {
657  channel = GetClassID();
658  consumable = false;
659  }
660 
663  LayoutDetachedEvent(Event const & in_event) : Event(in_event)
664  {
665  if (in_event.GetChannel() == Object::ClassID<LayoutDetachedEvent>())
666  {
667  auto that = static_cast<LayoutDetachedEvent const &>(in_event);
668  canvas = that.canvas;
669  layout = that.layout;
670  }
671  else
672  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
673  }
674 
676 
679  Event * Clone() const
680  {
681  LayoutDetachedEvent * new_event = new LayoutDetachedEvent(*this);
682  return new_event;
683  }
684 
685  Canvas canvas;
686  Layout layout;
687 };
688 
689 class SPRK_API LayoutDeletedEvent : public Event
690 {
691 public:
694  {
695  channel = GetClassID();
696  consumable = false;
697  }
698 
699  LayoutDeletedEvent(Layout const & in_layout)
700  : Event(), layout(in_layout)
701  {
702  channel = GetClassID();
703  consumable = false;
704  }
705 
708  LayoutDeletedEvent(Event const & in_event) : Event(in_event)
709  {
710  if (in_event.GetChannel() == Object::ClassID<LayoutDeletedEvent>())
711  {
712  auto that = static_cast<LayoutDeletedEvent const &>(in_event);
713  layout = that.layout;
714  }
715  else
716  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
717  }
718 
720 
723  Event * Clone() const
724  {
725  LayoutDeletedEvent * new_event = new LayoutDeletedEvent(*this);
726  return new_event;
727  }
728 
729  Layout layout;
730 };
731 
732 class SPRK_API ViewDetachedEvent : public Event
733 {
734 public:
735  enum class Action
736  {
737  None = 0,
738  SpecificLayer,
739  AllLayers,
740  };
741 
743  ViewDetachedEvent() : Event(), action(Action::None), layer(0)
744  {
745  channel = GetClassID();
746  consumable = false;
747  }
748 
749  ViewDetachedEvent(Layout const & in_layout, size_t in_layer, View const & in_view)
750  : Event(), layout(in_layout), action(Action::SpecificLayer), layer(in_layer), view(in_view)
751  {
752  channel = GetClassID();
753  consumable = false;
754  }
755 
756  ViewDetachedEvent(Layout const & in_layout, View const & in_view)
757  : Event(), layout(in_layout), action(Action::AllLayers), layer(std::numeric_limits<size_t>::max()), view(in_view)
758  {
759  channel = GetClassID();
760  consumable = false;
761  }
762 
765  ViewDetachedEvent(Event const & in_event) : Event(in_event)
766  {
767  if (in_event.GetChannel() == Object::ClassID<ViewDetachedEvent>())
768  {
769  auto that = static_cast<ViewDetachedEvent const &>(in_event);
770  layout = that.layout;
771  action = that.action;
772  layer = that.layer;
773  view = that.view;
774  }
775  else
776  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
777  }
778 
780 
783  Event * Clone() const
784  {
785  ViewDetachedEvent * new_event = new ViewDetachedEvent(*this);
786  return new_event;
787  }
788 
789  Layout layout;
790  Action action;
791  size_t layer;
792  View view;
793 };
794 
795 class SPRK_API ViewDeletedEvent : public Event
796 {
797 public:
800  {
801  channel = GetClassID();
802  consumable = false;
803  }
804 
805  ViewDeletedEvent(View const & in_view)
806  : Event(), view(in_view)
807  {
808  channel = GetClassID();
809  consumable = false;
810  }
811 
814  ViewDeletedEvent(Event const & in_event) : Event(in_event)
815  {
816  if (in_event.GetChannel() == Object::ClassID<ViewDeletedEvent>())
817  {
818  auto that = static_cast<ViewDeletedEvent const &>(in_event);
819  view = that.view;
820  }
821  else
822  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
823  }
824 
825  ~ViewDeletedEvent();
826 
829  Event * Clone() const
830  {
831  ViewDeletedEvent * new_event = new ViewDeletedEvent(*this);
832  return new_event;
833  }
834 
835  View view;
836 };
837 
838 class SPRK_API ModelDetachedEvent : public Event
839 {
840 public:
843  {
844  channel = GetClassID();
845  consumable = false;
846  }
847 
848  ModelDetachedEvent(View const & in_view, Model const & in_model)
849  : Event(), view(in_view), model(in_model)
850  {
851  channel = GetClassID();
852  consumable = false;
853  }
854 
857  ModelDetachedEvent(Event const & in_event) : Event(in_event)
858  {
859  if (in_event.GetChannel() == Object::ClassID<ModelDetachedEvent>())
860  {
861  auto that = static_cast<ModelDetachedEvent const &>(in_event);
862  view = that.view;
863  model = that.model;
864  }
865  else
866  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
867  }
868 
870 
873  Event * Clone() const
874  {
875  ModelDetachedEvent * new_event = new ModelDetachedEvent(*this);
876  return new_event;
877  }
878 
879  View view;
880  Model model;
881 };
882 
883 class SPRK_API ModelDeletedEvent : public Event
884 {
885 public:
888  {
889  channel = GetClassID();
890  consumable = false;
891  }
892 
893  ModelDeletedEvent(Model const & in_model)
894  : Event(), model(in_model)
895  {
896  channel = GetClassID();
897  consumable = false;
898  }
899 
902  ModelDeletedEvent(Event const & in_event) : Event(in_event)
903  {
904  if (in_event.GetChannel() == Object::ClassID<ModelDeletedEvent>())
905  {
906  auto that = static_cast<ModelDeletedEvent const &>(in_event);
907  model = that.model;
908  }
909  else
910  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
911  }
912 
914 
917  Event * Clone() const
918  {
919  ModelDeletedEvent * new_event = new ModelDeletedEvent(*this);
920  return new_event;
921  }
922 
923  Model model;
924 };
925 
928 class SPRK_API SprocketPath : public Sprocket
929 {
930 public:
931  SprocketPath();
932  SprocketPath(Model const & in_model, View const & in_view, Layout const & in_layout, Canvas const & in_canvas);
933  SprocketPath(Canvas const & in_canvas, Layout const & in_layout, View const & in_view, Model const & in_model);
934  SprocketPath(Canvas const & in_canvas, size_t in_layer = 0);
935  SprocketPath(SprocketPath const & that);
936  ~SprocketPath();
937 
938  HPS::Type ObjectType() const { return HPS::Type::SprocketPath; }
939 
940  SprocketPath & operator=(SprocketPath const & in_that);
941  void Set(SprocketPath const & in_that);
942 
943  bool Equals(SprocketPath const & in_that) const;
944  bool operator!= (SprocketPath const & in_that) const;
945  bool operator== (SprocketPath const & in_that) const;
946 
948  Canvas GetCanvas() const;
949 
951  Layout GetLayout() const;
952 
954  View GetView() const;
955 
957  Model GetModel() const;
958 
963  KeyPath GetKeyPath() const;
964 };
965 
966 
969 class SPRK_API Operator : public Sprocket
970 {
971 public:
972  Operator(MouseButtons in_mouse_trigger = MouseButtons::ButtonLeft(), ModifierKeys in_modifier_trigger = ModifierKeys());
973  Operator(Operator const & in_that);
974 
975  virtual ~Operator();
976 
977  HPS::Type ObjectType() const { return HPS::Type::Operator; }
978 
979  virtual Operator & operator= (Operator const & in_that);
980 
982  virtual void Assign(Operator const & in_that);
983 
985  virtual bool Equals(Operator const & in_that) const;
986 
988  virtual bool operator!= (Operator const & in_that) const;
989 
991  virtual bool operator== (Operator const & in_that) const;
992 
994  void DetachView();
995 
997  View GetAttachedView() const;
998 
1000  virtual UTF8 GetName() const { return "Operator"; }
1001 
1005  virtual bool OnMouseDown(MouseState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
1006 
1010  virtual bool OnMouseUp(MouseState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
1011 
1015  virtual bool OnMouseMove(MouseState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
1016 
1020  virtual bool OnMouseWheel(MouseState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
1021 
1025  virtual bool OnMouseEnter(MouseState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
1026 
1030  virtual bool OnMouseLeave(MouseState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
1031 
1035  virtual bool OnTouchDown(TouchState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
1036 
1040  virtual bool OnTouchUp(TouchState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
1041 
1045  virtual bool OnTouchMove(TouchState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
1046 
1050  virtual bool OnKeyDown(KeyboardState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
1051 
1055  virtual bool OnKeyUp(KeyboardState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
1056 
1060  virtual bool OnTimerTick(HPS::TimerTickEvent const & in_event) { HPS_UNREFERENCED(in_event); return false; }
1061 
1063  virtual void OnViewAttached() { return; }
1064 
1066  virtual void OnViewDetached() { return; }
1067 
1070  virtual void OnModelAttached() { return; }
1071 
1074  virtual void OnModelDetached() { return; }
1075 
1077  void SetMouseTrigger(MouseButtons in_buttons) { mouse_trigger = in_buttons; }
1078 
1081  MouseButtons GetMouseTrigger() const { return mouse_trigger; }
1082 
1086  void SetModifierTrigger(ModifierKeys in_modifiers) { modifier_trigger = in_modifiers; }
1087 
1089  ModifierKeys GetModifierTrigger() const { return modifier_trigger; }
1090 
1092  virtual bool IsMouseTriggered(MouseState const & in_state) { return in_state.HasAll(mouse_trigger, modifier_trigger); }
1093 
1094  enum class Priority
1095  {
1096  Low,
1097  Normal,
1098  High
1099  };
1100 
1101 protected:
1102 
1103  HPS::MouseButtons mouse_trigger;
1104  HPS::ModifierKeys modifier_trigger;
1105 };
1106 
1109 class SPRK_API OperatorControl : public SprocketControl
1110 {
1111 public:
1113  explicit OperatorControl(View const & in_view);
1114 
1116  OperatorControl(OperatorControl const & in_that);
1117 
1121  OperatorControl(OperatorControl && in_that);
1122 
1126  OperatorControl & operator=(OperatorControl && in_that);
1127 
1129  ~OperatorControl();
1130 
1131  HPS::Type ObjectType() const {return HPS::Type::OperatorControl;};
1132 
1134  OperatorControl & operator=(OperatorControl const & in_that);
1135 
1136 
1138  size_t GetCount();
1139 
1142  size_t GetCount(Operator::Priority in_priority);
1143 
1144 
1150  OperatorControl & Push(OperatorPtr const & in_operator, Operator::Priority in_priority = Operator::Priority::Normal);
1151 
1157  OperatorControl & Push(Operator * in_operator, Operator::Priority in_priority = Operator::Priority::Normal);
1158 
1162  bool Pop(Operator::Priority in_priority = Operator::Priority::Normal);
1163 
1168  bool Pop(OperatorPtr & out_operator);
1169 
1175  bool Pop(Operator::Priority in_priority, OperatorPtr & out_operator);
1176 
1177 
1183  OperatorControl & Set(OperatorPtr const & in_operator, Operator::Priority in_priority = Operator::Priority::Normal);
1184 
1190  OperatorControl & Set(Operator * in_operator, Operator::Priority in_priority = Operator::Priority::Normal);
1191 
1197  OperatorControl & Set(OperatorPtrArray & in_operators, Operator::Priority in_priority = Operator::Priority::Normal);
1198 
1205  OperatorControl & Set(size_t in_count, OperatorPtr in_operators [], Operator::Priority in_priority = Operator::Priority::Normal);
1206 
1207 
1211  OperatorControl & UnsetTop(Operator::Priority in_priority = Operator::Priority::Normal);
1212 
1216  OperatorControl & UnsetEverything(Operator::Priority in_priority);
1217 
1220  OperatorControl & UnsetEverything();
1221 
1222 
1226  bool ShowTop(OperatorPtr & out_operator) const;
1227 
1232  bool ShowTop(Operator::Priority in_priority, OperatorPtr & out_operator) const;
1233 
1237  bool Show(OperatorPtrArray & out_operators) const;
1238 
1243  bool Show(Operator::Priority in_priority, OperatorPtrArray & out_operators) const;
1244 
1245 private:
1247  OperatorControl() {}
1248 };
1249 
1253 {
1254 public:
1255 
1256  enum class Location
1257  {
1258  TopRight,
1259  TopLeft,
1260  BottomRight,
1261  BottomLeft,
1262  Custom,
1263  };
1264 
1266  explicit NavigationCubeControl(View const & in_view);
1267 
1270 
1275 
1279  NavigationCubeControl & operator=(NavigationCubeControl && in_that);
1280 
1283 
1284  HPS::Type ObjectType() const {return HPS::Type::NavigationCubeControl;};
1285 
1287  NavigationCubeControl & operator=(NavigationCubeControl const & in_that);
1288 
1295  NavigationCubeControl & SetLocation(Location in_location, HPS::Rectangle const & in_rectangle = HPS::Rectangle());
1296 
1299  Location GetLocation() const;
1300 
1304  NavigationCubeControl & SetPosition(HPS::Rectangle const & in_rectangle);
1305 
1308  HPS::Rectangle GetPosition() const;
1309 
1314  NavigationCubeControl & SetVisibility(bool in_visibility);
1315 
1318  bool GetVisibility() const;
1319 
1323  NavigationCubeControl & SetTextVisibility(bool in_text_visibility);
1324 
1327  bool GetTextVisibility() const;
1328 
1343  NavigationCubeControl & SetMaterialPalette(const char * in_material_palette);
1344 
1347  HPS::UTF8 GetMaterialPalette() const;
1348 
1356  NavigationCubeControl & SetInteractivity(bool in_interactivity);
1357 
1358 
1361  bool GetInteractivity() const;
1362 
1367  NavigationCubeControl & SetSize(float in_size);
1368 
1371  float GetSize() const;
1372 
1375  HPS::SegmentKey GetSegmentKey() const;
1376 
1377 private:
1380 
1382  HPS::SegmentKey GetNavigationCubeSegment() const;
1383 };
1384 
1387 class SPRK_API AxisTriadControl : public SprocketControl
1388 {
1389 public:
1390 
1391  enum class Location
1392  {
1393  TopRight,
1394  TopLeft,
1395  BottomRight,
1396  BottomLeft,
1397  Custom,
1398  };
1399 
1401  explicit AxisTriadControl(View const & in_view);
1402 
1404  AxisTriadControl(AxisTriadControl const & in_that);
1405 
1409  AxisTriadControl(AxisTriadControl && in_that);
1410 
1414  AxisTriadControl & operator=(AxisTriadControl && in_that);
1415 
1417  ~AxisTriadControl();
1418 
1419  HPS::Type ObjectType() const {return HPS::Type::AxisTriadControl;};
1420 
1422  AxisTriadControl & operator=(AxisTriadControl const & in_that);
1423 
1430  HPS::AxisTriadControl & SetLocation(Location in_location, HPS::Rectangle const & in_rectangle = HPS::Rectangle());
1431 
1434  Location GetLocation() const;
1435 
1439  AxisTriadControl & SetPosition(HPS::Rectangle const & in_rectangle);
1440 
1443  HPS::Rectangle GetPosition() const;
1444 
1449  HPS::AxisTriadControl & SetVisibility(bool in_visibility);
1450 
1453  bool GetVisibility() const;
1454 
1458  HPS::AxisTriadControl & SetTextVisibility(bool in_text_visibility);
1459 
1462  bool GetTextVisibility() const;
1463 
1472  HPS::AxisTriadControl & SetMaterialPalette(const char * in_material_palette);
1473 
1476  HPS::UTF8 GetMaterialPalette() const;
1477 
1484  HPS::AxisTriadControl & SetInteractivity(bool in_interactivity);
1485 
1488  bool GetInteractivity() const;
1489 
1494  AxisTriadControl & SetSize(float in_size);
1495 
1498  float GetSize() const;
1499 
1502  HPS::SegmentKey GetSegmentKey() const;
1503 
1504 private:
1506  AxisTriadControl(){};
1507 
1509  HPS::SegmentKey GetAxisTriadSegment() const;
1510 };
1511 
1513 class SPRK_API Component : public Sprocket
1514 {
1515 public:
1518  enum class ComponentType : uint32_t
1519  {
1520  None = 0x00000000,
1521  GenericMask = 0xfffff000,
1522 
1523  ExchangeComponentMask = 0x00001000,
1524  ExchangeModelFile = 0x00001001,
1525  ExchangeProductOccurrence = 0x00001002,
1526  ExchangePartDefinition = 0x00001003,
1527 
1528  ExchangeView = 0x00001004,
1529  ExchangeFilter = 0x00001005,
1530 
1531  ExchangeRepresentationItemMask = 0x00003000,
1532  ExchangeRIBRepModel = 0x00003001,
1533  ExchangeRICurve = 0x00003002,
1534  ExchangeRIDirection = 0x00003003,
1535  ExchangeRIPlane = 0x00003004,
1536  ExchangeRIPointSet = 0x00003005,
1537  ExchangeRIPolyBRepModel = 0x00003006,
1538  ExchangeRIPolyWire = 0x00003007,
1539  ExchangeRISet = 0x00003008,
1540  ExchangeRICoordinateSystem = 0x00003009,
1541 
1542  ExchangeTopologyMask = 0x00005000,
1543  ExchangeTopoBody = 0x00005001,
1544  ExchangeTopoConnex = 0x00005002,
1545  ExchangeTopoShell = 0x00005003,
1546  ExchangeTopoFace = 0x00005004,
1547  ExchangeTopoLoop = 0x00005005,
1548  ExchangeTopoCoEdge = 0x00005006,
1549  ExchangeTopoEdge = 0x00005007,
1550  ExchangeTopoVertex = 0x00005008,
1551  ExchangeTopoSingleWireBody = 0x00005009,
1552  ExchangeTopoWireEdge = 0x0000500a,
1553 
1554  ExchangeDrawingMask = 0x00006000,
1555  ExchangeDrawingModel = 0x00006001,
1556  ExchangeDrawingView = 0x00006002,
1557  ExchangeDrawingSheet = 0x00006003,
1558  ExchangeBasicDrawingBlock = 0x00006004,
1559  ExchangeOperatorDrawingBlock = 0x00006005,
1560 
1561  ExchangePMIMask = 0x00009000,
1562  ExchangePMI = ExchangePMIMask,
1563  ExchangePMIText = 0x00009100,
1564  ExchangePMIRichText = 0x00009200,
1565  ExchangePMIRoughness = 0x00009300,
1566  ExchangePMIGDT = 0x00009400,
1567  ExchangePMIDatum = 0x00009500,
1568  ExchangePMILineWelding = 0x00009600,
1569  ExchangePMISpotWelding = 0x00009700,
1570  ExchangePMIDimension = 0x00009800,
1571  ExchangePMIBalloon = 0x00009900,
1572  ExchangePMICoordinate = 0x00009a00,
1573  ExchangePMIFastener = 0x00009b00,
1574  ExchangePMILocator = 0x00009c00,
1575  ExchangePMIMeasurementPoint = 0x00009d00,
1576 
1577 
1578  ParasolidComponentMask = 0x00010000,
1579 
1580  ParasolidModelFile = 0x00010001,
1581  ParasolidAssembly = 0x00010002,
1582 
1583  ParasolidTopologyMask = 0x00050000,
1584  ParasolidTopoBody = 0x00050001,
1585  ParasolidTopoRegion = 0x00050002,
1586  ParasolidTopoShell = 0x00050003,
1587  ParasolidTopoFace = 0x00050004,
1588  ParasolidTopoLoop = 0x00050005,
1589  ParasolidTopoFin = 0x00050006,
1590  ParasolidTopoEdge = 0x00050007,
1591  ParasolidTopoVertex = 0x00050008,
1592  };
1593 
1594 
1596  Component();
1597 
1600  Component(Component const & in_that);
1601 
1604  Component(Component && in_that);
1605 
1607  virtual ~Component();
1608 
1609  HPS::Type ObjectType() const { return HPS::Type::Component; }
1610 
1611 
1615  Component & operator=(Component const & in_that);
1616 
1620  Component & operator=(Component && in_that);
1621 
1625  virtual void Assign(Component const & in_that);
1626 
1630  bool Equals(Component const & in_that) const;
1631 
1635  bool operator!=(Component const & in_that) const;
1636 
1640  bool operator==(Component const & in_that) const;
1641 
1642 
1645  ComponentType GetComponentType() const;
1646 
1650  bool HasComponentType(ComponentType in_mask) const;
1651 
1652 
1653 
1659  void AddKey(Key const & in_key);
1660 
1663  KeyArray GetKeys() const;
1664 
1665 
1666 
1671  void AddOwner(Component & in_owner, IncludeKey const & in_include = IncludeKey());
1672 
1676  ComponentArray GetOwners() const;
1677 
1680  ComponentArray GetSubcomponents() const;
1681 
1686  ComponentArray GetAllSubcomponents(ComponentType in_type) const;
1687 
1688 
1689 
1692  void AddReference(Component & in_reference);
1693 
1696  ComponentArray GetReferrers() const;
1697 
1701  ComponentArray GetReferences() const;
1702 
1703 
1704 
1707  MetadataArray GetAllMetadata() const;
1708 
1712  Metadata GetMetadata(char const * in_name) const;
1713 
1714 
1715 
1720  void Delete();
1721 
1722 
1730  static KeyPathArray GetKeyPath(Component const & in_component);
1731 
1741  static KeyPathArray GetKeyPath(size_t in_count, Component const in_components[]);
1742 
1751  static KeyPathArray GetKeyPath(ComponentArray const & in_components);
1752 };
1753 
1756 class SPRK_API ComponentPath : public Sprocket
1757 {
1758 public:
1760  ComponentPath();
1761 
1764  ComponentPath(ComponentArray const & in_components);
1765 
1769  ComponentPath(size_t in_count, Component const in_components[]);
1770 
1772  ComponentPath(ComponentPath const & in_that);
1773 
1777  ComponentPath(ComponentPath && in_that);
1778 
1782  ComponentPath & operator=(ComponentPath && in_that);
1783 
1785  virtual ~ComponentPath();
1786 
1787  HPS::Type ObjectType() const { return HPS::Type::ComponentPath; }
1788 
1792  ComponentPath & operator+=(Component const & in_component);
1793 
1797  ComponentPath & operator+=(ComponentPath const & in_path);
1798 
1802  ComponentPath & operator+=(ComponentArray const & in_components);
1803 
1807  ComponentPath & Append(Component const & in_component);
1808 
1812  ComponentPath & Append(ComponentPath const & in_path);
1813 
1817  ComponentPath & Append(ComponentArray const & in_components);
1818 
1822  ComponentPath & operator=(ComponentPath const & in_that);
1823 
1827  ComponentPath & operator=(ComponentArray const & in_path);
1828 
1831  void Set(ComponentPath const & in_that);
1832 
1836  bool Equals(ComponentPath const & in_that) const;
1837 
1841  bool operator!= (ComponentPath const & in_that) const;
1842 
1846  bool operator== (ComponentPath const & in_that) const;
1847 
1848 
1852  ComponentPath & SetComponents(ComponentArray const & in_components);
1853 
1858  ComponentPath & SetComponents(size_t in_count, Component const in_components[]);
1859 
1862  ComponentArray GetComponents() const;
1863 
1867  KeyPathArray GetKeyPaths() const;
1868 
1873  KeyPathArray GetKeyPaths(Canvas const & in_canvas, size_t in_layer = 0) const;
1874 
1875 
1879  void Highlight(Canvas const & in_canvas, HighlightOptionsKit const & in_options) const;
1880 
1885  void Highlight(Canvas const & in_canvas, size_t in_layer, HighlightOptionsKit const & in_options) const;
1886 
1890  void Unhighlight(Canvas const & in_canvas, HighlightOptionsKit const & in_options) const;
1891 
1896  void Unhighlight(Canvas const & in_canvas, size_t in_layer, HighlightOptionsKit const & in_options) const;
1897 
1898 
1902  void Hide(Canvas const & in_canvas, size_t in_layer = 0);
1903 
1907  void Show(Canvas const & in_canvas, size_t in_layer = 0);
1908 
1914  bool IsHidden(Canvas const & in_canvas, size_t in_layer = 0);
1915 
1919  void Isolate(Canvas const & in_canvas, size_t in_layer = 0);
1920 
1921  static void Isolate(HPS::ComponentPathArray & in_components_to_be_isolated, Canvas const & in_canvas, size_t in_layer = 0);
1922 };
1923 
1924 
1929 inline ComponentPath operator+(Component const & in_lhs, Component const & in_rhs)
1930 {
1931  return HPS::ComponentPath().Append(in_lhs).Append(in_rhs);
1932 }
1933 
1938 inline ComponentPath operator+(Component const & in_lhs, ComponentArray const & in_rhs)
1939 {
1940  return HPS::ComponentPath().Append(in_lhs).Append(in_rhs);
1941 }
1942 
1947 inline ComponentPath operator+(Component const & in_lhs, ComponentPath const & in_rhs)
1948 {
1949  return HPS::ComponentPath().Append(in_lhs).Append(in_rhs);
1950 }
1951 
1956 inline ComponentPath operator+(ComponentArray const & in_lhs, Component const & in_rhs)
1957 {
1958  return HPS::ComponentPath().Append(in_lhs).Append(in_rhs);
1959 }
1960 
1965 inline ComponentPath operator+(ComponentArray const & in_lhs, ComponentArray const & in_rhs)
1966 {
1967  return HPS::ComponentPath().Append(in_lhs).Append(in_rhs);
1968 }
1969 
1974 inline ComponentPath operator+(ComponentArray const & in_lhs, ComponentPath const & in_rhs)
1975 {
1976  return HPS::ComponentPath().Append(in_lhs).Append(in_rhs);
1977 }
1978 
1983 inline ComponentPath operator+(ComponentPath const & in_lhs, Component const & in_rhs)
1984 {
1985  return HPS::ComponentPath().Append(in_lhs).Append(in_rhs);
1986 }
1987 
1992 inline ComponentPath operator+(ComponentPath const & in_lhs, ComponentArray const & in_rhs)
1993 {
1994  return HPS::ComponentPath().Append(in_lhs).Append(in_rhs);
1995 }
1996 
2001 inline ComponentPath operator+(ComponentPath const & in_lhs, ComponentPath const & in_rhs)
2002 {
2003  return HPS::ComponentPath().Append(in_lhs).Append(in_rhs);
2004 }
2005 
2006 
2008 class SPRK_API ComponentHighlightEvent : public Event
2009 {
2010 public:
2011  enum class Action
2012  {
2013  None = 0,
2014  Highlight,
2015  Unhighlight,
2016  };
2017 
2020  {
2021  channel = GetClassID();
2022  consumable = false;
2023  action = Action::None;
2024  }
2025 
2026  ComponentHighlightEvent(Action in_action,
2027  ComponentPath const & in_path = ComponentPath(),
2028  HighlightOptionsKit const & in_options = HighlightOptionsKit())
2029  : Event(), action(in_action), path(in_path), options(in_options)
2030  {
2031  channel = GetClassID();
2032  consumable = false;
2033  }
2034 
2037  ComponentHighlightEvent(Event const & in_event) : Event(in_event)
2038  {
2039  if (in_event.GetChannel() == Object::ClassID<ComponentHighlightEvent>())
2040  {
2041  auto that = static_cast<ComponentHighlightEvent const &>(in_event);
2042  action = that.action;
2043  path = that.path;
2044  options = that.options;
2045  }
2046  else
2047  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
2048  }
2049 
2051 
2054  Event * Clone() const
2055  {
2056  ComponentHighlightEvent * new_event = new ComponentHighlightEvent(*this);
2057  return new_event;
2058  }
2059 
2060  Action action;
2061  ComponentPath path;
2062  HighlightOptionsKit options;
2063 };
2064 
2065 
2067 class SPRK_API Filter : public Component
2068 {
2069 public:
2071  Filter();
2072 
2076  Filter(Component const & in_that);
2077 
2080  Filter(Filter const & in_that);
2081 
2084  Filter(Filter && in_that);
2085 
2086  virtual ~Filter();
2087 
2088  HPS::Type ObjectType() const { return HPS::Type::Filter; }
2089 
2090 #ifndef _MSC_VER
2091  Filter & operator=(Filter const & in_that) = default;
2092 #endif
2093 
2097  Filter & operator=(Filter && in_that);
2098 
2099 
2102  void Activate(View const & in_view);
2103 
2106  void Deactivate(View const & in_view);
2107 };
2108 
2109 
2110 class SPRK_API FilterActivationEvent : public Event
2111 {
2112 public:
2113  enum class Action
2114  {
2115  None = 0,
2116  Activate,
2117  Deactivate,
2118  };
2119 
2122  {
2123  channel = GetClassID();
2124  consumable = false;
2125  }
2126 
2127  FilterActivationEvent(Filter in_filter, Action in_action, View in_view) : Event(), filter(in_filter), action(in_action), view(in_view)
2128  {
2129  channel = GetClassID();
2130  consumable = false;
2131  }
2132 
2135  FilterActivationEvent(Event const & in_event) : Event(in_event)
2136  {
2137  if (in_event.GetChannel() == Object::ClassID<FilterActivationEvent>())
2138  {
2139  auto that = static_cast<FilterActivationEvent const &>(in_event);
2140  filter = that.filter;
2141  action = that.action;
2142  view = that.view;
2143  }
2144  else
2145  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
2146  }
2147 
2149 
2152  Event * Clone() const
2153  {
2154  FilterActivationEvent * new_event = new FilterActivationEvent(*this);
2155  return new_event;
2156  }
2157 
2158  Filter filter;
2159  Action action;
2160  View view;
2161 };
2162 
2163 
2165 class SPRK_API Capture : public Component
2166 {
2167 public:
2169  Capture();
2170 
2174  Capture(Component const & in_that);
2175 
2178  Capture(Capture const & in_that);
2179 
2182  Capture(Capture && in_that);
2183 
2184  virtual ~Capture();
2185 
2186  HPS::Type ObjectType() const { return HPS::Type::Capture; }
2187 
2188 #ifndef _MSC_VER
2189  Capture & operator=(Capture const & in_that) = default;
2190 #endif
2191 
2195  Capture & operator=(Capture && in_that);
2196 
2197 
2201  View Activate();
2202 };
2203 
2204 
2205 class SPRK_API CaptureActivationEvent : public Event
2206 {
2207 public:
2210  {
2211  channel = GetClassID();
2212  consumable = false;
2213  }
2214 
2215  CaptureActivationEvent(Capture in_capture, View in_view) : Event(), capture(in_capture), view(in_view)
2216  {
2217  channel = GetClassID();
2218  consumable = false;
2219  }
2220 
2223  CaptureActivationEvent(Event const & in_event) : Event(in_event)
2224  {
2225  if (in_event.GetChannel() == Object::ClassID<CaptureActivationEvent>())
2226  {
2227  auto that = static_cast<CaptureActivationEvent const &>(in_event);
2228  capture = that.capture;
2229  view = that.view;
2230  }
2231  else
2232  throw HPS::InvalidSpecificationException("Invalid Event Type to Cast From.");
2233  }
2234 
2236 
2239  Event * Clone() const
2240  {
2241  CaptureActivationEvent * new_event = new CaptureActivationEvent(*this);
2242  return new_event;
2243  }
2244 
2245  Capture capture;
2246  View view;
2247 };
2248 
2249 
2251 class SPRK_API CADModel : public Component
2252 {
2253 public:
2255  CADModel();
2256 
2260  CADModel(Component const & in_that);
2261 
2264  CADModel(CADModel const & in_that);
2265 
2268  CADModel(CADModel && in_that);
2269 
2272  CADModel(Model const & in_that);
2273 
2274  virtual ~CADModel();
2275 
2276  HPS::Type ObjectType() const { return HPS::Type::CADModel; }
2277 
2278 #ifndef _MSC_VER
2279  CADModel & operator=(CADModel const & in_that) = default;
2280 #endif
2281 
2285  CADModel & operator=(CADModel && in_that);
2286 
2287 
2291  Component GetComponentFromKey(Key const & in_key) const;
2292 
2297  ComponentPath GetComponentPath(KeyPath const & in_key_path) const;
2298 
2304  ComponentPath GetComponentPath(SelectionItem const & in_item) const;
2305 
2306 
2309  Model GetModel() const;
2310 
2313  FilterArray GetAllFilters() const;
2314 
2317  CaptureArray GetAllCaptures() const;
2318 
2322  FilterArray GetActiveFilters(View const & in_view) const;
2323 
2324 
2328  View ActivateDefaultCapture();
2329 
2330 
2338  void ResetVisibility(Canvas & in_canvas, size_t in_layer = 0);
2339 };
2340 
2341 
2342 
2345 class SPRK_API Metadata : public Sprocket
2346 {
2347 public:
2349  Metadata();
2350 
2353  Metadata(Metadata const & in_that);
2354 
2357  Metadata(Metadata && in_that);
2358 
2361  Metadata(char const * in_name);
2362 
2363  virtual ~Metadata();
2364 
2365  HPS::Type ObjectType() const { return HPS::Type::Metadata; }
2366 
2367 
2371  Metadata & operator=(Metadata const & in_that);
2372 
2376  Metadata & operator=(Metadata && in_that);
2377 
2381  virtual void Assign(Metadata const & in_that);
2382 
2386  bool Equals(Metadata const & in_that) const;
2387 
2391  bool operator!=(Metadata const & in_that) const;
2392 
2396  bool operator==(Metadata const & in_that) const;
2397 
2398 
2401  HPS::UTF8 GetName() const;
2402 
2405  void SetName(char const * in_name);
2406 };
2407 
2409 class SPRK_API IntegerMetadata : public Metadata
2410 {
2411 public:
2413  IntegerMetadata();
2414 
2418  IntegerMetadata(Metadata const & in_that);
2419 
2422  IntegerMetadata(IntegerMetadata const & in_that);
2423 
2426  IntegerMetadata(IntegerMetadata && in_that);
2427 
2431  IntegerMetadata(char const * in_name, int in_value);
2432 
2433  virtual ~IntegerMetadata();
2434 
2435  HPS::Type ObjectType() const { return HPS::Type::IntegerMetadata; }
2436 
2437 #ifndef _MSC_VER
2438  IntegerMetadata & operator=(IntegerMetadata const & in_that) = default;
2439 #endif
2440 
2444  IntegerMetadata & operator=(IntegerMetadata && in_that);
2445 
2446 
2449  int GetValue() const;
2450 
2453  void SetValue(int in_value);
2454 };
2455 
2457 class SPRK_API UnsignedIntegerMetadata : public Metadata
2458 {
2459 public:
2462 
2466  UnsignedIntegerMetadata(Metadata const & in_that);
2467 
2471 
2475 
2479  UnsignedIntegerMetadata(char const * in_name, unsigned int in_value);
2480 
2481  virtual ~UnsignedIntegerMetadata();
2482 
2483  HPS::Type ObjectType() const { return HPS::Type::UnsignedIntegerMetadata; }
2484 
2485 #ifndef _MSC_VER
2486  UnsignedIntegerMetadata & operator=(UnsignedIntegerMetadata const & in_that) = default;
2487 #endif
2488 
2492  UnsignedIntegerMetadata & operator=(UnsignedIntegerMetadata && in_that);
2493 
2494 
2497  unsigned int GetValue() const;
2498 
2501  void SetValue(unsigned int in_value);
2502 };
2503 
2505 class SPRK_API DoubleMetadata : public Metadata
2506 {
2507 public:
2509  DoubleMetadata();
2510 
2514  DoubleMetadata(Metadata const & in_that);
2515 
2518  DoubleMetadata(DoubleMetadata const & in_that);
2519 
2522  DoubleMetadata(DoubleMetadata && in_that);
2523 
2527  DoubleMetadata(char const * in_name, double in_value);
2528 
2529  virtual ~DoubleMetadata();
2530 
2531  HPS::Type ObjectType() const { return HPS::Type::DoubleMetadata; }
2532 
2533 #ifndef _MSC_VER
2534  DoubleMetadata & operator=(DoubleMetadata const & in_that) = default;
2535 #endif
2536 
2540  DoubleMetadata & operator=(DoubleMetadata && in_that);
2541 
2542 
2545  double GetValue() const;
2546 
2549  void SetValue(double in_value);
2550 };
2551 
2553 class SPRK_API StringMetadata : public Metadata
2554 {
2555 public:
2557  StringMetadata();
2558 
2562  StringMetadata(Metadata const & in_that);
2563 
2566  StringMetadata(StringMetadata const & in_that);
2567 
2570  StringMetadata(StringMetadata && in_that);
2571 
2575  StringMetadata(char const * in_name, char const * in_value);
2576 
2577  virtual ~StringMetadata();
2578 
2579  HPS::Type ObjectType() const { return HPS::Type::StringMetadata; }
2580 
2581 #ifndef _MSC_VER
2582  StringMetadata & operator=(StringMetadata const & in_that) = default;
2583 #endif
2584 
2588  StringMetadata & operator=(StringMetadata && in_that);
2589 
2590 
2593  UTF8 GetValue() const;
2594 
2597  void SetValue(char const * in_value);
2598 };
2599 
2601 class SPRK_API TimeMetadata : public Metadata
2602 {
2603 public:
2605  TimeMetadata();
2606 
2610  TimeMetadata(Metadata const & in_that);
2611 
2614  TimeMetadata(TimeMetadata const & in_that);
2615 
2618  TimeMetadata(TimeMetadata && in_that);
2619 
2623  TimeMetadata(char const * in_name, unsigned int in_value);
2624 
2625  virtual ~TimeMetadata();
2626 
2627  HPS::Type ObjectType() const { return HPS::Type::TimeMetadata; }
2628 
2629 #ifndef _MSC_VER
2630  TimeMetadata & operator=(TimeMetadata const & in_that) = default;
2631 #endif
2632 
2636  TimeMetadata & operator=(TimeMetadata && in_that);
2637 
2638 
2641  unsigned int GetValue() const;
2642 
2645  HPS::UTF8 GetValueAsString() const;
2646 
2649  void SetValue(unsigned int in_value);
2650 };
2651 
2652 
2654 class SPRK_API BooleanMetadata : public Metadata
2655 {
2656 public:
2658  BooleanMetadata();
2659 
2663  BooleanMetadata(Metadata const & in_that);
2664 
2667  BooleanMetadata(BooleanMetadata const & in_that);
2668 
2671  BooleanMetadata(BooleanMetadata && in_that);
2672 
2676  BooleanMetadata(char const * in_name, bool in_value);
2677 
2678  virtual ~BooleanMetadata();
2679 
2680  HPS::Type ObjectType() const { return HPS::Type::BooleanMetadata; }
2681 
2682 #ifndef _MSC_VER
2683  BooleanMetadata & operator=(BooleanMetadata const & in_that) = default;
2684 #endif
2685 
2689  BooleanMetadata & operator=(BooleanMetadata && in_that);
2690 
2691 
2694  bool GetValue() const;
2695 
2698  void SetValue(bool in_value);
2699 };
2700 
2701 
2702 
2704 class SPRK_API Factory : public Sprocket
2705 {
2706 public:
2707 
2710  static CanvasArray GetCanvases();
2711 
2714  static LayoutArray GetLayouts();
2715 
2718  static ViewArray GetViews();
2719 
2722  static ModelArray GetModels();
2723 
2726  static CADModelArray GetCADModels();
2727 
2733  static Canvas CreateCanvas(HPS::WindowHandle in_window_handle, char const * in_name = "", HPS::ApplicationWindowOptionsKit const & in_options = HPS::ApplicationWindowOptionsKit());
2734 
2739  static Canvas CreateCanvas(char const * in_name = "", HPS::StandAloneWindowOptionsKit const & in_options = HPS::StandAloneWindowOptionsKit());
2740 
2746  static Canvas CreateCanvas(HPS::WindowKey const & in_window_key, HPS::PortfolioKey const & in_portfolio_key = HPS::PortfolioKey(), char const * in_name = "");
2747 
2751  static Layout CreateLayout(char const * in_name = "");
2752 
2756  static View CreateView(char const * in_name = "");
2757 
2761  static Model CreateModel(char const * in_name = "");
2762 
2763 private:
2764  Factory() {}
2765 };
2766 
2776 class SPRK_API AxisTriadOperator : public Operator
2777 {
2778 public:
2779  AxisTriadOperator(MouseButtons in_mouse_trigger = MouseButtons::ButtonLeft(), ModifierKeys in_modifier_trigger = ModifierKeys());
2781  virtual HPS::UTF8 GetName() const { return "HPS_AxisTriadOperator"; }
2782 
2788  virtual bool OnMouseDown(MouseState const & in_state);
2793  virtual bool OnMouseUp(MouseState const & in_state);
2798  virtual bool OnMouseMove(MouseState const & in_state);
2799 
2804  virtual bool OnTouchDown(TouchState const & in_state);
2809  virtual bool OnTouchUp(TouchState const & in_state);
2814  virtual bool OnTouchMove(TouchState const & in_state);
2815 
2816  virtual void OnViewAttached();
2817  virtual void OnViewDetached();
2818 
2819 private:
2820 
2821  bool AxisOrbit(HPS::WindowPoint const & in_loc);
2822  void Transition(HPS::SelectionResults selection_results);
2823  void TranslatePoint(HPS::WindowPoint * point);
2824  bool IsEventRelevant(HPS::Point const & event_location);
2825 
2826  bool operator_active;
2827  HPS::WindowPoint start_point;
2828  HPS::Vector start_sphere_point;
2829  float axis_subwindow_width;
2830  float axis_subwindow_height;
2831  HPS::TouchID tracked_touch_ID;
2832  HPS::Rectangle axis_subwindow;
2833  HPS::SegmentKey axis_triad_segment;
2834 
2835 };
2836 
2839 {
2840 public:
2843  virtual ~SmoothTransitionCompleteEvent();
2844 
2847  SmoothTransitionCompleteEvent(HPS::View const & in_view) : view(in_view)
2848  { channel = HPS::Object::ClassID<SmoothTransitionCompleteEvent>(); }
2849 
2852  Event * Clone() const
2853  {
2855  return new_event;
2856  }
2857 
2861  virtual bool Drop(Event const * in_that_event) const
2862  {
2863  HPS_UNREFERENCED(in_that_event);
2864  return false;
2865  }
2866 
2867  HPS::View view;
2868 };
2869 
2879 class SPRK_API NavigationCubeOperator : public Operator
2880 {
2881 public:
2882  NavigationCubeOperator(MouseButtons in_mouse_trigger = MouseButtons::ButtonLeft(), ModifierKeys in_modifier_trigger = ModifierKeys());
2883  ~NavigationCubeOperator() { OnViewDetached(); }
2884 
2886  virtual HPS::UTF8 GetName() const { return "HPS_NavigationCubeOperator"; }
2887 
2892  virtual bool OnMouseDown(MouseState const & in_state);
2897  virtual bool OnMouseUp(MouseState const & in_state);
2902  virtual bool OnMouseMove(MouseState const & in_state);
2903 
2907  virtual bool OnTouchDown(TouchState const & in_state);
2912  virtual bool OnTouchUp(TouchState const & in_state);
2917  virtual bool OnTouchMove(TouchState const & in_state);
2918 
2919  virtual void OnViewAttached();
2920  virtual void OnViewDetached();
2921 
2922  virtual void OnModelAttached();
2923 
2924  void UpdateHighlightColor();
2925 
2929  void SetReferenceSegment(HPS::SegmentKey const & in_segment);
2930 
2935  void SetReferenceSegment(HPS::SegmentKeyArray const & in_segments);
2936 
2940  HPS::SegmentKeyArray ShowReferenceSegment();
2941 
2942 private:
2943  void Transition(HPS::SelectionResults selection_results);
2944  bool Orbit(HPS::WindowPoint const & in_loc);
2945  void TranslatePoint(HPS::WindowPoint * point);
2946  bool IsEventRelevant(HPS::Point const & event_location);
2947  bool AreCamerasEqual(HPS::CameraKit const & this_camera, HPS::CameraKit const & that_camera);
2948 
2949  bool operator_active;
2950  HPS::TouchID tracked_touch_ID;
2951  HPS::WindowPoint start_point;
2952  HPS::WindowPoint down_position;
2953  HPS::Vector start_sphere_point;
2954  HPS::SegmentKeyArray reference_segments; //rotation and zooming happen around these segments
2955 
2956  HPS::SegmentKey nav_cube_segment;
2957  HPS::SegmentKey style_segment;
2958  HPS::PortfolioKey portfolio;
2959  HPS::ReferenceKeyArrayArray groups;
2960  HPS::HighlightOptionsKit highlight_options_kit;
2961  HPS::CameraKit previous_camera;
2962  int previous_face;
2963  bool suppress_mouse_over_highlights;
2964 
2965  HPS::Rectangle nav_cube_subwindow;
2966  float nav_cube_subwindow_width;
2967  float nav_cube_subwindow_height;
2968 
2969  int highlighted_group;
2970 
2971  bool moving;
2972 
2973  class SmoothTransitionCompleteEventHandler : public EventHandler
2974  {
2975  public:
2976  SmoothTransitionCompleteEventHandler(View const & in_view, bool & in_moving)
2977  : handler_view(in_view), handler_moving(&in_moving) {}
2978 
2979  ~SmoothTransitionCompleteEventHandler() { Shutdown(); }
2980 
2981  virtual HandleResult Handle(HPS::Event const * in_event);
2982 
2983  private:
2984  View handler_view;
2985  bool * handler_moving;
2986  };
2987 
2988  SmoothTransitionCompleteEventHandler * handler;
2989 };
2990 
2991 
2992 
2993 
2994 class SceneTreeItem;
2995 typedef std::shared_ptr<SceneTreeItem> SceneTreeItemPtr;
2996 class SceneTree;
2997 typedef std::shared_ptr<SceneTree> SceneTreePtr;
2998 
3001 class SPRK_API SceneTree : public Sprocket
3002 {
3003 public:
3006  enum class ItemType : uint32_t
3007  {
3008  None = 0x00000000,
3009  GenericMask = 0xffff0000,
3010 
3011  Segment = 0x00000001,
3012  Include = 0x00000002,
3013  ConditionalExpression = 0x00000003,
3014  StaticModelSegment = 0x00000004,
3015  AttributeFilter = 0x00000005,
3016 
3017  Geometry = 0x00010000,
3018  CuttingSection = 0x00010001,
3019  Shell = 0x00010002,
3020  Mesh = 0x00010003,
3021  Grid = 0x00010004,
3022  NURBSSurface = 0x00010005,
3023  Cylinder = 0x00010006,
3024  Sphere = 0x00010007,
3025  Polygon = 0x00010008,
3026  Circle = 0x00010009,
3027  CircularWedge = 0x0001000a,
3028  Ellipse = 0x0001000b,
3029  Line = 0x0001000c,
3030  NURBSCurve = 0x0001000d,
3031  CircularArc = 0x0001000e,
3032  EllipticalArc = 0x0001000f,
3033  InfiniteLine = 0x00010010,
3034  InfiniteRay = 0x00010011,
3035  Marker = 0x00010012,
3036  Text = 0x00010013,
3037  Reference = 0x00010014,
3038  DistantLight = 0x00010015,
3039  Spotlight = 0x00010016,
3040 
3041  Attribute = 0x00020000,
3042  Portfolio = 0x00020001,
3043  SegmentStyle = 0x00020002,
3044  NamedStyle = 0x00020003,
3045  MaterialPalette = 0x00020004,
3046  Priority = 0x00020005,
3047  Material = 0x00020006,
3048  Camera = 0x00020007,
3049  ModellingMatrix = 0x00020008,
3050  UserData = 0x00020009,
3051  TextureMatrix = 0x0002000a,
3052  Culling = 0x0002000b,
3053  CurveAttribute = 0x0002000c,
3054  CylinderAttribute = 0x0002000d,
3055  EdgeAttribute = 0x0002000e,
3056  LightingAttribute = 0x0002000f,
3057  LineAttribute = 0x00020010,
3058  MarkerAttribute = 0x00020011,
3059  SurfaceAttribute = 0x00020012,
3060  Selectability = 0x00020013,
3061  SphereAttribute = 0x00020014,
3062  Subwindow = 0x00020015,
3063  TextAttribute = 0x00020016,
3064  Transparency = 0x00020017,
3065  Visibility = 0x00020018,
3066  VisualEffects = 0x00020019,
3067  Performance = 0x00020020,
3068  DrawingAttribute = 0x00020021,
3069  HiddenLineAttribute = 0x00020022,
3070  ContourLine = 0x00020023,
3071  Condition = 0x00020024,
3072  Bounding = 0x00020025,
3073  AttributeLock = 0x00020026,
3074  TransformMask = 0x00020027,
3075  ColorInterpolation = 0x00020028,
3076  CuttingSectionAttribute = 0x00020029,
3077 
3078  // window only attributes
3079  Debugging = 0x00020030,
3080  PostProcessEffects = 0x00020031,
3081  SelectionOptions = 0x00020032,
3082  UpdateOptions = 0x00020033,
3083 
3084  Definition = 0x00040000,
3085  NamedStyleDefinition = 0x00040001,
3086  TextureDefinition = 0x00040002,
3087  LinePatternDefinition = 0x00040003,
3088  GlyphDefinition = 0x00040004,
3089  CubeMapDefinition = 0x00040005,
3090  ImageDefinition = 0x00040006,
3091  MaterialPaletteDefinition = 0x00040007,
3092  ShaderDefinition = 0x00040008,
3093 
3094  Group = 0x00080000,
3095  SegmentGroup = 0x00080100,
3096  GeometryGroup = 0x00080200,
3097  AttributeGroup = 0x00080300,
3098  PortfolioGroup = 0x00080400,
3099  StyleGroup = 0x00080500,
3100  IncludeGroup = 0x00080600,
3101  DefinitionGroup = 0x00180000,
3102  NamedStyleDefinitionGroup = 0x00180700,
3103  TextureDefinitionGroup = 0x00180800,
3104  LinePatternDefinitionGroup = 0x00180900,
3105  GlyphDefinitionGroup = 0x00180a00,
3106  CubeMapDefinitionGroup = 0x00180b00,
3107  ImageDefinitionGroup = 0x00180c00,
3108  MaterialPaletteDefinitionGroup = 0x00180d00,
3109  ShaderDefinitionGroup = 0x00180e00,
3110  CuttingSectionGroup = 0x00080001,
3111  ShellGroup = 0x00080002,
3112  MeshGroup = 0x00080003,
3113  GridGroup = 0x00080004,
3114  NURBSSurfaceGroup = 0x00080005,
3115  CylinderGroup = 0x00080006,
3116  SphereGroup = 0x00080007,
3117  PolygonGroup = 0x00080008,
3118  CircleGroup = 0x00080009,
3119  CircularWedgeGroup = 0x0008000a,
3120  EllipseGroup = 0x0008000b,
3121  LineGroup = 0x0008000c,
3122  NURBSCurveGroup = 0x0008000d,
3123  CircularArcGroup = 0x0008000e,
3124  EllipticalArcGroup = 0x0008000f,
3125  InfiniteLineGroup = 0x00080010,
3126  InfiniteRayGroup = 0x00080011,
3127  MarkerGroup = 0x00080012,
3128  TextGroup = 0x00080013,
3129  ReferenceGroup = 0x00080014,
3130  DistantLightGroup = 0x00080015,
3131  SpotlightGroup = 0x00080016,
3132  };
3133 
3135  SceneTree();
3136 
3139  SceneTree(Canvas const & in_canvas);
3140 
3143  SceneTree(SceneTree const & in_that);
3144 
3147  SceneTree(SceneTree && in_that);
3148 
3149  virtual ~SceneTree();
3150 
3151  virtual HPS::Type ObjectType() const { return HPS::Type::SceneTree; }
3152 
3156  SceneTree & operator=(SceneTree const & in_that);
3157 
3161  SceneTree & operator=(SceneTree && in_that);
3162 
3166  virtual void Assign(SceneTree const & in_that);
3167 
3171  bool Equals(SceneTree const & in_that) const;
3172 
3176  bool operator!=(SceneTree const & in_that) const;
3177 
3181  bool operator==(SceneTree const & in_that) const;
3182 
3183 
3191  void SetHighlightOptions(HighlightOptionsKit const & in_options);
3192 
3195  HighlightOptionsKit GetHighlightOptions() const;
3196 
3197 
3202  void SetGroupingLimit(size_t in_limit);
3203 
3206  size_t GetGroupingLimit() const;
3207 
3208 
3215  void SetRoot(SceneTreeItemPtr const & in_root);
3216 
3219  SceneTreeItemPtr GetRoot() const;
3220 
3221 
3224  virtual void Flush();
3225 };
3226 
3227 
3230 class SPRK_API SceneTreeItem : public Sprocket
3231 {
3232 public:
3234  SceneTreeItem();
3235 
3238  SceneTreeItem(SceneTreeItem const & in_that);
3239 
3242  SceneTreeItem(SceneTreeItem && in_that);
3243 
3249  SceneTreeItem(SceneTreePtr const & in_tree, Model const & in_model);
3250 
3256  SceneTreeItem(SceneTreePtr const & in_tree, View const & in_view);
3257 
3263  SceneTreeItem(SceneTreePtr const & in_tree, Layout const & in_layout);
3264 
3270  SceneTreeItem(SceneTreePtr const & in_tree, Canvas const & in_canvas);
3271 
3279  SceneTreeItem(SceneTreePtr const & in_tree, Key const & in_key, SceneTree::ItemType in_type, char const * in_title = nullptr);
3280 
3281  virtual ~SceneTreeItem();
3282 
3283  HPS::Type ObjectType() const { return HPS::Type::SceneTreeItem; }
3284 
3288  SceneTreeItem & operator=(SceneTreeItem const & in_that);
3289 
3293  SceneTreeItem & operator=(SceneTreeItem && in_that);
3294 
3298  virtual void Assign(SceneTreeItem const & in_that);
3299 
3303  bool Equals(SceneTreeItem const & in_that) const;
3304 
3308  bool operator!=(SceneTreeItem const & in_that) const;
3309 
3313  bool operator==(SceneTreeItem const & in_that) const;
3314 
3315 
3318  SceneTreePtr GetTree() const;
3319 
3322  UTF8 GetTitle() const;
3323 
3326  SceneTree::ItemType GetItemType() const;
3327 
3331  bool HasItemType(SceneTree::ItemType in_mask) const;
3332 
3335  Key GetKey() const;
3336 
3339  bool HasChildren() const;
3340 
3341 
3350  virtual SceneTreeItemPtr AddChild(Key const & in_key, SceneTree::ItemType in_type, char const * in_title = nullptr) = 0;
3351 
3352 
3355  virtual void Expand();
3356 
3359  virtual void Collapse();
3360 
3361 
3366  bool IsSelected() const;
3367 
3373  virtual void Select();
3374 
3380  virtual void Unselect();
3381 
3386  bool IsHighlightable() const;
3387 
3393  bool IsHighlighted() const;
3394 
3398  void Highlight();
3399 
3404  void Unhighlight();
3405 };
3406 
3407 
3408 
3409 class ComponentTreeItem;
3410 typedef std::shared_ptr<ComponentTreeItem> ComponentTreeItemPtr;
3411 class ComponentTree;
3412 typedef std::shared_ptr<ComponentTree> ComponentTreePtr;
3413 
3416 class SPRK_API ComponentTree : public Sprocket
3417 {
3418 public:
3421  enum class ItemType
3422  {
3423  None,
3424  ExchangeComponent,
3425  ExchangeModelFile,
3426 
3427  ExchangeViewGroup,
3428  ExchangeAnnotationViewGroup,
3429  ExchangePMIGroup,
3430  ExchangeModelGroup,
3431 
3432  ParasolidComponent,
3433  ParasolidModelFile,
3434  };
3435 
3437  ComponentTree();
3438 
3442  ComponentTree(Canvas const & in_canvas, size_t in_layer = 0);
3443 
3446  ComponentTree(ComponentTree const & in_that);
3447 
3450  ComponentTree(ComponentTree && in_that);
3451 
3452  virtual ~ComponentTree();
3453 
3454  virtual HPS::Type ObjectType() const { return HPS::Type::ComponentTree; }
3455 
3459  ComponentTree & operator=(ComponentTree const & in_that);
3460 
3464  ComponentTree & operator=(ComponentTree && in_that);
3465 
3469  virtual void Assign(ComponentTree const & in_that);
3470 
3474  bool Equals(ComponentTree const & in_that) const;
3475 
3479  bool operator!=(ComponentTree const & in_that) const;
3480 
3484  bool operator==(ComponentTree const & in_that) const;
3485 
3486 
3494  void SetHighlightOptions(HighlightOptionsKit const & in_options);
3495 
3498  HighlightOptionsKit GetHighlightOptions() const;
3499 
3500 
3507  void SetRoot(ComponentTreeItemPtr const & in_root);
3508 
3511  ComponentTreeItemPtr GetRoot() const;
3512 
3513 
3516  virtual void Flush();
3517 };
3518 
3519 
3522 class SPRK_API ComponentTreeItem : public Sprocket
3523 {
3524 public:
3527 
3530  ComponentTreeItem(ComponentTreeItem const & in_that);
3531 
3535 
3541  ComponentTreeItem(ComponentTreePtr const & in_tree, CADModel const & in_cad_model);
3542 
3549  ComponentTreeItem(ComponentTreePtr const & in_tree, Component const & in_component, ComponentTree::ItemType in_type);
3550 
3551  virtual ~ComponentTreeItem();
3552 
3553  HPS::Type ObjectType() const { return HPS::Type::ComponentTreeItem; }
3554 
3558  ComponentTreeItem & operator=(ComponentTreeItem const & in_that);
3559 
3563  ComponentTreeItem & operator=(ComponentTreeItem && in_that);
3564 
3568  virtual void Assign(ComponentTreeItem const & in_that);
3569 
3573  bool Equals(ComponentTreeItem const & in_that) const;
3574 
3578  bool operator!=(ComponentTreeItem const & in_that) const;
3579 
3583  bool operator==(ComponentTreeItem const & in_that) const;
3584 
3585 
3586 
3589  ComponentTreePtr GetTree() const;
3590 
3593  UTF8 GetTitle() const;
3594 
3597  ComponentTree::ItemType GetItemType() const;
3598 
3601  Component GetComponent() const;
3602 
3605  bool HasChildren() const;
3606 
3609  ComponentPath GetPath() const;
3610 
3611 
3619  virtual ComponentTreeItemPtr AddChild(Component const & in_component, ComponentTree::ItemType in_type) = 0;
3620 
3621 
3624  virtual void Expand();
3625 
3628  virtual void Collapse();
3629 
3630 
3636  bool IsHighlighted() const;
3637 
3642  virtual void OnHighlight(HighlightOptionsKit const & in_options);
3643 
3648  virtual void OnUnhighlight(HighlightOptionsKit const & in_options);
3649 
3650 
3654  void Highlight();
3655 
3659  void Unhighlight();
3660 
3661 
3671  bool IsHidden() const;
3672 
3676  virtual void OnHide();
3677 
3681  virtual void OnShow();
3682 
3686  void Hide();
3687 
3691  void Show();
3692 
3697  void Isolate();
3698 
3701  bool IsExpanded() const;
3702 };
3703 
3704 
3705 
3706 
3707 }
3708 #endif
3709 
3710 
3711 
Definition: sprk.h:2601
HPS::Type ObjectType() const
Definition: sprk.h:2435
Definition: hps.h:6015
HPS::Type ObjectType() const
Definition: sprk.h:438
Event * Clone() const
Definition: sprk.h:679
Definition: sprk.h:2776
Definition: sprk.h:239
ComponentHighlightEvent(Event const &in_event)
Definition: sprk.h:2037
HPS::Type ObjectType() const
Definition: sprk.h:247
virtual bool OnTimerTick(HPS::TimerTickEvent const &in_event)
Definition: sprk.h:1060
Definition: hps.h:37956
Definition: hps.h:1494
ComponentHighlightEvent()
Definition: sprk.h:2019
void SetModifierTrigger(ModifierKeys in_modifiers)
Definition: sprk.h:1086
Definition: hps.h:467
HPS::Type ObjectType() const
Definition: sprk.h:216
HPS::Type ObjectType() const
Definition: sprk.h:977
virtual bool OnKeyDown(KeyboardState const &in_state)
Definition: sprk.h:1050
HPS::Type ObjectType() const
Definition: sprk.h:2088
An InvalidSpecificationException is thrown when a method is called with non-sensical or contradictory...
Definition: hps.h:5533
Location
Definition: sprk.h:1256
ModifierKeys GetModifierTrigger() const
Definition: sprk.h:1089
virtual bool OnKeyUp(KeyboardState const &in_state)
Definition: sprk.h:1055
ItemType
Definition: sprk.h:3421
Definition: hps.h:5573
CaptureActivationEvent()
Definition: sprk.h:2209
Definition: sprk.h:69
Definition: sprk.h:213
Definition: sprk.h:601
Definition: sprk.h:106
virtual bool OnMouseMove(MouseState const &in_state)
Definition: sprk.h:1015
Definition: sprk.h:3522
virtual bool OnMouseEnter(MouseState const &in_state)
Definition: sprk.h:1025
Definition: sprk.h:2654
HPS::Type ObjectType() const
Definition: sprk.h:2276
Definition: hps.h:37743
Definition: hps.h:1325
Definition: hps.h:1048
HPS::Type ObjectType() const
Definition: sprk.h:1787
Definition: hps.h:1666
ModelDeletedEvent()
Definition: sprk.h:887
SmoothTransitionCompleteEvent(HPS::View const &in_view)
Definition: sprk.h:2847
Definition: sprk.h:3416
Definition: hps.h:42065
Definition: sprk.h:928
virtual bool OnTouchUp(TouchState const &in_state)
Definition: sprk.h:1040
Definition: hps.h:7390
MouseButtons GetMouseTrigger() const
Definition: sprk.h:1081
virtual HPS::Type ObjectType() const
Definition: sprk.h:3151
Definition: hps.h:3406
Definition: hps.h:1993
Definition: sprk.h:838
bool HasAll(MouseButtons in_mouse_trigger, ModifierKeys in_modifier_trigger) const
Event * Clone() const
Definition: sprk.h:723
Definition: sprk.h:689
Definition: hps.h:1384
Definition: hps.h:879
HPS::Type ObjectType() const
Definition: sprk.h:1419
UpdateControl
Definition: hps.h:175
Definition: hps.h:37861
virtual void OnModelDetached()
Definition: sprk.h:1074
Definition: hps.h:1712
Definition: hps.h:1523
Definition: hps.h:8591
Definition: hps.h:236
void SetMouseTrigger(MouseButtons in_buttons)
Definition: sprk.h:1077
ComponentPath & Append(Component const &in_component)
Definition: hps.h:1764
Event * Clone() const
Definition: sprk.h:829
Definition: hps.h:41964
Definition: hps.h:36852
Definition: sprk.h:1252
Definition: sprk.h:883
Definition: sprk.h:498
HPS::Type ObjectType() const
Definition: sprk.h:113
ViewDetachedEvent(Event const &in_event)
Definition: sprk.h:765
virtual void OnViewDetached()
Definition: sprk.h:1066
Definition: hps.h:36898
HPS::Type ObjectType() const
Definition: sprk.h:3283
LayoutDeletedEvent()
Definition: sprk.h:693
Event * Clone() const
Definition: sprk.h:873
virtual void OnViewAttached()
Definition: sprk.h:1063
Definition: hps.h:36368
Definition: hps.h:39102
Definition: hps.h:1087
Definition: sprk.h:2345
LayoutDetachedEvent()
Definition: sprk.h:648
Definition: sprk.h:2457
virtual bool OnMouseLeave(MouseState const &in_state)
Definition: sprk.h:1030
Definition: hps.h:9277
Definition: hps.h:37904
Definition: hps.h:1471
SmoothTransitionCompleteEvent()
Definition: sprk.h:2842
Definition: hps.h:1410
HPS::Type ObjectType() const
Definition: sprk.h:505
virtual bool OnMouseUp(MouseState const &in_state)
Definition: sprk.h:1010
FilterActivationEvent()
Definition: sprk.h:2121
Definition: hps.h:1429
virtual void OnModelAttached()
Definition: sprk.h:1070
Definition: hps.h:34837
FilterActivationEvent(Event const &in_event)
Definition: sprk.h:2135
ModelDetachedEvent(Event const &in_event)
Definition: sprk.h:857
HPS::Type ObjectType() const
Definition: sprk.h:1284
HPS::Type ObjectType() const
Definition: sprk.h:1609
Definition: hps.h:6763
Location
Definition: sprk.h:1391
Definition: hps.h:41456
UpdateType
Definition: sprk.h:78
Definition: sprk.h:2409
Definition: sprk.h:1387
Definition: hps.h:39274
HPS::Type ObjectType() const
Definition: sprk.h:1131
SprocketControl & operator=(SprocketControl &&in_that)
Definition: sprk.h:229
Definition: hps.h:40618
virtual UTF8 GetName() const
Definition: sprk.h:1000
Definition: hps.h:41852
Definition: sprk.h:644
Event * Clone() const
Definition: sprk.h:2152
CaptureActivationEvent(Event const &in_event)
Definition: sprk.h:2223
virtual bool OnTouchDown(TouchState const &in_state)
Definition: sprk.h:1035
HPS::Type ObjectType() const
Definition: sprk.h:2531
CanvasDeletedEvent()
Definition: sprk.h:605
virtual bool OnMouseWheel(MouseState const &in_state)
Definition: sprk.h:1020
HPS::Type ObjectType() const
Definition: sprk.h:2365
HPS::Type ObjectType() const
Definition: sprk.h:2483
SprocketControl(SprocketControl &&in_that)
Definition: sprk.h:224
Event * Clone() const
Definition: sprk.h:2239
Definition: hps.h:14347
ViewDeletedEvent()
Definition: sprk.h:799
intptr_t GetChannel() const
Definition: hps.h:6148
Definition: sprk.h:732
virtual bool Drop(Event const *in_that_event) const
Definition: sprk.h:2861
virtual HPS::UTF8 GetName() const
Definition: sprk.h:2781
Definition: sprk.h:1513
Definition: hps.h:39551
Definition: hps.h:41106
ViewDeletedEvent(Event const &in_event)
Definition: sprk.h:814
Definition: hps.h:34438
Definition: sprk.h:2553
ViewDetachedEvent()
Definition: sprk.h:743
Definition: hps.h:6115
Definition: sprk.h:1109
Definition: hps.h:403
HPS::Type ObjectType() const
Definition: sprk.h:2579
Event * Clone() const
Definition: sprk.h:2054
Definition: sprk.h:431
CanvasDeletedEvent(Event const &in_event)
Definition: sprk.h:620
Definition: sprk.h:2879
Definition: sprk.h:1756
ComponentType
Definition: sprk.h:1518
Definition: hps.h:40544
Definition: hps.h:7018
Definition: sprk.h:2008
Event * Clone() const
Definition: sprk.h:635
LayoutDetachedEvent(Event const &in_event)
Definition: sprk.h:663
HPS::Type ObjectType() const
Definition: sprk.h:3553
virtual bool OnMouseDown(MouseState const &in_state)
Definition: sprk.h:1005
ItemType
Definition: sprk.h:3006
Definition: sprk.h:2067
Definition: sprk.h:2704
virtual HPS::UTF8 GetName() const
Definition: sprk.h:2886
Definition: sprk.h:190
Definition: sprk.h:2838
Definition: hps.h:423
Event * Clone() const
Definition: sprk.h:917
Definition: sprk.h:2165
Definition: hps.h:2011
ModelDetachedEvent()
Definition: sprk.h:842
static MouseButtons ButtonLeft()
Definition: hps.h:41574
virtual HPS::Type ObjectType() const
Definition: sprk.h:3454
Definition: sprk.h:3001
Definition: sprk.h:2505
Definition: hps.h:8702
HPS::Type ObjectType() const
Definition: sprk.h:938
virtual bool IsMouseTriggered(MouseState const &in_state)
Definition: sprk.h:1092
Definition: hps.h:7312
Definition: sprk.h:2110
Definition: hps.h:34054
Definition: hps.h:346
Event * Clone() const
Definition: sprk.h:2852
ModelDeletedEvent(Event const &in_event)
Definition: sprk.h:902
Event * Clone() const
Definition: sprk.h:783
LayoutDeletedEvent(Event const &in_event)
Definition: sprk.h:708
Definition: hps.h:8916
Definition: hps.h:10311
virtual bool OnTouchMove(TouchState const &in_state)
Definition: sprk.h:1045
Definition: sprk.h:3230
Definition: sprk.h:2251
Mode
Definition: sprk.h:195
Definition: hps.h:513
Definition: sprk.h:969
Definition: hps.h:1129
Definition: hps.h:37788
Definition: sprk.h:795
Definition: sprk.h:2205
Definition: hps.h:36431
HPS::Type ObjectType() const
Definition: sprk.h:2627
HPS::Type ObjectType() const
Definition: sprk.h:2186
HPS::Type ObjectType() const
Definition: sprk.h:2680