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

📄 focus.n

📁 linux系统下的音频通信
💻 N
字号:
'\"'\" Copyright (c) 1990-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: @(#) focus.n 1.22 96/08/27 13:21:42'\" .so man.macros.TH focus n 4.0 Tk "Tk Built-In Commands".BS'\" Note:  do not modify the .SH NAME line immediately below!.SH NAMEfocus \- Manage the input focus.SH SYNOPSIS\fBfocus\fR.sp\fBfocus \fIwindow\fR.sp\fBfocus \fIoption\fR ?\fIarg arg ...\fR?.BE.SH DESCRIPTION.PPThe \fBfocus\fR command is used to manage the Tk input focus.At any given time, one window on each display is designated asthe \fIfocus window\fR;  any key press or key release events for thedisplay are sent to that window.It is normally up to the window manager to redirect the focus among thetop-level windows of a display.  For example, some window managersautomatically set the input focus to a top-level window wheneverthe mouse enters it;  others redirect the input focus only whenthe user clicks on a window.Usually the window manager will set the focusonly to top-level windows, leaving it up to the application toredirect the focus among the children of the top-level..PPTk remembers one focus window for each top-level (the most recentdescendant of that top-level to receive the focus);  when the windowmanager gives the focusto a top-level, Tk automatically redirects it to the rememberedwindow.  Within a top-level Tk uses an \fIexplicit\fR focus modelby default.  Moving the mouse within a top-level does not normallychange the focus;  the focus changes only when a widgetdecides explicitly to claim the focus (e.g., because of a buttonclick), or when the user types a key such as Tab that moves thefocus..PPThe Tcl procedure \fBtk_focusFollowsMouse\fR may be invoked tocreate an \fIimplicit\fR focus model:  it reconfigures Tk so thatthe focus is set to a window whenever the mouse enters it.The Tcl procedures \fBtk_focusNext\fR and \fBtk_focusPrev\fRimplement a focus order among the windows of a top-level;  theyare used in the default bindings for Tab and Shift-Tab, among otherthings..PPThe \fBfocus\fR command can take any of the following forms:.TP\fBfocus\fRReturns the path name of the focus window on the display containingthe application's main window,  or an empty string if no window inthis application has the focus on that display.   Note:  it isbetter to specify the display explicitly using \fB\-displayof\fR(see below) so that the code will work in applications using multipledisplays..TP\fBfocus \fIwindow\fRIf the application currently has the input focus on \fIwindow\fR'sdisplay, this command resets the input focus for \fIwindow\fR's displayto \fIwindow\fR and returns an empty string.If the application doesn't currently have the  input focus on\fIwindow\fR's display, \fIwindow\fR will be remembered as the focusfor its top-level;  the next time the focus arrives at the top-level,Tk will redirect it to \fIwindow\fR.If \fIwindow\fR is an empty string then the command does nothing..TP\fBfocus \-displayof\fR \fIwindow\fRReturns the name of the focus window on the display containing \fIwindow\fR.If the focus window for \fIwindow\fR's display isn't in thisapplication, the return value is an empty string..TP\fBfocus \-force \fIwindow\fRSets the focus of \fIwindow\fR's display to \fIwindow\fR, even ifthe application doesn't currently have the input focus for the display.This command should be used sparingly, if at all.In normal usage, an application should not claim the focus foritself;  instead, it should wait for the window manager to give itthe focus.If \fIwindow\fR is an empty string then the command does nothing..TP\fBfocus \-lastfor\fR \fIwindow\fRReturns the name of the most recent window to have the input focusamong all the windows in the same top-level as \fIwindow\fR.If no window in that top-level has ever had the input focus, orif the most recent focus window has been deleted, then the nameof the top-level is returned.  The return value is the window thatwill receive the input focus the next time the window manager givesthe focus to the top-level..SH "QUIRKS".PPWhen an internal window receives the input focus, Tk doesn't actuallyset the X focus to that window;  as far as X is concerned, the focuswill stay on the top-level window containing the window with the focus.However, Tk generates FocusIn and FocusOut events just as if the Xfocus were on the internal window.   This approach gets around anumber of problems that would occur if the X focus were actually moved;the fact that the X focus is on the top-level is invisible unlessyou use C code to query the X server directly..SH KEYWORDSevents, focus, keyboard, top-level, window manager

⌨️ 快捷键说明

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