VTK
Public Member Functions | Public Attributes | Protected Attributes
vtkContextMouseEvent Class Reference

data structure to represent mouse events. More...

#include <vtkContextMouseEvent.h>

Collaboration diagram for vtkContextMouseEvent:
Collaboration graph
[legend]

List of all members.

Public Types

enum  { NO_BUTTON = 0, LEFT_BUTTON = 1, MIDDLE_BUTTON = 2, RIGHT_BUTTON = 4 }
enum  { NO_MODIFIER = 0, ALT_MODIFIER = 1, SHIFT_MODIFIER = 2, CONTROL_MODIFIER = 4 }

Public Member Functions

 vtkContextMouseEvent ()
 ~vtkContextMouseEvent ()
int GetModifiers () const
void SetInteractor (vtkRenderWindowInteractor *interactor)
vtkRenderWindowInteractorGetInteractor () const
void SetPos (const vtkVector2f &pos)
vtkVector2f GetPos () const
void SetScenePos (const vtkVector2f &pos)
vtkVector2f GetScenePos () const
void SetScreenPos (const vtkVector2i &pos)
vtkVector2i GetScreenPos () const
void SetLastPos (const vtkVector2f &pos)
vtkVector2f GetLastPos () const
void SetLastScenePos (const vtkVector2f &pos)
vtkVector2f GetLastScenePos () const
void SetLastScreenPos (const vtkVector2i &pos)
vtkVector2i GetLastScreenPos () const
void SetButton (int button)
int GetButton () const

Public Attributes

vtkVector2f Pos
vtkVector2f ScenePos
vtkVector2i ScreenPos
vtkVector2f LastPos
vtkVector2f LastScenePos
vtkVector2i LastScreenPos
int Button

Protected Attributes

vtkRenderWindowInteractorInteractor

Detailed Description

data structure to represent mouse events.

Provides a convenient data structure to represent mouse events in the vtkContextScene. Passed to vtkAbstractContextItem objects.

Examples:
vtkContextMouseEvent (Examples)
Tests:
vtkContextMouseEvent (Tests)

Definition at line 39 of file vtkContextMouseEvent.h.


Member Enumeration Documentation

anonymous enum

Enumeration of mouse buttons.

Enumerator:
NO_BUTTON 
LEFT_BUTTON 
MIDDLE_BUTTON 
RIGHT_BUTTON 

Definition at line 44 of file vtkContextMouseEvent.h.

anonymous enum

Enumeration of modifier keys.

Enumerator:
NO_MODIFIER 
ALT_MODIFIER 
SHIFT_MODIFIER 
CONTROL_MODIFIER 

Definition at line 54 of file vtkContextMouseEvent.h.


Constructor & Destructor Documentation

Definition at line 62 of file vtkContextMouseEvent.h.

Definition at line 66 of file vtkContextMouseEvent.h.


Member Function Documentation

Set the interactor for the mouse event.

Definition at line 72 of file vtkContextMouseEvent.h.

Get the interactor for the mouse event. This can be null, and is provided only for convenience.

Definition at line 81 of file vtkContextMouseEvent.h.

void vtkContextMouseEvent::SetPos ( const vtkVector2f pos) [inline]

Set/get the position of the mouse in the item's coordinates.

Definition at line 89 of file vtkContextMouseEvent.h.

Set/get the position of the mouse in the item's coordinates.

Definition at line 90 of file vtkContextMouseEvent.h.

void vtkContextMouseEvent::SetScenePos ( const vtkVector2f pos) [inline]

Set/get the position of the mouse in scene coordinates.

Definition at line 95 of file vtkContextMouseEvent.h.

Set/get the position of the mouse in scene coordinates.

Definition at line 96 of file vtkContextMouseEvent.h.

void vtkContextMouseEvent::SetScreenPos ( const vtkVector2i pos) [inline]

Set/get the position of the mouse in screen coordinates.

Definition at line 101 of file vtkContextMouseEvent.h.

Set/get the position of the mouse in screen coordinates.

Definition at line 102 of file vtkContextMouseEvent.h.

void vtkContextMouseEvent::SetLastPos ( const vtkVector2f pos) [inline]

Set/get the position of the mouse in the item's coordinates.

Definition at line 107 of file vtkContextMouseEvent.h.

Set/get the position of the mouse in the item's coordinates.

Definition at line 108 of file vtkContextMouseEvent.h.

void vtkContextMouseEvent::SetLastScenePos ( const vtkVector2f pos) [inline]

Set/get the position of the mouse in scene coordinates.

Definition at line 113 of file vtkContextMouseEvent.h.

Set/get the position of the mouse in scene coordinates.

Definition at line 114 of file vtkContextMouseEvent.h.

void vtkContextMouseEvent::SetLastScreenPos ( const vtkVector2i pos) [inline]

Set/get the position of the mouse in screen coordinates.

Definition at line 119 of file vtkContextMouseEvent.h.

Set/get the position of the mouse in screen coordinates.

Definition at line 120 of file vtkContextMouseEvent.h.

void vtkContextMouseEvent::SetButton ( int  button) [inline]

Set/get the mouse button that caused the event, with possible values being NO_BUTTON, LEFT_BUTTON, MIDDLE_BUTTON and RIGHT_BUTTON.

Definition at line 126 of file vtkContextMouseEvent.h.

Set/get the mouse button that caused the event, with possible values being NO_BUTTON, LEFT_BUTTON, MIDDLE_BUTTON and RIGHT_BUTTON.

Definition at line 127 of file vtkContextMouseEvent.h.

Return the modifier keys, if any, ORed together. Valid modifier enum values are NO_MODIFIER, ALT_MODIFIER, SHIFT_MODIFIER and/or CONTROL_MODIFIER.


Member Data Documentation

Position of the mouse in item coordinate system.

Definition at line 141 of file vtkContextMouseEvent.h.

Position of the mouse the scene coordinate system.

Definition at line 144 of file vtkContextMouseEvent.h.

Position of the mouse in screen coordinates

Definition at line 147 of file vtkContextMouseEvent.h.

`Pos' at the previous mouse event.

Definition at line 150 of file vtkContextMouseEvent.h.

`ScenePos'at the previous mouse event.

Definition at line 153 of file vtkContextMouseEvent.h.

`ScreenPos' at the previous mouse event.

Definition at line 156 of file vtkContextMouseEvent.h.

Mouse button that caused the event, using the anonymous enumeration.

Definition at line 159 of file vtkContextMouseEvent.h.

Definition at line 162 of file vtkContextMouseEvent.h.


The documentation for this class was generated from the following file: