[comp.windows.x] Random toolkit issues

Christian.Molick@CS.CMU.EDU (07/27/90)

In the Athaena and Motif toolkits, buttons that perform some simple
action when pressed and widgets that maintain a state and toggle
when pressed are two very different widgets. Is this really such a
good idea, though? The only really big difference between these
seems to be that toggle widgets have radio group code included with
them, but this seems like more than people need for their toggle widgets.
Personally, it seems like a better choice to make a button widget
that has the option of toggling and a radio button widget that can
be radio grouped with others. Comments?

I have had only very limited contact with the Motif toolkit, but the use
of managers and gadgets seems to be a very usefull. Is there any
chance that future Athaena toolkit releases might include similiar
options?

Finally, "3D" look and feel seems to be really popular in toolkits these
days, but do these toolkits really support a 3D analogy? The Motif
style guide, if I remember, said something about pressable objects
being differentiated from nonpressable objects by a raised edge. If
this is the case, then how come Motif menus show raised edges only
when individual items are selected? Wouldn't it make more sense to
have all selectable/pressable items throughout the interface be indicated
by a raised edge, then use a highlighting mechanism to call attention
to armed/highlighted buttons. Furthermore, if 3D is the thing, then
wouldn't it be nicer to highlight buttons with a  lowered surrounding
area, as the default buttons in Motif dialog boxes? This would give
even the highlighting a 3D look without having to start buttons and
menu objects flush like unselectable labels. Items could then become
unselectable by not having raised edges, and the default selections
could be differentiated by having borders of varying thickness,
making them appear as larger buttons.

Come to think of it, aren't most look and feel issues independant
enough from code that you could start of with a simple/primitive widget
that knows how to draw itself given foreground and background
colors and a border width. This widget would have highlighting and
selection actions built in so that you could use different versions
depending on your own look and feel preferences. Hmm.

Anyway, I was just having some general thoughts on toolkit issues
and thought I'd throw them into the fray for consideration. (Please
don't flame me or anything!)

ChristianM

ben@hpcvlx.cv.hp.com (Benjamin Ellsworth) (07/31/90)

> ... The Motif style guide, if I remember, said something about
> pressable objects being differentiated from nonpressable objects by a
> raised edge. If this is the case, then how come Motif menus show
> raised edges only when individual items are selected?

Look more closely at the display.  The RowColumn widget does indeed
draw a shadow around the entire menu (unless you turn it off).

> Wouldn't it make more sense to have all selectable/pressable items
> throughout the interface be indicated

The highlight is the further shadow drawing by each button as it gets
the focus.

> ...
> Come to think of it, aren't most look and feel issues independant
> enough from code that you could start of with a simple/primitive
> widget that knows how to draw itself given foreground and background
> colors and a border width. This widget would have highlighting and
> selection actions built in so that you could use different versions
> depending on your own look and feel preferences. Hmm.

Try it.  I think that you'll be surprised at how difficult it becomes
to do this for a non-trivial widget set.  It ends up that the
description of *how* a component does something is very tightly bound
up in our ability to describe *what* is being done.  Don't dismay,
however, if you can find a simple, elegant way to separate behavior
from look which can be easily captured by a consistent API, you have a
viable PhD. thesis and probably a shot at a lucrative software licence
or two.  8-)

-----------------------------------------------------------------------
Benjamin Ellsworth      | ben@cv.hp.com                | INTERNET
Hewlett-Packard Company | {backbone}!hplabs!hp-pcd!ben | UUCP
1000 N.E. Circle        | (USA) (503) 750-4980         | FAX
Corvallis, OR 97330     | (USA) (503) 757-2000         | VOICE
-----------------------------------------------------------------------
                     All relevant disclaimers apply.
-----------------------------------------------------------------------