<HTML><HEAD><TITLE>Library Procedures - Tk_GeometryRequest manual page</TITLE></HEAD><BODY> <H3><A NAME="M2">NAME</A></H3> Tk_GeometryRequest, Tk_SetInternalBorder - specify desired geometry or internal border for a window <H3><A NAME="M3">SYNOPSIS</A></H3> <B>#include <tk.h></B><BR> <B>Tk_GeometryRequest</B>(<I>tkwin, reqWidth, reqHeight</I>)<BR> <B>Tk_SetInternalBorder</B>(<I>tkwin, width</I>)<BR> <H3><A NAME="M4">ARGUMENTS</A></H3> <DL> <P><DT>Tk_Window <B>tkwin</B> (in)<DD> Window for which geometry is being requested. <P><DT>int <B>reqWidth</B> (in)<DD> Desired width for <I>tkwin</I>, in pixel units. <P><DT>int <B>reqHeight</B> (in)<DD> Desired height for <I>tkwin</I>, in pixel units. <P><DT>int <B>width</B> (in)<DD> Space to leave for internal border for <I>tkwin</I>, in pixel units. <P></DL> <H3><A NAME="M5">DESCRIPTION</A></H3> <B>Tk_GeometryRequest</B> is called by widget code to indicate its preference for the dimensions of a particular window. The arguments to <B>Tk_GeometryRequest</B> are made available to the geometry manager for the window, which then decides on the actual geometry for the window. Although geometry managers generally try to satisfy requests made to <B>Tk_GeometryRequest</B>, there is no guarantee that this will always be possible. Widget code should not assume that a geometry request will be satisfied until it receives a <B>ConfigureNotify</B> event indicating that the geometry change has occurred. Widget code should never call procedures like <B><A HREF="../TkLib/ConfigWind.htm">Tk_ResizeWindow</A></B> directly. Instead, it should invoke <B>Tk_GeometryRequest</B> and leave the final geometry decisions to the geometry manager. <P> If <I>tkwin</I> is a top-level window, then the geometry information will be passed to the window manager using the standard ICCCM protocol. <P> <B>Tk_SetInternalBorder</B> is called by widget code to indicate that the widget has an internal border. This means that the widget draws a decorative border inside the window instead of using the standard X borders, which are external to the window's area. For example, internal borders are used to draw 3-D effects. <I>Width</I> specifies the width of the border in pixels. Geometry managers will use this information to avoid placing any children of <I>tkwin</I> overlapping the outermost <I>width</I> pixels of <I>tkwin</I>'s area. <P> The information specified in calls to <B>Tk_GeometryRequest</B> and <B>Tk_SetInternalBorder</B> can be retrieved using the macros <B><A HREF="../TkLib/WindowId.htm">Tk_ReqWidth</A></B>, <B><A HREF="../TkLib/WindowId.htm">Tk_ReqHeight</A></B>, and <B><A HREF="../TkLib/WindowId.htm">Tk_InternalBorderWidth</A></B>. See the <B><A HREF="../TkLib/WindowId.htm">Tk_WindowId</A></B> manual entry for details. <H3><A NAME="M6">KEYWORDS</A></H3> <A href="../Keywords/G.htm#geometry">geometry</A>, <A href="../Keywords/R.htm#request">request</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>