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 =========================================================================*/
23 #ifndef vtkEvent_h
24 #define vtkEvent_h
25 
26 #include "vtkInteractionWidgetsModule.h" // For export macro
27 #include "vtkObject.h"
28 
30 
31 class VTKINTERACTIONWIDGETS_EXPORT vtkEvent : public vtkObject
32 {
33 public:
37  static vtkEvent *New();
38 
40 
43  vtkTypeMacro(vtkEvent,vtkObject);
44  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
46 
52  AnyModifier = -1,
53  NoModifier = 0,
54  ShiftModifier = 1,
55  ControlModifier = 2,
56  AltModifier = 4
57  };
58 
60 
63  vtkSetMacro(EventId,unsigned long);
64  vtkGetMacro(EventId,unsigned long);
66 
68 
71  vtkSetMacro(Modifier,int);
72  vtkGetMacro(Modifier,int);
74 
76 
79  vtkSetMacro(KeyCode,char);
80  vtkGetMacro(KeyCode,char);
82 
84 
87  vtkSetMacro(RepeatCount,int);
88  vtkGetMacro(RepeatCount,int);
90 
92 
95  vtkSetStringMacro(KeySym);
96  vtkGetStringMacro(KeySym);
98 
102  static int GetModifier(vtkRenderWindowInteractor*);
103 
108  bool operator==(vtkEvent*);
109  bool operator==(unsigned long VTKEvent); //event with no modifiers
110 
111 protected:
112  vtkEvent();
113  ~vtkEvent() VTK_OVERRIDE;
114 
115  unsigned long EventId;
116  int Modifier;
117  char KeyCode;
118  int RepeatCount;
119  char* KeySym;
120 
121 private:
122  vtkEvent(const vtkEvent&) VTK_DELETE_FUNCTION;
123  void operator=(const vtkEvent&) VTK_DELETE_FUNCTION;
124 
125 };
126 
127 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:53
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:51
platform-independent render window interaction including picking and frame rate control.
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
a complete specification of a VTK event including all modifiers
Definition: vtkEvent.h:31
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...