VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DtControlPointWidget.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #ifndef DtControlPointWidget_H_
11 #define DtControlPointWidget_H_
12 
13 #include <vrvCore/vrvCore.h>
14 #include <vrvCore/DtUniqueID.h>
16 #include <vrvCore/DtMouseState.h>
17 #include <boost/signal.hpp>
18 
19 namespace makVrv
20 {
21  class DtAgentManagerInterface;
22  class DtProjectedWidgetModelAgent;
23  class DtWidgetAgent;
24  class DtWidgetLabelAgent;
25  class DtModelAgent;
26  class DtWidgetInstanceSignaler;
27  class DtWidgetSignaler;
28  class DtWidgetEventSignals;
29 
34  {
35  public:
38  {
39  Normal, // inactive, not selected
40  Active, // e.g. mouseover
41  Selected, // The only selected object
42  MultiSelected, // Part of a group of selected control points
43  };
44 
45  DtControlPointWidget(int modelSet, DtAgentManagerInterface& sceneInterface);
46 
47  virtual ~DtControlPointWidget();
48 
50  virtual void setModelDefinitions(
51  const std::string& emptyTheme = "ControlPointTheme",
52  const std::string& normalTheme = "ControlPointTheme",
53  const std::string& activeTheme = "ControlPointPinnedTheme",
54  const std::string& normalPointTheme = "ControlPointPinnedTheme",
55  const std::string& selectedPointTheme = "ControlPointPinnedTheme");
56 
58  virtual void setState(ControlPointState state);
59 
61  virtual void setColor(float r, float g, float b);
62 
64  virtual void setDimensions(int height, int width);
65 
67  DtModelAgent* model();
68 
70  ControlPointState state();
71 
73  virtual void setEventsEnabled(bool enabled);
74 
76  DtWidgetEventSignals& eventSignals(DtWidgetSignaler& signaler);
77 
79  virtual void setOrderGroup(int);
80 
81  public:
82 
83  boost::signal< void(bool) > signal_mouseInChanged;
84 
85  typedef boost::signal< void(DtMouseState& mouseState,
86  const std::string& displayEngineName,
87  const std::string& windowName,
88  const std::string& channelName)>
90 
94 
95  protected:
96 
97  void onMouseEnter(DtUniqueID id);
98  void onMouseLeave(DtUniqueID id);
99  void onMouseDown(DtUniqueID id, double x, double y, int button,
100  const std::string& displayEngineName,
101  const std::string& windowName,
102  const std::string& channelName);
103  void onMouseUp(DtUniqueID id, double x, double y, int button,
104  const std::string& displayEngineName,
105  const std::string& windowName,
106  const std::string& channelName);
107  void onMouseDblClick(DtUniqueID id, double x, double y, int button,
108  const std::string& displayEngineName,
109  const std::string& windowName,
110  const std::string& channelName);
111 
112  protected:
113 
116  DtProjectedWidgetModelAgent* myProjectedWidgetModelAgent;
117  DtWidgetAgent* myWidgetAgent;
118  DtWidgetAgent* myPointWidgetAgent;
120 
121  std::string myEmptyTheme;
122  std::string myNormalTheme;
123  std::string myActiveTheme;
124  std::string mySelectedPointTheme;
126 
127  int myHeight;
128  int myWidth;
129 
132 
135  };
136 }
137 
138 #endif
139 

Document ID: Generated on Mon Jul 4 01:00:18 EDT 2016 from SVN revision 166489
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)