NAME

Mwm - Communicate with the Motif(tm) window manager.

SYNOPSIS

$toplevel->MwmOption?(args)?

DESCRIPTION

COMMAND OPTIONS

$toplevel->MwmDecoration?(?option?=>?value? ?...?)?

When no options are given, this command returns the values of all the decorations options for the toplevel window with the $widget. When only one option is given without specifying the value, the current value of that option is returned. When more than one "option value" pairs are passed to this command, the specified values will be assigned to the corresponding options. As a result, the appearance of the Motif decorations around the toplevel window will be changed. Possible options are: -border, -menu, -maximize, -minimize, -resizeh and -title. The value must be a Boolean value. The values returned by this command are undefined when the window is not managed by mwm.

$toplevel->MwmIsmwmrunning

This returns true if mwm is running on the screen where the specified window is located, false otherwise.

$toplevel->MwmProtocol

When no additional options are given, this command returns all protocols associated with this toplevel window.

$toplevel->MwmProtocol(activate => protocol_name)

Activate the mwm protocol message in mwm's menu.

$toplevel->MwmProtocol(add => protocol_name,"menu_message")

Add a new mwm protocol message for this toplevel window. The message is identified by the string name specified in protocol_name. A menu item will be added into mwm's menu as specified by menu_message. Once a new mwm protocol message is added to a toplevel, it can be catched by the TK wm protocol command. Here is an example:

$mw->MwmProtocol(add => 'MY_PRINT_HELLO', '"Print Hello" _H Ctrl<Key>H'); $mw->protocol(MY_PRINT_HELLO => sub {print "Hello"});

$toplevel->MwmProtocol(deactivate => protocol_name)

Deactivate the mwm protocol message in mwm's menu.

$toplevel->MwmProtocol(delete => protocol_name)

Delete the mwm protocol message from mwm's menu. Please note that the window manager protocol handler associated with this protocol (by the wm protocol command) is not deleted automatically. You have to delete the protocol handle explicitly. E.g.:

$mw->MwmProtocol(delete => 'MY_PRINT_HELLO'); $mw->protocol(MY_PRINT_HELLO => '');

BUGS

This is a Tix extension which perl/Tk has adopted. It has not been tested as perl/Tk's author has not got round to installing a Motif Window Manager.

On some versions of Mwm, the -border will not disappear unless -resizeh is turned off. Also, the -title will not disappear unless all of -title, -menu, -maximize and -minimize are turned off.

AUTHOR

Ioi Kim Lam - ioi@graphics.cis.upenn.edu

KEYWORDS

TIX