]> www.wagner.pp.ru Git - oss/ck.git/blob - doc/focus.n
Ck console graphics toolkit
[oss/ck.git] / doc / focus.n
1 '\"
2 '\" Copyright (c) 1990-1994 The Regents of the University of California.
3 '\" Copyright (c) 1994-1995 Sun Microsystems, Inc.
4 '\" Copyright (c) 1996-1999 Christian Werner
5 '\"
6 '\" See the file "license.terms" for information on usage and redistribution
7 '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
8 '\" 
9 .so man.macros
10 .TH focus n 8.0 Ck "Ck Built-In Commands"
11 .BS
12 '\" Note:  do not modify the .SH NAME line immediately below!
13 .SH NAME
14 focus \- Manage the input focus
15 .SH SYNOPSIS
16 \fBfocus\fR
17 .br
18 \fBfocus \fIwindow\fR
19 .BE
20
21 .SH DESCRIPTION
22 .PP
23 The \fBfocus\fR command is used to manage the Ck input focus.
24 At any given time, one window on the terminal's screen is designated as
25 the \fIfocus window\fR;  any key press events are sent to that window.
26 The Tcl procedures \fBck_focusNext\fR and \fBck_focusPrev\fR
27 implement a focus order among the windows of a top-level;  they
28 are used in the default bindings for Tab and Shift-Tab, among other
29 things. Switching the focus among different top-levels is up
30 to the user. 
31 .PP
32 The \fBfocus\fR command can take any of the following forms:
33 .TP
34 \fBfocus\fR
35 Returns the path name of the focus window or an empty string if no window
36 in the application has the focus.
37 .TP
38 \fBfocus \fIwindow\fR
39 This command sets the input focus to \fIwindow\fR and returns an
40 empty string. If \fIwindow\fR is in a different top-level than
41 the current input focus window, then \fIwindow's\fR top-level
42 is automatically raised just as if the \fBraise\fR Tcl command
43 had been invoked.
44 If \fIwindow\fR is an empty string then the command does nothing.
45
46 .SH KEYWORDS
47 events, focus, keyboard, top-level