dfr@CAD.USNA.MIL ("David F. Rogers") (06/02/89)
G'day, We are having a number of small problems with pop-up menus and the mouse buttons. 1. If we lay the window out with fixed locations for menu items ala MENU1 MENU2 MENU3 ..... and use the x & y locations of the cursor along with the LEFT mouse button to pop up the appropriate menu, it is necessary to use the RIGHT mouse button to select the individual item from the menu. Both the LEFT and RIGHT mouse pull the cursor down the menu list. We would much prefer to use the LEFT mouse button to both pop-up the menu and select the individual item. 2. For various reasons we prefer to use direct calls to mouse functions rather than queing the mouse. That works ok with the LEFT mouse button. However, the RIGHT mouse button appears to be `permanently' attached to the window manager, it pops up the window menu, as well as the MIDDLE button, which moves the window. In order to detach these functions we presently have to que both buttons. Anyone know how to detach them from the window manager while in direct mode? Please note: We are not interested in a discussion of qued verses direct device calls, nor in alternate ways to do the menus. Thanks in advance Dave Rogers
blbates@AERO4.LARC.NASA.GOV ("Brent L. Bates TAD/TAB ms294 x42854") (06/03/89)
On the 3000's there is a file /usr/lib/gl2/mexrc which sets the default configuration of the window manager. Below is a copy of the one on our machine: #include <device.h> bindfunc pop LEFTMOUSE bindfunc movegrow MIDDLEMOUSE bindfunc menu RIGHTMOUSE bindindex inborder 7 bindindex hiinborder 7 bindindex titletextin 4 bindindex titletextout 4 bindindex hititletextin 4 bindindex hititletextout 4 bindindex hioutborder 1 bindindex outborder 0 bindcolor menu 10 10 10 bindcolor menuback 220 220 220 bindcolor cursor 255 0 0 As you can see the RIGHTMOUSE button is bound to the menu function. I have a .mexrc file in my home directory to change the defaults. One line I have added is: bindfunc hogwhiledown 13 This allows me to use the RIGHTMOUSE button in a program without having the MEX menu come up. If I want the MEX menu, while in the program, I hold down key 13 (NO SCRL) and that gives me the MEX menu functions. If you have a 3000, I suggest reading the section on customizing MEX, its in IRIS User's Guide Volume I, Programming Guide, Version 4.0, the Window Manager Section 4., pages W-47 thru W-55. I think this should solve your problems. I imagine if you have a 4D, that it may work in a similar fashion. If it doesn't, would someone please correct me. -- Brent L. Bates NASA-Langley Research Center M.S. 294 Hampton, Virginia 23665-5225 (804) 864-2854 E-mail: blbates@aero4.larc.nasa.gov or blbates@aero2.larc.nasa.gov
goss@SNOW-WHITE.MERIT-TECH.COM (Mike Goss) (06/03/89)
Regarding the message from David F. Rogers "Menus and mouse buttons": > 2. For various reasons we prefer to use direct calls to mouse functions > rather than queing the mouse. That works ok with the LEFT mouse button. > However, the RIGHT mouse button appears to be `permanently' attached > to the window manager, it pops up the window menu, as well as the > MIDDLE button, which moves the window. In order to detach these > functions we presently have to que both buttons. Anyone know how to > detach them from the window manager while in direct mode? You can queue both buttons, and then ignore the queue and access the buttons directly. This will keep the window manager out of your way. Mike Goss, Merit Technology Inc.