VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DtEventProcessorInterface.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2008 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 /******************************************************************************
6 ** $RCSfile: DtEventProcessorInterface.h,v $ $Revision: 1.10 $ $State: Exp $
7 ******************************************************************************/
8 
12 
13 #ifndef DtEventProcessorInterface_H_
14 #define DtEventProcessorInterface_H_
15 
16 #include <vrvCore/vrvCore.h>
17 #include <vrvCore/DtMouseEvent.h>
18 #include <vrvCore/DtUniqueID.h>
19 #include <string>
20 
23 
24 namespace makVrv
25 {
26  class DtKeyEvent;
27  class DtPinchGesture;
28  class DtChannel;
29  class DtDe;
30 
38  {
39  public:
42 
44  virtual ~DtEventProcessorInterface();
45 
49  virtual bool processMouseEvent( const DtMouseEvent& ev, DtChannel& channel) = 0;
50 
54  virtual bool processKeyboardEvent( const DtKeyEvent& ev, DtChannel& channel) = 0;
55 
57  virtual bool processPinchGesture( const DtPinchGesture& ev, DtChannel& channel) {return false;}
58 
61  virtual const std::string& className() = 0;
62 
64  virtual void setEnabled(bool b);
65 
66  inline bool enabled() const
67  {
68  return myEnabled;
69  }
70 
71  protected:
72  bool myEnabled;
73  };
74 
75 
80  {
81 
82  public:
85  static DtWidgetEventProcessorCreator& instance( DtDe& de );
86 
88  static void registerInstance(DtDe& de,
90 
92  virtual DtEventProcessorInterface* create( DtDe& de ) = 0;
93  };
94 }
95 
96 #endif
97 

Document ID: Generated on Tue Mar 8 22:13:38 EST 2016 from SVN revision 162938
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)