VR-Forces 4.6 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtBasicEditingEventProcessor.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2016 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvUtil/signalslib.h>
15 #include <vrvCore/DtIntersector.h>
17 
18 #include <matrix/vlVector.h>
19 
20 namespace makVrv
21 {
22  class DtInputDriver;
23  class DtDe;
24  class DtMouseEvent;
25 
46  {
47  public:
48 
52  DtBasicEditingEventProcessor(DtInputDriver& inputDriver, DtDe& de, const std::string& className);
53 
56 
59  virtual const std::string& className();
60 
61  double currentAltitude() const;
62  void setCurrentAltitude(double);
63  void setCurrentGroundLocation(const DtVector&);
64 
66  virtual void changeAltitude( double mouseX, double mouseY );
67 
69  virtual void changeAltitudeWithWheel( int wheelSteps );
70 
72  virtual bool dragging() const;
73 
78  virtual void setAllowDragDrop(bool);
79  bool allowDragDrop() const;
80 
82  virtual void setCreating(bool);
83  bool creating() const;
84 
86  virtual bool allowEdit(const DtSelectionManager::IdSet&, bool doubleClick) const;
87 
90  virtual bool allowContinueDrag(const DtVector&) const;
91 
93  virtual void cancel();
94 
96  virtual void setEnabled(bool);
97 
99  double mouseX() const;
100  double mouseY() const;
101 
104  boost::signal<void (DtVector, double altAboveGround)> signal_locationChanged;
105 
107  boost::signal<void ()> signal_cancel;
108 
111  boost::signal<void (DtUniqueID, DtVector, double altAboveGround)> signal_place;
112 
114  boost::signal<void (DtVector, double)> signal_altitudeChanged;
115 
117  boost::signal<void (const DtSelectionManager::IdSet&, const DtVector&)> signal_dragStart;
118 
120  boost::signal<void (bool)> signal_altitudeIsDragging;
121 
122  protected:
124  virtual DtIntersector::IntersectProperties intersectorPickMask() const;
125 
129  virtual bool processMouseEvent( const DtMouseEvent& ev, DtChannel& channel);
130 
134  virtual bool processKeyboardEvent( const DtKeyEvent& ev, DtChannel& channel);
135 
136  virtual void processMouseMove(DtChannel& channel, const DtMouseEvent& ev);
137 
139  virtual bool pick(DtChannel& channel, double x, double y, DtIntersectorResult& result,
141 
142  protected:
145  std::string myClassName;
151 
152  double myLastMouseX;
153  double myLastMouseY;
154 
155  // These are used for dragging
158  double myLastDeltaY;
159 
161 
163  };
164 }

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)