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 "vtkObject.h"
34 
37 class vtkObserverMap;
38 
39 
41 {
42 public:
44  static vtkObserverMediator *New();
45 
47 
49  void PrintSelf(ostream& os, vtkIndent indent);
51 
53 
55  void SetInteractor(vtkRenderWindowInteractor* iren);
56  vtkGetObjectMacro(Interactor, vtkRenderWindowInteractor);
58 
63  int RequestCursorShape(vtkInteractorObserver*, int cursorShape);
64 
66  void RemoveAllCursorShapeRequests(vtkInteractorObserver*);
67 
68 protected:
71 
72  // The render window whose cursor we are controlling
74 
75  // A map whose key is the observer*, and whose data value is a cursor
76  // request. Note that a special compare function is used to sort the
77  // widgets based on the observer's priority.
78  vtkObserverMap *ObserverMap; //given a widget*, return its data
79 
80  // The current observer and cursor shape
83 
84 private:
85  vtkObserverMediator(const vtkObserverMediator&); //Not implemented
86  void operator=(const vtkObserverMediator&); //Not implemented
87 };
88 
89 #endif