-
Notifications
You must be signed in to change notification settings - Fork 6
/
vtkToolCursorInteractorObserver.h
77 lines (58 loc) · 2.41 KB
/
vtkToolCursorInteractorObserver.h
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
/*=========================================================================
Program: ToolCursor
Module: vtkToolCursorInteractorObserver.h
Copyright (c) 2010 David Gobbi
All rights reserved.
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 vtkToolCursorInteractorObserver - Observer for vtkToolCursor
// .SECTION Description
// This is a helper class for vtkToolCursor. Specifically, this class
// receives events from a vtkRenderWindowInteractor and then calls the
// appropriate methods of vtkToolCursor.
#ifndef __vtkToolCursorInteractorObserver_h
#define __vtkToolCursorInteractorObserver_h
#include "vtkInteractorObserver.h"
class vtkToolCursor;
class VTK_EXPORT vtkToolCursorInteractorObserver :
public vtkInteractorObserver
{
public:
// Description:
// Instantiate the object.
static vtkToolCursorInteractorObserver *New();
// Description:
// Standard vtkObject methods
vtkTypeMacro(vtkToolCursorInteractorObserver,
vtkInteractorObserver);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// Enable the cursor.
virtual void SetEnabled(int enable);
// Description:
// Set the cursor that this object observes events for.
void SetToolCursor(vtkToolCursor *cursor);
vtkToolCursor *GetToolCursor() { return this->ToolCursor; };
// Description:
// Get vtkToolCursor "modifier" bits from a VTK keysym.
static int ModifierFromKeySym(const char *keysym);
protected:
vtkToolCursorInteractorObserver();
~vtkToolCursorInteractorObserver();
static void ProcessPassiveEvents(vtkObject* object,
unsigned long event,
void* clientdata,
void* calldata);
static void ProcessEvents(vtkObject* object,
unsigned long event,
void* clientdata,
void* calldata);
vtkCallbackCommand *PassiveEventCallbackCommand;
vtkToolCursor *ToolCursor;
private:
vtkToolCursorInteractorObserver(const vtkToolCursorInteractorObserver&); //Not implemented
void operator=(const vtkToolCursorInteractorObserver&); //Not implemented
};
#endif