Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / tools / perl-5.8.0 / man / man3 / Tk::Wm.3
CommitLineData
86530b38
AT
1.\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13
2.\"
3.\" Standard preamble:
4.\" ========================================================================
5.de Sh \" Subsection heading
6.br
7.if t .Sp
8.ne 5
9.PP
10\fB\\$1\fR
11.PP
12..
13.de Sp \" Vertical space (when we can't use .PP)
14.if t .sp .5v
15.if n .sp
16..
17.de Vb \" Begin verbatim text
18.ft CW
19.nf
20.ne \\$1
21..
22.de Ve \" End verbatim text
23.ft R
24.fi
25..
26.\" Set up some character translations and predefined strings. \*(-- will
27.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
28.\" double quote, and \*(R" will give a right double quote. | will give a
29.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
30.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
31.\" expand to `' in nroff, nothing in troff, for use with C<>.
32.tr \(*W-|\(bv\*(Tr
33.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
34.ie n \{\
35. ds -- \(*W-
36. ds PI pi
37. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
38. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
39. ds L" ""
40. ds R" ""
41. ds C` ""
42. ds C' ""
43'br\}
44.el\{\
45. ds -- \|\(em\|
46. ds PI \(*p
47. ds L" ``
48. ds R" ''
49'br\}
50.\"
51.\" If the F register is turned on, we'll generate index entries on stderr for
52.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
53.\" entries marked with X<> in POD. Of course, you'll have to process the
54.\" output yourself in some meaningful fashion.
55.if \nF \{\
56. de IX
57. tm Index:\\$1\t\\n%\t"\\$2"
58..
59. nr % 0
60. rr F
61.\}
62.\"
63.\" For nroff, turn off justification. Always turn off hyphenation; it makes
64.\" way too many mistakes in technical documents.
65.hy 0
66.if n .na
67.\"
68.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
69.\" Fear. Run. Save yourself. No user-serviceable parts.
70. \" fudge factors for nroff and troff
71.if n \{\
72. ds #H 0
73. ds #V .8m
74. ds #F .3m
75. ds #[ \f1
76. ds #] \fP
77.\}
78.if t \{\
79. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
80. ds #V .6m
81. ds #F 0
82. ds #[ \&
83. ds #] \&
84.\}
85. \" simple accents for nroff and troff
86.if n \{\
87. ds ' \&
88. ds ` \&
89. ds ^ \&
90. ds , \&
91. ds ~ ~
92. ds /
93.\}
94.if t \{\
95. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
96. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
97. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
98. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
99. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
100. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
101.\}
102. \" troff and (daisy-wheel) nroff accents
103.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
104.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
105.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
106.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
107.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
108.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
109.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
110.ds ae a\h'-(\w'a'u*4/10)'e
111.ds Ae A\h'-(\w'A'u*4/10)'E
112. \" corrections for vroff
113.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
114.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
115. \" for low resolution devices (crt and lpr)
116.if \n(.H>23 .if \n(.V>19 \
117\{\
118. ds : e
119. ds 8 ss
120. ds o a
121. ds d- d\h'-1'\(ga
122. ds D- D\h'-1'\(hy
123. ds th \o'bp'
124. ds Th \o'LP'
125. ds ae ae
126. ds Ae AE
127.\}
128.rm #[ #] #H #V #F C
129.\" ========================================================================
130.\"
131.IX Title "WM 1"
132.TH WM 1 "2000-12-30" "perl v5.8.0" "User Contributed Perl Documentation"
133.SH "NAME"
134Tk::Wm \- Communicate with window manager
135.SH "SYNOPSIS"
136.IX Header "SYNOPSIS"
137\&\ \fI$toplevel\fR\->\fImethod\fR(?\fIargs\fR?)
138.SH "DESCRIPTION"
139.IX Header "DESCRIPTION"
140The \fBwm\fR methods are used to interact with window managers in
141order to control such things as the title for a window, its geometry,
142or the increments in terms of which it may be resized.
143The \fBwm\fR methods can take any of a number of different forms, depending on
144the particular \fImethod\fR argument.
145All of the forms expect \fI$toplevel\fR, which must be a
146top-level window object.
147.PP
148The legal forms for the \fBwm\fR methods are:
149.IP "\fI$toplevel\fR\->\fBaspect\fR(?\fIminNumer minDenom maxNumer maxDenom\fR?)" 4
150.IX Item "$toplevel->aspect(?minNumer minDenom maxNumer maxDenom?)"
151If \fIminNumer\fR, \fIminDenom\fR, \fImaxNumer\fR, and \fImaxDenom\fR
152are all specified, then they will be passed to the window manager
153and the window manager should use them to enforce a range of
154acceptable aspect ratios for \fI$toplevel\fR. The aspect ratio of
155\&\fI$toplevel\fR (width/length) will be constrained to lie
156between \fIminNumer\fR/\fIminDenom\fR and \fImaxNumer\fR/\fImaxDenom\fR.
157If \fIminNumer\fR etc. are all specified as empty strings, then
158any existing aspect ratio restrictions are removed.
159If \fIminNumer\fR etc. are specified, then the method returns an
160empty string. Otherwise, it returns
161a array containing four elements, which are the current values
162of \fIminNumer\fR, \fIminDenom\fR, \fImaxNumer\fR, and \fImaxDenom\fR
163(if no aspect restrictions are in effect, then an empty string is
164returned).
165.IP "\fI$toplevel\fR\->\fBclient\fR(?\fIname\fR?)" 4
166.IX Item "$toplevel->client(?name?)"
167If \fIname\fR is specified, this method stores \fIname\fR (which
168should be the name of
169the host on which the application is executing) in \fI$toplevel\fR's
170\&\fB\s-1WM_CLIENT_MACHINE\s0\fR property for use by the window manager or
171session manager.
172The method returns an empty string in this case.
173If \fIname\fR isn't specified, the method returns the last name
174set in a \fBclient\fR method for \fI$toplevel\fR.
175If \fIname\fR is specified as an empty string, the method deletes the
176\&\fB\s-1WM_CLIENT_MACHINE\s0\fR property from \fI$toplevel\fR.
177.IP "\fI$toplevel\fR\->\fBcolormapwindows\fR(?\fIwindowList\fR?)" 4
178.IX Item "$toplevel->colormapwindows(?windowList?)"
179This method is used to manipulate the \fB\s-1WM_COLORMAP_WINDOWS\s0\fR
180property, which provides information to the window managers about
181windows that have private colormaps.
182If \fIwindowList\fR isn't specified, the method returns a list
183whose elements are the names of the windows in the \fB\s-1WM_COLORMAP_WINDOWS\s0\fR
184property.
185If \fIwindowList\fR is specified, it consists of a list of widgets;
186the method overwrites the \fB\s-1WM_COLORMAP_WINDOWS\s0\fR
187property with the given windows and returns an empty string.
188The \fB\s-1WM_COLORMAP_WINDOWS\s0\fR property should normally contain a
189list of the internal windows within \fI$toplevel\fR whose colormaps differ
190from their parents.
191The order of the windows in the property indicates a priority order:
192the window manager will attempt to install as many colormaps as possible
193from the head of this list when \fI$widget\fR gets the colormap focus.
194If \fI$widget\fR is not included among the windows in \fIwindowList\fR,
195Tk implicitly adds it at the end of the \fB\s-1WM_COLORMAP_WINDOWS\s0\fR
196property, so that its colormap is lowest in priority.
197If \fI$widget\fR\->colormapwindows is not invoked, Tk will automatically set
198the property for each top-level window to all the internal windows
199whose colormaps differ from their parents, followed by the top-level
200itself; the order of the internal windows is undefined.
201See the \s-1ICCCM\s0 documentation for more information on the
202\&\fB\s-1WM_COLORMAP_WINDOWS\s0\fR property.
203.IP "\fI$toplevel\fR\->\fBcommand\fR(?\fIvalue\fR?)" 4
204.IX Item "$toplevel->command(?value?)"
205If \fIvalue\fR is specified, this method stores \fIvalue\fR in \fI$toplevel\fR's
206\&\fB\s-1WM_COMMAND\s0\fR property for use by the window manager or
207session manager and returns an empty string.
208\&\fIValue\fR must have proper list structure; the elements should
209contain the words of the command used to invoke the application.
210If \fIvalue\fR isn't specified then the method returns the last value
211set in a \fBcommand\fR method for \fI$toplevel\fR.
212If \fIvalue\fR is specified as an empty string, the method
213deletes the \fB\s-1WM_COMMAND\s0\fR property from \fI$toplevel\fR.
214.IP "\fI$toplevel\fR\->\fBdeiconify\fR" 4
215.IX Item "$toplevel->deiconify"
216Arrange for \fI$toplevel\fR to be displayed in normal (non\-iconified) form.
217This is done by mapping the window. If the window has never been
218mapped then this method will not map the window, but it will ensure
219that when the window is first mapped it will be displayed
220in de-iconified form. Returns an empty string.
221.IP "\fI$toplevel\fR\->\fBfocusmodel\fR(?\fBactive\fR|\fBpassive\fR?)" 4
222.IX Item "$toplevel->focusmodel(?active|passive?)"
223If \fBactive\fR or \fBpassive\fR is supplied as an optional argument
224to the method, then it specifies the focus model for \fI$toplevel\fR.
225In this case the method returns an empty string. If no additional
226argument is supplied, then the method returns the current focus
227model for \fI$toplevel\fR.
228An \fBactive\fR focus model means that \fI$toplevel\fR will claim the
229input focus for itself or its descendants, even at times when
230the focus is currently in some other application. \fBPassive\fR means that
231\&\fI$toplevel\fR will never claim the focus for itself: the window manager
232should give the focus to \fI$toplevel\fR at appropriate times. However,
233once the focus has been given to \fI$toplevel\fR or one of its descendants,
234the application may re-assign the focus among \fI$toplevel\fR's descendants.
235The focus model defaults to \fBpassive\fR, and Tk's \fBfocus\fR method
236assumes a passive model of focusing.
237.IP "\fI$toplevel\fR\->\fBframe\fR" 4
238.IX Item "$toplevel->frame"
239If \fI$widget\fR has been reparented by the window manager into a
240decorative frame, the method returns the platform specific window
241identifier for the outermost frame that contains \fI$toplevel\fR (the
242window whose parent is the root or virtual root). If \fI$toplevel\fR
243hasn't been reparented by the window manager then the method returns
244the platform specific window identifier for \fI$toplevel\fR.
245.IP "\fI$toplevel\fR\->\fBgeometry\fR(?\fInewGeometry\fR?)" 4
246.IX Item "$toplevel->geometry(?newGeometry?)"
247If \fInewGeometry\fR is specified, then the geometry of \fI$toplevel\fR
248is changed and an empty string is returned. Otherwise the current
249geometry for \fI$toplevel\fR is returned (this is the most recent
250geometry specified either by manual resizing or
251in a \fBgeometry\fR method). \fINewGeometry\fR has
252the form \fB=\fR\fIwidth\fR\fBx\fR\fIheight\fR\fB+\-\fR\fIx\fR\fB+\-\fR\fIy\fR, where
253any of \fB=\fR, \fIwidth\fR\fBx\fR\fIheight\fR, or \fB+\-\fR\fIx\fR\fB+\-\fR\fIy\fR
254may be omitted. \fIWidth\fR and \fIheight\fR are positive integers
255specifying the desired dimensions of \fI$toplevel\fR. If \fI$toplevel\fR
256is gridded (see \*(L"\s-1GRIDDED\s0 \s-1GEOMETRY\s0 \s-1MANAGEMENT\s0\*(R" below) then the dimensions
257are specified in grid units; otherwise they are specified in pixel
258units. \fIX\fR and \fIy\fR specify the desired location of
259\&\fI$toplevel\fR on the screen, in pixels.
260If \fIx\fR is preceded by \fB+\fR, it specifies
261the number of pixels between the left edge of the screen and the left
262edge of \fI$toplevel\fR's border; if preceded by \fB\-\fR then
263\&\fIx\fR specifies the number of pixels
264between the right edge of the screen and the right edge of \fI$toplevel\fR's
265border. If \fIy\fR is preceded by \fB+\fR then it specifies the
266number of pixels between the top of the screen and the top
267of \fI$toplevel\fR's border; if \fIy\fR is preceded by \fB\-\fR then
268it specifies the number of pixels between the bottom of \fI$toplevel\fR's
269border and the bottom of the screen.
270If \fInewGeometry\fR is specified as an empty string then any
271existing user-specified geometry for \fI$toplevel\fR is cancelled, and
272the window will revert to the size requested internally by its
273widgets.
274.IP "\fI$toplevel\fR\->\fBwmGrid\fR(?\fIbaseWidth,baseHeight,widthInc,heightInc\fR?)" 4
275.IX Item "$toplevel->wmGrid(?baseWidth,baseHeight,widthInc,heightInc?)"
276This method indicates that \fI$toplevel\fR is to be managed as a
277gridded window.
278It also specifies the relationship between grid units and pixel units.
279\&\fIBaseWidth\fR and \fIbaseHeight\fR specify the number of grid
280units corresponding to the pixel dimensions requested internally
281by \fI$toplevel\fR using \fBTk_GeometryRequest\fR. \fIWidthInc\fR
282and \fIheightInc\fR specify the number of pixels in each horizontal
283and vertical grid unit.
284These four values determine a range of acceptable sizes for
285\&\fI$toplevel\fR, corresponding to grid-based widths and heights
286that are non-negative integers.
287Tk will pass this information to the window manager; during
288manual resizing, the window manager will restrict the window's size
289to one of these acceptable sizes.
290Furthermore, during manual resizing the window manager will display
291the window's current size in terms of grid units rather than pixels.
292If \fIbaseWidth\fR etc. are all specified as empty strings, then
293\&\fI$toplevel\fR will no longer be managed as a gridded window. If
294\&\fIbaseWidth\fR etc. are specified then the return value is an
295empty string.
296Otherwise the return value is a array containing
297four elements corresponding to the current \fIbaseWidth\fR,
298\&\fIbaseHeight\fR, \fIwidthInc\fR, and \fIheightInc\fR; if
299\&\fI$toplevel\fR is not currently gridded, then an empty string
300is returned.
301Note: this command should not be needed very often, since the
302\&\fBTk_SetGrid\fR library procedure and the \fB\-setgrid\fR option
303provide easier access to the same functionality.
304.IP "\fI$toplevel\fR\->\fBgroup\fR(?\fI$widget\fR?)" 4
305.IX Item "$toplevel->group(?$widget?)"
306If \fI$widget\fR is specified, it is the the leader of
307a group of related windows. The window manager may use this information,
308for example, to unmap all of the windows in a group when the group's
309leader is iconified. \fI$widget\fR may be specified as an empty string to
310remove \fI$toplevel\fR from any group association. If \fI$widget\fR is
311specified then the method returns an empty string; otherwise it
312returns the \fI$toplevel\fR's current group leader, or an empty
313string if \fI$toplevel\fR isn't part of any group.
314.IP "\fI$toplevel\fR\->\fBiconbitmap\fR(?\fIbitmap\fR?)" 4
315.IX Item "$toplevel->iconbitmap(?bitmap?)"
316If \fIbitmap\fR is specified, then it names a bitmap in the standard
317forms accepted by Tk (see the \fBTk_GetBitmap\fR documentation for details).
318This \fIblack and white\fR bitmap is passed to the window manager to be displayed
319in \fI$toplevel\fR's icon, and the method returns an empty string. If
320an empty string is specified for \fIbitmap\fR, then any current icon
321bitmap or image is cancelled for \fI$toplevel\fR.
322If \fIbitmap\fR is specified then the method returns an empty string.
323Otherwise it returns the name of
324the current icon bitmap associated with \fI$toplevel\fR, or an empty
325string if \fI$toplevel\fR has no icon bitmap.
326.IP "\fI$toplevel\fR\->\fBiconify\fR" 4
327.IX Item "$toplevel->iconify"
328Arrange for \fI$toplevel\fR to be iconified. It \fI$toplevel\fR hasn't
329yet been mapped for the first time, this method will arrange for
330it to appear in the iconified state when it is eventually mapped.
331.IP "\fI$toplevel\fR\->\fBiconimage\fR(?\fIimage\fR?)" 4
332.IX Item "$toplevel->iconimage(?image?)"
333If \fIimage\fR is specified, then it names a normal Tk image.
334This image is rendered into a private \fIcoloured\fR bitmap which is passed to
335the window manager to be displayed in \fI$toplevel\fR's icon, and the method returns
336an empty string. If an empty string is specified for \fIimage\fR, then any current
337icon bitmap or image is cancelled for \fI$toplevel\fR.
338If \fIimage\fR is specified then the method returns an empty string.
339Otherwise it returns the name of
340the current icon image associated with \fI$toplevel\fR, or an empty
341string if \fI$toplevel\fR has no icon image.
342The private pixmap is not pre-cleared so images which are partly \*(L"transparent\*(R"
343display rubbish in their transparent parts.
344.Sp
345The sizes of images that can be used as icons in this manner are platform
346dependant. On Win32 this sets the \*(L"large\*(R" icon, which should be 32x32, it
347will automatically be scaled down to 16x16 for use as a small icon.
348.IP "\fI$toplevel\fR\->\fBiconmask\fR(?\fIbitmap\fR?)" 4
349.IX Item "$toplevel->iconmask(?bitmap?)"
350If \fIbitmap\fR is specified, then it names a bitmap in the standard
351forms accepted by Tk (see the \fBTk_GetBitmap\fR documentation for details).
352This bitmap is passed to the window manager to be used as a mask
353in conjunction with the \fBiconbitmap\fR option: where the mask
354has zeroes no icon will be displayed; where it has ones, the bits
355from the icon bitmap will be displayed. If
356an empty string is specified for \fIbitmap\fR then any current icon
357mask is cancelled for \fI$toplevel\fR (this is equivalent to specifying
358a bitmap of all ones). If \fIbitmap\fR is specified
359then the method returns an empty string. Otherwise it
360returns the name of the current icon mask associated with
361\&\fI$toplevel\fR, or an empty string if no mask is in effect.
362.IP "\fI$toplevel\fR\->\fBiconname\fR(?\fInewName\fR?)" 4
363.IX Item "$toplevel->iconname(?newName?)"
364If \fInewName\fR is specified, then it is passed to the window
365manager; the window manager should display \fInewName\fR inside
366the icon associated with \fI$toplevel\fR. In this case an empty
367string is returned as result. If \fInewName\fR isn't specified
368then the method returns the current icon name for \fI$toplevel\fR,
369or an empty string if no icon name has been specified (in this
370case the window manager will normally display the window's title,
371as specified with the \fBtitle\fR method).
372.IP "\fI$toplevel\fR\->\fBiconposition\fR(?\fIx y\fR?)" 4
373.IX Item "$toplevel->iconposition(?x y?)"
374If \fIx\fR and \fIy\fR are specified, they are passed to the window
375manager as a hint about where to position the icon for \fI$toplevel\fR.
376In this case an empty string is returned. If \fIx\fR and \fIy\fR are
377specified as empty strings then any existing icon position hint is cancelled.
378If neither \fIx\fR nor \fIy\fR is specified, then the method returns
379a array containing two values, which are the current icon position
380hints (if no hints are in effect then an empty string is returned).
381.IP "\fI$toplevel\fR\->\fBiconwindow\fR(?\fI$widget\fR?)" 4
382.IX Item "$toplevel->iconwindow(?$widget?)"
383If \fI$widget\fR is specified, it is a window to
384use as icon for \fI$toplevel\fR: when \fI$toplevel\fR is iconified then
385\&\fI$widget\fR will be mapped to serve as icon, and when \fI$toplevel\fR
386is de-iconified then \fI$widget\fR will be unmapped again. If
387\&\fI$widget\fR is specified as an empty string then any existing
388icon window association for \fI$toplevel\fR will be cancelled. If
389the \fI$widget\fR argument is specified then an empty string is
390returned. Otherwise the method returns the
391current icon window for \fI$toplevel\fR, or an empty string if there
392is no icon window currently specified for \fI$toplevel\fR.
393Button press events are disabled for \fI$toplevel\fR as long as it is
394an icon window; this is needed in order to allow window managers
395to ``own'' those events.
396Note: not all window managers support the notion of an icon window.
397.IP "\fI$toplevel\fR\->\fBmaxsize\fR(?\fIwidth,height\fR?)" 4
398.IX Item "$toplevel->maxsize(?width,height?)"
399If \fIwidth\fR and \fIheight\fR are specified, they give
400the maximum permissible dimensions for \fI$toplevel\fR.
401For gridded windows the dimensions are specified in
402grid units; otherwise they are specified in pixel units.
403The window manager will restrict the window's dimensions to be
404less than or equal to \fIwidth\fR and \fIheight\fR.
405If \fIwidth\fR and \fIheight\fR are
406specified, then the method returns an empty string. Otherwise
407it returns a array with two elements, which are the
408maximum width and height currently in effect.
409The maximum size defaults to the size of the screen.
410If resizing has been disabled with the \fBresizable\fR method,
411then this method has no effect.
412See the sections on geometry management below for more information.
413.IP "\fI$toplevel\fR\->\fBminsize\fR(?\fIwidth,height\fR?)" 4
414.IX Item "$toplevel->minsize(?width,height?)"
415If \fIwidth\fR and \fIheight\fR are specified, they give the
416minimum permissible dimensions for \fI$toplevel\fR.
417For gridded windows the dimensions are specified in
418grid units; otherwise they are specified in pixel units.
419The window manager will restrict the window's dimensions to be
420greater than or equal to \fIwidth\fR and \fIheight\fR.
421If \fIwidth\fR and \fIheight\fR are
422specified, then the method returns an empty string. Otherwise
423it returns a array with two elements, which are the
424minimum width and height currently in effect.
425The minimum size defaults to one pixel in each dimension.
426If resizing has been disabled with the \fBresizable\fR method,
427then this method has no effect.
428See the sections on geometry management below for more information.
429.IP "\fI$toplevel\fR\->\fBoverrideredirect(?\fR\fIboolean\fR?)" 4
430.IX Item "$toplevel->overrideredirect(?boolean?)"
431If \fIboolean\fR is specified, it must have a proper boolean form and
432the override-redirect flag for \fI$toplevel\fR is set to that value.
433If \fIboolean\fR is not specified then \fB1\fR or \fB0\fR is
434returned to indicate whether or not the override-redirect flag
435is currently set for \fI$toplevel\fR.
436Setting the override-redirect flag for a window causes
437it to be ignored by the window manager; among other things, this means
438that the window will not be reparented from the root window into a
439decorative frame and the user will not be able to manipulate the
440window using the normal window manager mechanisms.
441.IP "\fI$toplevel\fR\->\fBpositionfrom\fR(?\fIwho\fR?)" 4
442.IX Item "$toplevel->positionfrom(?who?)"
443If \fIwho\fR is specified, it must be either \fBprogram\fR or
444\&\fBuser\fR, or an abbreviation of one of these two. It indicates
445whether \fI$toplevel\fR's current position was requested by the
446program or by the user. Many window managers ignore program-requested
447initial positions and ask the user to manually position the window; if
448\&\fBuser\fR is specified then the window manager should position the
449window at the given place without asking the user for assistance.
450If \fIwho\fR is specified as an empty string, then the current position
451source is cancelled.
452If \fIwho\fR is specified, then the method returns an empty string.
453Otherwise it returns \fBuser\fR or \f(CW$widget\fR to indicate the
454source of the window's current position, or an empty string if
455no source has been specified yet. Most window managers interpret
456``no source'' as equivalent to \fBprogram\fR.
457Tk will automatically set the position source to \fBuser\fR
458when a \fBgeometry\fR method is invoked, unless the source has
459been set explicitly to \fBprogram\fR.
460.IP "\fI$toplevel\fR\->\fBprotocol\fR(?\fIname\fR?,?\fIcallback\fR?)" 4
461.IX Item "$toplevel->protocol(?name?,?callback?)"
462This method is used to manage window manager protocols such as
463\&\fB\s-1WM_DELETE_WINDOW\s0\fR.
464\&\fIName\fR is the name of an atom corresponding to a window manager
465protocol, such as \fB\s-1WM_DELETE_WINDOW\s0\fR or \fB\s-1WM_SAVE_YOURSELF\s0\fR
466or \fB\s-1WM_TAKE_FOCUS\s0\fR.
467If both \fIname\fR and \fIcallback\fR are specified, then \fIcallback\fR
468is associated with the protocol specified by \fIname\fR.
469\&\fIName\fR will be added to \fI$toplevel\fR's \fB\s-1WM_PROTOCOLS\s0\fR
470property to tell the window manager that the application has a
471protocol handler for \fIname\fR, and \fIcallback\fR will
472be invoked in the future whenever the window manager sends a
473message to the client for that protocol.
474In this case the method returns an empty string.
475If \fIname\fR is specified but \fIcallback\fR isn't, then the current
476callback for \fIname\fR is returned, or an empty string if there
477is no handler defined for \fIname\fR.
478If \fIcallback\fR is specified as an empty string then the current
479handler for \fIname\fR is deleted and it is removed from the
480\&\fB\s-1WM_PROTOCOLS\s0\fR property on \fI$toplevel\fR; an empty string is
481returned.
482Lastly, if neither \fIname\fR nor \fIcallback\fR is specified, the
483method returns a list of all the protocols for which handlers
484are currently defined for \fI$toplevel\fR.
485.RS 4
486.Sp
487.RS 8
488Tk always defines a protocol handler for \fB\s-1WM_DELETE_WINDOW\s0\fR, even if
489you haven't asked for one with \fBprotocol\fR.
490If a \fB\s-1WM_DELETE_WINDOW\s0\fR message arrives when you haven't defined
491a handler, then Tk handles the message by destroying the window for
492which it was received.
493.RE
494.RE
495.RS 4
496.RE
497.IP "\fI$toplevel\fR\->\fBresizable\fR(?\fIwidth,height\fR?)" 4
498.IX Item "$toplevel->resizable(?width,height?)"
499This method controls whether or not the user may interactively
500resize a top-level window. If \fIwidth\fR and \fIheight\fR are
501specified, they are boolean values that determine whether the
502width and height of \fI$toplevel\fR may be modified by the user.
503In this case the method returns an empty string.
504If \fIwidth\fR and \fIheight\fR are omitted then the method
505returns a list with two 0/1 elements that indicate whether the
506width and height of \fI$toplevel\fR are currently resizable.
507By default, windows are resizable in both dimensions.
508If resizing is disabled, then the window's size will be the size
509from the most recent interactive resize or \fBgeometry\fR
510method. If there has been no such operation then
511the window's natural size will be used.
512.IP "\fI$toplevel\fR\->\fBsizefrom\fR(?\fIwho\fR?)" 4
513.IX Item "$toplevel->sizefrom(?who?)"
514If \fIwho\fR is specified, it must be either \fBprogram\fR or
515\&\fBuser\fR, or an abbreviation of one of these two. It indicates
516whether \fI$toplevel\fR's current size was requested by the
517program or by the user. Some window managers ignore program-requested
518sizes and ask the user to manually size the window; if
519\&\fBuser\fR is specified then the window manager should give the
520window its specified size without asking the user for assistance.
521If \fIwho\fR is specified as an empty string, then the current size
522source is cancelled.
523If \fIwho\fR is specified, then the method returns an empty string.
524Otherwise it returns \fBuser\fR or \f(CW$widget\fR to indicate the
525source of the window's current size, or an empty string if
526no source has been specified yet. Most window managers interpret
527``no source'' as equivalent to \fBprogram\fR.
528.IP "\fI$toplevel\fR\->\fBstate\fR" 4
529.IX Item "$toplevel->state"
530Returns the current state of \f(CW$widget:\fR either \fBnormal\fR,
531\&\fBiconic\fR, \fBwithdrawn\fR, or \fBicon\fR. The difference
532between \fBiconic\fR and \fBicon\fR is that \fBiconic\fR refers
533to a window that has been iconified (e.g., with the \fBiconify\fR
534method) while \fBicon\fR refers to a window whose only purpose is
535to serve as the icon for some other window (via the \fBiconwindow\fR
536method).
537.IP "\fI$toplevel\fR\->\fBtitle\fR(?\fIstring\fR?)" 4
538.IX Item "$toplevel->title(?string?)"
539If \fIstring\fR is specified, then it will be passed to the window
540manager for use as the title for \fI$toplevel\fR (the window manager
541should display this string in \fI$toplevel\fR's title bar). In this
542case the method returns an empty string. If \fIstring\fR isn't
543specified then the method returns the current title for the
544\&\fI$toplevel\fR. The title for a window defaults to its name.
545.IP "\fI$toplevel\fR\->\fBtransient\fR(?\fImaster\fR?)" 4
546.IX Item "$toplevel->transient(?master?)"
547If \fImaster\fR is specified, then the window manager is informed
548that \fI$toplevel\fR is a transient window (e.g. pull-down menu) working
549on behalf of \fImaster\fR (where \fImaster\fR is
550a top-level window). Some window managers will use
551this information to manage \fI$toplevel\fR specially. If \fImaster\fR
552is specified as an empty string then \fI$toplevel\fR is marked as not
553being a transient window any more. If \fImaster\fR is specified,
554then the method returns an empty string. Otherwise the method
555returns the path name of \fI$toplevel\fR's current master, or an
556empty string if \fI$toplevel\fR isn't currently a transient window.
557.IP "\fI$toplevel\fR\->\fBwithdraw\fR" 4
558.IX Item "$toplevel->withdraw"
559Arranges for \fI$toplevel\fR to be withdrawn from the screen. This
560causes the window to be unmapped and forgotten about by the window
561manager. If the window
562has never been mapped, then this method
563causes the window to be mapped in the withdrawn state. Not all
564window managers appear to know how to handle windows that are
565mapped in the withdrawn state.
566Note: it sometimes seems to be necessary to withdraw a
567window and then re-map it (e.g. with \fBdeiconify\fR) to get some
568window managers to pay attention to changes in window attributes
569such as group.
570.IP "\fI$toplevel\fR\->\fBwrapper\fR" 4
571.IX Item "$toplevel->wrapper"
572Returns the window id of the wrapper window in which Tk has placed
573\&\fI$toplevel\fR. This is the id by which window manager will know
574\&\fI$toplevel\fR, and so is appropriate place to add X properties.
575.SH "ICON SIZES"
576.IX Header "ICON SIZES"
577The sizes of bitmaps/images that can be used as icons in this manner are platform
578and window manager dependant. Unix window managers are typically more tolerant
579than Win32. It is possible that coloured \f(CW\*(C`iconimage\*(C'\fR icons may cause problems
580on some X window managers.
581.IP "\(bu Win32" 4
582.IX Item "Win32"
583\&\f(CW\*(C`iconimage\*(C'\fR and \f(CW\*(C`iconbitmap\*(C'\fR set the \*(L"large\*(R" icon, which should be
58432x32, it will automatically be scaled down to 16x16 for use as a small icon.
585Win32 ignores \f(CW\*(C`iconwin\*(C'\fR requests.
586.ie n .IP "\(bu \s-1KDE\s0's ""kwm""" 4
587.el .IP "\(bu \s-1KDE\s0's ``kwm''" 4
588.IX Item "KDE's kwm"
589Accepts coloured \f(CW\*(C`iconimage\*(C'\fR and black and white \f(CW\*(C`iconbitmap\*(C'\fR but
590will scale either to a small (14x14?) icon. Kwm ignores \f(CW\*(C`iconwin\*(C'\fR.
591.ie n .IP "\(bu Sun's ""olwm"" or ""olvwm""" 4
592.el .IP "\(bu Sun's ``olwm'' or ``olvwm''" 4
593.IX Item "Sun's olwm or olvwm"
594Honours \f(CW\*(C`iconwin\*(C'\fR which will override \f(CW\*(C`iconimage\*(C'\fR or \f(CW\*(C`iconbitmap\*(C'\fR.
595Coloured images work.
596.IP "\(bu Sun's \s-1CDE\s0 window manager" 4
597.IX Item "Sun's CDE window manager"
598Coloured images work. ...
599.SH "GEOMETRY MANAGEMENT"
600.IX Header "GEOMETRY MANAGEMENT"
601By default a top-level window appears on the screen in its
602\&\fInatural size\fR, which is the one determined internally by its
603widgets and geometry managers.
604If the natural size of a top-level window changes, then the window's size
605changes to match.
606A top-level window can be given a size other than its natural size in two ways.
607First, the user can resize the window manually using the facilities
608of the window manager, such as resize handles.
609Second, the application can request a particular size for a
610top-level window using the \fBgeometry\fR method.
611These two cases are handled identically by Tk; in either case,
612the requested size overrides the natural size.
613You can return the window to its natural by invoking \fBgeometry\fR
614with an empty \fIgeometry\fR string.
615.PP
616Normally a top-level window can have any size from one pixel in each
617dimension up to the size of its screen.
618However, you can use the \fBminsize\fR and \fBmaxsize\fR methods
619to limit the range of allowable sizes.
620The range set by \fBminsize\fR and \fBmaxsize\fR applies to
621all forms of resizing, including the window's natural size as
622well as manual resizes and the \fBgeometry\fR method.
623You can also use the method \fBresizable\fR to completely
624disable interactive resizing in one or both dimensions.
625.SH "GRIDDED GEOMETRY MANAGEMENT"
626.IX Header "GRIDDED GEOMETRY MANAGEMENT"
627Gridded geometry management occurs when one of the widgets of an
628application supports a range of useful sizes.
629This occurs, for example, in a text editor where the scrollbars,
630menus, and other adornments are fixed in size but the edit widget
631can support any number of lines of text or characters per line.
632In this case, it is usually desirable to let the user specify the
633number of lines or characters\-per\-line, either with the
634\&\fBgeometry\fR method or by interactively resizing the window.
635In the case of text, and in other interesting cases also, only
636discrete sizes of the window make sense, such as integral numbers
637of lines and characters\-per\-line; arbitrary pixel sizes are not useful.
638.PP
639Gridded geometry management provides support for this kind of
640application.
641Tk (and the window manager) assume that there is a grid of some
642sort within the application and that the application should be
643resized in terms of \fIgrid units\fR rather than pixels.
644Gridded geometry management is typically invoked by turning on
645the \fBsetGrid\fR option for a widget; it can also be invoked
646with the \fBwmGrid\fR method or by calling \fBTk_SetGrid\fR.
647In each of these approaches the particular widget (or sometimes
648code in the application as a whole) specifies the relationship between
649integral grid sizes for the window and pixel sizes.
650To return to non-gridded geometry management, invoke
651\&\fBgrid\fR with empty argument strings.
652.PP
653When gridded geometry management is enabled then all the dimensions specified
654in \fBminsize\fR, \fBmaxsize\fR, and \fBgeometry\fR methods
655are treated as grid units rather than pixel units.
656Interactive resizing is also carried out in even numbers of grid units
657rather than pixels.
658.SH "BUGS"
659.IX Header "BUGS"
660Most existing window managers appear to have bugs that affect the
661operation of the \fBwm\fR methods. For example, some changes won't
662take effect if the window is already active: the window will have
663to be withdrawn and de-iconified in order to make the change happen.
664.SH "SEE ALSO"
665.IX Header "SEE ALSO"
666Tk::Widget
667Tk::tixWm
668Tk::Mwm
669.SH "KEYWORDS"
670.IX Header "KEYWORDS"
671aspect ratio, deiconify, focus model, geometry, grid, group, icon, iconify, increments, position, size, title, top-level window, units, window manager