VTK  9.3.1
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 
25 VTK_ABI_NAMESPACE_BEGIN
28 class vtkObserverMap;
29 
30 class VTKRENDERINGCORE_EXPORT vtkObserverMediator : public vtkObject
31 {
32 public:
36  static vtkObserverMediator* New();
37 
39 
43  void PrintSelf(ostream& os, vtkIndent indent) override;
45 
47 
51  void SetInteractor(vtkRenderWindowInteractor* iren);
52  vtkGetObjectMacro(Interactor, vtkRenderWindowInteractor);
54 
60  int RequestCursorShape(vtkInteractorObserver*, int requestedShape);
61 
65  void RemoveAllCursorShapeRequests(vtkInteractorObserver*);
66 
67 protected:
69  ~vtkObserverMediator() override;
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 
83 private:
85  void operator=(const vtkObserverMediator&) = delete;
86 };
87 
88 VTK_ABI_NAMESPACE_END
89 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:51
vtkRenderWindowInteractor * Interactor
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkObserverMap * ObserverMap
vtkInteractorObserver * CurrentObserver
an abstract superclass for classes observing events invoked by vtkRenderWindowInteractor ...
platform-independent render window interaction including picking and frame rate control.
a simple class to control print indentation
Definition: vtkIndent.h:28
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
manage contention for cursors and other resources