CLIM mail archive

[Prev][Next][Index][Thread]

clim 2.0.beta: menu-choose



    Date: Mon, 23 Nov 1992 10:19 EST
    From: Jeff Morrill <jmorrill@BBN.COM>

    I have previously complained about menu-choose privately to Franz, but
    now that I have the Motif style guide, I can see that there are issues
    here of general importance.  Perhaps those of you who have experience
    programming with other GUIs can expand on this theme.

    In Motif there are two aspects of a menu that control the behavior of
    the menu (see Chap. 3 of the Style Guide):

    1.  pull-down vs. pop-up.  The general behavior Motif wants to promote is
    that (1) Press exposes the menu and (2) Release chooses a menu item.
    So if you Press-Right to expose the menu, then Release-Right should
    choose something (pop-up menu).  And if you Press-Left to expose the
    menu, then Release-Left should choose something (pull-down menu).
    As it stands, menu-choose is always the pop-up variety, there seems to
    be no way to get a pull-down type.  It would be nice if there was an
    extra argument to menu-choose to specify the correct behavior.

I agree that a new argument to MENU-CHOOSE is needed.

    Also, there is a bug that sometimes occurs.  If the menu is not exposed
    promptly, intervening Release-Right events get "thrown away".  Therefore
    if the user gets tired waiting and releases the mouse, they eventually
    get a menu anyway and it does not go away until a second Release-Right
    event occurs.  This can be rather unintuitive behavior.

The problem is that CLIM distributes the release event to the sheet
that is under the pointer.  I'm not sure exactly how to get the event
distribution to do anything besides that.

    2.  spring-loaded vs. posted.  A spring-loaded menu must be removed when
    the button that exposed it is released.  A posted menu remains until the
    user explicitly removes it.

    Because of the problem #1 above, menu-choose menus appear to be posted
    when they are in fact spring-loaded and merely waiting for a Release-Right
    event.  I conclude this because the only way to "unpost" the menu is to
    provide a release-right event.  But Motif specifies that in a posted
    menu, Left and Right should both behave identically.  

Now you are talking about what the Motif port should do with menus.
CLIM 2.0 has a generic function called FRAME-MANAGER-MENU-CHOOSE, which
is invoked by MENU-CHOOSE.  The frame manager gets to decide whether it
can use the "native" menus provided by the toolkit.  I would say that,
when the Motif version of FRAME-MANAGER-MENU-CHOOSE can use a Motif
menu, then the correct behavior should happen as a matter of course.

Are you saying that you get old, CLIM 1.1-style menus instead of Motif
menus?  I can certainly believe that...

							  Furthermore, it is the
    Press event that activates a menu item rather than Release.

If you are talking about a CLIM 1.1-style menu, then yes, a button press
activates the menu item.  This is a look-and-feel issue that I have to
stand by, since the only time these kind of menus will be used with any
regularity is under Genera, and I would prefer to maintain the Genera
look-and-feel when under Genera.

    I would argue that menu-choose should utilize the "posted" variety by
    default, but that the spring-loaded variety should be available via some 
    keyword to menu-choose.

I agree that another argument to MENU-CHOOSE is warranted.

    I suspect that there are similar issues in other GUIs, and that the
    specification of menu-choose is overly biased in favor of its Dynamic
    Windows heritage.

MENU-CHOOSE should be invoking the frame manager's method for bringing
up a menu, so the "fault" lies with the implementation on any particular
port.  The "default" method for FRAME-MANAGER-MENU-CHOOSE will remain
beholden to Dynamic Windows, but the other methods can implement
something much better than that.

Note that there is one other small problem here, which is that there are
one or two places within CLIM that call MENU-CHOOSE-FROM-DRAWER directly,
which subverts the use of FRAME-MANAGER-MENU-CHOOSE.  Chris and I are
figuring out how to ensure that all of CLIM only ever uses MENU-CHOOSE,
so that the right thing always just happens.

0,,

Follow-Ups: References:

Main Index | Thread Index