VR-Forces 4.3 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DtBasicEditingEventProcessor.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2013 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvCore/vrvCore.h>
13 #include <vrvUtil/signalslib.h>
16 #include <vrvCore/DtIntersector.h>
18 
19 #include <matrix/vlVector.h>
20 
21 namespace makVrv
22 {
23  class DtInputDriver;
24  class DtDe;
25  class DtMouseEvent;
26 
47  {
48  public:
49 
53  DtBasicEditingEventProcessor(DtInputDriver& inputDriver, DtDe& de, const std::string& className);
54 
57 
60  virtual const std::string& className();
61 
62  double currentAltitude() const;
63  void setCurrentAltitude(double);
64  void setCurrentGroundLocation(const DtVector&);
65 
67  virtual void changeAltitude( double mouseX, double mouseY );
68 
70  virtual void changeAltitudeWithWheel( int wheelSteps );
71 
73  virtual bool dragging() const;
74 
79  virtual void setAllowDragDrop(bool);
80  bool allowDragDrop() const;
81 
83  virtual void setCreating(bool);
84  bool creating() const;
85 
87  virtual bool allowEdit(const DtSelectionManager::IdSet&, bool doubleClick) const;
88 
91  virtual bool allowContinueDrag(const DtVector&) const;
92 
94  virtual void cancel();
95 
97  virtual void setEnabled(bool);
98 
100  double mouseX() const;
101  double mouseY() const;
102 
105  boost::signal<void (DtVector, double altAboveGround)> signal_locationChanged;
106 
108  boost::signal<void ()> signal_cancel;
109 
112  boost::signal<void (DtUniqueID, DtVector, double altAboveGround)> signal_place;
113 
115  boost::signal<void (DtVector, double)> signal_altitudeChanged;
116 
118  boost::signal<void (const DtSelectionManager::IdSet&, const DtVector&)> signal_dragStart;
119 
121  boost::signal<void (bool)> signal_altitudeIsDragging;
122 
123  protected:
125  virtual DtIntersector::IntersectProperties intersectorPickMask() const;
126 
130  virtual bool processMouseEvent( const DtMouseEvent& ev, DtChannel& channel);
131 
135  virtual bool processKeyboardEvent( const DtKeyEvent& ev, DtChannel& channel);
136 
137  virtual void processMouseMove(DtChannel& channel, const DtMouseEvent& ev);
138 
140  virtual bool pick(DtChannel& channel, double x, double y, DtIntersectorResult& result,
142 
143  protected:
146  std::string myClassName;
152 
153  double myLastMouseX;
154  double myLastMouseY;
155 
156  // These are used for dragging
159 
161  };
162 }

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)