| 1 |
# Copyright (c) 1990-1994 The Regents of the University of California. |
| 2 |
# Copyright (c) 1994-1996 Sun Microsystems, Inc. |
| 3 |
# See the file "license.terms" for information on usage and redistribution |
| 4 |
# of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
| 5 |
# |
| 6 |
# |
| 7 |
# |
| 8 |
|
| 9 |
=head1 NAME |
| 10 |
|
| 11 |
Tk_GeometryRequest, Tk_SetInternalBorder - specify desired geometry or internal border for a window |
| 12 |
|
| 13 |
=for category C Programming |
| 14 |
|
| 15 |
=head1 SYNOPSIS |
| 16 |
|
| 17 |
B<#include E<lt>tk.hE<gt>> |
| 18 |
|
| 19 |
B<Tk_GeometryRequest>(I<tkwin, reqWidth, reqHeight>) |
| 20 |
|
| 21 |
B<Tk_SetInternalBorder>(I<tkwin, width>) |
| 22 |
|
| 23 |
=head1 ARGUMENTS |
| 24 |
|
| 25 |
=over 4 |
| 26 |
|
| 27 |
=item Tk_Window tkwin (in) |
| 28 |
|
| 29 |
Window for which geometry is being requested. |
| 30 |
|
| 31 |
=item int reqWidth (in) |
| 32 |
|
| 33 |
Desired width for I<tkwin>, in pixel units. |
| 34 |
|
| 35 |
=item int reqHeight (in) |
| 36 |
|
| 37 |
Desired height for I<tkwin>, in pixel units. |
| 38 |
|
| 39 |
=item int width (in) |
| 40 |
|
| 41 |
Space to leave for internal border for I<tkwin>, in pixel units. |
| 42 |
|
| 43 |
=back |
| 44 |
|
| 45 |
=head1 DESCRIPTION |
| 46 |
|
| 47 |
B<Tk_GeometryRequest> is called by widget code to indicate its |
| 48 |
preference for the dimensions of a particular window. The arguments |
| 49 |
to B<Tk_GeometryRequest> are made available to the geometry |
| 50 |
manager for the window, which then decides on the actual geometry |
| 51 |
for the window. Although geometry managers generally try to satisfy |
| 52 |
requests made to B<Tk_GeometryRequest>, there is no guarantee that |
| 53 |
this will always be possible. Widget code should not assume that |
| 54 |
a geometry request will be satisfied until it receives a |
| 55 |
B<ConfigureNotify> event indicating that the geometry change has |
| 56 |
occurred. Widget code should never call procedures like |
| 57 |
B<Tk_ResizeWindow> directly. Instead, it should invoke |
| 58 |
B<Tk_GeometryRequest> and leave the final geometry decisions to |
| 59 |
the geometry manager. |
| 60 |
|
| 61 |
If I<tkwin> is a top-level window, then the geometry information |
| 62 |
will be passed to the window manager using the standard ICCCM protocol. |
| 63 |
|
| 64 |
B<Tk_SetInternalBorder> is called by widget code to indicate that |
| 65 |
the widget has an internal border. This means that the widget draws |
| 66 |
a decorative border inside the window instead of using the standard |
| 67 |
X borders, which are external to the window's area. For example, |
| 68 |
internal borders are used to draw 3-D effects. I<Width> |
| 69 |
specifies the width of the border in pixels. Geometry managers will |
| 70 |
use this information to avoid placing any children of I<tkwin> |
| 71 |
overlapping the outermost I<width> pixels of I<tkwin>'s area. |
| 72 |
|
| 73 |
The information specified in calls to B<Tk_GeometryRequest> and |
| 74 |
B<Tk_SetInternalBorder> can be retrieved using the macros |
| 75 |
B<Tk_ReqWidth>, B<Tk_ReqHeight>, and B<Tk_InternalBorderWidth>. |
| 76 |
See the L<Tk::WindowId> documentation for details. |
| 77 |
|
| 78 |
=head1 KEYWORDS |
| 79 |
|
| 80 |
geometry, request |