home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / languages / tcl / tk3.3b1 / doc / ManageGeom.3 < prev    next >
Encoding:
Text File  |  1993-04-01  |  3.8 KB  |  94 lines

  1. '\"
  2. '\" Copyright (c) 1990 The Regents of the University of California.
  3. '\" All rights reserved.
  4. '\"
  5. '\" Permission is hereby granted, without written agreement and without
  6. '\" license or royalty fees, to use, copy, modify, and distribute this
  7. '\" documentation for any purpose, provided that the above copyright
  8. '\" notice and the following two paragraphs appear in all copies.
  9. '\"
  10. '\" IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
  11. '\" FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
  12. '\" ARISING OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
  13. '\" CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  14. '\"
  15. '\" THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
  16. '\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
  17. '\" AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
  18. '\" ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
  19. '\" PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
  20. '\" 
  21. '\" $Header: /user6/ouster/wish/man/RCS/ManageGeom.3,v 1.5 93/04/01 09:41:43 ouster Exp $ SPRITE (Berkeley)
  22. '\" 
  23. .so man.macros
  24. .HS Tk_ManageGeometry tkc
  25. .BS
  26. .SH NAME
  27. Tk_ManageGeometry \- arrange to handle geometry requests for a window
  28. .SH SYNOPSIS
  29. .nf
  30. \fB#include <tk.h>\fR
  31. .sp
  32. \fBTk_ManageGeometry\fR(\fItkwin, proc, clientData\fR)
  33. .SH ARGUMENTS
  34. .AS Tk_GeometryProc clientData
  35. .AP Tk_Window tkwin in
  36. Token for window to be managed.
  37. .AP Tk_GeometryProc *proc in
  38. Procedure to invoke to handle geometry requests on \fItkwin\fR, or
  39. NULL to indicate that \fItkwin\fR's geometry shouldn't be managed
  40. anymore.
  41. .AP ClientData clientData in
  42. Arbitrary one-word value to pass to \fIproc\fR.
  43. .BE
  44.  
  45. .SH DESCRIPTION
  46. .PP
  47. \fBTk_ManageGeometry\fR arranges for \fIproc\fR to be invoked
  48. whenever \fBTk_GeometryRequest\fR is called to change the desired
  49. geometry for \fItkwin\fR.  \fBTk_ManageGeometry\fR is typically
  50. invoked by geometry managers when they take control of a window's
  51. geometry.
  52. .PP
  53. \fIProc\fP should have arguments and results that match the
  54. type \fBTk_GeometryProc\fR:
  55. .nf
  56. .RS
  57. typedef void Tk_GeometryProc(
  58. .RS
  59. ClientData \fIclientData\fR,
  60. Tk_Window \fItkwin\fR);
  61. .RE
  62. .RE
  63. .fi
  64. The parameters to \fIproc\fR will be identical to the
  65. corresponding parameters passed to \fBTk_ManageGeometry\fR.
  66. Typically, \fIclientData\fR points to a data
  67. structure containing application-specific information about
  68. how to manage \fItkwin\fR's geometry.
  69. .PP
  70. \fIProc\fR will be called during each call to \fBTk_GeometryRequest\fR
  71. for \fItkwin\fR.  \fIProc\fR can use macros like \fBTk_ReqWidth\fR
  72. to retrieve the arguments passed to \fBTk_GeometryRequest\fR.  It
  73. should do what it can to meet the request, subject to the space
  74. available in \fItkwin\fR's parent and its own policies for managing geometry.
  75. If \fIproc\fR can meet the request, it should call procedures like
  76. \fBTk_ResizeWindow\fR or \fBTk_MoveWindow\fR to carry out the actual
  77. geometry change.  In some cases it may make sense for \fIproc\fR not
  78. to process the geometry request immediately, but rather to schedule a
  79. procedure to do it later, using \fBTk_DoWhenIdle\fR.  This approach
  80. is likely to be more efficient in situations where several geometry
  81. requests occur simultaneously:  only a single geometry change will
  82. be made, after all the requests have been registered.
  83. .PP
  84. If \fIproc\fR is specified as NULL, then the geometry handler for
  85. \fItkwin\fR will be eliminated, leaving \fItkwin\fR unmanaged.
  86. Calls to \fBTk_GeometryRequest\fR have no effect for unmanaged
  87. windows except to store the requested size in a structure where
  88. they can be retrieved by macros like \fBTk_ReqWidth\fR.  If
  89. \fBTk_GeometryRequest\fR has never been invoked for a window then
  90. it is unmanaged.
  91.  
  92. .SH KEYWORDS
  93. callback, geometry, managed, request, unmanaged
  94.