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 "vtkObject.h"
29 
31 
33 {
34 public:
36  static vtkEvent *New();
37 
39 
40  vtkTypeMacro(vtkEvent,vtkObject);
41  void PrintSelf(ostream& os, vtkIndent indent);
43 
44 //BTX
46 
49  AnyModifier = -1,
50  NoModifier = 0,
51  ShiftModifier = 1,
52  ControlModifier = 2,
53  AltModifier = 4
54  };
55 //ETX
57 
59 
60  vtkSetMacro(EventId,unsigned long);
61  vtkGetMacro(EventId,unsigned long);
63 
65 
66  vtkSetMacro(Modifier,int);
67  vtkGetMacro(Modifier,int);
69 
71 
72  vtkSetMacro(KeyCode,char);
73  vtkGetMacro(KeyCode,char);
75 
77 
78  vtkSetMacro(RepeatCount,int);
79  vtkGetMacro(RepeatCount,int);
81 
83 
84  vtkSetStringMacro(KeySym);
85  vtkGetStringMacro(KeySym);
87 
89  static int GetModifier(vtkRenderWindowInteractor*);
90 
91 //BTX
93 
95  int operator==(vtkEvent*);
96  int operator==(unsigned long VTKEvent); //event with no modifiers
97 //ETX
99 
100 protected:
101  vtkEvent();
102  virtual ~vtkEvent();
103 
104  unsigned long EventId;
105  int Modifier;
106  char KeyCode;
108  char* KeySym;
109 
110 private:
111  vtkEvent(const vtkEvent&); //Not implemented
112  void operator=(const vtkEvent&); //Not implemented
113 
114 };
115 
116 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:60
int RepeatCount
Definition: vtkEvent.h:107
EventModifiers
Definition: vtkEvent.h:48
char KeyCode
Definition: vtkEvent.h:106
platform-independent render window interaction including picking and frame rate control.
VTK_COMMON_EXPORT bool operator==(const vtkUnicodeString &lhs, const vtkUnicodeString &rhs)
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:37
#define VTK_WIDGETS_EXPORT
char * KeySym
Definition: vtkEvent.h:108
int Modifier
Definition: vtkEvent.h:105
a complete specification of a VTK event including all modifiers
Definition: vtkEvent.h:32
static vtkObject * New()
unsigned long EventId
Definition: vtkEvent.h:104