[vtk-developers] ARB - feature addition

John Biddiscombe john.biddiscombe at mirada-solutions.com
Fri Dec 12 07:48:21 EST 2003


> Be careful here. We do not want any dependencies in the C++ 
> code on any 
> external GUI. The best we can do is set up a sequence of 
> event invocations 
> that we can later connect to a GUI. For example, select a 
> handle which 
> invokes an event (e.g., SetPropertiesEvent). That event in 
> turn can be 
> caught to create the GUI and eventually set the appropriate 
> properties.

Exactly. The click triggers an event. The user is responsible for "doing
something" during the vent and currently the widgets expects that a "RGB
value" will be set on the method SetPickedRGBColur (or whatever I called
it when I did it).

However, as widgets get more advanced I can see that some more abstract
GUI/Widget interface should be created which allows some degree of
standardization of these types of events. Note that currently there are
"naughty" things like cursor shape changes handled in interactors which
(despite being nice) I feel have been stuck in without a good "API"
being considered. A cursor change is as significant as a dialog box in
some respects and perhaps some kind of interface like

Class vtkGuiEventManager {
  static PerformColourDialog(...)
  Static PerformCursorChange(...)
  Static PerformFontSelection
}

Do you see where I'm going?

By default, these methods would simply return, but if plugged in Gui's
were to override the events triggered, we'd be able to simply create a
tcl/java/c++ interface fopr them and have a reasonable level od
consistency.

I encourage feedback on this one.

JB



More information about the vtk-developers mailing list