[comp.sys.atari.st] Menu control for the ST

franco@iuvax.cs.indiana.edu (01/04/88)

Here is a program that solves the problem of unwanted menu dropping when the 
mouse is accidentally moved to the menu bar.  Put the program in the AUTO
folder.  After booting you should notice that you cannot move the mouse above
the menu bar with any button released or with any button pressed starting from
any point below the menu bar.  However, if you move the mouse to the bottom 
of the menu bar with the left button released and then apply upward movement 
to the mouse while pressing the left button you will move the mouse into the 
menu bar (and drop a menu if one is right under the mouse position).  From 
there two modes of operation are possible:  for Atari mode release the left 
button - this gives menu control exactly as packaged by Atari.  In Atari mode
you can move the mouse all over the screen dropping menus all over the place 
until you click on a menu item (in which case the item is selected) or click 
off the menu (in which case the menu pops up with no action taken).  For Mac 
mode keep the left button pressed then move the mouse down the menu of your 
choice until you find the desired item to selected - then release the button 
to select that item.  If you release the button while the mouse is off the
dropped menu then no action will be taken and the dropped menu will pop back 
up.

The problems:

  Atari mode:  I do not know of any

  Mac mode:    Can be fooled in the following two ways:
    
     1.  Bring the mouse right up to the bottom of the menu bar.
         With the slightest upward movement possible, press the
         left button - when you see the menu bar drop, stop all mouse
         movement.  Then, while continuing to hold down the left button,
         move the mouse sharply down.  The result: the menu will pop back up
         and the first item will be selected.

     2.  Move the mouse to the menu bar with upward-movement-while-pressing
         but not over a menu position.  When the mouse is moved over a menu
         the menu will not drop.

To work in Mac mode (as I always do) and not let the problems above affect
you, a) give a little extra upward movement while pressing the left button
(actually it is hard to avoid doing this), and b) if a menu fails to drop,
either use Atari mode or release then press the button for Mac mode.  I will
be grateful to the person that posts a program which solves these problems.

Acknowledgement:  This program is based on previous work by David Small and
                  Brent McKim.

						John Franco
						Bloomington, IN
 						franco@iuvax.cs.indiana.edu

The code below was tested only using a monochrome monitor.  However, I see no
reason why it should not work using a color monitor.  The code below was
UUENCODED using the encoder that currently resides on our VAX.

---------------------------cut here------------------------------------
begin 644 mac.prg
M8!H```-```````````````'X`````````````#\\`'].3M_\`````I'\````
M`B/(````]$AY````=C\\`"9.3M_\````!C\\``1.3M_\`````@Q```)F$C/\
M`!(```#P,_P`$P```/)@$#/\``H```#P,_P`"P```/(@;P`$("@`#-"\```!
M`$*G+P`_/``Q3D%!^0```((AR`"X3G4B>`2B,!\S`",?2.$?'R')!*((```-
M9@).;R!Y````]#`?L%AL-@Q```!F'`Q7``%F%B9O``8L?````S@LBT?Y````
M^"]+``;E2"`P```@0&H"(%`J?`````!.D")X!*),V?CX+QD_&2')!*).<P``
M````````2C@GYV8``C@O`"\!##D``````SUO```D##D``@```SUO```&")``
M`1%\`````@0Y``$```,]8``"`C`X)N(2*``"2('2>";BL'D```#R;@``L&<`
M`""R>0```/!N``"0"!```6<``'03_``!```#/F```<@,.0`````#/&X``;RR
M>0```/)N``%NLGP``&\``"8($``!9@``#A/\``````,^8```B@PY``$```,^
M9P``?F```0X($``!9@``#A/\``````,^8```9@PY``$```,^9P``6F```.H3
M_``"```#/!/\``````,^8``!3@@0``%GYA/\``$```,^8``!/+)Y````\&X`
M`.ZR?```;P``9`@0``%F```P$_P``````SX,.0`"```#/&<``0X3_``````#
M/#`Y````\I!X)N(10``"8```]`PY``````,\9@``#!/\``$```,^8-`3_``!
M```#/@PY``$```,\9P``RF"Z"!```68``"@3_``````#/@PY``(```,\9P``
M!&"<,#P``9!X)N(10``"8```F@PY``$```,\9^8,.0`"```#/&?<$_P``0``
M`SY@`/]N,#@FXI!Y````\-!\``9&0!%```(3_``!```#/`B0``$3_``#```#
M/1/\``$```,^8```1@@0``%G```B$_P``0```SX,.0`"```#/&T``"H3_```
M```#/&```!X3_``````#/@PY``$```,\9@``"A/\``````,\(A\@'T[Y$C16
M>`````!G;V9O<FET`((``````'1R87`Q-'1A@@````#T<V5T;7ET<F&"````
M`'9N;W1M;VYO`((`````3FUE;G5Y````@@````#P;65N=7EY``""`````/)T
M97)M`````((`````7FUY=')A<#$T@@````""<W5P97)M;V2"`````)QD;VYE
M`````((`````WF1O:70`````@@````#*:&5R90````""`````S9D;VET7W1O
M:8(`````^&1I<F5C=```@@````#6=')Y``````""`````SU!5````````((`
M```!,E14````````@@````$@;&5A=F4```""`````S)",0```````((````!
M^$(R,```````@@````%L0C(```````""`````>9",P```````((````!TF)U
M='1O;@``@@````,^;65N=0````""`````SQ"-````````((````"[D(R-0``
M````@@````&N0C(W``````""`````9Y".````````((````")D(Q,```````
M@@````*Z0C(X``````""`````<)"-0```````((````";$(V````````@@``
M``)`0C(Q``````""`````E9".0```````((````"FD(Q,@``````@@````**
M0C$Q``````""`````Q8````4!B8("@@>)AP(1@P6&`X4#`H<#!@,$`@2"AP(
6#`84#`H(%@@>"@H.$@P(%`@,#`@,``@>
`
end