Solaris Common Desktop Environment: Advanced User's and System Administrator's Guide

Workspace Manager Menus

Workspace Manager has three default menus:

Workspace menu--also called the root menu. Displayed when the user presses mouse button 3 when the pointer is on the backdrop. The menu is associated with the mouse button through a button binding.

Window menu--the menu displayed when the user presses mouse button 1 or mouse button 3 when the pointer is on the Window menu button (upper left corner of the window frame). The menu is associated with the button by the windowMenu resource.

Front Panel menu--the menu displayed when the user presses mouse button 1 or mouse button 3 when the pointer is over the Front Panel's Window menu button.

Workspace Manager Menu Syntax

Workspace Manager menus have the syntax:

Menu MenuName
 {
    selection1 [mnemonic] [accelerator] function [argument]
    selection2 [mnemonic] [accelerator] function [argument]
    ...
 }

where:

selection--the text or bitmap that appears on the menu. If the text includes spaces, enclose the text in quotation marks. For bitmaps, use the syntax @/path.

mnemonic--a single character that acts as a keyboard shortcut when the menu is displayed. It is specified in the form _character.

accelerator--a keyboard shortcut that is active whether or not the menu is displayed. Accelerators have the syntax modifier<Key> Keyname where modifier is Ctrl , Shift, Alt (Extend char), or Lock. For a list of all possible key names, refer to the keysymdef.h file in your "X11 include" directory.

function--the function to be performed when this selection is made. Refer to the dtwmrc(4) man page for a list of functions.

argument--function arguments. Refer to the dtwmrc(4) man page for more details.

For example, the following menu item labeled Restore normalizes the window. When the menu is displayed, typing "R" will also restore the window. Pressing Extend char F5 will also restore the window.

Restore   _R   Alt<Key> F5   f.normalize

Note -

For complete information on Workspace Manager menu syntax, see the dtwmrc(4) man page.


To Modify the Existing Workspace (Root) Menu

  1. Open the appropriate file for editing:

  2. Edit the description of the Workspace menu.

    The default Workspace menu is named DtRootMenu.

    	Menu DtRootMenu
     	{
       	  "Workspace Menu"                    f.title
       	  "Shuffle Up"                        f.circle_up
       	  "Shuffle Down"                      f.circle_down
       	  ...
     	}

To Create a New Workspace (Root) Menu

  1. Open the appropriate file for editing:

  2. Create the new menu:

    	Menu menu_name
     	{
     	        ...
     	}

    See "Workspace Manager Menu Syntax".

  3. Create or edit the button binding to display the new menu.

    If the menu replaces the existing menu, edit the button binding that displays the Workspace menu.

    	<Btn3Down> root  f.menu  menu_name
    

    If the menu is an additional menu, create a new mouse button binding. For example, the following button binding displays the menu when Shift-mouse button 3 is pressed over the backdrop:

    	Shift<Btn3Down> root  f.menu  menu_name
    
  4. Choose Restart Workspace Manager from the Workspace menu.

To Create a New Window Menu


Note -

The Window menu is built into the Workspace Manager, and ordinarily is not customized. To keep window behavior consistent between applications, you should avoid extensive modification to the Window menu.


  1. Open the appropriate file for editing:

  2. Create the new menu:

    	Menu menu_name
     	{
     	        ...
     	}
  3. Use the windowMenu resource to specify the new menu:

    	Dtwm*windowMenu: menu_name
    
  4. Choose Restart Workspace Manager from the Workspace menu.