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 =========================================================================*/
25 #ifndef vtkEvent_h
26 #define vtkEvent_h
27 
28 #include "vtkInteractionWidgetsModule.h" // For export macro
29 #include "vtkObject.h"
30 
32 
34 {
35 public:
37  static vtkEvent *New();
38 
40 
41  vtkTypeMacro(vtkEvent,vtkObject);
42  void PrintSelf(ostream& os, vtkIndent indent);
44 
45 //BTX
47 
50  AnyModifier = -1,
51  NoModifier = 0,
52  ShiftModifier = 1,
53  ControlModifier = 2,
54  AltModifier = 4
55  };
56 //ETX
58 
60 
61  vtkSetMacro(EventId,unsigned long);
62  vtkGetMacro(EventId,unsigned long);
64 
66 
67  vtkSetMacro(Modifier,int);
68  vtkGetMacro(Modifier,int);
70 
72 
73  vtkSetMacro(KeyCode,char);
74  vtkGetMacro(KeyCode,char);
76 
78 
79  vtkSetMacro(RepeatCount,int);
80  vtkGetMacro(RepeatCount,int);
82 
84 
85  vtkSetStringMacro(KeySym);
86  vtkGetStringMacro(KeySym);
88 
90  static int GetModifier(vtkRenderWindowInteractor*);
91 
92 //BTX
94 
96  int operator==(vtkEvent*);
97  int operator==(unsigned long VTKEvent); //event with no modifiers
98 //ETX
100 
101 protected:
102  vtkEvent();
103  virtual ~vtkEvent();
104 
105  unsigned long EventId;
106  int Modifier;
107  char KeyCode;
109  char* KeySym;
110 
111 private:
112  vtkEvent(const vtkEvent&); //Not implemented
113  void operator=(const vtkEvent&); //Not implemented
114 
115 };
116 
117 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:61
int RepeatCount
Definition: vtkEvent.h:108
EventModifiers
Definition: vtkEvent.h:49
char KeyCode
Definition: vtkEvent.h:107
platform-independent render window interaction including picking and frame rate control.
#define VTKINTERACTIONWIDGETS_EXPORT
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:38
char * KeySym
Definition: vtkEvent.h:109
int Modifier
Definition: vtkEvent.h:106
a complete specification of a VTK event including all modifiers
Definition: vtkEvent.h:33
VTKCOMMONCORE_EXPORT bool operator==(const vtkUnicodeString &lhs, const vtkUnicodeString &rhs)
static vtkObject * New()
unsigned long EventId
Definition: vtkEvent.h:105