File: ManageGeom.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 (103 lines) | stat: -rw-r--r-- 3,196 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#  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_ManageGeometry - arrange to handle geometry requests for a window

=for category C Programming

=head1 SYNOPSIS

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

B<Tk_ManageGeometry>(I<tkwin, mgrPtr, clientData>)

=head1 ARGUMENTS

=over 4

=item Tk_Window tkwin (in)

Token for window to be managed.

=item Tk_GeomMgr *mgrPtr (in)

Pointer to data structure containing information about the
geometry manager, or NULL to indicate that I<tkwin>'s geometry
shouldn't be managed anymore.
The data structure pointed to by I<mgrPtr> must be static:
Tk keeps a reference to it as long as the window is managed.

=item ClientData clientData (in)

Arbitrary one-word value to pass to geometry manager callbacks.

=back

=head1 DESCRIPTION

B<Tk_ManageGeometry> arranges for a particular geometry manager,
described by the I<mgrPtr> argument, to control the geometry
of a particular slave window, given by I<tkwin>.
If I<tkwin> was previously managed by some other geometry manager,
the previous manager loses control in favor of the new one.
If I<mgrPtr> is NULL, geometry management is cancelled for
I<tkwin>.

The structure pointed to by I<mgrPtr> contains information about
the geometry manager:

 typedef struct {
 	char *name;
 	Tk_GeomRequestProc *requestProc;
 	Tk_GeomLostSlaveProc *lostSlaveProc;
 } Tk_GeomMgr;

The I<name> field is the textual name for the geometry manager,
such as B<pack> or B<place>;  this value will be returned
by the command B<winfo manager>.

I<requestProc> is a procedure in the geometry manager that
will be invoked whenever B<Tk_GeometryRequest> is called by the
slave to change its desired geometry.
I<requestProc> should have arguments and results that match the
type B<Tk_GeomRequestProc>:

 typedef void Tk_GeomRequestProc(
 	ClientData clientData,
 	Tk_Window tkwin);

The parameters to I<requestProc> will be identical to the
corresponding parameters passed to B<Tk_ManageGeometry>.
I<clientData> usually points to a data
structure containing application-specific information about
how to manage I<tkwin>'s geometry.

The I<lostSlaveProc> field of I<mgrPtr> points to another
procedure in the geometry manager.
Tk will invoke I<lostSlaveProc> if some other manager
calls B<Tk_ManageGeometry> to claim
I<tkwin> away from the current geometry manager.
I<lostSlaveProc> is not invoked if B<Tk_ManageGeometry> is
called with a NULL value for I<mgrPtr> (presumably the current
geometry manager has made this call, so it already knows that the
window is no longer managed), nor is it called if I<mgrPtr>
is the same as the window's current geometry manager.
I<lostSlaveProc> should have
arguments and results that match the following prototype:

 typedef void Tk_GeomLostSlaveProc(
 	ClientData clientData,
 	Tk_Window tkwin);

The parameters to I<lostSlaveProc> will be identical to the
corresponding parameters passed to B<Tk_ManageGeometry>.

=head1 KEYWORDS

callback, geometry, managed, request, unmanaged