[vtk-developers] Upcoming features, careful with CVS updates...
Will Schroeder
will.schroeder at kitware.com
Mon Mar 27 18:28:32 EST 2006
*Summary*:
There are upcoming changes to VTK timers (which may affect interactor
styles); and the addition of timer-based widgets (e.g.,
vtkBalloonWidget). Please delay CVS updates for a day or two while we
stabilize.
*Details:
*Dave Cole and I have been working on the timer methods found in
vtkRenderWindowInteractor. Originally, these methods implicitly assumed
that only one timer at a time was created, and they were only used by
subclasses of vtkInteractorStyle. However, we are beginning to add
widgets (like vtkHoverWidget and vtkBalloonWidget) that depend on
timers. (These widgets perform an action if the mouse pointer does not
move for a certain time and the pointer is over top of a vtkProp. For
example, a text string or caption associated with the vtkProp can be
popped up. Eventually we will have widgets that popup thumbnails and/or
hyperlinks.)
Such widgets require that multiple timers run simultaneously, meaning
that timers must be distinguished by a timer id. Also, the InvokeEvent()
method must provide the timer id associated with the event (e.g.,
vtkCommand::TimerEvent,(void*)&timerId);) so that observers know whether
an event is for them or not.
While the code is fairly straightforward, it is a bit tricky to
simultaneously develop and thoroughly test the code on multiple
platforms (Win32, X, Carbon, Cocoa). We plan on checking the code in
stages starting early Tuesday or Wednesday (I will warn everybody).
Unfortunately there may be some instability while we coordinate our
efforts which we will do our best to avoid. I will give the all clear
once we believe everything is stable.
Note that backward compatibility should be preserved: the old
CreateTimer(timerType)/DestroyTimer(void) methods are being augmented by
new methods that deal with timer ids
(timerId=CreateOneShotTimer(duration);
timerId=CreateRepeatingTimer(duration); ResetTimer(timerId) and
DestroyTimer(timerId)).
Please let me know if you have concerns, suggestions, etc.
Will
More information about the vtk-developers
mailing list