| 1 |
# Copyright (c) 1990-1993 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 |
=head1 NAME |
| 9 |
|
| 10 |
Tk_MoveToplevelWindow - Adjust the position of a top-level window |
| 11 |
|
| 12 |
=for category C Programming |
| 13 |
|
| 14 |
=head1 SYNOPSIS |
| 15 |
|
| 16 |
B<#include E<lt>tk.hE<gt>> |
| 17 |
|
| 18 |
B<Tk_MoveToplevelWindow(>I<tkwin, x, y>B<)> |
| 19 |
|
| 20 |
=head1 ARGUMENTS |
| 21 |
|
| 22 |
=over 4 |
| 23 |
|
| 24 |
=item Tk_Window tkwin (in) |
| 25 |
|
| 26 |
Token for top-level window to move. |
| 27 |
|
| 28 |
=item int x (in) |
| 29 |
|
| 30 |
New x-coordinate for the top-left pixel of I<tkwin>'s border, or the |
| 31 |
top-left pixel of the decorative border supplied for I<tkwin> by the |
| 32 |
window manager, if there is one. |
| 33 |
|
| 34 |
=item int y (in) |
| 35 |
|
| 36 |
New y-coordinate for the top-left pixel of I<tkwin>'s border, or the |
| 37 |
top-left pixel of the decorative border supplied for I<tkwin> by the |
| 38 |
window manager, if there is one. |
| 39 |
|
| 40 |
=back |
| 41 |
|
| 42 |
=head1 DESCRIPTION |
| 43 |
|
| 44 |
In general, a window should never set its own position; this should be |
| 45 |
done only by the geometry manger that is responsible for the window. |
| 46 |
For top-level windows the window manager is effectively the geometry |
| 47 |
manager; Tk provides interface code between the application and the |
| 48 |
window manager to convey the application's desires to the geometry |
| 49 |
manager. The desired size for a top-level window is conveyed using |
| 50 |
the usual B<Tk_GeometryRequest> mechanism. The procedure |
| 51 |
B<Tk_MoveToplevelWindow> may be used by an application to request |
| 52 |
a particular position for a top-level window; this procedure is |
| 53 |
similar in function to the B<wm geometry> Tcl command except that |
| 54 |
negative offsets cannot be specified. It is invoked by widgets such as |
| 55 |
menus that want to appear at a particular place on the screen. |
| 56 |
|
| 57 |
When B<Tk_MoveToplevelWindow> is called it doesn't immediately |
| 58 |
pass on the new desired location to the window manager; it defers |
| 59 |
this action until all other outstanding work has been completed, |
| 60 |
using the B<Tk_DoWhenIdle> mechanism. |
| 61 |
|
| 62 |
=head1 KEYWORDS |
| 63 |
|
| 64 |
position, top-level window, window manager |