FreeMat

- Main Page
- Related Pages

vtkObserverMediator

Section: Visualization Toolkit Rendering Classes

# Usage

The vtkObserverMediator is a helper class that manages requests for cursor changes from multiple interactor observers (e.g. widgets). It keeps a list of widgets (and their priorities) and their current requests for cursor shape. It then satisfies requests based on widget priority and the relative importance of the request (e.g., a lower priority widget requesting a particular cursor shape will overrule a higher priority widget requesting a default shape).

To create an instance of class vtkObserverMediator, simply invoke its constructor as follows

      obj = vtkObserverMediator

# Methods

The class vtkObserverMediator has several methods that can be used. They are listed below. Note that the documentation is translated automatically from the VTK sources, and may not be completely intelligible. When in doubt, consult the VTK website. In the methods listed below, `obj` is an instance of the vtkObserverMediator class.

- `string = obj.GetClassName ()` - Standard macros.
- `int = obj.IsA (string name)` - Standard macros.
- `vtkObserverMediator = obj.NewInstance ()` - Standard macros.
- `vtkObserverMediator = obj.SafeDownCast (vtkObject o)` - Standard macros.
- `obj.SetInteractor (vtkRenderWindowInteractor iren)` - Specify the instance of vtkRenderWindow whose cursor shape is to be managed.
- `vtkRenderWindowInteractor = obj.GetInteractor ()` - Specify the instance of vtkRenderWindow whose cursor shape is to be managed.
- `int = obj.RequestCursorShape (vtkInteractorObserver , int cursorShape)` - Method used to request a cursor shape. Note that the shape is specified using one of the integral values determined in vtkRenderWindow.h. The method returns a non-zero value if the shape was successfully changed.
- `obj.RemoveAllCursorShapeRequests (vtkInteractorObserver )` - Remove all requests for cursor shape from a given interactor.