[vtkusers] BorderWidget with mouse

David Doria daviddoria at gmail.com
Sat Oct 23 08:21:16 EDT 2010


>
> Try the BorderWidget example in the vtkwikiexamples. You can download
> that directly from the wiki
>
> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Qt/BorderWidget
>
> or get it from the git server
>
> http://gitorious.org/vtkwikiexamples
>
> It looks to me the drag and resize are implemented. You just need the
> ability to have the user set the initial size. In the case of the
> example the Widget is already some default size on the screen and not
> added by a user action.
>

John,

Did you mean to post the non-Qt version?
http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/Border

<http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/Border>Also, in both of
them, the widget is not subclassed. vtkCommand is subclassed and an observer
is added to the widget. I just modified
http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/Border so that is an actual
subclass of the widget. There is a lot of funny business that has to go on
(the function must be static, you must set a this->CallbackMapper method,
etc) but this is probably the way you want to go to have the most control.

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101023/aa196aa9/attachment.htm>


More information about the vtkusers mailing list