NAME
TkManageGeometry - arrange to handle geometry requests for a window
SYNOPSIS
##iinncclluuddee <
TTkkMMaannaaggeeGGeeoommeettrryy(tkwin, mgrPtr, clientData) AARRGGUUMMEENNTTSS> TkWindow tkwin (in) Token for window to be man-
aged.TkGeomMgr *mgrPtr (in) Pointer to data structure con-
taining information about the geometry manager, or NULL to indicate that tkwin's geometry shouldn't be managed anymore. The data structure pointed to by mgrPtr must be static: Tk keeps a reference to it as long as the window is managed.ClientData clientData (in) Arbitrary one-word value to
pass to geometry manager call-
backs.DESCRIPTION
TTkkMMaannaaggeeGGeeoommeettrryy arranges for a particular geometry manager, described by the mgrPtr argument, to control the geometry of a particular slave window, given by tkwin. If tkwin was previously managed by some other geometry manager, the previous manager loses control in favor of the new one. If mgrPtr is NULL, geometry management is cancelled for tkwin.The structure pointed to by mgrPtr contains information about the geom-
etry manager: typedef struct { char *name; TkGeomRequestProc *requestProc; TkGeomLostSlaveProc *lostSlaveProc; } TkGeomMgr; The name field is the textual name for the geometry manager, such asppaacckk or ppllaaccee; this value will be returned by the command wwiinnffoo mmaann-
aaggeerr. requestProc is a procedure in the geometry manager that will be invoked whenever TTkkGGeeoommeettrryyRReeqquueesstt is called by the slave to change its desired geometry. requestProc should have arguments and results that match the type TTkkGGeeoommRReeqquueessttPPrroocc: typedef void TkGeomRequestProc( ClientData clientData, TkWindow tkwin); The parameters to requestProc will be identical to the corresponding parameters passed to TTkkMMaannaaggeeGGeeoommeettrryy. clientData usually points to adata structure containing application-specific information about how to
manage tkwin's geometry. The lostSlaveProc field of mgrPtr points to another procedure in the geometry manager. Tk will invoke lostSlaveProc if some other manager calls TTkkMMaannaaggeeGGeeoommeettrryy to claim tkwin away from the current geometry manager. lostSlaveProc is not invoked if TTkkMMaannaaggeeGGeeoommeettrryy is called with a NULL value for mgrPtr (presumably the current geometry manager has made this call, so it already knows that the window is no longermanaged), nor is it called if mgrPtr is the same as the window's cur-
rent geometry manager. lostSlaveProc should have arguments and results that match the following prototype: typedef void TkGeomLostSlaveProc( ClientData clientData, TkWindow tkwin); The parameters to lostSlaveProc will be identical to the corresponding parameters passed to TTkkMMaannaaggeeGGeeoommeettrryy. KKEEYYWWOORRDDSS callback, geometry, managed, request, unmanagedTk 4.0 TkManageGeometry(3)