[comp.windows.x] Simple mouse/menu access

jesup@cbmvax.UUCP (Randell Jesup) (08/22/88)

In article <5613@ihlpf.ATT.COM> warren@ihlpf.ATT.COM (Montgomery) writes:
>  My appliction would like to use the mouse for
>pointing and menues, and take explicit control of a scrollbar if
>provided, but would otherwise like to treat the screen like a
>terminal.  Most windowing systems seem to offer me the choice of
>running my application under a terminal emulator (e.g. xterm,
>shelltool) that provides no access to the mouse and no control of
>the scrollbar, or running directly on the windowing system, which
>requires that I explicitly paint the screen using calls to the
>windowing library instead of escape sequences and usually requires
>that my application be re-structured to be event driven, which isn't
>very natural for it.  What I'd really like is:

	This has been thought of before, in the Amiga OS.  The console
device (that is attached to windows optionally) is essentially an ANSI
3.64 terminal emulator.  It also has additional escape sequences that allow
you to turn on things such as mouse buttons reporting, mouse position, 
window resizing, etc.  While not every thing can be done through this,
it allows most of what you're looking for.

>Changes in the mouse buttons reported via escape sequences in the
>same input stream as the keyboard.  Mouse position either reported
>with the button events or available via a function call.

	Available.

>Some way of presenting menues, either by specifying in advance that
>a certain button is for menues, giving a menu, and having the
>selection reported in the input stream, or by having some function
>that puts up a menu and returns a selection invokable after a mouse
>push.

	Menu numbers are returned when a menu is selected.  Intuition
(the windowing system) calls for setting/clearing menustrips can be used
with this.

>Explicit control over any scrollbars, either through an escape
>sequence that controls where the bar is displayed or through a
>function call that does it.  Mouse pushes in the scroll bar would be
>reported in the same way as other mouse pushes, perhaps with
>different encoding.

	Scrollbars are not currently directly part of the user interface.
Proportional gadgets (with x and/or y freedom, and either automatic knobs
(% of width/height) or custom images are part of the OS, and can be reported
via the console.device.  Also requesters that pop up will send set/clear
messages, and disks inserted/removed will send messages (though it doesn't
identify which disk at this time).  There is also a timer entry, I think you
can get 1/10 sec messages there.  All messages are timestamped in secs and
microsecs, and include modifier key/button states.
	
>The closest thing I have seen to this is the windowing system on the
>Unix PC, which can be set up to report mouse events the way I'd like
>and provides the ability to put up a menu, but I have yet to see
>comparable things for X, News, or Sunview.  Any suggestions?

-- 
Randell Jesup, Commodore Engineering {uunet|rutgers|allegra}!cbmvax!jesup