[vtk-developers] RE: VTK Widgets redesign

Prabhu Ramachandran prabhu_r at users.sf.net
Tue Sep 6 07:07:23 EDT 2005


>>>>> "Prabhu" == Prabhu Ramachandran <prabhu_r at users.sf.net> writes:

>>>>> "Will" == kitware  <(W.S.)" <kitware at kitware.com>> writes:
    Will> Hi Andrew- At 09:45 PM 9/1/2005, Andrew Maclean wrote:

    >>> 1) I think mediation is going to be a major problem in the
    >>> future. I foresee

    Will> You are absolutely right. Unless we limit the number of
    Will> widgets to one at a time, this is a big problem if we are
    Will> going to create professional apps. Having said that, I am

    Prabhu> Just a thought (perhaps totally useless!).  Doesn't one
    Prabhu> have the same problem with a "window manager"?  You have
    Prabhu> several windows (including a root window) and need to
    Prabhu> interact with all of them easily.  The solution is
    Prabhu> managing the current window's "focus".  This is usually
    Prabhu> done using either a simple "switch focus key" (that has a
    Prabhu> global binding) or a "task bar" or a "window list".  Then
    Prabhu> you can have sloppy-focus, click-to-focus etc.  Can't we
    Prabhu> simply use the same idea for the currently active widget?

Just building on this idea, I think the InteractorStyle should feature
two modes: a navigation mode and a widget mode.  Each mode should have
a different cursor (say a pointer and a hand) and a configurable key
binding (and a member function) to change between the two.  In
navigation mode, you never pick or interact with a widget.  In widget
mode one could bind the TAB key to switch between widgets.  Each
widget could also have a title outline area (like a window title) with
an optional title and with buttons to disable/enable interactivity in
the widget mode.  Pressing the <ChangeActiveWidget> key could bring up
a small text outline with a list of all active (and enabled) widgets.
Alternatively, the focus simply shifts to the "next" available widget
(the current widget always has a clear visible cue to differentiate it
from the others).  Additionally, the interactor style could set the
focus mode in navigator mode to one of sloppy-focus (i.e. mouse over
an object for a specified time to make it the current widget) or
click-to-focus (where one explicitly clicks the widget or its title
handle).  A <WindowListKeyEvent> could generate a "list box" with
numbered shortcut keys that let one set the active widget.  Once a
widget is selected, other widgets will not receive any events.  Thus
there is no need for a special mediator.  Managing widgets is done by
the user using an efficient mechanism that every computer user is
comfortable with.

Perhaps the "widget title" and the "window list" are overkill.  I
would think that just having two modes for the interactor along with a
clear, intuitive and documented mechanism to switch the widget focus
would be enough to handle multiple widgets.

cheers,
prabhu



More information about the vtk-developers mailing list