Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / tools / perl-5.8.0 / lib / site_perl / 5.8.0 / sun4-solaris / Tk / Mwm.pod
CommitLineData
86530b38
AT
1
2=head1 NAME
3
4Tk::Mwm - Communicate with the Motif(tm) window manager.
5
6=for category Tix Extensions
7
8=head1 SYNOPSIS
9
10S< >B<use Tk::Mwm;>
11
12S< >I<$toplevel>-E<gt>B<mwm>I<Option>?(I<args>)?
13
14S< >I<$toplevel>-E<gt>B<mwm>(I<option> ?,I<args>?)
15
16=head1 DESCRIPTION
17
18Interface to special extentions supported by mwm.
19
20=head1 METHODS
21
22=over 4
23
24=item I<$toplevel>-E<gt>B<mwmDecoration>?(?option??=E<gt>value? ?,...?)?
25
26When no options are given, this method returns the values of all the
27decorations options for the toplevel window with the I<$toplevel>.
28When only one option is given without specifying the value, the
29current value of that option is returned.
30When more than one "option-value" pairs are passed to this method,
31the specified values will be assigned to the corresponding options. As
32a result, the appearance of the Motif decorations around the toplevel
33window will be changed.
34Possible options are: B<-border>, B<-menu>, B<-maximize>,
35B<-minimize>, B<-resizeh> and B<-title>. The value must be a
36Boolean value. The values returned by this command are undefined when
37the window is not managed by mwm.
38
39=item I<$toplevel>-E<gt>B<mwmIsmwmrunning>
40
41This returns value is true if mwm is running on the screen where the specified
42window is located, false otherwise.
43
44=item I<$toplevel>-E<gt>B<mwmProtocol>
45
46When no additional options are given, this method returns all
47protocols associated with this toplevel window.
48
49=item I<$toplevel>-E<gt>B<mwmProtocol>(B<activate> =E<gt> I<protocol_name>)
50
51Activate the mwm protocol message in mwm's menu.
52
53=item I<$toplevel>-E<gt>B<MwmProtocol>(B<add> =E<gt> I<protocol_name>, I<menu_message>)
54
55Add a new mwm protocol message for this toplevel window. The
56message is identified by the string name specified in
57I<protocol_name>. A menu item will be added into mwm's menu as
58specified by I<menu_message>. Once a new mwm protocol message is
59added to a toplevel, it can be caught by the TK B<protocol>
60method. Here is an example:
61
62S< >I<$toplevel>-E<gt>B<mwmProtocol>(B<'add'> =E<gt> 'MY_PRINT_HELLO', '"Print Hello" _H CtrlE<lt>KeyE<gt>H');
63
64S< >I<$toplevel>-E<gt>B<protocol>(B<'MY_PRINT_HELLO'> =E<gt> sub {print "Hello"});
65
66=item I<$toplevel>-E<gt>B<mwmProtocol>(B<'deactivate'> =E<gt> I<protocol_name>)
67
68Deactivate the mwm protocol message in mwm's menu.
69
70=item I<$toplevel>-E<gt>B<mwmProtocol>(B<'delete'> =E<gt> I<protocol_name>)
71
72Delete the mwm protocol message from mwm's menu. Please note that the
73window manager protocol handler associated with this protocol (by the
74B<protocol> method) is not deleted automatically. You have to
75delete the protocol handle explicitly. E.g.:
76
77S< >I<$mw>-E<gt>B<mwmProtocol>(B<'delete'> =E<gt> 'MY_PRINT_HELLO');
78
79S< >I<$mw>-E<gt>B<protocol>(B<'MY_PRINT_HELLO'> =E<gt> '');
80
81=back
82
83=head1 BUGS
84
85This is a Tix extension which perl/Tk has adopted. It has not been
86tested as perl/Tk's author has not got round to installing a Motif Window
87Manager.
88
89On some versions of mwm, the B<-border> will not disappear unless
90B<-resizeh> is turned off. Also, the B<-title> will not disappear
91unless all of B<-title>, B<-menu>, B<-maximize> and
92B<-minimize> are turned off.
93
94=head1 SEE ALSO
95
96L<Tk::Wm|Tk::Wm>
97L<Tk::tixWm|Tk::tixWm>
98L<Tk::Toplevel|Tk::Toplevel>
99
100=head1 KEYWORDS
101
102window manager, mwm, TIX
103
104=head1 AUTHOR
105
106Ioi Kim Lam - ioi@graphics.cis.upenn.edu
107
108=cut
109