VTK
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 =========================================================================*/
30 #ifndef vtkObserverMediator_h
31 #define vtkObserverMediator_h
32 
33 #include "vtkRenderingCoreModule.h" // For export macro
34 #include "vtkObject.h"
35 
38 class vtkObserverMap;
39 
40 
42 {
43 public:
45  static vtkObserverMediator *New();
46 
48 
50  void PrintSelf(ostream& os, vtkIndent indent);
52 
54 
56  void SetInteractor(vtkRenderWindowInteractor* iren);
57  vtkGetObjectMacro(Interactor, vtkRenderWindowInteractor);
59 
64  int RequestCursorShape(vtkInteractorObserver*, int cursorShape);
65 
67  void RemoveAllCursorShapeRequests(vtkInteractorObserver*);
68 
69 protected:
72 
73  // The render window whose cursor we are controlling
75 
76  // A map whose key is the observer*, and whose data value is a cursor
77  // request. Note that a special compare function is used to sort the
78  // widgets based on the observer's priority.
79  vtkObserverMap *ObserverMap; //given a widget*, return its data
80 
81  // The current observer and cursor shape
84 
85 private:
86  vtkObserverMediator(const vtkObserverMediator&); //Not implemented
87  void operator=(const vtkObserverMediator&); //Not implemented
88 };
89 
90 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:61
vtkRenderWindowInteractor * Interactor
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.
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:38
#define VTKRENDERINGCORE_EXPORT
static vtkObject * New()
manage contention for cursors and other resources