VR-Forces 4.7 Class Documentation
 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 
47  virtual void setMouseHideTime( float hideTime );
48  virtual float mouseHideTime() const;
50 
52 
53  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 
86  virtual void showMouse();
87  virtual void hideMouse();
89 
90 
91  private:
94 
97 
99  DtMouseHideProcessor& operator=(const DtMouseHideProcessor* orig);
100 
101  protected:
112 
113  // Used for connect once / destroy in destructor-type connection
115 #if 0
116  typedef struct
117  {
118  boost::signalslib::connection myFullScreenWatcher;
119  } WindowData;
120 
121  // Given a (local) window, maintain an attachment to its toggle fullscreen signal,
122  // and a list of its (local) channels
123  typedef boost::unordered_map<const DtWindow*, WindowData*> WindowDataMap;
124 #else
125  // Given a (local) window, maintain an attachment to its toggle fullscreen signal
126  typedef boost::unordered_map<const DtWindow*, boost::signalslib::connection*> WindowDataMap;
127 
128 #endif
130  };
131 
132  //
133  //----------------
134  //
135 
140  {
141  public:
144  {
145  }
146 
149  {
150  }
151 
153  static DtMouseHideProcessorCreator& instance(DtDe& de);
154 
156  static void registerInstance(DtDe& de, DtMouseHideProcessorCreator* inst);
157 
159  virtual DtMouseHideProcessor* create(DtInputDriver& inputDriver, DtDe& de);
160  };
161 
162 
163 }

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)