<HTML><HEAD><TITLE>Tk Library Procedures - Tk_ManageGeometry manual page</TITLE></HEAD><BODY> <H3><A NAME="M2">NAME</A></H3> Tk_ManageGeometry - arrange to handle geometry requests for a window <H3><A NAME="M3">SYNOPSIS</A></H3> <B>#include <tk.h></B><BR> <B>Tk_ManageGeometry</B>(<I>tkwin, mgrPtr, clientData</I>)<BR> <H3><A NAME="M4">ARGUMENTS</A></H3> <DL> <P><DT>Tk_Window <B>tkwin</B> (in)<DD> Token for window to be managed. <P><DT>Tk_GeomMgr <B>*mgrPtr</B> (in)<DD> Pointer to data structure containing information about the geometry manager, or NULL to indicate that <I>tkwin</I>'s geometry shouldn't be managed anymore. The data structure pointed to by <I>mgrPtr</I> must be static: Tk keeps a reference to it as long as the window is managed. <P><DT>ClientData <B>clientData</B> (in)<DD> Arbitrary one-word value to pass to geometry manager callbacks. <P></DL> <H3><A NAME="M5">DESCRIPTION</A></H3> <B>Tk_ManageGeometry</B> arranges for a particular geometry manager, described by the <I>mgrPtr</I> argument, to control the geometry of a particular slave window, given by <I>tkwin</I>. If <I>tkwin</I> was previously managed by some other geometry manager, the previous manager loses control in favor of the new one. If <I>mgrPtr</I> is NULL, geometry management is cancelled for <I>tkwin</I>. <P> The structure pointed to by <I>mgrPtr</I> contains information about the geometry manager: <PRE>typedef struct { char *<I>name</I>; Tk_GeomRequestProc *<I>requestProc</I>; Tk_GeomLostSlaveProc *<I>lostSlaveProc</I>; } Tk_GeomMgr;</PRE> The <I>name</I> field is the textual name for the geometry manager, such as <B><A HREF="../TkCmd/pack.htm">pack</A></B> or <B><A HREF="../TkCmd/place.htm">place</A></B>; this value will be returned by the command <B><A HREF="../TkCmd/winfo.htm">winfo manager</A></B>. <P> <I>requestProc</I> is a procedure in the geometry manager that will be invoked whenever <B><A HREF="../TkLib/GeomReq.htm">Tk_GeometryRequest</A></B> is called by the slave to change its desired geometry. <I>requestProc</I> should have arguments and results that match the type <B>Tk_GeomRequestProc</B>: <PRE>typedef void Tk_GeomRequestProc( ClientData <I>clientData</I>, Tk_Window <I>tkwin</I>);</PRE> The parameters to <I>requestProc</I> will be identical to the corresponding parameters passed to <B>Tk_ManageGeometry</B>. <I>clientData</I> usually points to a data structure containing application-specific information about how to manage <I>tkwin</I>'s geometry. <P> The <I>lostSlaveProc</I> field of <I>mgrPtr</I> points to another procedure in the geometry manager. Tk will invoke <I>lostSlaveProc</I> if some other manager calls <B>Tk_ManageGeometry</B> to claim <I>tkwin</I> away from the current geometry manager. <I>lostSlaveProc</I> is not invoked if <B>Tk_ManageGeometry</B> is called with a NULL value for <I>mgrPtr</I> (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</I> is the same as the window's current geometry manager. <I>lostSlaveProc</I> should have arguments and results that match the following prototype: <PRE>typedef void Tk_GeomLostSlaveProc( ClientData <I>clientData</I>, Tk_Window <I>tkwin</I>);</PRE> The parameters to <I>lostSlaveProc</I> will be identical to the corresponding parameters passed to <B>Tk_ManageGeometry</B>. <H3><A NAME="M6">KEYWORDS</A></H3> <A href="../Keywords/C.htm#callback">callback</A>, <A href="../Keywords/G.htm#geometry">geometry</A>, <A href="../Keywords/M.htm#managed">managed</A>, <A href="../Keywords/R.htm#request">request</A>, <A href="../Keywords/U.htm#unmanaged">unmanaged</A> <HR><PRE> <A HREF="../copyright.htm">Copyright</A> © 1990-1994 The Regents of the University of California. <A HREF="../copyright.htm">Copyright</A> © 1994-1996 Sun Microsystems, Inc. <A HREF="../copyright.htm">Copyright</A> © 1995-1997 Roger E. Critchlow Jr.</PRE> </BODY></HTML>