VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtMouseHideProcessor.h
Go to the documentation of this file.
1 // /******************************************************************************
2 // ** Copyright (c) 2018 MAK Technologies, Inc.
3 // ** All rights reserved.
4 // ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvCore/vrvCore.h>
15 
16 #include <boost/unordered_map.hpp>
17 
18 namespace makVrv
19 {
20  // Forward Declarations
21  class DtInputDriver;
22  class DtDe;
23  class DtChannel;
24  class DtWindow;
25  class DtMouseEvent;
26 
33  {
34  public:
36  DtMouseHideProcessor(DtInputDriver& inputDriver, DtDe& de);
37 
39  virtual ~DtMouseHideProcessor();
40 
43  virtual void processMouseMoveEvent( const DtMouseEvent& ev, DtChannel& channel);
44 
46  virtual void setMouseHideTime( float hideTime );
48  virtual float mouseHideTime() const;
50 
52  virtual void setMouseHideEnabled( bool enabled );
54  virtual bool mouseHideEnabled() const;
56 
59  virtual void slot_fullScreenToggle(DtWindow* window, bool fullScreen);
60 
61  protected:
62 
66  virtual void slot_channelToBeDestroyed(DtChannel* channel);
67 
70  virtual void slot_windowCreated(DtWindow* window);
71 
74  virtual void slot_windowToBeDestroyed(DtWindow* window);
75 
78  virtual void slot_preTick();
79 
82  virtual void clearState();
83 
85  virtual void showMouse();
87  virtual void hideMouse();
89 
90 
91  private:
94 
97 
99  DtMouseHideProcessor& operator=(const DtMouseHideProcessor* orig);
100 
101  protected:
111 
112  // Used for connect once / destroy in destructor-type connection
114 #if 0
115  typedef struct
116  {
117  boost::signalslib::connection myFullScreenWatcher;
118  } WindowData;
119 
120  // Given a (local) window, maintain an attachment to its toggle fullscreen signal,
121  // and a list of its (local) channels
122  typedef boost::unordered_map<const DtWindow*, WindowData*> WindowDataMap;
123 #else
124  // Given a (local) window, maintain an attachment to its toggle fullscreen signal
125  typedef boost::unordered_map<const DtWindow*, boost::signalslib::connection*> WindowDataMap;
126 
127 #endif
129  };
130 
131  //
132  //----------------
133  //
134 
139  {
140  public:
143  {
144  }
145 
148  {
149  }
150 
152  static DtMouseHideProcessorCreator& instance(DtDe& de);
153 
155  static void registerInstance(DtDe& de, DtMouseHideProcessorCreator* inst);
156 
158  virtual DtMouseHideProcessor* create(DtInputDriver& inputDriver, DtDe& de);
159  };
160 
161 
162 }
Abstract Base class.
Definition: DtWindow.h:25
double myLastMouseMoveTime
Definition: DtMouseHideProcessor.h:103
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
virtual ~DtMouseHideProcessorCreator()
DTOR.
Definition: DtMouseHideProcessor.h:147
DtDe & myDe
Definition: DtMouseHideProcessor.h:102
DtInputDriver & myInputDriver
Definition: DtMouseHideProcessor.h:106
bool myMouseHideEnabled
Definition: DtMouseHideProcessor.h:105
boost::unordered_map< const DtWindow *, boost::signalslib::connection * > WindowDataMap
Definition: DtMouseHideProcessor.h:125
DtChannel * myLastMouseChannel
Definition: DtMouseHideProcessor.h:108
This class encapsulates a mouse button event.
Definition: DtMouseEvent.h:19
The abstract Channel Class.
Definition: DtChannel.h:35
Contains makVrv::DtVirtualBaseClass class.
int myLastMouseY
Definition: DtMouseHideProcessor.h:110
DtMouseHideProcessorCreator creates instances of DtMouseHideProcessor using a registered creator func...
Definition: DtMouseHideProcessor.h:138
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
int myLastMouseX
Definition: DtMouseHideProcessor.h:109
This class&#39;s main responsibility is to handle keyboard and mouse events from OSG (Qt events are route...
Definition: DtInputDriver.h:43
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
WindowDataMap myWindowDataMap
Definition: DtMouseHideProcessor.h:128
double myMouseHideTime
Definition: DtMouseHideProcessor.h:104
Base class to provide boost signal/slot management.
DtMouseHideProcessor tracks mouse move events and when they happen. If a mouse move event does not ha...
Definition: DtMouseHideProcessor.h:32
DtSignalConnectionManager myConnections
Definition: DtMouseHideProcessor.h:113
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:70
bool myMouseHidden
Definition: DtMouseHideProcessor.h:107
DtMouseHideProcessorCreator()
CTOR.
Definition: DtMouseHideProcessor.h:142
Contains DLL export macros.

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)