OSDN Git Service

Please enter the commit message for your changes. Lines starting
[eos/base.git] / util / src / TclTk / tk8.6.12 / doc / SetGrid.3
1 '\"
2 '\" Copyright (c) 1990-1994 The Regents of the University of California.
3 '\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
4 '\"
5 '\" See the file "license.terms" for information on usage and redistribution
6 '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
7 '\"
8 .TH Tk_SetGrid 3 4.0 Tk "Tk Library Procedures"
9 .so man.macros
10 .BS
11 .SH NAME
12 Tk_SetGrid, Tk_UnsetGrid \- control the grid for interactive resizing
13 .SH SYNOPSIS
14 .nf
15 \fB#include <tk.h>\fR
16 .sp
17 \fBTk_SetGrid\fR(\fItkwin, reqWidth, reqHeight, widthInc, heightInc\fR)
18 .sp
19 \fBTk_UnsetGrid\fR(\fItkwin\fR)
20 .SH ARGUMENTS
21 .AS Tk_Window heightInc
22 .AP Tk_Window tkwin in
23 Token for window.
24 .AP int reqWidth in
25 Width in grid units that corresponds to the pixel dimension \fItkwin\fR
26 has requested via \fBTk_GeometryRequest\fR.
27 .AP int reqHeight in
28 Height in grid units that corresponds to the pixel dimension \fItkwin\fR
29 has requested via \fBTk_GeometryRequest\fR.
30 .AP int widthInc in
31 Width of one grid unit, in pixels.
32 .AP int heightInc in
33 Height of one grid unit, in pixels.
34 .BE
35 .SH DESCRIPTION
36 .PP
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
40 option is true.
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
49 information.
50 .PP
51 \fBTk_UnsetGrid\fR cancels gridded geometry management for
52 \fItkwin\fR's toplevel window.
53 .PP
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.
59 .PP
60 See the \fBwm\fR manual entry for additional information on gridded geometry
61 management.
62 .SH KEYWORDS
63 grid, window, window manager