------------------------------------------------------------------------------ This software is provided without support and without any obligation on the part of Silicon Graphics, Inc. to assist in its use, correction, modification or enhancement. There is no guarantee that this software will be included in future software releases. THIS SOFTWARE IS PROVIDED "AS IS" WITH NO WARRANTIES OF ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. In no event will Silicon Graphics, Inc. be liable for any lost revenue or profits or other special, indirect and consequential damages, even if Silicon Graphics, Inc. has been advised of the possibility of such damages. ------------------------------------------------------------------------------ Pulldown Menus In The Popup Planes Using ViewKit ================================================ The Irix 5.2/5.3 API for ViewKit prevents the use of pulldown menus in the popup planes. It is impossible to provide a different colormap/ visual/depth to the call to XmCreatePulldownMenu buried inside of VkSubMenu. This package provides a replacement ViewKit library that provides easy support for putting pulldown menus in the popup planes and that remains API compatible with the Irix 5.2/5.3 version. By statically linking with the new ViewKit library (libvk.a), you can build an application that contains this new capability. How To Enable Pulldown Menus In The Popup Planes ================================================ By default, pulldown menus appear in the normal planes as with the old library. There are three ways to enable pulldowns in the popup planes: 1. Call VkMenu::useOverlayMenus(TRUE) in your application. This will force pulldowns in the popup planes, with no way to put them back in the normal planes without recompiling. 2. Put the resource string "*useOverlayMenus: True" in your application's app-defaults file. This will put pulldowns in the popup planes the default, but allow users to use the normal planes by changing their .Xdefaults file. 3. Ask the user to add the "-useOverlayMenus" switch when they run your application. This will put pulldowns in the normal planes by default, but allow the user to explicitly ask that the popup planes be used. Disadvantages Of Pulldown Menus In The Popup Planes =================================================== Why not put pulldown menus in the popup planes all the time? There are several disadvantages to using the popup planes: 1. The colormap in the popup planes only has three entries. Menus in the popup planes have a different appearance, using fewer colors. If you have items in your menu pulldowns other than labels (e.g. cascade buttons or toggle buttons), they may not look correct in some of the less-common color schemes. 2. Other applications that are using the popup planes at the same time will display in the wrong colors (i.e. colormap flash) when a pulldown menu appears, because the pulldown menu colormap will get installed and replace any previous colormap. 3. When a pulldown menu in the popup plane is torn off, 4Dwm puts the tear-off in the popup planes. The title bar of the window appears with the wrong colors, and as with (2), the window appears with the wrong colors when another application uses the popup planes (e.g. 4Dwm's root-window popup menu). Installing The New ViewKit Library ================================== To install this package on IRIX 5.2 or IRIX 5.3, do the following: su mv /usr/include/Vk/VkMenu.h /usr/include/Vk/VkMenu.h.O cp VkMenu.h /usr/include/Vk/ cp libvk.a /usr/lib/libvk-popup.a There is a test program included in this package to demonstrate the use of pulldown menus in the popup planes. Compile it with: CC -g -o vkmenu vkmenu.c++ -lvk-popup -lvkhelp -lXm -lXt -lX11 Running "vkmenu" shows that the expose counter increments each time a menubar item is selected and dismissed. Running "vkmenu -useOverlayMenus" shows that the expose counter does not change when pulldown menus appear and disappear, since no expose events are generated. Replacing The IRIX ViewKit DSO (Optional) ========================================= Statically linking your application with the new library will make it bigger. One option is to replace the ViewKit DSO (/usr/lib/libvk.so.1) used by all applications with a new version that includes the pulldown enhancement. Some testing has been done with this replacement DSO and it appears to be completely compatible. However, we only recommend replacing your IRIX ViewKit DSO if disk and memory space is at an absolute premium. To replace your IRIX ViewKit DSO and affect the behavior of all applications, do the following: su mv /usr/lib/libvk.so.1 /usr/lib/libvk.so.1.O cp libvk.so.1 /usr/lib/ If you replace your IRIX ViewKit DSO than you can link using "-lvk" as you normally would, instead of using "-lvk-popup". However, any application that calls VkMenu::useOverlayMenus() and that links with "-lvk" will not work on a system that has not had its IRIX ViewKit DSO replaced. Additionally, replacing your IRIX ViewKit DSO will cause applications not to quickstart, and will slow down startup of applications. If you're running IRIX 5.3, you can requickstart your applications after replacing the DSO by running rqsall: su rqsread -f /var/inst/.rqsfiles /usr/lib/libvk.so.1 rqsall -force -o /var/inst/.rqsfiles -update_registry /usr/lib/so_locations /var/inst/.rqsfiles Do "man rqsall" for more details. ----------------------------------------------------------------------- Mike Yang Silicon Graphics Computer Systems mikey@sgi.com 415/390-1786 (voice) http://reality.sgi.com/employees/mikey 415/390-6056 (fax)