|
|
Using the X Window System > Chapter 7 The Window ManagerManaging Window Manager Menus |
|
The OSF/Motif Window Manager menus are defined by a text file in /usr/lib/X11 called system.mwmrc, unless you have a file in your home directory called .mwmrc. You can add or delete menus and menu selections by copying system.mwmrc to your home directory as .mwmrc and modifying it to suit your needs. The OSF/Motif Window Manager comes with two default menus: The default window menu is built into mwm. For reference, a copy of its contents are placed in .mwmrc.
By default, the window menu displays when you do the following operations:
The windowMenu resource must be set in order to replace the DefaultWindowMenu with a different menu. The default root menu is specified in the same files by the following lines:
By default, the root menu displays when you press button 3 on the root window. You can modify either menu to suit the specific needs of your application; however, for the sake of the consistency of window operation, it's usually better to modify the root menu and keep the window menu the same. All window manager menus, regardless of the mechanism that calls them to the screen, have the same syntax.
Each line identifies a selection name followed by the function to be done if that selection is chosen. The order of the selections is the order of their appearance when you display the menu. A selection name may be either a character string or a bitmap. The f.title function creates a menu title, and automatically places a separator above and below the title.
Most contexts and devices are valid for most functions. Occasionally, a context or device doesn't make sense for a particular function. Any selection that uses an invalid context, an invalid function, or a function that doesn't apply to the current context is grayed out. The following table lists the valid functions, contexts, and devices. Table 7-17 Valid Window Manager Functions
The windowMenu resource lets you change the menu displayed when you press button 1 on the window menu button. For example, you would place the following line in your personal resource specifications to associate a menu named EditMenu with an hpterm window started as hpterm -name hp850.
|
|