🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.x
Article #38443

Re: new free widget library

#38443
From: Joseph H Allen
Date: Wed, 12 Mar 1997 00:00
67 lines
4991 bytes
In article <slrn5ibokq.usg.jtotland@jospc.hjemme.no>,
Jo Totland <jtotland@online.no> wrote:
>In article <E6vBxI.MtG@world.std.com>, Joseph H Allen wrote:
>>I'm close to completing a new free-ware widget library for X. 

>When can we have a look at it. I'd really like to try it out. It
>seems you have got most things right from what you write...

I'm finishing the first application which will use it tonight.  This is a
shipping planner for a wholesale company and basically works like a drag &
drop file manager (lists of orders or sub-lists correspond to files and
directories).  This was a good exercise: I discovered and fixed lots of bugs
while getting this application to work.

Anyway, I need to write more documentation for it and do a few more last
minute changes and bug fixes before I can release it.  No matter what state
it is in, I'm going to put it on the ftp site next friday.  I really need to
release it, otherwise I'll twiddle with it forever.

>Menus should work like windows (aggh!) in one other respect too; the
>Meta-key should highlight the menu-bar, and then you can use the
>arrow-keys or accelerators to navigate the menus. Of course the
>library shouldn't enforce it, but it should make the default, like
>it is in windows, and it should be very easy for the programmer to
>program it. It's hard to implement, but it will be worth it. Most
>X-widget-sets seems to neglect the fact that a GUI doesn't
>necessearily imply a MUI (mouse-user-interface).

I agree with this completely and arrow keys do work with the menus now. 
They work as in Windows: you can use either the arrow keys or tab/back-tab
to focus on to an item in the menu bar (actually there is nothing special
about the menu bar- it just contains cascade buttons which the focus manager
will see).  Then you can hit return or space to open the menu (which
simulates left-clicking on the focused button).  Once a menu is open, right
& left arrow keys open the menu to the right or left of the current one. 
ESC can be used to close the current menu.  Normal buttons, toggle buttons,
graphic separators, cascade buttons or anything else can be in a menu. 
Cascade buttons are used to open sub-menus.  The left and right arrow keys
also work in sub-menus: they open the main menu to the left or right of the
current tree.

When you're using the menus with the hold-the-mouse-button-down-method, the
mouse pointer will open any cascade button it points to (and close any open
menu up to that point in the hierarchy before doing so). Currently there is
no delay before opening a submenu this way (this might be added for the
first release).  Yes, this code was confusing to write (for example, you
have to switch back and fourth between greedy and non-greedy grabs depending
on whether or not the mouse button is down).

The thing with the Alt key is a matter for the application program or
perhaps the resource-manager.  It is enabling or disabling the tab manager
(and if the tab manager is enabled, it steals keys which would otherwise go
to the top-level window).  I should probably pick a standard key to this by
default so that the main application can't forget about it.  I might use ESC
instead of Alt.

I do not have accelerator-keys / resource-bindings / hot-keys or whatever
you want to call them.  I haven't yet made a clean seperation between what I
think Motif calls actions (which resource bindings refer to) and regular
events.  Keyboard processing is basically ad-hoc.  This should not be too
hard to fix, but it won't be ready for the first release.
-- 
/*  jhallen@world.std.com (192.74.137.5) */               /* Joseph H. Allen */
int a[1817];main(z,p,q,r){for(p=80;q+p-80;p-=2*a[p])for(z=9;z--;)q=3&(r=time(0)
+r*57)/7,q=q?q-1?q-2?1-p%79?-1:0:p%79-77?1:0:p<1659?79:0:p>158?-79:0,q?!a[p+q*2
]?a[p+=a[p+=q]=q]=q:0:0;for(;q++-1817;)printf(q%79?"%c":"%c\n"," #"[!a[q-1]]);}
Technical Details
Message-ID: <E6x60t.343@world.std.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <E6vBxI.MtG@world.std.com> <slrn5ibokq.usg.jtotland@jospc.hjemme.no>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1103af,a8c746231dfc1302
X-Google-Attributes: gid1103af,public
X-Google-Thread: 103734,a8c746231dfc1302
X-Google-Attributes: gid103734,public
X-Google-Thread: 1108a1,a8c746231dfc1302
X-Google-Attributes: gid1108a1,public
X-Google-Thread: f6356,a8c746231dfc1302
X-Google-Attributes: gidf6356,public
X-Google-Thread: 108717,a8c746231dfc1302
X-Google-Attributes: gid108717,public
X-Google-Thread: 107393,a8c746231dfc1302
X-Google-Attributes: gid107393,public
X-Google-Thread: 1025b4,a8c746231dfc1302
X-Google-Attributes: gid1025b4,public
From: jhallen@world.std.com (Joseph H Allen)
Subject: Re: new free widget library
Date: 1997/03/12
Message-ID: <E6x60t.343@world.std.com>
X-Deja-AN: 224876533
References: <E6vBxI.MtG@world.std.com> <slrn5ibokq.usg.jtotland@jospc.hjemme.no>
Organization: The World Public Access UNIX, Brookline, MA
Newsgroups: comp.windows.x,comp.unix.user-friendly,comp.os.linux.misc,comp.editors,comp.programming,comp.object,gnu.misc.discuss