VTK
vtkEvent.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkEvent.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
26 #ifndef vtkEvent_h
27 #define vtkEvent_h
28 
29 #include "vtkInteractionWidgetsModule.h" // For export macro
30 #include "vtkObject.h"
31 
33 
34 class VTKINTERACTIONWIDGETS_EXPORT vtkEvent : public vtkObject
35 {
36 public:
40  static vtkEvent *New();
41 
43 
46  vtkTypeMacro(vtkEvent,vtkObject);
47  void PrintSelf(ostream& os, vtkIndent indent);
49 
55  AnyModifier = -1,
56  NoModifier = 0,
57  ShiftModifier = 1,
58  ControlModifier = 2,
59  AltModifier = 4
60  };
61 
63 
66  vtkSetMacro(EventId,unsigned long);
67  vtkGetMacro(EventId,unsigned long);
69 
71 
74  vtkSetMacro(Modifier,int);
75  vtkGetMacro(Modifier,int);
77 
79 
82  vtkSetMacro(KeyCode,char);
83  vtkGetMacro(KeyCode,char);
85 
87 
90  vtkSetMacro(RepeatCount,int);
91  vtkGetMacro(RepeatCount,int);
93 
95 
98  vtkSetStringMacro(KeySym);
99  vtkGetStringMacro(KeySym);
101 
105  static int GetModifier(vtkRenderWindowInteractor*);
106 
111  bool operator==(vtkEvent*);
112  bool operator==(unsigned long VTKEvent); //event with no modifiers
113 
114 protected:
115  vtkEvent();
116  virtual ~vtkEvent();
117 
118  unsigned long EventId;
119  int Modifier;
120  char KeyCode;
122  char* KeySym;
123 
124 private:
125  vtkEvent(const vtkEvent&) VTK_DELETE_FUNCTION;
126  void operator=(const vtkEvent&) VTK_DELETE_FUNCTION;
127 
128 };
129 
130 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:59
int RepeatCount
Definition: vtkEvent.h:121
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
EventModifiers
Ways to specify modifiers to VTK events.
Definition: vtkEvent.h:54
char KeyCode
Definition: vtkEvent.h:120
platform-independent render window interaction including picking and frame rate control.
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
char * KeySym
Definition: vtkEvent.h:122
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
int Modifier
Definition: vtkEvent.h:119
a complete specification of a VTK event including all modifiers
Definition: vtkEvent.h:34
VTKCOMMONCORE_EXPORT bool operator==(const vtkUnicodeString &lhs, const vtkUnicodeString &rhs)
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
unsigned long EventId
Definition: vtkEvent.h:118