[vtk-developers] RE: VTK Widgets redesign
Dean Inglis
dean.inglis at camris.ca
Wed Sep 7 15:37:17 EDT 2005
I think David is on the right track with additional
*ButtonDrag events that in the long run could simplify
things. For example, dropping seed points or free-hand
tracing as is done with vtkImageTracerWidget requires logic
that keeps track of whether a mouse click/release pair
occurred or whether a mouse click/move/release sequence etc.
I'm also not in favor of a generic "Move" event
as is currently enumerated in vtkWidgetEvent.
>I think we should discourage the use of a generic "Move" widget event as
>much as
>possible. It's best if the WidgetEventTranslator is sophisticated
>enough to translate
>the "MouseMoveEvent" into a more meaningful widget event (Scale,
>Translate, etc).
With regard to multi-widget management, perhaps the API could enforce
widgets to have a shutoff mechanism, something like
void SetInteraction(int onoff)=0;
as is done in vtkImagePlaneWidget, vtkImageTracerWidget, and more
elaborately in vtkBoxWidget for example, where the widget is visible,
but not interactive. I presume that vtkWidgetEventTranslator
would coordinate such activity?
I think Prabhu has proposed some great ideas for widget management:
reminds me of the Alt-Tab key function on MS windows where you get to
pick from among currently running apps. This could be done as a
2D overlay widget(perhaps modelled after vtkLegendBoxActor?), and
perhaps one could have the thing generate its own icons(?)
or text names(?) of the widgets added to it at run time...
just my $.02
Dean
More information about the vtk-developers
mailing list