2 '\" Copyright (c) 1990-1994 The Regents of the University of California.
3 '\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
5 '\" See the file "license.terms" for information on usage and redistribution
6 '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
9 '\" RCS: @(#) $Id: GeomReq.3,v 1.3 2001/09/26 20:25:17 pspjuth Exp $
11 '\" The definitions below are for supplemental macros used in Tcl/Tk
14 '\" .AP type name in/out ?indent?
15 '\" Start paragraph describing an argument to a library procedure.
16 '\" type is type of argument (int, etc.), in/out is either "in", "out",
17 '\" or "in/out" to describe whether procedure reads or modifies arg,
18 '\" and indent is equivalent to second arg of .IP (shouldn't ever be
19 '\" needed; use .AS below instead)
22 '\" Give maximum sizes of arguments for setting tab stops. Type and
23 '\" name are examples of largest possible arguments that will be passed
24 '\" to .AP later. If args are omitted, default tab stops are used.
27 '\" Start box enclosure. From here until next .BE, everything will be
28 '\" enclosed in one large box.
31 '\" End of box enclosure.
34 '\" Begin code excerpt.
39 '\" .VS ?version? ?br?
40 '\" Begin vertical sidebar, for use in marking newly-changed parts
41 '\" of man pages. The first argument is ignored and used for recording
42 '\" the version when the .VS was added, so that the sidebars can be
43 '\" found and removed when they reach a certain age. If another argument
44 '\" is present, then a line break is forced before starting the sidebar.
47 '\" End of vertical sidebar.
50 '\" Begin an indented unfilled display.
53 '\" End of indented unfilled display.
56 '\" Start of list of standard options for a Tk widget. The
57 '\" options follow on successive lines, in four columns separated
61 '\" End of list of standard options for a Tk widget.
63 '\" .OP cmdName dbName dbClass
64 '\" Start of description of a specific option. cmdName gives the
65 '\" option's name as specified in the class command, dbName gives
66 '\" the option's name in the option database, and dbClass gives
67 '\" the option's class in the option database.
70 '\" Print arg1 underlined, then print arg2 normally.
72 '\" RCS: @(#) $Id: man.macros,v 1.4 2000/08/25 06:18:32 ericm Exp $
74 '\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages.
78 '\" # Start an argument description
82 . ie !"\\$2"" .TP \\n()Cu
87 \&\\$1 \\fI\\$2\\fP (\\$3)
100 '\" # define tabbing values for .AP
103 .if !"\\$1"" .nr )A \\w'\\$1'u+3n
106 .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n
107 .nr )C \\n()Bu+\\w'(in/out)'u+2n
109 .AS Tcl_Interp Tcl_CreateInterp in/out
110 '\" # BS - start boxed text
111 '\" # ^y = starting y location
119 .if n \l'\\n(.lu\(ul'
122 '\" # BE - end boxed text (draw box now)
127 .ie n \l'\\n(^lu\(ul'
129 .\" Draw four-sided box normally, but don't draw top of
130 .\" box if the box started on an earlier page.
132 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
135 \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
142 '\" # VS - start vertical sidebar
143 '\" # ^Y = starting y location
144 '\" # ^v = 1 (for troff; for nroff this doesn't matter)
148 .ie n 'mc \s12\(br\s0
151 '\" # VE - end of vertical sidebar
159 \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n'
166 '\" # Special macro to handle page bottom: finish off current
167 '\" # box/sidebar if in box/sidebar mode, then invoked standard
168 '\" # page bottom macro.
175 .\" Draw three-sided box if this is the box's first page,
176 .\" draw two sides but no top otherwise.
177 .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
178 .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
181 .nr ^x \\n(^tu+1v-\\n(^Yu
182 \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c
195 '\" # DS - begin display
201 '\" # DE - end display
207 '\" # SO - start of list of standard options
209 .SH "STANDARD OPTIONS"
215 '\" # SE - end of list of standard options
220 See the \\fBoptions\\fR manual entry for details on the standard options.
222 '\" # OP - start of full description for a single option
227 Command-Line Name: \\fB\\$1\\fR
228 Database Name: \\fB\\$2\\fR
229 Database Class: \\fB\\$3\\fR
233 '\" # CS - begin code excerpt
239 '\" # CE - end code excerpt
247 .TH Tk_GeometryRequest 3 "8.4" Tk "Tk Library Procedures"
250 Tk_GeometryRequest, Tk_SetMinimumRequestSize, Tk_SetInternalBorder, Tk_SetInternalBorderEx \- specify desired geometry or internal border for a window
253 \fB#include <tk.h>\fR
255 \fBTk_GeometryRequest\fR(\fItkwin, reqWidth, reqHeight\fR)
257 \fBTk_SetMinimumRequestSize\fR(\fItkwin, minWidth, minHeight\fR)
259 \fBTk_SetInternalBorder\fR(\fItkwin, width\fR)
261 \fBTk_SetInternalBorderEx\fR(\fItkwin, left, right, top, bottom\fR)
263 .AS baseHeight clientData
264 .AP Tk_Window tkwin in
265 Window for which geometry is being requested.
267 Desired width for \fItkwin\fR, in pixel units.
269 Desired height for \fItkwin\fR, in pixel units.
271 Desired minimum requested width for \fItkwin\fR, in pixel units.
273 Desired minimum requested height for \fItkwin\fR, in pixel units.
275 Space to leave for internal border for \fItkwin\fR, in pixel units.
277 Space to leave for left side of internal border for \fItkwin\fR, in pixel units.
279 Space to leave for right side of internal border for \fItkwin\fR, in pixel units.
281 Space to leave for top side of internal border for \fItkwin\fR, in pixel units.
283 Space to leave for bottom side of internal border for \fItkwin\fR, in pixel units.
288 \fBTk_GeometryRequest\fR is called by widget code to indicate its
289 preference for the dimensions of a particular window. The arguments
290 to \fBTk_GeometryRequest\fR are made available to the geometry
291 manager for the window, which then decides on the actual geometry
292 for the window. Although geometry managers generally try to satisfy
293 requests made to \fBTk_GeometryRequest\fR, there is no guarantee that
294 this will always be possible. Widget code should not assume that
295 a geometry request will be satisfied until it receives a
296 \fBConfigureNotify\fR event indicating that the geometry change has
297 occurred. Widget code should never call procedures like
298 \fBTk_ResizeWindow\fR directly. Instead, it should invoke
299 \fBTk_GeometryRequest\fR and leave the final geometry decisions to
300 the geometry manager.
302 If \fItkwin\fR is a top-level window, then the geometry information
303 will be passed to the window manager using the standard ICCCM protocol.
305 \fBTk_SetInternalBorder\fR is called by widget code to indicate that
306 the widget has an internal border. This means that the widget draws
307 a decorative border inside the window instead of using the standard
308 X borders, which are external to the window's area. For example,
309 internal borders are used to draw 3-D effects. \fIWidth\fR
310 specifies the width of the border in pixels. Geometry managers will
311 use this information to avoid placing any children of \fItkwin\fR
312 overlapping the outermost \fIwidth\fR pixels of \fItkwin\fR's area.
314 \fBTk_SetInternalBorderEx\fR works like \fBTk_SetInternalBorder\fR
315 but lets you specify different widths for different sides of the window.
317 \fBTk_SetMinimumRequestSize\fR is called by widget code to indicate
318 that a geometry manager should request at least this size for the
319 widget. This allows a widget to have some control over its size when
320 a propagating geometry manager is used inside it.
322 The information specified in calls to \fBTk_GeometryRequest\fR,
323 \fBTk_SetMinimumRequestSize\fR, \fBTk_SetInternalBorder\fR and
324 \fBTk_SetInternalBorderEx\fR can be retrieved using the macros
325 \fBTk_ReqWidth\fR, \fBTk_ReqHeight\fR, \fBTk_MinReqWidth\fR,
326 \fBTk_MinReqHeight\fR, \fBTk_MinReqWidth\fR, \fBTk_InternalBorderLeft\fR,
327 \fBTk_InternalBorderRight\fR, \fBTk_InternalBorderTop\fR and
328 \fBTk_InternalBorderBottom\fR.
329 See the \fBTk_WindowId\fR manual entry for details.