[vtk-developers] Changing cursors

John Platt jcplatt at lineone.net
Thu Jun 2 07:50:06 EDT 2005


Hi All,

 

I thought it would be nice to show a different cursor when rotating the
camera using vtkInteractorStyleTrackballCamera - LBDown+MouseMove. This
works fine until the cursor is moved over vtkScalarBarWidget.

 

vtkScalarBarWidget::OnMouseMove() changes the cursor, and specifically,
on leaving the scalar bar, calls SetCurrentCursor(VTK_CURSOR_DEFAULT)
removing the custom rotation cursor.

 

vtkScalarBarWidget could be changed to restore the original 'outside'
cursor but this is only a partial cure. I am assuming that since
vtkScalarBarWidget has a priority of 0.55, it always gets the
LBDown/MouseMove events before the render window interactor. If the
scalar bar was hit on LBDown it can do the correct MouseMove stuff and
then set the abort flag to prevent the interactor receiving the mouse
move notification. However, if LBDown did not hit the scalar bar, it
would be preferable if the widget ignored mouse move events.

 

A possible solution is for vtkScalarBarWidget to ignore mouse move
events if a LBDown did not hit the scalar bar. Can anybody foresee any
side effects? Similar treatment may also be required for
vtkXYPlotWidget.

 

John.

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20050602/180f474d/attachment.html>


More information about the vtk-developers mailing list