VTK  9.4.20241108
vtkObserverMediator.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
19#ifndef vtkObserverMediator_h
20#define vtkObserverMediator_h
21
22#include "vtkObject.h"
23#include "vtkRenderingCoreModule.h" // For export macro
24
25VTK_ABI_NAMESPACE_BEGIN
28class vtkObserverMap;
29
30class VTKRENDERINGCORE_EXPORT vtkObserverMediator : public vtkObject
31{
32public:
37
39
43 void PrintSelf(ostream& os, vtkIndent indent) override;
45
47
52 vtkGetObjectMacro(Interactor, vtkRenderWindowInteractor);
54
60 int RequestCursorShape(vtkInteractorObserver*, int requestedShape);
61
66
67protected:
70
71 // The render window whose cursor we are controlling
73
74 // A map whose key is the observer*, and whose data value is a cursor
75 // request. Note that a special compare function is used to sort the
76 // widgets based on the observer's priority.
77 vtkObserverMap* ObserverMap; // given a widget*, return its data
78
79 // The current observer and cursor shape
82
83private:
85 void operator=(const vtkObserverMediator&) = delete;
86};
87
88VTK_ABI_NAMESPACE_END
89#endif
a simple class to control print indentation
Definition vtkIndent.h:108
an abstract superclass for classes observing events invoked by vtkRenderWindowInteractor
abstract base class for most VTK objects
Definition vtkObject.h:162
manage contention for cursors and other resources
void RemoveAllCursorShapeRequests(vtkInteractorObserver *)
Remove all requests for cursor shape from a given interactor.
static vtkObserverMediator * New()
Instantiate the class.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard macros.
int RequestCursorShape(vtkInteractorObserver *, int requestedShape)
Method used to request a cursor shape.
void SetInteractor(vtkRenderWindowInteractor *iren)
Specify the instance of vtkRenderWindow whose cursor shape is to be managed.
vtkRenderWindowInteractor * Interactor
~vtkObserverMediator() override
vtkObserverMap * ObserverMap
vtkInteractorObserver * CurrentObserver
platform-independent render window interaction including picking and frame rate control.