2 '\" Copyright (c) 1990-1994 The Regents of the University of California.
3 '\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
5 '\" See the file "license.terms" for information on usage and redistribution
6 '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
8 .TH Tk_SetGrid 3 4.0 Tk "Tk Library Procedures"
12 Tk_SetGrid, Tk_UnsetGrid \- control the grid for interactive resizing
17 \fBTk_SetGrid\fR(\fItkwin, reqWidth, reqHeight, widthInc, heightInc\fR)
19 \fBTk_UnsetGrid\fR(\fItkwin\fR)
21 .AS Tk_Window heightInc
22 .AP Tk_Window tkwin in
25 Width in grid units that corresponds to the pixel dimension \fItkwin\fR
26 has requested via \fBTk_GeometryRequest\fR.
28 Height in grid units that corresponds to the pixel dimension \fItkwin\fR
29 has requested via \fBTk_GeometryRequest\fR.
31 Width of one grid unit, in pixels.
33 Height of one grid unit, in pixels.
37 \fBTk_SetGrid\fR turns on gridded geometry management for \fItkwin\fR's
38 toplevel window and specifies the geometry of the grid.
39 \fBTk_SetGrid\fR is typically invoked by a widget when its \fBsetGrid\fR
41 It restricts interactive resizing of \fItkwin\fR's toplevel window so
42 that the space allocated to the toplevel is equal to its requested
43 size plus or minus even multiples of \fIwidthInc\fR and \fIheightInc\fR.
44 Furthermore, the \fIreqWidth\fR and \fIreqHeight\fR values are
45 passed to the window manager so that it can report the window's
46 size in grid units during interactive resizes.
47 If \fItkwin\fR's configuration changes (e.g., the size of a grid unit
48 changes) then the widget should invoke \fBTk_SetGrid\fR again with the new
51 \fBTk_UnsetGrid\fR cancels gridded geometry management for
52 \fItkwin\fR's toplevel window.
54 For each toplevel window there can be at most one internal window
55 with gridding enabled.
56 If \fBTk_SetGrid\fR or \fBTk_UnsetGrid\fR is invoked when some
57 other window is already controlling gridding for \fItkwin\fR's
58 toplevel, the calls for the new window have no effect.
60 See the \fBwm\fR manual entry for additional information on gridded geometry
63 grid, window, window manager