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

  1. #  Copyright (c) 1990-1994 The Regents of the University of California.
  2. #  Copyright (c) 1994-1997 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::Widget - Base class of all widgets
  11.  
  12. =for pm Tk/Widget.pm
  13.  
  14. =for category Tk Generic Methods
  15.  
  16. =head1 SYNOPSIS
  17.  
  18.    package Tk::Whatever;
  19.    require Tk::Widget;
  20.    @ISA = qw(Tk::Widget);
  21.    Construct Tk::Widget 'Whatever';
  22.  
  23.    sub Tk_cmd { \&Tk::whatever }
  24.  
  25. S<   >I<$widget>-E<gt>I<method>(?I<arg, arg, ...>?)
  26.  
  27. =head1 DESCRIPTION
  28.  
  29. The B<Tk::Widget> is an abstract base class for all Tk widgets.
  30.  
  31. Generic methods available to all widgets include the methods based on core
  32. C<winfo> mechanism and are used to retrieve information about windows managed by
  33. Tk. They can take any of a number of different forms, depending on the I<method>.
  34. The legal forms are:
  35.  
  36. =over 4
  37.  
  38. =item I<$widget>-E<gt>B<appname>?(I<newName>)?
  39.  
  40. If I<newName> isn't specified, this method returns the name
  41. of the application (the name that may be used in B<send>
  42. commands to communicate with the application).
  43. If I<newName> is specified, then the name of the application
  44. is changed to I<newName>.
  45. If the given name is already in use, then a suffix of the form
  46. ``B< #2>'' or ``B< #3>'' is appended in order to make the name unique.
  47. The method's result is the name actually chosen.
  48. I<newName> should not start with a capital letter.
  49. This will interfere with L<option|Tk::option> processing, since names starting with
  50. capitals are assumed to be classes;  as a result, Tk may not
  51. be able to find some options for the application.
  52. If sends have been disabled by deleting the B<send> command,
  53. this command will reenable them and recreate the B<send>
  54. command.
  55.  
  56. =item I<$widget>-E<gt>B<atom>(I<name>)
  57.  
  58. Returns a decimal string giving the integer identifier for the
  59. atom whose name is I<name>.  If no atom exists with the name
  60. I<name> then a new one is created.
  61.  
  62. =item I<$widget>-E<gt>B<atomname>(I<id>)
  63.  
  64. Returns the textual name for the atom whose integer identifier is
  65. I<id>.
  66. This command is the inverse of the I<$widget>-E<gt>B<atom> command.
  67. It generates an error if no such atom exists.
  68.  
  69. =item I<$widget>-E<gt>B<bell>( ?-nice? );
  70.  
  71. This command rings the bell on the display for I<$widget> and
  72. returns an empty string.
  73. The command uses the current bell-related settings for the display, which
  74. may be modified with programs such as B<xset>.
  75.  
  76. If I<-nice>  is  not specified, this command also resets the screen saver
  77. for the screen.  Some screen savers will ignore this, but  others  will
  78. reset so that the screen becomes visible again.
  79.  
  80. =item I<$widget>-E<gt>B<bindDump>
  81.  
  82. This command returns a list of strings suitable for printing detailing
  83. binding information for a widget.  It prints a widget's
  84. bindtags.  For each binding tag it prints all the bindings, comprised
  85. of the event descriptor and the callback.  Callback arguments are
  86. printed, and B<Tk::Ev> objects are expanded.
  87.  
  88. =item I<$widget>-E<gt>B<Busy>?(?-recurse => 1?I<-option => value>?)?
  89.  
  90. This method B<configure>s a B<-cursor> option for I<$widget> and
  91. (if B<-recurse => 1> is specified) all its descendants. The cursor to
  92. be set may be passed as S<B<-cursor> => I<cursor>> or defaults to 'watch'.
  93. Additional B<configure> options are applied to I<$widget> only.
  94. It also adds a special tag B<'Busy'> to the B<bindtags> of the widgets so
  95. configured so that  B<KeyPress>, B<KeyRelease>, B<ButtonPress> and
  96. B<ButtonRelease> events are ignored (with press events generating a call to
  97. B<bell>). It then acquires a local B<grab> for I<$widget>.
  98. The state of the widgets and the grab is restored by a call to
  99. I<$widget>-E<gt>B<Unbusy>.
  100.  
  101. =item I<$widget>-E<gt>B<caret>( I<?-x x?, ?-y y?, ?-height height?> );
  102.  
  103. Sets and queries the caret location for the display of the specified
  104. Tk window window.  The caret is the per-display cursor location used
  105. for indicating global focus (e.g. to comply with Microsoft
  106. Accessibility guidelines), as well as for location of the
  107. over-the-spot XIM (X Input Methods) or Windows IME windows. If no
  108. options are specified, the last values used for setting the caret are
  109. return in option-value pair format.  -x and -y represent
  110. window-relative coordinates, and -height is the height of the current
  111. cursor location, or the height of the specified window if none is
  112. given.
  113.  
  114. =item I<$widget>-E<gt>B<cells>
  115.  
  116. Returns a decimal string giving the number of cells in the
  117. color map for I<$widget>.
  118.  
  119. =item I<$widget>-E<gt>B<children>
  120.  
  121. I<$widget->>B<children>
  122. Returns a list containing all the children
  123. of $widget.  The list is in stacking order, with the lowest
  124. window first.  Top-level windows are returned as children
  125. of their logical parents.
  126.  
  127. =item I<$widget>-E<gt>B<class>
  128.  
  129. Returns the class name for I<$widget>.
  130.  
  131. =item I<$widget>-E<gt>B<colormapfull>
  132.  
  133. Returns 1 if the colormap for I<$widget> is known to be full, 0
  134. otherwise.  The colormap for a window is ``known'' to be full if the last
  135. attempt to allocate a new color on that window failed and this
  136. application hasn't freed any colors in the colormap since the
  137. failed allocation.
  138.  
  139. =item I<$widget>-E<gt>B<ConfigSpecs>
  140.  
  141. Used to perform delegated option configuration for a mega-widget.
  142. Returns, in Tk::Derived::ConfigSpecs notation (see L<Tk::ConfigSpecs>),
  143. all possible options for a widget. For example,
  144.  
  145.  $s = $self->Scale;
  146.  $self->ConfigSpecs(
  147.      $s->ConfigSpecs,
  148.      .... more ConfigSpecs specifications
  149.  );
  150.  
  151. returns a hash of all Tk::Scale options, delegated to $s - e.g. some
  152. representative examples:
  153.  
  154.  -bigincrement => [$s, bigIncrement, BigIncrement, 0, 0]
  155.  -digits       => [$s, digits, Digits, 0, 0]
  156.  -sliderlength => [$s, sliderLength, SliderLength, 10m, 30]
  157.  -troughcolor  => [$s, troughColor, Background, #c3c3c3, #c3c3c3]
  158.  
  159. This provides an easy means of populating a mega-widget's ConfigSpecs
  160. with initializers.
  161.  
  162. =item I<$widget>-E<gt>B<containing>(I<rootX,rootY>)
  163.  
  164. Returns the window containing the point given
  165. by I<rootX> and I<rootY>.
  166. I<RootX> and I<rootY> are specified in screen units (i.e.
  167. any form acceptable to B<Tk_GetPixels>) in the coordinate
  168. system of the root window (if a virtual-root window manager is in
  169. use then the coordinate system of the virtual root window is used).
  170. If no window in this application contains the point then an empty
  171. string is returned.
  172. In selecting the containing window, children are given higher priority
  173. than parents and among siblings the highest one in the stacking order is
  174. chosen.
  175.  
  176. =item I<$widget>-E<gt>B<depth>
  177.  
  178. Returns a decimal string giving the depth of I<$widget> (number
  179. of bits per pixel).
  180.  
  181. =item I<$widget>-E<gt>B<destroy>
  182.  
  183. This command deletes the window related to
  184. I<$widget>, plus all its descendants.
  185. If all the B<MainWindows> are deleted then the entire application
  186. will be destroyed.
  187.  
  188. The perl object I<$widget> continues to exist while references
  189. to it still exist, e.g. until variable goes out of scope.
  190. However any attempt to use Tk methods on the object will fail.
  191. B<Exists>(I<$widget>) will return false on such objects.
  192.  
  193. Note however that while a window exists for I<$widget> the
  194. perl object is maintained (due to "references" in perl/Tk internals)
  195. even though original variables may have gone out of scope.
  196. (Normally this is intuitive.)
  197.  
  198. =item B<Exists>(I<$widget>)
  199.  
  200. Returns 1 if there exists a window for I<$widget>, 0 if no such
  201. window exists.
  202.  
  203. =item I<$widget>-E<gt>B<font>(I<option>?, I<arg, arg, ...>?)
  204.  
  205. Create and inspect fonts. See L<Tk::Font> for further details.
  206.  
  207. =item I<$widget>-E<gt>B<fpixels>(I<number>)
  208.  
  209. Returns a floating-point value giving the number of pixels
  210. in I<$widget> corresponding to the distance given by I<number>.
  211. I<Number> may be specified in any of the forms acceptable
  212. to B<Tk_GetScreenMM>, such as ``2.0c'' or ``1i''.
  213. The return value may be fractional;  for an integer value, use
  214. I<$widget>-E<gt>B<pixels>.
  215.  
  216. =item I<$widget>-E<gt>B<Getimage>(I<name>)
  217.  
  218. Given I<name>, look for an image file with that base name and return
  219. a L<Tk::Image>.  File extensions are tried in this order: F<xpm>,
  220. F<gif>, F<ppm>, F<xbm> until a valid iamge is found.  If no image is
  221. found, try a builtin image with that name.
  222.  
  223. =item I<$widget>-E<gt>B<geometry>
  224.  
  225. Returns the geometry for I<$widget>, in the form
  226. I<width>B<x>I<height>B<+>I<x>B<+>I<y>.  All dimensions are
  227. in pixels.
  228.  
  229. =item I<$widget>-E<gt>B<height>
  230.  
  231. Returns a decimal string giving I<$widget>'s height in pixels.
  232. When a window is first created its height will be 1 pixel;  the
  233. height will eventually be changed by a geometry manager to fulfill
  234. the window's needs.
  235. If you need the true height immediately after creating a widget,
  236. invoke B<update> to force the geometry manager to arrange it,
  237. or use I<$widget>-E<gt>B<reqheight> to get the window's requested height
  238. instead of its actual height.
  239.  
  240. =item I<$widget>-E<gt>B<id>
  241.  
  242. Returns a hexadecimal string giving a low-level platform-specific
  243. identifier for $widget.  On Unix platforms, this is the X
  244. window identifier.  Under Windows, this is the Windows
  245. HWND.  On the Macintosh the value has no meaning outside Tk.
  246.  
  247. =item I<$widget>-E<gt>B<idletasks>
  248.  
  249. One of two methods which are used to bring the application ``up to date''
  250. by entering the event loop repeated until all pending events
  251. (including idle callbacks) have been processed.
  252.  
  253. If the B<idletasks> method is specified, then no new events or errors
  254. are processed; only idle callbacks are invoked. This causes operations
  255. that are normally deferred, such as display updates and window layout
  256. calculations, to be performed immediately.
  257.  
  258. The B<idletasks> command is useful in scripts where changes have been
  259. made to the application's state and you want those changes to appear
  260. on the display immediately, rather than waiting for the script to
  261. complete. Most display updates are performed as idle callbacks, so
  262. B<idletasks> will cause them to run. However, there are some kinds of
  263. updates that only happen in response to events, such as those
  264. triggered by window size changes; these updates will not occur in
  265. B<idletasks>.
  266.  
  267. =item I<$widget>-E<gt>B<interps>
  268.  
  269. Returns a list whose members are the names of all Tcl interpreters
  270. (e.g. all Tk-based applications) currently registered for
  271. a particular display.
  272. The return value refers
  273. to the display of I<$widget>.
  274.  
  275. =item I<$widget>-E<gt>B<ismapped>
  276.  
  277. Returns B<1> if I<$widget> is currently mapped, B<0> otherwise.
  278.  
  279. =item I<$widget->>B<lower>(?I<belowThis>?)
  280.  
  281. If the I<belowThis> argument is omitted then the command lowers
  282. $widget so that it is below all of its siblings in the stacking
  283. order (it will be obscured by any siblings that overlap it and
  284. will not obscure any siblings).
  285. If I<belowThis> is specified then it must be the path name of
  286. a window that is either a sibling of $widget or the descendant
  287. of a sibling of $widget.
  288. In this case the B<lower> command will insert
  289. $widget into the stacking order just below I<belowThis>
  290. (or the ancestor of I<belowThis> that is a sibling of $widget);
  291. this could end up either raising or lowering $widget.
  292.  
  293. =item I<$widget>-E<gt>B<MapWindow>
  294.  
  295. Cause I<$widget> to be "mapped" i.e. made visible on the display.
  296. May confuse the geometry manager (pack, grid, place, ...)
  297. that thinks it is managing the widget.
  298.  
  299. =item I<$widget>-E<gt>B<manager>
  300.  
  301. Returns the name of the geometry manager currently
  302. responsible for I<$widget>, or an empty string if I<$widget>
  303. isn't managed by any geometry manager.
  304. The name is usually the name of the method for the geometry
  305. manager, such as B<pack> or B<place>.
  306. If the geometry manager is a widget, such as canvases or text, the
  307. name is the widget's class command, such as B<canvas>.
  308.  
  309. =item I<$widget>-E<gt>B<name>
  310.  
  311. Returns I<$widget>'s name (i.e. its name within its parent, as opposed
  312. to its full path name).
  313. The command I<$mainwin>-E<gt>B<name> will return the name of the application.
  314.  
  315. =item I<$widget>-E<gt>B<OnDestroy>(I<callback>);
  316.  
  317. OnDestroy accepts a standard perl/Tk I<callback>.
  318. When the window associated with I<$widget> is destroyed then
  319. the callback is invoked. Unlike I<$widget->>bind('E<lt>DestroyE<gt>',...)
  320. the widgets methods are still available when I<callback> is executed,
  321. so (for example) a B<Text> widget can save its contents to a file.
  322.  
  323. OnDestroy was required for new B<after> mechanism.
  324.  
  325. =item I<$widget>-E<gt>B<parent>
  326.  
  327. Returns I<$widget>'s parent, or an empty string
  328. if I<$widget> is the main window of the application.
  329.  
  330. =item I<$widget>-E<gt>B<PathName>
  331.  
  332. Returns the tk path name of I<$widget>. (This is an import from the
  333. C interface.)
  334.  
  335. =item I<$widget>-E<gt>B<pathname>(I<id>)
  336.  
  337. Returns an object whose X identifier is I<id>.
  338. The identifier is looked up on the display of I<$widget>.
  339. I<Id> must be a decimal, hexadecimal, or octal integer and must
  340. correspond to a window in the invoking application, or an error
  341. occurs which can be trapped with C<eval { }> or C<Tk::catch { }>.
  342. If the window belongs to the application, but is not an object
  343. (for example wrapper windows, HList header, etc.) then C<undef>
  344. is returned.
  345.  
  346. =item I<$widget>-E<gt>B<pixels>(I<number>)
  347.  
  348. Returns the number of pixels in I<$widget> corresponding
  349. to the distance given by I<number>.
  350. I<Number> may be specified in any of the forms acceptable
  351. to B<Tk_GetPixels>, such as ``2.0c'' or ``1i''.
  352. The result is rounded to the nearest integer value;  for a
  353. fractional result, use I<$widget>-E<gt>B<fpixels>.
  354.  
  355. =item I<$widget>-E<gt>B<pointerx>
  356.  
  357. If the mouse pointer is on the same screen as I<$widget>, returns the
  358. pointer's x coordinate, measured in pixels in the screen's root window.
  359. If a virtual root window is in use on the screen, the position is
  360. measured in the virtual root.
  361. If the mouse pointer isn't on the same screen as I<$widget> then
  362. -1 is returned.
  363.  
  364. =item I<$widget>-E<gt>B<pointerxy>
  365.  
  366. If the mouse pointer is on the same screen as I<$widget>, returns a list
  367. with two elements, which are the pointer's x and y coordinates measured
  368. in pixels in the screen's root window.
  369. If a virtual root window is in use on the screen, the position
  370. is computed in the virtual root.
  371. If the mouse pointer isn't on the same screen as I<$widget> then
  372. both of the returned coordinates are -1.
  373.  
  374. =item I<$widget>-E<gt>B<pointery>
  375.  
  376. If the mouse pointer is on the same screen as I<$widget>, returns the
  377. pointer's y coordinate, measured in pixels in the screen's root window.
  378. If a virtual root window is in use on the screen, the position
  379. is computed in the virtual root.
  380. If the mouse pointer isn't on the same screen as I<$widget> then
  381. -1 is returned.
  382.  
  383. =item I<$widget>-E<gt>B<raise>(?I<aboveThis>?)
  384.  
  385. If the I<aboveThis> argument is omitted then the command raises
  386. $widget so that it is above all of its siblings in the stacking
  387. order (it will not be obscured by any siblings and will obscure
  388. any siblings that overlap it).
  389. If I<aboveThis> is specified then it must be the path name of
  390. a window that is either a sibling of $widget or the descendant
  391. of a sibling of $widget.
  392. In this case the B<raise> command will insert
  393. $widget into the stacking order just above I<aboveThis>
  394. (or the ancestor of I<aboveThis> that is a sibling of $widget);
  395. this could end up either raising or lowering $widget.
  396.  
  397. =item I<$widget>-E<gt>B<reqheight>
  398.  
  399. Returns a decimal string giving I<$widget>'s requested height,
  400. in pixels.  This is the value used by I<$widget>'s geometry
  401. manager to compute its geometry.
  402.  
  403. =item I<$widget>-E<gt>B<reqwidth>
  404.  
  405. Returns a decimal string giving I<$widget>'s requested width,
  406. in pixels.  This is the value used by I<$widget>'s geometry
  407. manager to compute its geometry.
  408.  
  409. =item I<$widget>-E<gt>B<rgb>(I<color>)
  410.  
  411. Returns a list containing three decimal values, which are the
  412. red, green, and blue intensities that correspond to I<color> in
  413. the window given by I<$widget>.  I<Color>
  414. may be specified in any of the forms acceptable for a color
  415. option.
  416.  
  417. =item I<$widget>-E<gt>B<rootx>
  418.  
  419. Returns a decimal string giving the x-coordinate, in the root
  420. window of the screen, of the
  421. upper-left corner of I<$widget>'s border (or I<$widget> if it
  422. has no border).
  423.  
  424. =item I<$widget>-E<gt>B<rooty>
  425.  
  426. Returns a decimal string giving the y-coordinate, in the root
  427. window of the screen, of the
  428. upper-left corner of I<$widget>'s border (or I<$widget> if it
  429. has no border).
  430.  
  431. =item B<scaling>
  432.  
  433. =item I<$widget>-E<gt>B<scaling>?(I<number>)?
  434.  
  435. Sets and queries the current scaling factor used by Tk to convert between
  436. physical units (for example, points, inches, or millimeters) and pixels.  The
  437. I<number> argument is a floating point number that specifies the number of
  438. pixels per point on $widget's display. If the I<number> argument is
  439. omitted, the current value of the scaling factor is returned.
  440.  
  441. A ``point'' is a unit of measurement equal to 1/72 inch.  A scaling factor
  442. of 1.0 corresponds to 1 pixel per point, which is equivalent to a standard
  443. 72 dpi monitor.  A scaling factor of 1.25 would mean 1.25 pixels per point,
  444. which is the setting for a 90 dpi monitor; setting the scaling factor to
  445. 1.25 on a 72 dpi monitor would cause everything in the application to be
  446. displayed 1.25 times as large as normal.  The initial value for the scaling
  447. factor is set when the application starts, based on properties of the
  448. installed monitor (as reported via the window system),
  449. but it can be changed at any time.  Measurements made
  450. after the scaling factor is changed will use the new scaling factor, but it
  451. is undefined whether existing widgets will resize themselves dynamically to
  452. accomodate the new scaling factor.
  453.  
  454. =item I<$widget>-E<gt>B<screen>
  455.  
  456. Returns the name of the screen associated with I<$widget>, in
  457. the form I<displayName>.I<screenIndex>.
  458.  
  459. =item I<$widget>-E<gt>B<screencells>
  460.  
  461. Returns a decimal string giving the number of cells in the default
  462. color map for I<$widget>'s screen.
  463.  
  464. =item I<$widget>-E<gt>B<screendepth>
  465.  
  466. Returns a decimal string giving the depth of the root window
  467. of I<$widget>'s screen (number of bits per pixel).
  468.  
  469. =item I<$widget>-E<gt>B<screenheight>
  470.  
  471. Returns a decimal string giving the height of I<$widget>'s screen,
  472. in pixels.
  473.  
  474. =item I<$widget>-E<gt>B<screenmmheight>
  475.  
  476. Returns a decimal string giving the height of I<$widget>'s screen,
  477. in millimeters.
  478.  
  479. =item I<$widget>-E<gt>B<screenmmwidth>
  480.  
  481. Returns a decimal string giving the width of I<$widget>'s screen,
  482. in millimeters.
  483.  
  484. =item I<$widget>-E<gt>B<screenvisual>
  485.  
  486. Returns one of the following strings to indicate the default visual
  487. class for I<$widget>'s screen: B<directcolor>, B<grayscale>,
  488. B<pseudocolor>, B<staticcolor>, B<staticgray>, or
  489. B<truecolor>.
  490.  
  491. =item I<$widget>-E<gt>B<screenwidth>
  492.  
  493. Returns a decimal string giving the width of I<$widget>'s screen,
  494. in pixels.
  495.  
  496. =item I<$widget>-E<gt>B<server>
  497.  
  498. Returns a string containing information about the server for
  499. I<$widget>'s display.  The exact format of this string may vary
  500. from platform to platform.  For X servers the string
  501. has the form ``B<X>I<major>B<R>I<minor vendor vendorVersion>''
  502. where I<major> and I<minor> are the version and revision
  503. numbers provided by the server (e.g., B<X11R5>), I<vendor>
  504. is the name of the vendor for the server, and I<vendorRelease>
  505. is an integer release number provided by the server.
  506.  
  507. =item I<$widget>-E<gt>B<toplevel>
  508.  
  509. Returns the reference of the top-level window containing I<$widget>.
  510.  
  511. =item I<$widget>-E<gt>B<UnmapWindow>
  512.  
  513. Cause I<$widget> to be "unmapped" i.e. removed from the display.
  514. This does for any widget what I<$widget>-E<gt>withdraw does for
  515. toplevel widgets. May confuse the geometry manager (pack, grid, place, ...)
  516. that thinks it is managing the widget.
  517.  
  518. =item I<$widget>-E<gt>B<update>
  519.  
  520. One of two methods which are used to bring the application ``up to date''
  521. by entering the event loop repeated until all pending events
  522. (including idle callbacks) have been processed.
  523.  
  524. The B<update> method is useful in scripts where you are performing a
  525. long-running computation but you still want the application to respond
  526. to events such as user interactions; if you occasionally call
  527. B<update> then user input will be processed during the next call to
  528. B<update>.
  529.  
  530. =item I<$widget>-E<gt>B<Unbusy>
  531.  
  532. Restores widget state after a call to  I<$widget>-E<gt>B<Busy>.
  533.  
  534. =item I<$widget>-E<gt>B<viewable>
  535.  
  536. Returns 1 if I<$widget> and all of its ancestors up through the
  537. nearest toplevel window are mapped.  Returns 0 if any of these
  538. windows are not mapped.
  539.  
  540. =item I<$widget>-E<gt>B<visual>
  541.  
  542. Returns one of the following strings to indicate the visual
  543. class for I<$widget>: B<directcolor>, B<grayscale>,
  544. B<pseudocolor>, B<staticcolor>, B<staticgray>, or
  545. B<truecolor>.
  546.  
  547. =item I<$widget>-E<gt>B<visualid>
  548.  
  549. Returns the X identifier for the visual for $widget.
  550.  
  551. =item I<$widget>-E<gt>B<visualsavailable>(?B<includeids>?)
  552.  
  553. Returns a list whose elements describe the visuals available for
  554. I<$widget>'s screen.
  555. Each element consists of a visual class followed by an integer depth.
  556. The class has the same form as returned by I<$widget>-E<gt>B<visual>.
  557. The depth gives the number of bits per pixel in the visual.
  558. In addition, if the B<includeids> argument is provided, then the
  559. depth is followed by the X identifier for the visual.
  560.  
  561. =item I<$widget>-E<gt>B<vrootheight>
  562.  
  563. Returns the height of the virtual root window associated with I<$widget>
  564. if there is one;  otherwise returns the height of I<$widget>'s screen.
  565.  
  566. =item I<$widget>-E<gt>B<vrootwidth>
  567.  
  568. Returns the width of the virtual root window associated with I<$widget>
  569. if there is one;  otherwise returns the width of I<$widget>'s screen.
  570.  
  571. =item I<$widget>-E<gt>B<vrootx>
  572.  
  573. Returns the x-offset of the virtual root window associated with I<$widget>,
  574. relative to the root window of its screen.
  575. This is normally either zero or negative.
  576. Returns 0 if there is no virtual root window for I<$widget>.
  577.  
  578. =item I<$widget>-E<gt>B<vrooty>
  579.  
  580. Returns the y-offset of the virtual root window associated with I<$widget>,
  581. relative to the root window of its screen.
  582. This is normally either zero or negative.
  583. Returns 0 if there is no virtual root window for I<$widget>.
  584.  
  585. =item I<$widget->>B<waitVariable>(\$I<name>)
  586.  
  587. =item I<$widget->>B<waitVisibility>
  588.  
  589. =item I<$widget->>B<waitWindow>
  590.  
  591. The B<tk wait> methods wait for one of several things to happen,
  592. then it returns without taking any other actions.
  593. The return value is always an empty string.
  594. B<waitVariable> expects a reference to a perl
  595. variable and the command waits for that variable to be modified.
  596. This form is typically used to wait for a user to finish interacting
  597. with a dialog which sets the variable as part (possibly final)
  598. part of the interaction.
  599. B<waitVisibility> waits for a change in I<$widget>'s
  600. visibility state (as indicated by the arrival of a VisibilityNotify
  601. event).  This form is typically used to wait for a newly-created
  602. window to appear on the screen before taking some action.
  603. B<waitWindow> waits for I<$widget> to be destroyed.
  604. This form is typically used to wait for a user to finish interacting
  605. with a dialog box before using the result of that interaction.
  606. Note that creating and destroying the window each time a dialog is required
  607. makes code modular but imposes overhead which can be avoided by B<withdrawing>
  608. the window instead and using B<waitVisibility>.
  609.  
  610. While the B<tk wait> methods are waiting they processes events in
  611. the normal fashion, so the application will continue to respond
  612. to user interactions.
  613. If an event handler invokes B<tkwait> again, the nested call
  614. to B<tkwait> must complete before the outer call can complete.
  615.  
  616. =item I<$widget>-E<gt>B<width>
  617.  
  618. Returns a decimal string giving I<$widget>'s width in pixels.
  619. When a window is first created its width will be 1 pixel;  the
  620. width will eventually be changed by a geometry manager to fulfill
  621. the window's needs.
  622. If you need the true width immediately after creating a widget,
  623. invoke B<update> to force the geometry manager to arrange it,
  624. or use I<$widget>-E<gt>B<reqwidth> to get the window's requested width
  625. instead of its actual width.
  626.  
  627. =item  I<$widget>-E<gt>B<useinputmethods>( ?boolean? );
  628.  
  629. Sets and queries the state of whether Tk should use XIM (X Input
  630. Methods) for filtering events.  The resulting state is returned.
  631. XIM  is  used  in some locales (ie: Japanese, Korean), to handle
  632. special input devices.  This feature is only significant  on  X.
  633. If  XIM support is not available, this will always return 0.
  634. If  the  boolean  argument  is  omitted,  the  current  state is
  635. returned.  This is turned on by default for the main display.
  636.  
  637. =item I<$widget>-E<gt>B<windowingsystem>;
  638.  
  639. Returns the current Tk windowing system, one of B<x11> (X11-based),
  640. B<win32> (MS Windows), B<classic> (Mac OS Classic), or B<aqua> (Mac OS  X Aqua).
  641.  
  642. =item I<$widget>-E<gt>B<x>
  643.  
  644. Returns a decimal string giving the x-coordinate, in I<$widget>'s
  645. parent, of the upper-left corner of I<$widget>'s border (or I<$widget>
  646. if it has no border).
  647.  
  648. =item I<$widget>-E<gt>B<y>
  649.  
  650. Returns a decimal string giving the y-coordinate, in I<$widget>'s
  651. parent, of the
  652. upper-left corner of I<$widget>'s border (or I<$widget> if it
  653. has no border).
  654.  
  655. =back
  656.  
  657. =head1 CAVEATS
  658.  
  659. The above documentaion on generic methods is incomplete.
  660.  
  661. =head1 KEYWORDS
  662.  
  663. atom, children, class, geometry, height, identifier, information, interpreters,
  664. mapped, parent, path name, screen, virtual root, width, window
  665.  
  666. =cut
  667.  
  668.