⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 maintgeom.3

📁 linux系统下的音频通信
💻 3
字号:
'\"'\" Copyright (c) 1994 The Regents of the University of California.'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.'\"'\" See the file "license.terms" for information on usage and redistribution'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.'\" '\" SCCS: @(#) MaintGeom.3 1.7 96/03/26 18:15:30'\" .so man.macros.TH Tk_MaintainGeometry 3 4.0 Tk "Tk Library Procedures".BS.SH NAMETk_MaintainGeometry, Tk_UnmaintainGeometry \- maintain geometry of one window relative to another.SH SYNOPSIS.nf\fB#include <tk.h>\fR.sp\fBTk_MaintainGeometry\fR(\fIslave, master, x, y, width, height\fR).sp\fBTk_UnmaintainGeometry\fR(\fIslave, master\fR).SH ARGUMENTS.AS Tk_Window master.AP Tk_Window slave inWindow whose geometry is to be controlled..AP Tk_Window master inWindow relative to which \fIslave\fR's geometry will be controlled..AP int x inDesired x-coordinate of \fIslave\fR in \fImaster\fR, measured in pixelsfrom the inside of \fImaster\fR's left border to the outside of\fIslave\fR's left border..AP int y inDesired y-coordinate of \fIslave\fR in \fImaster\fR, measured in pixelsfrom the inside of \fImaster\fR's top border to the outside of\fIslave\fR's top border..AP int width inDesired width for \fIslave\fR, in pixels..AP int height inDesired height for \fIslave\fR, in pixels..BE.SH DESCRIPTION.PP\fBTk_MaintainGeometry\fR and \fBTk_UnmaintainGeometry\fR make iteasier for geometry managers to deal with slaves whose masters are nottheir parents.Three problems arise if the master for a slave is not its parent:.IP [1]The x- and y-position of the slave must be translated from thecoordinate system of the master to that of the parent beforepositioning the slave..IP [2]If the master window, or any of its ancestors up to the slave'sparent, is moved, then the slave must be repositioned within itsparent in order to maintain the correct position relative to themaster..IP [3]If the master or one of its ancestors is mapped or unmapped, thenthe slave must be mapped or unmapped to correspond..LPNone of these problems is an issue if the parent and master arethe same.  For example, if the master or one of its ancestorsis unmapped, the slave is automatically removed by the screenby X..PP\fBTk_MaintainGeometry\fR deals with these problems for slaveswhose masters aren't their parents.\fBTk_MaintainGeometry\fR is typically called by a window manageronce it has decided where a slave should be positioned relativeto its master.\fBTk_MaintainGeometry\fR translates the coordinates to thecoordinate system of \fIslave\fR's parent and then moves andresizes the slave appropriately.Furthermore, it remembers the desired position and creates eventhandlers to monitor the master and all of its ancestors upto (but not including) the slave's parent.If any of these windows is moved, mapped, or unmapped,the slave will be adjusted so that it is mapped only when themaster is mapped and its geometry relative to the masterremains as specified by \fIx\fR, \fIy\fR, \fIwidth\fR, and\fIheight\fR..PPWhen a window manager relinquishes control over a window, orif it decides that it does not want the window to appear on thescreen under any conditions, it calls \fBTk_UnmaintainGeometry\fR.\fBTk_UnmaintainGeometry\fR unmaps the window and cancels anyprevious calls to \fBTk_MaintainGeometry\fR for the\fImaster\fR\-\fIslave\fR pair, so that the slave'sgeometry and mapped state are no longer maintainedautomatically.\fBTk_UnmaintainGeometry\fR need not be called by a geometrymanager if the slave, the master, or any of the master's ancestorsis destroyed:  Tk will call it automatically..PPIf \fBTk_MaintainGeometry\fR is called repeatedly for the same\fImaster\fR\-\fIslave\fR pair, the information from the mostrecent call supersedes any older information.If \fBTk_UnmaintainGeometry\fR is called for a \fImaster\fR\-\fIslave\fRpair that is isn't currently managed, the call has no effect..SH KEYWORDSgeometry manager, map, master, parent, position, slave, unmap

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -