1Tk_ManageGeometry(3)         Tk Library Procedures        Tk_ManageGeometry(3)
2
3
4
5______________________________________________________________________________
6

NAME

8       Tk_ManageGeometry - arrange to handle geometry requests for a window
9

SYNOPSIS

11       #include <tk.h>
12
13       Tk_ManageGeometry(tkwin, mgrPtr, clientData)
14

ARGUMENTS

16       Tk_Window tkwin (in)                     Token  for  window  to be man‐
17                                                aged.
18
19       const 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                                                should not 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

DESCRIPTION

35       Tk_ManageGeometry arranges for a particular geometry manager, described
36       by  the  mgrPtr argument, to control the geometry of a particular slave
37       window, given by tkwin.  If tkwin was previously managed by some  other
38       geometry  manager,  the  previous manager loses control in favor of the
39       new one.  If mgrPtr is  NULL,  geometry  management  is  cancelled  for
40       tkwin.
41
42       The structure pointed to by mgrPtr contains information about the geom‐
43       etry manager:
44              typedef struct {
45                  const char *name;
46                  Tk_GeomRequestProc *requestProc;
47                  Tk_GeomLostSlaveProc *lostSlaveProc;
48              } Tk_GeomMgr;
49       The name field is the textual name for the geometry  manager,  such  as
50       pack  or  place;  this value will be returned by the command winfo man‐
51       ager.
52
53       requestProc is a procedure in the geometry manager that will be invoked
54       whenever  Tk_GeometryRequest  is  called  by  the  slave  to change its
55       desired geometry.  requestProc should have arguments and  results  that
56       match the type Tk_GeomRequestProc:
57              typedef void Tk_GeomRequestProc(
58                      ClientData clientData,
59                      Tk_Window tkwin);
60       The  parameters  to  requestProc will be identical to the corresponding
61       parameters passed to Tk_ManageGeometry.  clientData usually points to a
62       data structure containing application-specific information about how to
63       manage tkwin's geometry.
64
65       The lostSlaveProc field of mgrPtr points to another  procedure  in  the
66       geometry  manager.   Tk will invoke lostSlaveProc if some other manager
67       calls Tk_ManageGeometry to claim tkwin away from the  current  geometry
68       manager.   lostSlaveProc  is not invoked if Tk_ManageGeometry is called
69       with a NULL value for mgrPtr (presumably the current  geometry  manager
70       has  made  this  call, so it already knows that the window is no longer
71       managed), nor is it called if mgrPtr is the same as the  window's  cur‐
72       rent geometry manager.  lostSlaveProc should have arguments and results
73       that match the following prototype:
74              typedef void Tk_GeomLostSlaveProc(
75                      ClientData clientData,
76                      Tk_Window tkwin);
77       The parameters to lostSlaveProc will be identical to the  corresponding
78       parameters passed to Tk_ManageGeometry.
79

KEYWORDS

81       callback, geometry, managed, request, unmanaged
82
83
84
85Tk                                    4.0                 Tk_ManageGeometry(3)
Impressum