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 
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 
88 
91 
92 //BTX
94 
97  int operator==(unsigned long VTKEvent); //event with no modifiers
98 //ETX
100 
101 protected:
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
vtkEvent::~vtkEvent
virtual ~vtkEvent()
vtkEvent::New
static vtkEvent * New()
vtkEvent::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkEvent::Modifier
int Modifier
Definition: vtkEvent.h:106
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:62
vtkInteractionWidgetsModule.h
vtkEvent::EventId
unsigned long EventId
Definition: vtkEvent.h:105
vtkEvent
a complete specification of a VTK event including all modifiers
Definition: vtkEvent.h:34
vtkEvent::vtkEvent
vtkEvent()
vtkEvent::KeySym
char * KeySym
Definition: vtkEvent.h:109
vtkEvent::operator==
int operator==(unsigned long VTKEvent)
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkSetStringMacro
#define vtkSetStringMacro(name)
Definition: vtkSetGet.h:104
vtkEvent::GetModifier
static int GetModifier(vtkRenderWindowInteractor *)
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkGetStringMacro
vtkGetStringMacro(ExtensionsString)
vtkRenderWindowInteractor
platform-independent render window interaction including picking and frame rate control.
Definition: vtkRenderWindowInteractor.h:80
vtkEvent::KeyCode
char KeyCode
Definition: vtkEvent.h:107
vtkObject.h
vtkEvent::operator==
int operator==(vtkEvent *)
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
VTKINTERACTIONWIDGETS_EXPORT
#define VTKINTERACTIONWIDGETS_EXPORT
Definition: vtkInteractionWidgetsModule.h:15
vtkEvent::RepeatCount
int RepeatCount
Definition: vtkEvent.h:108
vtkEvent::EventModifiers
EventModifiers
Definition: vtkEvent.h:49