[Paraview-developers] PV widgets cleanup
Berk Geveci
berk.geveci at kitware.com
Fri Nov 5 13:39:47 EST 2004
On Monday, I will commit quite a few changes to paraview, mostly to
cleanup some vtkPVWidget and sub-classes. In future, please keep the
following in mind when developing/changing paraview widgets:
1. Initialize() is called once after the widget is created (cloned) and
is responsible of anything that is done once at the beginning. For
example, vtkPVInputMenu connects the current source as input in
Initialize().
2. Reset() is called when the user clicks on Reset or when a source is
selected ONLY if the widget has been modified (ModifiedFlag = 1).
Reset() is not called when the widget is created. If Initialize() and
Reset() has common code, it might be convenient to move it to another
method.
3. Accept() is called when user clicks Accept (or when a widget changes
if auto-accept is on) ONLY if the widget has been modified (ModifiedFlag
= 1). Accept() should reset ModifiedFlag to 0. Accept() should also call
Trace().
4. Select()/Deselect() are called when the source is selected/deselected
and should do things like turning visibility of a 3d widget on/off or
updating a menu.
Let me know if you run into strange widget behavior, specially when 3d
widgets are concerned.
-Berk
More information about the Paraview-developers
mailing list