VR-Forces 4.1 Class Documentation
DtBasicEditingEventProcessor.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2012 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:
124 
128  virtual bool processMouseEvent( const DtMouseEvent& ev, DtChannel& channel);
129 
133  virtual bool processKeyboardEvent( const DtKeyEvent& ev, DtChannel& channel);
134 
135  virtual void processMouseMove(DtChannel& channel, const DtMouseEvent& ev);
136 
138  virtual bool pick(DtChannel& channel, double x, double y, DtIntersectorResult& result,
140 
141  protected:
144  std::string myClassName;
150 
151  double myLastMouseX;
152  double myLastMouseY;
153 
154  // These are used for dragging
157 
158  // This is used for altitude changing
160 
162  };
163 }

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)