mwm.html
来自「perl教程」· HTML 代码 · 共 167 行
HTML
167 行
<?xml version="1.0" ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<!-- saved from url=(0017)http://localhost/ -->
<script language="JavaScript" src="../../displayToc.js"></script>
<script language="JavaScript" src="../../tocParas.js"></script>
<script language="JavaScript" src="../../tocTab.js"></script>
<link rel="stylesheet" type="text/css" href="../../scineplex.css">
<title>Tk::Mwm - Communicate with the Motif window manager.</title>
<link rel="stylesheet" href="../../Active.css" type="text/css" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:" />
</head>
<body>
<script>writelinks('__top__',2);</script>
<h1><a>Tk::Mwm - Communicate with the Motif window manager.</a></h1>
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<ul>
<li><a href="#name">NAME</a></li>
<li><a href="#synopsis">SYNOPSIS</a></li>
<li><a href="#description">DESCRIPTION</a></li>
<li><a href="#methods">METHODS</a></li>
<li><a href="#bugs">BUGS</a></li>
<li><a href="#see_also">SEE ALSO</a></li>
<li><a href="#keywords">KEYWORDS</a></li>
<li><a href="#author">AUTHOR</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>Tk::Mwm - Communicate with the <code>Motif(tm)</code> window manager.</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<p> <strong>use Tk::Mwm;</strong></p>
<p> <em>$toplevel</em>-><strong>mwm</strong><em>Option</em>?(<em>args</em>)?</p>
<p> <em>$toplevel</em>-><strong>mwm</strong>(<em>option</em> ?,<em>args</em>?)</p>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>Interface to special extentions supported by mwm.</p>
<p>
</p>
<hr />
<h1><a name="methods">METHODS</a></h1>
<dl>
<dt><strong><a name="item_mwmdecoration"><em>$toplevel</em>-><strong>mwmDecoration</strong>?(?option??=>value? ?,...?)?</a></strong>
<dd>
<p>When no options are given, this method returns the values of all the
decorations options for the toplevel window with the <em>$toplevel</em>.
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 method,
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: <strong>-border</strong>, <strong>-menu</strong>, <strong>-maximize</strong>,
<strong>-minimize</strong>, <strong>-resizeh</strong> and <strong>-title</strong>. The value must be a
Boolean value. The values returned by this command are undefined when
the window is not managed by mwm.</p>
</dd>
</li>
<dt><strong><a name="item_mwmismwmrunning"><em>$toplevel</em>-><strong>mwmIsmwmrunning</strong></a></strong>
<dd>
<p>This returns value is true if mwm is running on the screen where the specified
window is located, false otherwise.</p>
</dd>
</li>
<dt><strong><a name="item_mwmprotocol"><em>$toplevel</em>-><strong>mwmProtocol</strong></a></strong>
<dd>
<p>When no additional options are given, this method returns all
protocols associated with this toplevel window.</p>
</dd>
</li>
<dt><strong><em>$toplevel</em>-><strong>mwmProtocol</strong>(<strong>activate</strong> => <em>protocol_name</em>)</strong>
<dd>
<p>Activate the mwm protocol message in mwm's menu.</p>
</dd>
</li>
<dt><strong><a name="item_mwmprotocol"><em>$toplevel</em>-><strong>MwmProtocol</strong>(<strong>add</strong> => <em>protocol_name</em>, <em>menu_message</em>)</a></strong>
<dd>
<p>Add a new mwm protocol message for this toplevel window. The
message is identified by the string name specified in
<em>protocol_name</em>. A menu item will be added into mwm's menu as
specified by <em>menu_message</em>. Once a new mwm protocol message is
added to a toplevel, it can be caught by the TK <strong>protocol</strong>
method. Here is an example:</p>
</dd>
<dd>
<p> <em>$toplevel</em>-><strong>mwmProtocol</strong>(<strong>'add'</strong> => 'MY_PRINT_HELLO', '"Print Hello" _H Ctrl<Key>H');</p>
</dd>
<dd>
<p> <em>$toplevel</em>-><strong>protocol</strong>(<strong>'MY_PRINT_HELLO'</strong> => sub {print "Hello"});</p>
</dd>
</li>
<dt><strong><em>$toplevel</em>-><strong>mwmProtocol</strong>(<strong>'deactivate'</strong> => <em>protocol_name</em>)</strong>
<dd>
<p>Deactivate the mwm protocol message in mwm's menu.</p>
</dd>
</li>
<dt><strong><em>$toplevel</em>-><strong>mwmProtocol</strong>(<strong>'delete'</strong> => <em>protocol_name</em>)</strong>
<dd>
<p>Delete the mwm protocol message from mwm's menu. Please note that the
window manager protocol handler associated with this protocol (by the
<strong>protocol</strong> method) is not deleted automatically. You have to
delete the protocol handle explicitly. E.g.:</p>
</dd>
<dd>
<p> <em>$mw</em>-><strong>mwmProtocol</strong>(<strong>'delete'</strong> => 'MY_PRINT_HELLO');</p>
</dd>
<dd>
<p> <em>$mw</em>-><strong>protocol</strong>(<strong>'MY_PRINT_HELLO'</strong> => '');</p>
</dd>
</li>
</dl>
<p>
</p>
<hr />
<h1><a name="bugs">BUGS</a></h1>
<p>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.</p>
<p>On some versions of mwm, the <strong>-border</strong> will not disappear unless
<strong>-resizeh</strong> is turned off. Also, the <strong>-title</strong> will not disappear
unless all of <strong>-title</strong>, <strong>-menu</strong>, <strong>-maximize</strong> and
<strong>-minimize</strong> are turned off.</p>
<p>
</p>
<hr />
<h1><a name="see_also">SEE ALSO</a></h1>
<p><a href="../../lib/Tk/Wm.html">Tk::Wm</a>
<a href="../../lib/Tk/tixWm.html">Tk::tixWm</a>
<a href="../../lib/Tk/Toplevel.html">Tk::Toplevel</a></p>
<p>
</p>
<hr />
<h1><a name="keywords">KEYWORDS</a></h1>
<p>window manager, mwm, TIX</p>
<p>
</p>
<hr />
<h1><a name="author">AUTHOR</a></h1>
<p>Ioi Kim Lam - <a href="mailto:ioi@graphics.cis.upenn.edu">ioi@graphics.cis.upenn.edu</a></p>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?