Tk_MoveToplevelWindow(3)
hiii bestie π this is the Tk_MoveToplevelWindow(3) page from Tk Library Procedures, and itβs all about asking a top-level window to scoot to a new spot on screen. slay, letβs get into it π
β¨ NAME β¨
Tk_MoveToplevelWindow β adjust the position of a top-level window. literally moving the whole window vibe π
πΈ SYNOPSIS πΈ
#include <tk.h>
Tk_MoveToplevelWindow(tkwin, x, y)
π¦ ARGUMENTS π¦
Tk_Window tkwin(in) β the token for the top-level window you wanna move, bestie π«Άint x(in) β the new x-coordinate for the top-left pixel oftkwinβs border, or the top-left pixel of the decorative border supplied fortkwinby the window manager, if there is one β¨int y(in) β the new y-coordinate for the top-left pixel oftkwinβs border, or the top-left pixel of the decorative border supplied fortkwinby the window manager, if there is one π
π DESCRIPTION π
okay so the big rule: in general, a window should never set its own position π€ this should be done only by the geometry manager thatβs responsible for the window. for top-level windows, the window manager is effectively the geometry manager; Tk provides interface code between the application and the window manager to convey the applicationβs desires to the geometry manager. the desired size for a top-level window is conveyed using the usual Tk_GeometryRequest mechanism π«
the procedure Tk_MoveToplevelWindow may be used by an application to request a particular position for a top-level window. this procedure is similar in function to the wm geometry Tcl command except that negative offsets cannot be specified π¨ it is invoked by widgets such as menus that want to appear at a particular place on the screen π
when Tk_MoveToplevelWindow is called, it does not immediately pass on the new desired location to the window manager; it defers this action until all other outstanding work has been completed, using the Tcl_DoWhenIdle mechanism β³ iconic behavior, honestly.
π KEYWORDS π
positiontop-level windowwindow manager
mwah π this page came from Tk, and the page name is Tk_MoveToplevelWindow(3) β the footer didnβt list a date, so no invented date here, bestie π
β¨
π¦ where this page comes from
- alpine 3.23: tk9-doc 9.0.3-r0 Β· TCL
- alpine 3.24: tk9-doc 9.0.3-r2 Β· TCL
- fedora 43: tk-devel 1:9.0.2-1.fc43 Β· TCL AND HPND-Pbmplus AND CC-BY-SA-3.0 AND MIT-open-group AND MIT
- fedora 43: tk-devel 1:9.0.2-1.fc43 Β· TCL AND HPND-Pbmplus AND CC-BY-SA-3.0 AND MIT-open-group AND MIT
- fedora 44: tk-devel 1:9.0.2-1.fc44 Β· TCL AND HPND-Pbmplus AND CC-BY-SA-3.0 AND MIT-open-group AND MIT
- fedora 44: tk-devel 1:9.0.2-1.fc44 Β· TCL AND HPND-Pbmplus AND CC-BY-SA-3.0 AND MIT-open-group AND MIT
- nixos 26.05: tk 9.0.3
- nixpkgs unstable: tk 9.1.0
- Copyright (c) 1990-1993 The Regents of the University of California
- Copyright (c) 1994-1996 Sun Microsystems, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms