[vtk-developers] VTK Widgets redesign

David Gobbi dgobbi at atamai.com
Thu Sep 1 15:21:21 EDT 2005


I took a peek at the wiki page, and I didn't see anything that would 
make it impossible
for scripters to use the new widgets.

A couple extra features will have to be added to the wrappers, though:
- support for enumerations (the enums in vtkCommand or vtkWidgetEvent)
- CallbackMapper::SetCallbackMethod() will need special handling in the 
wrappers

I would also like to add that it would be really nice if there were 
"MouseDrag"
events, because people usually like to do something different depending 
on which mouse
button was used to initiate the mouse drag, something like the following:

LeftButtonDragEvent
RightButtonDragEvent
MiddleButtonDragEvent
MouseMoveEvent (always called in addition to the above)

That would require changes to vtkCommand, so it might be further than 
you would
want to go.

Another option would be to make the WidgetEventTranslator could be a 
little more
sophisticated, so that you could tell it to translate a 
"press/drag/release" sequence
with specific modifiers to generate e.g "StartScale/Scale/EndScale" 
widget events.

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).

 - David

Will Schroeder wrote:

> Prabhu-
>
> I like to script too. We will make sure that there is support for the 
> scripting languages.
>
> Will
>
> At 12:23 AM 9/1/2005, Prabhu Ramachandran wrote:
>
>> >>>>> "Will" == Will Schroeder <will.schroeder at kitware.com> writes:
>>
>>     Will> As some of you know, I've been working on and off on a
>>     Will> redesign of the VTK widgets. I've put together a document
>>     Will> (on the VTK wiki http://www.vtk.org/Wiki/VTKWidgets) that
>>     Will> describes the design and includes a reference
>>     Will> implementation. I'd like everybody to throw stones at the
>>     Will> design and I'll do what I can to accommodate suggestions. Of
>>     Will> course this will not be added to VTK until after the
>>     Will> 5.0 release...
>>
>> I really like the fact that the widgets are being redesigned.  I
>> haven't gone over the current code/design enough to offer serious
>> comments.  However, I'd just like to say that I like what I see of the
>> new design.  I only have one request: it would be great if all of this
>> functionality were usable from a scripting language without having to
>> write any C++ code.  I know that this will very likely be true but I'm
>> just suggesting to make sure.
>>
>> Thanks!
>> cheers,
>> prabhu
>>
>> p.s. Thanks Brad for fixing the exact extent problem.  I can confirm
>> that it all works fine now.
>> _______________________________________________
>> vtk-developers mailing list
>> vtk-developers at vtk.org
>> http://www.vtk.org/mailman/listinfo/vtk-developers
>
>
> _______________________________________________
> vtk-developers mailing list
> vtk-developers at vtk.org
> http://www.vtk.org/mailman/listinfo/vtk-developers
>




More information about the vtk-developers mailing list