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
34class VTKINTERACTIONWIDGETS_EXPORT vtkEvent : public vtkObject
35{
36public:
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);
101
106
112 bool operator==(unsigned long VTKEvent); //event with no modifiers
113
114protected:
116 virtual ~vtkEvent();
117
118 unsigned long EventId;
122 char* KeySym;
123
124private:
125 vtkEvent(const vtkEvent&) VTK_DELETE_FUNCTION;
126 void operator=(const vtkEvent&) VTK_DELETE_FUNCTION;
127
128};
129
130#endif
a complete specification of a VTK event including all modifiers
Definition: vtkEvent.h:35
char * KeySym
Definition: vtkEvent.h:122
unsigned long EventId
Definition: vtkEvent.h:118
bool operator==(vtkEvent *)
Used to compare whether two events are equal.
EventModifiers
Ways to specify modifiers to VTK events.
Definition: vtkEvent.h:54
static vtkEvent * New()
The object factory constructor.
int RepeatCount
Definition: vtkEvent.h:121
int Modifier
Definition: vtkEvent.h:119
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
static int GetModifier(vtkRenderWindowInteractor *)
Convenience method computes the event modifier from an interactor.
bool operator==(unsigned long VTKEvent)
char KeyCode
Definition: vtkEvent.h:120
virtual ~vtkEvent()
a simple class to control print indentation
Definition: vtkIndent.h:40
abstract base class for most VTK objects
Definition: vtkObject.h:60
platform-independent render window interaction including picking and frame rate control.
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.