VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtPickableWidget.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2011 MAK Technologies, Inc.
3  * All rights reserved.
4  *****************************************************************************/
5 
9 
10 #pragma once
11 
13 
14 #include <boost/signal.hpp>
15 
16 namespace makVrv
17 {
18 
19  class DtQuad;
20  class DtBoundingBox;
21  class DtLineSegment;
22  class DtWidgetPicker;
23  class DtTriangleProxy;
24 
28  {
29  public:
30 
31  friend class DtWidgetPicker;
32 
34  virtual ~DtPickableWidget();
35 
37  static unsigned int idFromColor( unsigned int );
38 
40  void setUserData( unsigned long long data );
41 
43  unsigned long long userData() const;
44 
46  boost::signal<void (int x, int y)> signal_mouseEnter;
47 
50  boost::signal<void ()> signal_mouseLeave;
51 
53  boost::signal<void (int x, int y)> signal_mouseMove;
54 
56  boost::signal<void (int x, int y, int button)> signal_mousePress;
57 
59  boost::signal<void (int x, int y, int button)> signal_mouseRelease;
60 
62  boost::signal<void (int x, int y, int button)> signal_mouseDoubleClick;
63 
65  boost::signal<void (int x, int y, int wheel)> signal_mouseWheel;
66 
67  protected:
68 
71 
72  protected:
73 
75  unsigned int myId;
76  unsigned long long myUserData;
77 
78  };
79 
80 
84  {
85  public:
86 
87  friend class DtWidgetPicker;
88 
90  virtual ~DtPickableQuad();
91 
96  void setPosition( float x, float y, float z, float w );
97 
99  void setRotation( float angle );
100 
103  void setPoints( const float points[8] );
104 
106  void setGroup( float group );
107 
108  protected:
109 
111  DtPickableQuad( DtWidgetPicker& picker );
112 
113  protected:
114 
116 
117  };
118 
119 
124  {
125  public:
126 
127  friend class DtWidgetPicker;
128 
130  virtual ~DtPickableLine();
131 
136  void set3DPosition( int index0or1, float x, float y, float z, float w );
137 
139  void set2DPosition( int index0or1, float x, float y );
140 
142  void set3DDirection( unsigned int vertexIndex, float x, float y, float z );
143 
145  void setDirection2DLength( unsigned int vertexIndex, float length );
146 
148  void setGroup( float group );
149 
151  void setWidth( float w );
152 
153  protected:
154 
156  DtPickableLine( DtWidgetPicker& picker );
157 
158  protected:
159 
161 
162  };
163 
164 
169  {
170  public:
171 
172  friend class DtWidgetPicker;
173 
175  virtual ~DtPickableTriangle();
176 
178  void set3DPosition( float x, float y, float z, float w );
179 
181  void set3DPosition( unsigned int index, float x, float y, float z, float w );
182 
185  void set2DPosition( unsigned int index, float x, float y );
186 
188  void setGroup( float order );
189 
190  protected:
191 
194 
195  protected:
196 
198 
199  };
200 
201 }
boost::signal< void(int x, int y)> signal_mouseMove
Emitted whenever a mouse moves over a widget, including when it enters.
Definition: DtPickableWidget.h:53
boost::signal< void(int x, int y, int button)> signal_mouseDoubleClick
Emitted when a mouse button is doubled clicked over a widget.
Definition: DtPickableWidget.h:62
unsigned long long myUserData
Definition: DtPickableWidget.h:76
boost::signal< void(int x, int y)> signal_mouseEnter
Emitted whenever a mouse enters over a widget for the first time.
Definition: DtPickableWidget.h:46
boost::signal< void(int x, int y, int button)> signal_mouseRelease
Emitted whenever a mouse button is released over a widget.
Definition: DtPickableWidget.h:59
The DtPickableQuad is a pickable widget that matches the Quad interface.
Definition: DtPickableWidget.h:83
unsigned int myId
Definition: DtPickableWidget.h:75
The DtPickableLine is a pickable widget that matches the TriangleProxy interface. ...
Definition: DtPickableWidget.h:168
A non-visible interactive widget.
Definition: DtPickableWidget.h:27
#define DT_DLL_VRVGRAPHICS
Contains DLL export macros.
Definition: vrvGraphics.h:19
A class which represents a single line segment.
Definition: DtLineSegment.h:21
boost::signal< void(int x, int y, int wheel)> signal_mouseWheel
Emitted when a mouse wheel is scrolled over a widget.
Definition: DtPickableWidget.h:65
A flyweight class for controlling a triangle owned by the triangle renderer.
Definition: DtTriangleRenderer.h:98
DT_DLL_vrfutil double angle(double vec1[3], double vec2[3])
The DtPickableLine is a pickable widget that matches the LineSegment interface.
Definition: DtPickableWidget.h:123
boost::signal< void(int x, int y, int button)> signal_mousePress
Emitted whenever a mouse button is pressed over a widget. If a press.
Definition: DtPickableWidget.h:56
DtLineSegment * myLine
Definition: DtPickableWidget.h:160
DtTriangleProxy * myProxy
Definition: DtPickableWidget.h:197
A single 2D quadrilateral.
Definition: DtQuad.h:24
DtQuad * myQuad
Definition: DtPickableWidget.h:115
boost::signal< void()> signal_mouseLeave
Emitted whenever a mouse leaves over a widget, called before it enters another widget.
Definition: DtPickableWidget.h:50
DtWidgetPicker & myPicker
Definition: DtPickableWidget.h:74
The picker class which allocates and does picking operatings on widgets.
Definition: DtWidgetPicker.h:32

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)