Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

tk_managegeometry(3tk) [opensolaris man page]

Tk_ManageGeometry(3TK)					       Tk Library Procedures					    Tk_ManageGeometry(3TK)

__________________________________________________________________________________________________________________________________________________

NAME
Tk_ManageGeometry - arrange to handle geometry requests for a window SYNOPSIS
#include <tk.h> Tk_ManageGeometry(tkwin, mgrPtr, clientData) ARGUMENTS
Tk_Window tkwin (in) Token for window to be managed. Tk_GeomMgr *mgrPtr (in) Pointer to data structure containing information about the geometry manager, or NULL to indicate that tkwin's geometry shouldn't be managed anymore. The data structure pointed to by mgrPtr must be static: Tk keeps a reference to it as long as the window is managed. ClientData clientData (in) Arbitrary one-word value to pass to geometry manager callbacks. _________________________________________________________________ DESCRIPTION
Tk_ManageGeometry arranges for a particular geometry manager, described by the mgrPtr argument, to control the geometry of a particular slave window, given by tkwin. If tkwin was previously managed by some other geometry manager, the previous manager loses control in favor of the new one. If mgrPtr is NULL, geometry management is cancelled for tkwin. The structure pointed to by mgrPtr contains information about the geometry manager: typedef struct { char *name; Tk_GeomRequestProc *requestProc; Tk_GeomLostSlaveProc *lostSlaveProc; } Tk_GeomMgr; The name field is the textual name for the geometry manager, such as pack or place; this value will be returned by the command winfo man- ager. requestProc is a procedure in the geometry manager that will be invoked whenever Tk_GeometryRequest is called by the slave to change its desired geometry. requestProc should have arguments and results that match the type Tk_GeomRequestProc: typedef void Tk_GeomRequestProc( ClientData clientData, Tk_Window tkwin); The parameters to requestProc will be identical to the corresponding parameters passed to Tk_ManageGeometry. clientData usually points to a data structure containing application-specific information about how to manage tkwin's geometry. The lostSlaveProc field of mgrPtr points to another procedure in the geometry manager. Tk will invoke lostSlaveProc if some other manager calls Tk_ManageGeometry to claim tkwin away from the current geometry manager. lostSlaveProc is not invoked if Tk_ManageGeometry is called with a NULL value for mgrPtr (presumably the current geometry manager has made this call, so it already knows that the window is no longer managed), nor is it called if mgrPtr is the same as the window's current geometry manager. lostSlaveProc should have arguments and results that match the following prototype: typedef void Tk_GeomLostSlaveProc( ClientData clientData, Tk_Window tkwin); The parameters to lostSlaveProc will be identical to the corresponding parameters passed to Tk_ManageGeometry. KEYWORDS
callback, geometry, managed, request, unmanaged ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +--------------------+-----------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +--------------------+-----------------+ |Availability | SUNWTk | +--------------------+-----------------+ |Interface Stability | Uncommitted | +--------------------+-----------------+ NOTES
Source for Tk is available on http://opensolaris.org. Tk 4.0 Tk_ManageGeometry(3TK)

Check Out this Related Man Page

Tk_MoveToplevelWindow(3)				       Tk Library Procedures					  Tk_MoveToplevelWindow(3)

__________________________________________________________________________________________________________________________________________________

NAME
Tk_MoveToplevelWindow - Adjust the position of a top-level window SYNOPSIS
#include <tk.h> Tk_MoveToplevelWindow(tkwin, x, y) ARGUMENTS
Tk_Window tkwin (in) Token for top-level window to move. int x (in) New x-coordinate for the top-left pixel of tkwin's border, or the top-left pixel of the decorative border supplied for tkwin by the window manager, if there is one. int y (in) New y-coordinate for the top-left pixel of tkwin's border, or the top-left pixel of the decorative border supplied for tkwin by the window manager, if there is one. _________________________________________________________________ DESCRIPTION
In general, a window should never set its own position; this should be done only by the geometry manger that is responsible for the win- dow. 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 speci- fied. 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 Tk_DoWhenIdle mechanism. KEYWORDS
position, top-level window, window manager Tk Tk_MoveToplevelWindow(3)
Man Page