File: SetGrid.pod

package info (click to toggle)
perl-tk 1%3A804.036%2Bdfsg1-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 35,284 kB
  • sloc: ansic: 349,560; perl: 52,292; sh: 12,678; makefile: 5,700; asm: 3,565; ada: 1,681; pascal: 1,082; cpp: 1,006; yacc: 883; cs: 879
file content (80 lines) | stat: -rw-r--r-- 2,218 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#  Copyright (c) 1990-1994 The Regents of the University of California.
#  Copyright (c) 1994-1996 Sun Microsystems, Inc.
#  See the file "license.terms" for information on usage and redistribution
#  of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
#

=head1 NAME

Tk_SetGrid, Tk_UnsetGrid - control the grid for interactive resizing

=for category C Programming

=head1 SYNOPSIS

B<#include E<lt>tk.hE<gt>>

B<Tk_SetGrid>(I<tkwin, reqWidth, reqHeight, widthInc, heightInc>)

B<Tk_UnsetGrid>(I<tkwin>)

=head1 ARGUMENTS

=over 4

=item Tk_Window tkwin (in)

Token for window.

=item int reqWidth (in)

Width in grid units that corresponds to the pixel dimension I<tkwin>
has requested via B<Tk_GeometryRequest>.

=item int reqHeight (in)

Height in grid units that corresponds to the pixel dimension I<tkwin>
has requested via B<Tk_GeometryRequest>.

=item int widthInc (in)

Width of one grid unit, in pixels.

=item int heightInc (in)

Height of one grid unit, in pixels.

=back

=head1 DESCRIPTION

B<Tk_SetGrid> turns on gridded geometry management for I<tkwin>'s
toplevel window and specifies the geometry of the grid.
B<Tk_SetGrid> is typically invoked by a widget when its B<setGrid>
option is true.
It restricts interactive resizing of I<tkwin>'s toplevel window so
that the space allocated to the toplevel is equal to its requested
size plus or minus even multiples of I<widthInc> and I<heightInc>.
Furthermore, the I<reqWidth> and I<reqHeight> values are
passed to the window manager so that it can report the window's
size in grid units during interactive resizes.
If I<tkwin>'s configuration changes (e.g., the size of a grid unit
changes) then the widget should invoke B<Tk_SetGrid> again with the new
information.

B<Tk_UnsetGrid> cancels gridded geometry management for
I<tkwin>'s toplevel window.

For each toplevel window there can be at most one internal window
with gridding enabled.
If B<Tk_SetGrid> or B<Tk_UnsetGrid> is invoked when some
other window is already controlling gridding for I<tkwin>'s
toplevel, the calls for the new window have no effect.

See the B<wm> documentation for additional information on gridded geometry
management.

=head1 KEYWORDS

grid, window, window manager