[ Pobierz całość w formacie PDF ]
.keyword.Some actions are fairly obvious: f.move, f.resize, f.maximize, f.minimize, f.title, f.lower and so on.Some actions are not so obvious: f.separator (displays a line on the menu item),f.circle_up (shuffles window stacking order up), f.circle_down (shuffles window stacking order down).See Table 23.1 for all the features available for you to work with.Table 23.1.Motif menu item descriptions.FunctionDescriptionf.circle_down[icon|window]Shuffles window stacking order down.f.circle_up[icon|window]Shuffles window stacking order up.f.exec or ! [command]Executes command.f.focus_colorSets colormap focus of a client window.f.focus_keySets keyboard input focus to a window or icon.f.goto [x|y]Hops to a different location on the virtual desktop.f.killTerminates a client window.f.lower [-client|within|freeFamily]Lowers a window to the bottom of the stack.f.maximizeMaximizes a window.f.menuAssociates a pull-right menu with the menu pane.f.minimizeMinimizes a window to an icon.f.moveEnables the interactive movement of a window.f.move_constrainedSimilar to f.move but restricts movement of the window to within the boundary of the screen.f.next_cmapChanges the colormap of the current window to the next colormap in the list.f.next_key[icon|window|transient]Sets keyboard focus to the next window/icon.f.nopNo operation.It's a filler only.f.normalizeRestores a window to original size.f.normalize_and_raiseRestores a window to original size and brings to top of stack.f.pack_iconsRearranges the icons on a desktop.f.pan[dx|dy]Pans the view of the virtual canvas.f.pass_keysEnables/disables (toggles) key bindings.f.post_wmenuPosts the window menu.f.prev_cmapChanges the colormap of the current window to the previous colormap in the list.f.prev_key[icon|window|transient]Sets keyboard focus to the previous window or icon.f.quit_mwmTerminates Motif.f.raise[-client|within|freeFamily]Raises a window to the top of the stack.f.raise_lower[within|freeFamily]Raises a window to the top of the stack if it is partially obscured, or lowers it if not at all obscured.f.refreshRedraws all windows.f.refresh_winRedraws only a specific window.f.resizeEnables the interactive sizing of a window.f.restoreRestores the state of an icon/window to its normal state.f.restore_and_raiseRestores and raises a window to the top of the stack.f.restartRestarts mwm.f.screenJumps cursor to a specific screen, or to the next, previous, or last visited screen.f.send_msg message_numberSends a client message.f.separatorDraws a line.f.set_behaviorRestarts Motif, toggling between default or custom behaviors.f.titleNames the menu.f.track_panMoves the canvas interactively.You can get more information from the OSF/Motif Reference book.In my humble opinion, it's dry but informative; the book will supply you with all the information you could possibly want about these commands.Adding Your Own Menu ItemsLet's see about defining your own menu items.The following could be a sample menu item:Menu MyGames{"Kamran Games" f.titleno-label f.separator"Tetris" f.exec "xtetris &""Mahhjong" f.exec "xmahjongg &""Chess" f.exec "xchess &"}The f.title action specifies a heading for the submenu.The f.separator draws a line under the title.The f.exec fires up the command shown in double quotes.Note the ampersand in f.exec for starting these tasks in the background.Do not start a task that may never return and thus hang up your mwm session.Now, you can add this new menu to the root menu by adding the following line in your DefaultRoot-Menu definitions:"Utils" f.menu MyGamesMore on Button and Key BindingsThe key and button bindings work in the same way as menus.The first obvious difference is the extra column with the words icon, frame, window, and root in it.These words force the bindings on the context.The root applies to any location of thepointer on the root window, the frame or window keywords apply binding only when the pointer is in a window or its frame.The icon bindings apply to icons.In your.Xdefaults file, refer to these key bindings for the class Mwm:Mwm*keyBindings: DefaultKeyBindingsHere are some of the descriptions in the key bindings:Shift<Key>Escape window|icon f.post_wmenuAlt<Key>space window|icon f.post_wmenuAlt<Key>Tab root f
[ Pobierz całość w formacie PDF ]