Tk Library Procedures Tk_GeometryRequest(3TK)
_________________________________________________________________
NAME
Tk_GeometryRequest, Tk_SetMinimumRequestSize,
Tk_SetInternalBorder, Tk_SetInternalBorderEx - specify
desired geometry or internal border for a windowSYNOPSIS
#include
Tk_GeometryRequest(tkwin, reqWidth, reqHeight)
Tk_SetMinimumRequestSize(tkwin, minWidth, minHeight)
Tk_SetInternalBorder(tkwin, width)
Tk_SetInternalBorderEx(tkwin, left, right, top, bottom)
ARGUMENTSTk_Window tkwin (in) Window for which
geometry is being requested. int reqWidth (in) Desired width for tkwin, in pixel units. int reqHeight (in) Desired height for tkwin, in pixel units. int minWidth (in) Desired minimum requested width for tkwin, in pixel units. int minHeight (in) Desired minimum requested height for tkwin, in pixel units. int width (in) Space to leave for internal border for tkwin, in pixel units. int left (in) Space to leave for left side of internal border for tkwin, in pixel units. int right (in) Space to leave for right side of internal border for tkwin, in pixel units. int top (in) Space to leave for top Tk Last change: 8.4 1Tk Library Procedures Tk_GeometryRequest(3TK)
side of internal border for tkwin, in pixel units.int bottom (in) Space to leave for bot-
tom side of internal border for tkwin, in pixel units._________________________________________________________________
DESCRIPTION
Tk_GeometryRequest is called by widget code to indicate its
preference for the dimensions of a particular window. Thearguments to Tk_GeometryRequest 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 toTk_GeometryRequest, there is no guarantee that this will
always be possible. Widget code should not assume that ageometry request will be satisfied until it receives a Con-
figureNotify event indicating that the geometry change has occurred. Widget code should never call procedures likeTk_ResizeWindow directly. Instead, it should invoke
Tk_GeometryRequest and leave the final geometry decisions to
the geometry manager.If tkwin is a top-level window, then the geometry informa-
tion will be passed to the window manager using the standard ICCCM protocol.Tk_SetInternalBorder 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 todraw 3-D effects. Width specifies the width of the border
in pixels. Geometry managers will use this information toavoid placing any children of tkwin overlapping the outer-
most width pixels of tkwin's area.Tk_SetInternalBorderEx works like Tk_SetInternalBorder but
lets you specify different widths for different sides of the window.Tk_SetMinimumRequestSize is called by widget code to indi-
cate that a geometry manager should request at least thissize for the widget. This allows a widget to have some con-
trol over its size when a propagating geometry manager is used inside it. Tk Last change: 8.4 2Tk Library Procedures Tk_GeometryRequest(3TK)
The information specified in calls to Tk_GeometryRequest,
Tk_SetMinimumRequestSize, Tk_SetInternalBorder and
Tk_SetInternalBorderEx can be retrieved using the macros
Tk_ReqWidth, Tk_ReqHeight, Tk_MinReqWidth, Tk_MinReqHeight,
Tk_MinReqWidth, Tk_InternalBorderLeft,
Tk_InternalBorderRight, Tk_InternalBorderTop and
Tk_InternalBorderBottom. See the Tk_WindowId manual entry
for details. KEYWORDS geometry, requestATTRIBUTES
See attributes(5) for descriptions of the following attri-
butes:_______________________________________
| ATTRIBUTE TYPE | ATTRIBUTE VALUE|
|____________________|__________________|_
| Availability | runtime/tk-8 |
|____________________|__________________|_
| Interface Stability| Uncommitted ||____________________|_________________|
NOTES Source for Tk is available on http://opensolaris.org. Tk Last change: 8.4 3