home *** CD-ROM | disk | FTP | other *** search
/ Netrunner 2004 October / NETRUNNER0410.ISO / regular / ActivePerl-5.8.4.810-MSWin32-x86.msi / _3e53ba0febe642a63dc1b13648498c43 < prev    next >
Encoding:
Text File  |  2004-06-01  |  29.2 KB  |  646 lines

  1. #  Copyright (c) 1991-1994 The Regents of the University of California.
  2. #  Copyright (c) 1994-1996 Sun Microsystems, Inc.
  3. #  See the file "license.terms" for information on usage and redistribution
  4. #  of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  5. #
  6. #
  7.  
  8. =head1 NAME
  9.  
  10. Tk::Wm - Communicate with window manager
  11.  
  12. =for category Tk Geometry Management
  13.  
  14. =head1 SYNOPSIS
  15.  
  16. S<    >I<$toplevel>-E<gt>I<method>(?I<args>?)
  17.  
  18. =head1 DESCRIPTION
  19.  
  20. The B<wm> methods are used to interact with window managers in
  21. order to control such things as the title for a window, its geometry,
  22. or the increments in terms of which it may be resized.
  23. The B<wm> methods can take any of a number of different forms, depending on
  24. the particular I<method> argument.
  25. All of the forms expect I<$toplevel>, which must be a
  26. top-level window object.
  27.  
  28. The legal forms for the B<wm> methods are:
  29.  
  30. =over 4
  31.  
  32. =item I<$toplevel>-E<gt>B<aspect>(?I<minNumer minDenom maxNumer maxDenom>?)
  33.  
  34. If I<minNumer>, I<minDenom>, I<maxNumer>, and I<maxDenom>
  35. are all specified, then they will be passed to the window manager
  36. and the window manager should use them to enforce a range of
  37. acceptable aspect ratios for I<$toplevel>.  The aspect ratio of
  38. I<$toplevel> (width/length) will be constrained to lie
  39. between I<minNumer>/I<minDenom> and I<maxNumer>/I<maxDenom>.
  40. If I<minNumer> etc. are all specified as empty strings, then
  41. any existing aspect ratio restrictions are removed.
  42. If I<minNumer> etc. are specified, then the method returns an
  43. empty string.  Otherwise, it returns
  44. a array containing four elements, which are the current values
  45. of I<minNumer>, I<minDenom>, I<maxNumer>, and I<maxDenom>
  46. (if no aspect restrictions are in effect, then an empty string is
  47. returned).
  48.  
  49. =item I<$widget>-E<gt>B<attributes>( I<?args?> );
  50.  
  51. This subcommand returns or  sets  platform  specific  attributes
  52. associated with a window.
  53.  
  54. =over 4
  55.  
  56. =item I<$widget>-E<gt>B<attributes>;
  57.  
  58. Returns a list of the  platform specific  flags  and  their  values. 
  59.  
  60. =item I<$widget>-E<gt>B<attributes>( I<?option?> );
  61.  
  62. Returns  the  value for the specific option.
  63.  
  64. =item I<$widget>-E<gt>B<attributes>( I<?option value option value...?> );
  65.  
  66. Sets one or more of the values. The values are as follows:
  67.  
  68. On Windows, -disabled gets or sets whether the window  is  in  a 
  69. disabled state. -toolwindow gets or sets the style of the window 
  70. to toolwindow (as defined in the MSDN). -topmost  gets  or  sets 
  71. whether  this is a topmost window (displays above all other win- 
  72. dows).                                                           
  73.  
  74. On Macintosh, there are currently no special attribute values.
  75.  
  76. On Unix, there are currently no special attribute values.        
  77.  
  78. =back
  79.  
  80. =item I<$toplevel>-E<gt>B<client>(?I<name>?)
  81.  
  82. If I<name> is specified, this method stores I<name> (which
  83. should be the name of
  84. the host on which the application is executing) in I<$toplevel>'s
  85. B<WM_CLIENT_MACHINE> property for use by the window manager or
  86. session manager.
  87. The method returns an empty string in this case.
  88. If I<name> isn't specified, the method returns the last name
  89. set in a B<client> method for I<$toplevel>.
  90. If I<name> is specified as an empty string, the method deletes the
  91. B<WM_CLIENT_MACHINE> property from I<$toplevel>.
  92.  
  93. =item I<$toplevel>-E<gt>B<colormapwindows>(?I<windowList>?)
  94.  
  95. This method is used to manipulate the B<WM_COLORMAP_WINDOWS>
  96. property, which provides information to the window managers about
  97. windows that have private colormaps.
  98. If I<windowList> isn't specified, the method returns a list
  99. whose elements are the names of the windows in the B<WM_COLORMAP_WINDOWS>
  100. property.
  101. If I<windowList> is specified, it consists of a list of widgets;
  102. the method overwrites the B<WM_COLORMAP_WINDOWS>
  103. property with the given windows and returns an empty string.
  104. The B<WM_COLORMAP_WINDOWS> property should normally contain a
  105. list of the internal windows within I<$toplevel> whose colormaps differ
  106. from their parents.
  107. The order of the windows in the property indicates a priority order:
  108. the window manager will attempt to install as many colormaps as possible
  109. from the head of this list when I<$widget> gets the colormap focus.
  110. If I<$widget> is not included among the windows in I<windowList>,
  111. Tk implicitly adds it at the end of the B<WM_COLORMAP_WINDOWS>
  112. property, so that its colormap is lowest in priority.
  113. If I<$widget>-E<gt>colormapwindows is not invoked, Tk will automatically set
  114. the property for each top-level window to all the internal windows
  115. whose colormaps differ from their parents, followed by the top-level
  116. itself;  the order of the internal windows is undefined.
  117. See the ICCCM documentation for more information on the
  118. B<WM_COLORMAP_WINDOWS> property.
  119.  
  120. =item I<$toplevel>-E<gt>B<command>(?I<value>?)
  121.  
  122. If I<value> is specified, this method stores I<value> in I<$toplevel>'s
  123. B<WM_COMMAND> property for use by the window manager or
  124. session manager and returns an empty string.
  125. I<Value> must have proper list structure;  the elements should
  126. contain the words of the command used to invoke the application.
  127. If I<value> isn't specified then the method returns the last value
  128. set in a B<command> method for I<$toplevel>.
  129. If I<value> is specified as an empty string, the method
  130. deletes the B<WM_COMMAND> property from I<$toplevel>.
  131.  
  132. =item I<$toplevel>-E<gt>B<deiconify>
  133.  
  134. Arrange for I<$toplevel> to be displayed in normal (non-iconified) form.
  135. This is done by mapping the window.  If the window has never been
  136. mapped then this method will not map the window, but it will ensure
  137. that when the window is first mapped it will be displayed
  138. in de-iconified form.  Returns an empty string.
  139.  
  140. =item I<$toplevel>-E<gt>B<focusmodel>(?B<active>|B<passive>?)
  141.  
  142. If B<active> or B<passive> is supplied as an optional argument
  143. to the method, then it specifies the focus model for I<$toplevel>.
  144. In this case the method returns an empty string.  If no additional
  145. argument is supplied, then the method returns the current focus
  146. model for I<$toplevel>.
  147. An B<active> focus model means that I<$toplevel> will claim the
  148. input focus for itself or its descendants, even at times when
  149. the focus is currently in some other application.  B<Passive> means that
  150. I<$toplevel> will never claim the focus for itself:  the window manager
  151. should give the focus to I<$toplevel> at appropriate times.  However,
  152. once the focus has been given to I<$toplevel> or one of its descendants,
  153. the application may re-assign the focus among I<$toplevel>'s descendants.
  154. The focus model defaults to B<passive>, and Tk's B<focus> method
  155. assumes a passive model of focusing.
  156.  
  157. =item I<$toplevel>-E<gt>B<frame>
  158.  
  159. If I<$widget> has been reparented by the window manager into a
  160. decorative frame, the method returns the platform specific window
  161. identifier for the outermost frame that contains I<$toplevel> (the
  162. window whose parent is the root or virtual root).  If I<$toplevel>
  163. hasn't been reparented by the window manager then the method returns
  164. the platform specific window identifier for I<$toplevel>.
  165.  
  166. =item I<$toplevel>-E<gt>B<geometry>(?I<newGeometry>?)
  167.  
  168. If I<newGeometry> is specified, then the geometry of I<$toplevel>
  169. is changed and an empty string is returned.  Otherwise the current
  170. geometry for I<$toplevel> is returned (this is the most recent
  171. geometry specified either by manual resizing or
  172. in a B<geometry> method).  I<NewGeometry> has
  173. the form B<=>I<width>B<x>I<height>B<+->I<x>B<+->I<y>, where
  174. any of B<=>, I<width>B<x>I<height>, or B<+->I<x>B<+->I<y>
  175. may be omitted.  I<Width> and I<height> are positive integers
  176. specifying the desired dimensions of I<$toplevel>.  If I<$toplevel>
  177. is gridded (see L<"GRIDDED GEOMETRY MANAGEMENT"> below) then the dimensions
  178. are specified in grid units;  otherwise they are specified in pixel
  179. units.  I<X> and I<y> specify the desired location of
  180. I<$toplevel> on the screen, in pixels.
  181. If I<x> is preceded by B<+>, it specifies
  182. the number of pixels between the left edge of the screen and the left
  183. edge of I<$toplevel>'s border;  if preceded by B<-> then
  184. I<x> specifies the number of pixels
  185. between the right edge of the screen and the right edge of I<$toplevel>'s
  186. border.  If I<y> is preceded by B<+> then it specifies the
  187. number of pixels between the top of the screen and the top
  188. of I<$toplevel>'s border;  if I<y> is preceded by B<-> then
  189. it specifies the number of pixels between the bottom of I<$toplevel>'s
  190. border and the bottom of the screen.
  191. If I<newGeometry> is specified as an empty string then any
  192. existing user-specified geometry for I<$toplevel> is cancelled, and
  193. the window will revert to the size requested internally by its
  194. widgets.
  195.  
  196. =item I<$toplevel>-E<gt>B<wmGrid>(?I<baseWidth,baseHeight,widthInc,heightInc>?)
  197.  
  198. This method indicates that I<$toplevel> is to be managed as a
  199. gridded window.
  200. It also specifies the relationship between grid units and pixel units.
  201. I<BaseWidth> and I<baseHeight> specify the number of grid
  202. units corresponding to the pixel dimensions requested internally
  203. by I<$toplevel> using B<Tk_GeometryRequest>.  I<WidthInc>
  204. and I<heightInc> specify the number of pixels in each horizontal
  205. and vertical grid unit.
  206. These four values determine a range of acceptable sizes for
  207. I<$toplevel>, corresponding to grid-based widths and heights
  208. that are non-negative integers.
  209. Tk will pass this information to the window manager;  during
  210. manual resizing, the window manager will restrict the window's size
  211. to one of these acceptable sizes.
  212. Furthermore, during manual resizing the window manager will display
  213. the window's current size in terms of grid units rather than pixels.
  214. If I<baseWidth> etc. are all specified as empty strings, then
  215. I<$toplevel> will no longer be managed as a gridded window.  If
  216. I<baseWidth> etc. are specified then the return value is an
  217. empty string.
  218. Otherwise the return value is a array containing
  219. four elements corresponding to the current I<baseWidth>,
  220. I<baseHeight>, I<widthInc>, and I<heightInc>;  if
  221. I<$toplevel> is not currently gridded, then an empty string
  222. is returned.
  223. Note: this command should not be needed very often, since the
  224. B<Tk_SetGrid> library procedure and the B<-setgrid> option
  225. provide easier access to the same functionality.
  226.  
  227. =item I<$toplevel>-E<gt>B<group>(?I<$widget>?)
  228.  
  229. If I<$widget> is specified, it is the the leader of
  230. a group of related windows.  The window manager may use this information,
  231. for example, to unmap all of the windows in a group when the group's
  232. leader is iconified.  I<$widget> may be specified as an empty string to
  233. remove I<$toplevel> from any group association.  If I<$widget> is
  234. specified then the method returns an empty string;  otherwise it
  235. returns the I<$toplevel>'s current group leader, or an empty
  236. string if I<$toplevel> isn't part of any group.
  237.  
  238. =item I<$toplevel>-E<gt>B<iconbitmap>(?I<bitmap>?)
  239.  
  240. If I<bitmap> is specified, then it names a bitmap in the standard
  241. forms accepted by Tk (see the B<Tk_GetBitmap> documentation for details).
  242. This I<black and white> bitmap is passed to the window manager to be displayed
  243. in I<$toplevel>'s icon, and the method returns an empty string.  If
  244. an empty string is specified for I<bitmap>, then any current icon
  245. bitmap or image is cancelled for I<$toplevel>.
  246. If I<bitmap> is specified then the method returns an empty string.
  247. Otherwise it returns the name of
  248. the current icon bitmap associated with I<$toplevel>, or an empty
  249. string if I<$toplevel> has no icon bitmap.
  250.  
  251. =item I<$toplevel>-E<gt>B<iconify>
  252.  
  253. Arrange for I<$toplevel> to be iconified.  It I<$toplevel> hasn't
  254. yet been mapped for the first time, this method will arrange for
  255. it to appear in the iconified state when it is eventually mapped.
  256.  
  257. =item I<$toplevel>-E<gt>B<iconimage>(?I<image>?)
  258.  
  259. If I<image> is specified, then it names a normal Tk image.
  260. This image is rendered into a private I<coloured> bitmap which is passed to
  261. the window manager to be displayed in I<$toplevel>'s icon, and the method returns
  262. an empty string. If an empty string is specified for I<image>, then any current
  263. icon bitmap or image is cancelled for I<$toplevel>.
  264. If I<image> is specified then the method returns an empty string.
  265. Otherwise it returns the name of
  266. the current icon image associated with I<$toplevel>, or an empty
  267. string if I<$toplevel> has no icon image.
  268. The private pixmap is not pre-cleared so images which are partly "transparent"
  269. display rubbish in their transparent parts.
  270.  
  271. The sizes of images that can be used as icons in this manner are platform
  272. dependant. On Win32 this sets the "large" icon, which should be 32x32, it
  273. will automatically be scaled down to 16x16 for use as a small icon.
  274.  
  275. =item I<$toplevel>-E<gt>B<iconmask>(?I<bitmap>?)
  276.  
  277. If I<bitmap> is specified, then it names a bitmap in the standard
  278. forms accepted by Tk (see the B<Tk_GetBitmap> documentation for details).
  279. This bitmap is passed to the window manager to be used as a mask
  280. in conjunction with the B<iconbitmap> option:  where the mask
  281. has zeroes no icon will be displayed;  where it has ones, the bits
  282. from the icon bitmap will be displayed.  If
  283. an empty string is specified for I<bitmap> then any current icon
  284. mask is cancelled for I<$toplevel> (this is equivalent to specifying
  285. a bitmap of all ones).  If I<bitmap> is specified
  286. then the method returns an empty string.  Otherwise it
  287. returns the name of the current icon mask associated with
  288. I<$toplevel>, or an empty string if no mask is in effect.
  289.  
  290. =item I<$toplevel>-E<gt>B<iconname>(?I<newName>?)
  291.  
  292. If I<newName> is specified, then it is passed to the window
  293. manager;  the window manager should display I<newName> inside
  294. the icon associated with I<$toplevel>.  In this case an empty
  295. string is returned as result.  If I<newName> isn't specified
  296. then the method returns the current icon name for I<$toplevel>,
  297. or an empty string if no icon name has been specified (in this
  298. case the window manager will normally display the window's title,
  299. as specified with the B<title> method).
  300.  
  301. =item I<$toplevel>-E<gt>B<iconposition>(?I<x y>?)
  302.  
  303. If I<x> and I<y> are specified, they are passed to the window
  304. manager as a hint about where to position the icon for I<$toplevel>.
  305. In this case an empty string is returned.  If I<x> and I<y> are
  306. specified as empty strings then any existing icon position hint is cancelled.
  307. If neither I<x> nor I<y> is specified, then the method returns
  308. a array containing two values, which are the current icon position
  309. hints (if no hints are in effect then an empty string is returned).
  310.  
  311. =item I<$toplevel>-E<gt>B<iconwindow>(?I<$widget>?)
  312.  
  313. If I<$widget> is specified, it is a window to
  314. use as icon for I<$toplevel>: when I<$toplevel> is iconified then
  315. I<$widget> will be mapped to serve as icon, and when I<$toplevel>
  316. is de-iconified then I<$widget> will be unmapped again.  If
  317. I<$widget> is specified as an empty string then any existing
  318. icon window association for I<$toplevel> will be cancelled.  If
  319. the I<$widget> argument is specified then an empty string is
  320. returned.  Otherwise the method returns the
  321. current icon window for I<$toplevel>, or an empty string if there
  322. is no icon window currently specified for I<$toplevel>.
  323. Button press events are disabled for I<$toplevel> as long as it is
  324. an icon window;  this is needed in order to allow window managers
  325. to ``own'' those events.
  326. Note: not all window managers support the notion of an icon window.
  327.  
  328. =item I<$toplevel>-E<gt>B<maxsize>(?I<width,height>?)
  329.  
  330. If I<width> and I<height> are specified, they give
  331. the maximum permissible dimensions for I<$toplevel>.
  332. For gridded windows the dimensions are specified in
  333. grid units;  otherwise they are specified in pixel units.
  334. The window manager will restrict the window's dimensions to be
  335. less than or equal to I<width> and I<height>.
  336. If I<width> and I<height> are
  337. specified, then the method returns an empty string.  Otherwise
  338. it returns a array with two elements, which are the
  339. maximum width and height currently in effect.
  340. The maximum size defaults to the size of the screen.
  341. If resizing has been disabled with the B<resizable> method,
  342. then this method has no effect.
  343. See the sections on geometry management below for more information.
  344.  
  345. =item I<$toplevel>-E<gt>B<minsize>(?I<width,height>?)
  346.  
  347. If I<width> and I<height> are specified, they give the
  348. minimum permissible dimensions for I<$toplevel>.
  349. For gridded windows the dimensions are specified in
  350. grid units;  otherwise they are specified in pixel units.
  351. The window manager will restrict the window's dimensions to be
  352. greater than or equal to I<width> and I<height>.
  353. If I<width> and I<height> are
  354. specified, then the method returns an empty string.  Otherwise
  355. it returns a array with two elements, which are the
  356. minimum width and height currently in effect.
  357. The minimum size defaults to one pixel in each dimension.
  358. If resizing has been disabled with the B<resizable> method,
  359. then this method has no effect.
  360. See the sections on geometry management below for more information.
  361.  
  362. =item I<$toplevel>-E<gt>B<overrideredirect(?>I<boolean>?)
  363.  
  364. If I<boolean> is specified, it must have a proper boolean form and
  365. the override-redirect flag for I<$toplevel> is set to that value.
  366. If I<boolean> is not specified then B<1> or B<0> is
  367. returned to indicate whether or not the override-redirect flag
  368. is currently set for I<$toplevel>.
  369. Setting the override-redirect flag for a window causes
  370. it to be ignored by the window manager;  among other things, this means
  371. that the window will not be reparented from the root window into a
  372. decorative frame and the user will not be able to manipulate the
  373. window using the normal window manager mechanisms.
  374.  
  375. =item I<$toplevel>-E<gt>B<positionfrom>(?I<who>?)
  376.  
  377. If I<who> is specified, it must be either B<program> or
  378. B<user>, or an abbreviation of one of these two.  It indicates
  379. whether I<$toplevel>'s current position was requested by the
  380. program or by the user.  Many window managers ignore program-requested
  381. initial positions and ask the user to manually position the window;  if
  382. B<user> is specified then the window manager should position the
  383. window at the given place without asking the user for assistance.
  384. If I<who> is specified as an empty string, then the current position
  385. source is cancelled.
  386. If I<who> is specified, then the method returns an empty string.
  387. Otherwise it returns B<user> or $widget to indicate the
  388. source of the window's current position, or an empty string if
  389. no source has been specified yet.  Most window managers interpret
  390. ``no source'' as equivalent to B<program>.
  391. Tk will automatically set the position source to B<user>
  392. when a B<geometry> method is invoked, unless the source has
  393. been set explicitly to B<program>.
  394.  
  395. =item I<$toplevel>-E<gt>B<protocol>(?I<name>?,?I<callback>?)
  396.  
  397. This method is used to manage window manager protocols such as
  398. B<WM_DELETE_WINDOW>.
  399. I<Name> is the name of an atom corresponding to a window manager
  400. protocol, such as B<WM_DELETE_WINDOW> or B<WM_SAVE_YOURSELF>
  401. or B<WM_TAKE_FOCUS>.
  402. If both I<name> and I<callback> are specified, then I<callback>
  403. is associated with the protocol specified by I<name>.
  404. I<Name> will be added to I<$toplevel>'s B<WM_PROTOCOLS>
  405. property to tell the window manager that the application has a
  406. protocol handler for I<name>, and I<callback> will
  407. be invoked in the future whenever the window manager sends a
  408. message to the client for that protocol.
  409. In this case the method returns an empty string.
  410. If I<name> is specified but I<callback> isn't, then the current
  411. callback for I<name> is returned, or an empty string if there
  412. is no handler defined for I<name>.
  413. If I<callback> is specified as an empty string then the current
  414. handler for I<name> is deleted and it is removed from the
  415. B<WM_PROTOCOLS> property on I<$toplevel>;  an empty string is
  416. returned.
  417. Lastly, if neither I<name> nor I<callback> is specified, the
  418. method returns a list of all the protocols for which handlers
  419. are currently defined for I<$toplevel>.
  420.  
  421. =over 8
  422.  
  423. Tk always defines a protocol handler for B<WM_DELETE_WINDOW>, even if
  424. you haven't asked for one with B<protocol>.
  425. If a B<WM_DELETE_WINDOW> message arrives when you haven't defined
  426. a handler, then Tk handles the message by destroying the window for
  427. which it was received.
  428.  
  429. =back
  430.  
  431. =item I<$toplevel>-E<gt>B<resizable>(?I<width,height>?)
  432.  
  433. This method controls whether or not the user may interactively
  434. resize a top-level window.  If I<width> and I<height> are
  435. specified, they are boolean values that determine whether the
  436. width and height of I<$toplevel> may be modified by the user.
  437. In this case the method returns an empty string.
  438. If I<width> and I<height> are omitted then the method
  439. returns a list with two 0/1 elements that indicate whether the
  440. width and height of I<$toplevel> are currently resizable.
  441. By default, windows are resizable in both dimensions.
  442. If resizing is disabled, then the window's size will be the size
  443. from the most recent interactive resize or B<geometry>
  444. method.  If there has been no such operation then
  445. the window's natural size will be used.
  446.  
  447. =item I<$toplevel>-E<gt>B<sizefrom>(?I<who>?)
  448.  
  449. If I<who> is specified, it must be either B<program> or
  450. B<user>, or an abbreviation of one of these two.  It indicates
  451. whether I<$toplevel>'s current size was requested by the
  452. program or by the user.  Some window managers ignore program-requested
  453. sizes and ask the user to manually size the window;  if
  454. B<user> is specified then the window manager should give the
  455. window its specified size without asking the user for assistance.
  456. If I<who> is specified as an empty string, then the current size
  457. source is cancelled.
  458. If I<who> is specified, then the method returns an empty string.
  459. Otherwise it returns B<user> or $widget to indicate the
  460. source of the window's current size, or an empty string if
  461. no source has been specified yet.  Most window managers interpret
  462. ``no source'' as equivalent to B<program>.
  463.  
  464. =item I<$toplevel>-E<gt>B<stackorder>( I<?isabove|isbelow $toplevel?> );
  465.  
  466. The stackorder command returns a list  of  toplevel  windows  in
  467. stacking  order,  from lowest to highest. When a single toplevel
  468. window is passed, the returned list recursively includes all  of
  469. the  window's  children that are toplevels. Only those toplevels
  470. that are currently mapped  to  the  screen  are  returned.   The
  471. stackorder command can also be used to determine if one toplevel
  472. is positioned above or below a second toplevel.  When two window
  473. arguments  separated  by either isabove or isbelow are passed, a
  474. boolean result indicates whether or not the first window is
  475. currently above or below the second window in the stacking order.
  476.  
  477.  
  478. =item I<$toplevel>-E<gt>B<state>(?I<newstate>?)
  479.  
  480. If I<newstate> is specified, the window will be set to
  481. the new state, otherwise it returns the current state of
  482. I<$toplevel>: either B<normal>, B<iconic>, B<withdrawn>, B<icon>, or
  483. (Windows only) B<zoomed>. The
  484. difference between B<iconic> and B<icon> is that B<iconic> refers to a
  485. window that has been iconified (e.g., with the B<iconify> method)
  486. while B<icon> refers to a window whose only purpose is to serve as the
  487. icon for some other window (via the B<iconwindow> method). The
  488. B<icon> state cannot be set.
  489.  
  490.  
  491. =item I<$toplevel>-E<gt>B<title>(?I<string>?)
  492.  
  493. If I<string> is specified, then it will be passed to the window
  494. manager for use as the title for I<$toplevel> (the window manager
  495. should display this string in I<$toplevel>'s title bar).  In this
  496. case the method returns an empty string.  If I<string> isn't
  497. specified then the method returns the current title for the
  498. I<$toplevel>.  The title for a window defaults to its name.
  499.  
  500. =item I<$toplevel>-E<gt>B<transient>(?I<master>?)
  501.  
  502. If I<master> is specified, then the window manager is informed
  503. that I<$toplevel> is a transient window (e.g. pull-down menu) working
  504. on behalf of I<master> (where I<master> is
  505. a top-level window).  Some window managers will use
  506. this information to manage I<$toplevel> specially.  If I<master>
  507. is specified as an empty string then I<$toplevel> is marked as not
  508. being a transient window any more.  If I<master> is specified,
  509. then the method returns an empty string.  Otherwise the method
  510. returns the path name of I<$toplevel>'s current master, or an
  511. empty string if I<$toplevel> isn't currently a transient window.
  512.  
  513. =item I<$toplevel>-E<gt>B<withdraw>
  514.  
  515. Arranges for I<$toplevel> to be withdrawn from the screen.  This
  516. causes the window to be unmapped and forgotten about by the window
  517. manager.  If the window
  518. has never been mapped, then this method
  519. causes the window to be mapped in the withdrawn state.  Not all
  520. window managers appear to know how to handle windows that are
  521. mapped in the withdrawn state.
  522. Note: it sometimes seems to be necessary to withdraw a
  523. window and then re-map it (e.g. with B<deiconify>) to get some
  524. window managers to pay attention to changes in window attributes
  525. such as group.
  526.  
  527. =item I<$toplevel>-E<gt>B<wrapper>
  528.  
  529. Returns the window id of the wrapper window in which Tk has placed
  530. I<$toplevel>. This is the id by which window manager will know
  531. I<$toplevel>, and so is appropriate place to add X properties.
  532.  
  533. =back
  534.  
  535. =head1 ICON SIZES
  536.  
  537. The sizes of bitmaps/images that can be used as icons in this manner are platform
  538. and window manager dependant. Unix window managers are typically more tolerant
  539. than Win32. It is possible that coloured C<iconimage> icons may cause problems
  540. on some X window managers.
  541.  
  542. =over 4
  543.  
  544. =item * Win32
  545.  
  546. C<iconimage> and C<iconbitmap> set the "large" icon, which should be
  547. 32x32, it will automatically be scaled down to 16x16 for use as a small icon.
  548. Win32 ignores C<iconwin> requests.
  549.  
  550. =item * KDE's "kwm"
  551.  
  552. Accepts coloured C<iconimage> and black and white C<iconbitmap> but
  553. will scale either to a small (14x14?) icon. Kwm ignores C<iconwin>.
  554.  
  555. =item * Sun's "olwm" or "olvwm"
  556.  
  557. Honours C<iconwin> which will override C<iconimage> or C<iconbitmap>.
  558. Coloured images work.
  559.  
  560. =item * Sun's CDE window manager
  561.  
  562. Coloured images work. ...
  563.  
  564. =back
  565.  
  566. =head1 GEOMETRY MANAGEMENT
  567.  
  568. By default a top-level window appears on the screen in its
  569. I<natural size>, which is the one determined internally by its
  570. widgets and geometry managers.
  571. If the natural size of a top-level window changes, then the window's size
  572. changes to match.
  573. A top-level window can be given a size other than its natural size in two ways.
  574. First, the user can resize the window manually using the facilities
  575. of the window manager, such as resize handles.
  576. Second, the application can request a particular size for a
  577. top-level window using the B<geometry> method.
  578. These two cases are handled identically by Tk;  in either case,
  579. the requested size overrides the natural size.
  580. You can return the window to its natural by invoking B<geometry>
  581. with an empty I<geometry> string.
  582.  
  583. Normally a top-level window can have any size from one pixel in each
  584. dimension up to the size of its screen.
  585. However, you can use the B<minsize> and B<maxsize> methods
  586. to limit the range of allowable sizes.
  587. The range set by B<minsize> and B<maxsize> applies to
  588. all forms of resizing, including the window's natural size as
  589. well as manual resizes and the B<geometry> method.
  590. You can also use the method B<resizable> to completely
  591. disable interactive resizing in one or both dimensions.
  592.  
  593. =head1 GRIDDED GEOMETRY MANAGEMENT
  594.  
  595. Gridded geometry management occurs when one of the widgets of an
  596. application supports a range of useful sizes.
  597. This occurs, for example, in a text editor where the scrollbars,
  598. menus, and other adornments are fixed in size but the edit widget
  599. can support any number of lines of text or characters per line.
  600. In this case, it is usually desirable to let the user specify the
  601. number of lines or characters-per-line, either with the
  602. B<geometry> method or by interactively resizing the window.
  603. In the case of text, and in other interesting cases also, only
  604. discrete sizes of the window make sense, such as integral numbers
  605. of lines and characters-per-line;  arbitrary pixel sizes are not useful.
  606.  
  607. Gridded geometry management provides support for this kind of
  608. application.
  609. Tk (and the window manager) assume that there is a grid of some
  610. sort within the application and that the application should be
  611. resized in terms of I<grid units> rather than pixels.
  612. Gridded geometry management is typically invoked by turning on
  613. the B<setGrid> option for a widget;  it can also be invoked
  614. with the B<wmGrid> method or by calling B<Tk_SetGrid>.
  615. In each of these approaches the particular widget (or sometimes
  616. code in the application as a whole) specifies the relationship between
  617. integral grid sizes for the window and pixel sizes.
  618. To return to non-gridded geometry management, invoke
  619. B<grid> with empty argument strings.
  620.  
  621. When gridded geometry management is enabled then all the dimensions specified
  622. in B<minsize>, B<maxsize>, and B<geometry> methods
  623. are treated as grid units rather than pixel units.
  624. Interactive resizing is also carried out in even numbers of grid units
  625. rather than pixels.
  626.  
  627. =head1 BUGS
  628.  
  629. Most existing window managers appear to have bugs that affect the
  630. operation of the B<wm> methods.  For example, some changes won't
  631. take effect if the window is already active:  the window will have
  632. to be withdrawn and de-iconified in order to make the change happen.
  633.  
  634. =head1 SEE ALSO
  635.  
  636. L<Tk::Widget|Tk::Widget>
  637. L<Tk::tixWm|Tk::tixWm>
  638. L<Tk::Mwm|Tk::Mwm>
  639.  
  640. =head1 KEYWORDS
  641.  
  642. aspect ratio, deiconify, focus model, geometry, grid, group, icon, iconify, increments, position, size, title, top-level window, units, window manager
  643.  
  644. =cut
  645.  
  646.