/usr/include/vtk-5.10/vtkContextMouseEvent.h is in libvtk5-dev 5.10.1+dfsg-2.1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | /*=========================================================================
Program: Visualization Toolkit
Module: vtkContextMouseEvent.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
// .NAME vtkContextMouseEvent - data structure to represent mouse events.
//
// .SECTION Description
// Provides a convenient data structure to represent mouse events in the
// vtkContextScene. Passed to vtkAbstractContextItem objects.
#ifndef __vtkContextMouseEvent_h
#define __vtkContextMouseEvent_h
#include "vtkVector.h" // Needed for vtkVector2f and vtkVector2i
class vtkRenderWindowInteractor;
class vtkContextMouseEvent
{
public:
// Description:
// Enumeration of mouse buttons.
enum {
NO_BUTTON = 0,
LEFT_BUTTON = 1,
MIDDLE_BUTTON = 2,
RIGHT_BUTTON = 4
};
// Description:
// Enumeration of modifier keys.
enum {
NO_MODIFIER = 0,
ALT_MODIFIER = 1,
SHIFT_MODIFIER = 2,
CONTROL_MODIFIER = 4
};
vtkContextMouseEvent()
{
}
~vtkContextMouseEvent()
{
}
// Description:
// Set the interactor for the mouse event.
void SetInteractor(vtkRenderWindowInteractor *interactor)
{
this->Interactor = interactor;
}
// Description:
// Get the interactor for the mouse event. This can be null, and is provided
// only for convenience.
vtkRenderWindowInteractor* GetInteractor() const
{
return this->Interactor;
}
// Description:
// Set/get the position of the mouse in the item's coordinates.
void SetPos(const vtkVector2f &pos) { this->Pos = pos; }
vtkVector2f GetPos() const { return this->Pos; }
// Description:
// Set/get the position of the mouse in scene coordinates.
void SetScenePos(const vtkVector2f &pos) { this->ScenePos = pos; }
vtkVector2f GetScenePos() const { return this->ScenePos; }
// Description:
// Set/get the position of the mouse in screen coordinates.
void SetScreenPos(const vtkVector2i &pos) { this->ScreenPos = pos; }
vtkVector2i GetScreenPos() const { return this->ScreenPos; }
// Description:
// Set/get the position of the mouse in the item's coordinates.
void SetLastPos(const vtkVector2f &pos) { this->LastPos = pos; }
vtkVector2f GetLastPos() const { return this->LastPos; }
// Description:
// Set/get the position of the mouse in scene coordinates.
void SetLastScenePos(const vtkVector2f &pos) { this->LastScenePos = pos; }
vtkVector2f GetLastScenePos() const { return this->LastScenePos; }
// Description:
// Set/get the position of the mouse in screen coordinates.
void SetLastScreenPos(const vtkVector2i &pos) { this->LastScreenPos = pos; }
vtkVector2i GetLastScreenPos() const { return this->LastScreenPos; }
// Description:
// Set/get the mouse button that caused the event, with possible values being
// NO_BUTTON, LEFT_BUTTON, MIDDLE_BUTTON and RIGHT_BUTTON.
void SetButton(int button) { this->Button = button; }
int GetButton() const { return this->Button; }
// Description:
// Return the modifier keys, if any, ORed together. Valid modifier enum values
// are NO_MODIFIER, ALT_MODIFIER, SHIFT_MODIFIER and/or CONTROL_MODIFIER.
int GetModifiers() const;
#ifdef VTK_LEGACY_REMOVE
// Deprecating the public exposure of member variables for mouse events
// Deprecated in VTK 5.9.
protected:
#endif
// Description:
// Position of the mouse in item coordinate system.
vtkVector2f Pos;
// Description:
// Position of the mouse the scene coordinate system.
vtkVector2f ScenePos;
// Description:
// Position of the mouse in screen coordinates
vtkVector2i ScreenPos;
// Description:
// `Pos' at the previous mouse event.
vtkVector2f LastPos;
// Description:
// `ScenePos'at the previous mouse event.
vtkVector2f LastScenePos;
// Description:
// `ScreenPos' at the previous mouse event.
vtkVector2i LastScreenPos;
// Description:
// Mouse button that caused the event, using the anonymous enumeration.
int Button;
protected:
vtkRenderWindowInteractor *Interactor;
};
#endif // __vtkContextMouseEvent_h
|