VTK
dox
Rendering
Core
vtkObserverMediator.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkObserverMediator.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
=========================================================================*/
31
#ifndef vtkObserverMediator_h
32
#define vtkObserverMediator_h
33
34
#include "vtkRenderingCoreModule.h"
// For export macro
35
#include "
vtkObject.h
"
36
37
class
vtkRenderWindowInteractor
;
38
class
vtkInteractorObserver
;
39
class
vtkObserverMap;
40
41
42
class
VTKRENDERINGCORE_EXPORT
vtkObserverMediator
:
public
vtkObject
43
{
44
public
:
48
static
vtkObserverMediator
*
New
();
49
51
54
vtkTypeMacro(
vtkObserverMediator
,
vtkObject
);
55
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
57
59
63
void
SetInteractor(
vtkRenderWindowInteractor
* iren);
64
vtkGetObjectMacro(Interactor,
vtkRenderWindowInteractor
);
66
72
int
RequestCursorShape(
vtkInteractorObserver
*,
int
cursorShape);
73
77
void
RemoveAllCursorShapeRequests(
vtkInteractorObserver
*);
78
79
protected
:
80
vtkObserverMediator
();
81
~
vtkObserverMediator
()
override
;
82
83
// The render window whose cursor we are controlling
84
vtkRenderWindowInteractor
*
Interactor
;
85
86
// A map whose key is the observer*, and whose data value is a cursor
87
// request. Note that a special compare function is used to sort the
88
// widgets based on the observer's priority.
89
vtkObserverMap *
ObserverMap
;
//given a widget*, return its data
90
91
// The current observer and cursor shape
92
vtkInteractorObserver
*
CurrentObserver
;
93
int
CurrentCursorShape
;
94
95
private
:
96
vtkObserverMediator
(
const
vtkObserverMediator
&) =
delete
;
97
void
operator=(
const
vtkObserverMediator
&) =
delete
;
98
};
99
100
#endif
vtkObserverMediator::CurrentObserver
vtkInteractorObserver * CurrentObserver
Definition:
vtkObserverMediator.h:92
vtkObserverMediator::CurrentCursorShape
int CurrentCursorShape
Definition:
vtkObserverMediator.h:93
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkObject
abstract base class for most VTK objects
Definition:
vtkObject.h:59
vtkObserverMediator::ObserverMap
vtkObserverMap * ObserverMap
Definition:
vtkObserverMediator.h:89
vtkInteractorObserver
an abstract superclass for classes observing events invoked by vtkRenderWindowInteractor
Definition:
vtkInteractorObserver.h:59
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:39
vtkObserverMediator::Interactor
vtkRenderWindowInteractor * Interactor
Definition:
vtkObserverMediator.h:84
vtkObject::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkRenderWindowInteractor
platform-independent render window interaction including picking and frame rate control.
Definition:
vtkRenderWindowInteractor.h:78
vtkObject.h
vtkObserverMediator
manage contention for cursors and other resources
Definition:
vtkObserverMediator.h:42
Generated by
1.8.16