VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Rendering/Core/vtkObserverMediator.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkObserverMediator.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00030 #ifndef vtkObserverMediator_h
00031 #define vtkObserverMediator_h
00032 
00033 #include "vtkRenderingCoreModule.h" // For export macro
00034 #include "vtkObject.h"
00035 
00036 class vtkRenderWindowInteractor;
00037 class vtkInteractorObserver;
00038 class vtkObserverMap;
00039 
00040 
00041 class VTKRENDERINGCORE_EXPORT vtkObserverMediator : public vtkObject
00042 {
00043 public:
00045   static vtkObserverMediator *New();
00046 
00048 
00049   vtkTypeMacro(vtkObserverMediator,vtkObject);
00050   void PrintSelf(ostream& os, vtkIndent indent);
00052 
00054 
00056   void SetInteractor(vtkRenderWindowInteractor* iren);
00057   vtkGetObjectMacro(Interactor, vtkRenderWindowInteractor);
00059 
00064   int RequestCursorShape(vtkInteractorObserver*, int cursorShape);
00065 
00067   void RemoveAllCursorShapeRequests(vtkInteractorObserver*);
00068 
00069 protected:
00070   vtkObserverMediator();
00071   ~vtkObserverMediator();
00072 
00073   // The render window whose cursor we are controlling
00074   vtkRenderWindowInteractor *Interactor;
00075 
00076   // A map whose key is the observer*, and whose data value is a cursor
00077   // request. Note that a special compare function is used to sort the
00078   // widgets based on the observer's priority.
00079   vtkObserverMap *ObserverMap; //given a widget*, return its data
00080 
00081   // The current observer and cursor shape
00082   vtkInteractorObserver *CurrentObserver;
00083   int                    CurrentCursorShape;
00084 
00085 private:
00086   vtkObserverMediator(const vtkObserverMediator&);  //Not implemented
00087   void operator=(const vtkObserverMediator&);  //Not implemented
00088 };
00089 
00090 #endif