@lay:3218s2

!
! @OSF_COPYRIGHT@
! COPYRIGHT NOTICE
! Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.
! ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for
! the full copyright text.
!
! $XConsortium: system.mwmrc /main/9 1996/10/25 11:45:42 drk $
!
! HISTORY
!

!!
!!  DEFAULT Mwm RESOURCE DESCRIPTION FILE (system.mwmrc)
!!
!!  NOTE: To personalize this file, copy this file before editing it.
!!        Personalize copies of the Mwm resource file typically
!!        reside as:
!!
!!              $HOME/.mwmrc
!!

!!
!! Root Menu Description (this menu must be explicitly posted via f.menu)
!!

Menu DefaultRootMenu
{
        "Root Menu"             f.title
        "New Window"            f.exec "xterm &"
        "Shuffle Up"            f.circle_up
        "Shuffle Down"          f.circle_down
        "Refresh"               f.refresh
        "Pack Icons"            f.pack_icons
!       "Toggle Behavior..."    f.set_behavior
         no-label               f.separator
        "Restart..."            f.restart
        "Quit..."               f.quit_mwm

}

Menu RootMenu_1.1
{
        "Root Menu"             f.title
        "New Window"            f.exec "xterm &"
        "Shuffle Up"            f.circle_up
        "Shuffle Down"          f.circle_down
        "Refresh"               f.refresh
!       "Pack Icons"            f.pack_icons
!       "Toggle Behavior"       f.set_behavior
        no-label                f.separator
        "Restart..."            f.restart
}

!!
!! Default Window Menu Description
!!

Menu DefaultWindowMenu
{
        Restore         _R      Alt<Key>F5      f.restore
        Move            _M      Alt<Key>F7      f.move
        Size            _S      Alt<Key>F8      f.resize
        Minimize        _n      Alt<Key>F9      f.minimize
        Maximize        _x      Alt<Key>F10     f.maximize
        Lower           _L      Alt<Key>F3      f.lower
        no-label                                f.separator
        Close           _C      Alt<Key>F4      f.kill
}

!! Added by John Kacur
Menu MyRootMenu
{
        "My Root Menu"  f.title
        "Netscape"      f.exec  "netscape-communicator &"
        "WordPerfect"   f.exec  "/usr/local/wp/wpbin/xwp &"
        "xmaple"        f.exec  "xmaple &"
        "editors"       f.menu  "EditorsMenu"
        graphics        f.menu  "GraphicsMenu"
        games           f.menu  "GamesMenu"
        viewers         f.menu  "ViewersMenu"
        utilities       f.menu  "UtilityMenu"
        no-label        f.separator
        "lock screen"   f.exec  "xlock -mode random"
        screensaver     f.exec  "sleep 3; xscreensaver-command -activate"
}

Menu EditorsMenu
{
        "Editors"       f.title
        "emacs"         f.exec  "emacs &"
        "nedit"         f.exec  "nedit &"
}

Menu GamesMenu
{
        "Games"         f.title
        "chess"         f.exec  "xboard &"
        "xtetris"       f.exec  "xtetris &"
        "xbill"         f.exec  "xbill &"
}

Menu GraphicsMenu
{
        "Graphics"      f.title
        "Blender"       f.exec  "blender &"
}

Menu ViewersMenu
{
        "Viewers"       f.title
        xview           f.exec  "xv &"
        ghostview       f.exec  "ghostview &"
        "Adobe Acrobat" f.exec  "acroread &"
}

Menu UtilityMenu
{
        "Utilities"     f.title
        xcalculator     f.exec  "xcalc &"
        xclipboard      f.exec  "xclipboard &"
        xman            f.exec  "xman &"
}

!! End of section added by John Kacur

!!
!! Key Binding Description
!!

Keys DefaultKeyBindings
{
        Shift<Key>Escape        window|icon             f.post_wmenu
        Alt<Key>space           window|icon             f.post_wmenu
        Alt<Key>Tab             root|icon|window        f.next_key
        Alt Shift<Key>Tab       root|icon|window        f.prev_key
        Alt<Key>Escape          root|icon|window        f.circle_down
        Alt Shift<Key>Escape    root|icon|window        f.circle_up
        Alt Shift Ctrl<Key>exclam root|icon|window      f.set_behavior
        Alt<Key>F6              window                  f.next_key transient
        Alt Shift<Key>F6        window                  f.prev_key transient
        Shift<Key>F10           icon                    f.post_wmenu
!       Alt Shift<Key>Delete    root|icon|window        f.restart
}

!!
!! Button Binding Description(s)
!!

Buttons DefaultButtonBindings
{
        <Btn1Down>      root            f.menu  MyRootMenu
        <Btn1Down>      icon|frame      f.raise
        <Btn3Down>      icon|frame      f.post_wmenu
        <Btn3Down>      root            f.menu  DefaultRootMenu
}

Buttons ExplicitButtonBindings
{
        <Btn1Down>      frame|icon      f.raise
        <Btn3Down>      frame|icon      f.post_wmenu
        <Btn3Down>      root            f.menu  DefaultRootMenu
!       <Btn1Up>        icon            f.restore
        Alt<Btn1Down>   window|icon     f.lower
!       Alt<Btn2Down>   window|icon     f.resize
!       Alt<Btn3Down>   window|icon     f.move

}

Buttons PointerButtonBindings
{
        <Btn1Down>      frame|icon      f.raise
        <Btn3Down>      frame|icon      f.post_wmenu
        <Btn3Down>      root            f.menu  DefaultRootMenu
        <Btn1Down>      window          f.raise
!       <Btn1Up>        icon            f.restore
        Alt<Btn1Down>   window|icon     f.lower
!       Alt<Btn2Down>   window|icon     f.resize
!       Alt<Btn3Down>   window|icon     f.move
}

!!
!!  END OF mwm RESOURCE DESCRIPTION FILE
!!

	
 	In the Buttons DefaultButtonBindings, I<\#146>ve added the line
<Btn1Down>      root            f.menu  MyRootMenu
Which means clicking mouse button one in the root window activates the menu
called MyRootMenu.
	Take a look at Menu MyRootMenu. The general form is
Menu menu_name
{
	item1 [mnemonic] [accelerator] function [argument]
	item2 [mnemonic] [accelerator] function [argument]
}
