1Tk_ManageGeometry(3) Tk Library Procedures Tk_ManageGeometry(3)
2
3
4
5______________________________________________________________________________
6
8 Tk_ManageGeometry - arrange to handle geometry requests for a window
9
11 #include <tk.h>
12
13 Tk_ManageGeometry(tkwin, mgrPtr, clientData)
14
16 Tk_Window tkwin (in) Token for window to be man‐
17 aged.
18
19 Tk_GeomMgr *mgrPtr (in) Pointer to data structure con‐
20 taining information about the
21 geometry manager, or NULL to
22 indicate that tkwin's geometry
23 shouldn't be managed anymore.
24 The data structure pointed to
25 by mgrPtr must be static: Tk
26 keeps a reference to it as
27 long as the window is managed.
28
29 ClientData clientData (in) Arbitrary one-word value to
30 pass to geometry manager call‐
31 backs.
32_________________________________________________________________
33
34
36 Tk_ManageGeometry arranges for a particular geometry manager, described
37 by the mgrPtr argument, to control the geometry of a particular slave
38 window, given by tkwin. If tkwin was previously managed by some other
39 geometry manager, the previous manager loses control in favor of the
40 new one. If mgrPtr is NULL, geometry management is cancelled for
41 tkwin.
42
43 The structure pointed to by mgrPtr contains information about the geom‐
44 etry manager:
45 typedef struct {
46 char *name;
47 Tk_GeomRequestProc *requestProc;
48 Tk_GeomLostSlaveProc *lostSlaveProc;
49 } Tk_GeomMgr;
50 The name field is the textual name for the geometry manager, such as
51 pack or place; this value will be returned by the command winfo man‐
52 ager.
53
54 requestProc is a procedure in the geometry manager that will be invoked
55 whenever Tk_GeometryRequest is called by the slave to change its
56 desired geometry. requestProc should have arguments and results that
57 match the type Tk_GeomRequestProc:
58 typedef void Tk_GeomRequestProc(
59 ClientData clientData,
60 Tk_Window tkwin);
61 The parameters to requestProc will be identical to the corresponding
62 parameters passed to Tk_ManageGeometry. clientData usually points to a
63 data structure containing application-specific information about how to
64 manage tkwin's geometry.
65
66 The lostSlaveProc field of mgrPtr points to another procedure in the
67 geometry manager. Tk will invoke lostSlaveProc if some other manager
68 calls Tk_ManageGeometry to claim tkwin away from the current geometry
69 manager. lostSlaveProc is not invoked if Tk_ManageGeometry is called
70 with a NULL value for mgrPtr (presumably the current geometry manager
71 has made this call, so it already knows that the window is no longer
72 managed), nor is it called if mgrPtr is the same as the window's cur‐
73 rent geometry manager. lostSlaveProc should have arguments and results
74 that match the following prototype:
75 typedef void Tk_GeomLostSlaveProc(
76 ClientData clientData,
77 Tk_Window tkwin);
78 The parameters to lostSlaveProc will be identical to the corresponding
79 parameters passed to Tk_ManageGeometry.
80
81
83 callback, geometry, managed, request, unmanaged
84
85
86
87Tk 4.0 Tk_ManageGeometry(3)