archie/tk3.6/doc/SetGrid.3
2024-05-27 16:13:40 +02:00

69 lines
2.7 KiB
Groff

'\"
'\" Copyright (c) 1990 The Regents of the University of California.
'\" All rights reserved.
'\"
'\" Permission is hereby granted, without written agreement and without
'\" license or royalty fees, to use, copy, modify, and distribute this
'\" documentation for any purpose, provided that the above copyright
'\" notice and the following two paragraphs appear in all copies.
'\"
'\" IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
'\" FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
'\" ARISING OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
'\" CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'\"
'\" THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
'\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
'\" AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
'\" ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
'\" PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
'\"
'\" $Header: /user6/ouster/wish/man/RCS/SetGrid.3,v 1.4 93/04/01 09:41:57 ouster Exp $ SPRITE (Berkeley)
'\"
.so man.macros
.HS Tk_SetGrid tkc
.BS
.SH NAME
Tk_SetGrid \- control the grid for interactive resizing
.SH SYNOPSIS
.nf
\fB#include <tk.h>\fR
.sp
\fBTk_SetGrid\fR(\fItkwin, reqWidth, reqHeight, widthInc, heightInc\fR)
.SH ARGUMENTS
.AS Tk_Window heightInc
.AP Tk_Window tkwin in
Token for window.
.AP int reqWidth in
Width in grid units that corresponds to the pixel dimension \fItkwin\fR
has requested via \fBTk_GeometryRequest\fR.
.AP int reqHeight in
Height in grid units that corresponds to the pixel dimension \fItkwin\fR
has requested via \fBTk_GeometryRequest\fR.
.AP int widthInc in
Width of one grid unit, in pixels.
.AP int heightInc in
Height of one grid unit, in pixels.
.BE
.SH DESCRIPTION
.PP
\fBTk_SetGrid\fR is typically invoked by a widget when its \fBsetGrid\fR
option is true.
This procedure allows a widget to control interactive resizing of its
top-level window so that the space allocated to the widget is equal to
the space requested by the widget using \fBTk_GeometryRequest\fR, plus
or minus even multiples of \fIwidthInc\fR and \fIheightInc\fR.
\fBTk_SetGrid\fR turns on gridded geometry management for the top-level
window associated with \fItkwin\fR, and records the relationship between
pixel sizes and grid sizes as defined by \fIreqWidth\fR, \fIreqHeight\fR,
\fIwidthInc\fR, and \fIheightInc\fR.
.PP
See the \fBwm\fR manual entry for complete details on gridded geometry
management.
There is currently no way to turn off gridded geometry management using
a C procedure call; instead, invoke the ``\fBwm grid\fR'' command.
.SH KEYWORDS
grid, window, window manager