]> www.wagner.pp.ru Git - oss/ck.git/blob - doc/toplevel.n
Ck console graphics toolkit
[oss/ck.git] / doc / toplevel.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 toplevel 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 toplevel \- Create and manipulate toplevel widgets
15 .SH SYNOPSIS
16 \fBtoplevel\fI \fIpathName \fR?\fIoptions\fR?
17 .SH "STANDARD OPTIONS"
18 .LP
19 .nf
20 .ta 4c 8c 12c
21 \fBattributes\fR        \fBborder\fR    \fBforeground\fR        \fBtakefocus\fR
22 \fBbackground\fR
23 .fi
24 .LP
25 See the ``options'' manual entry for details on the standard options.
26 .SH "WIDGET-SPECIFIC OPTIONS"
27 .ta 4c
28 .LP
29 .nf
30 Name:   \fBclass\fR
31 Class:  \fBClass\fR
32 Command-Line Switch:    \fB\-class\fR
33 .fi
34 .IP
35 Specifies a class for the window.
36 This class will be used when querying the option database for
37 the window's other options, and it will also be used later for
38 other purposes such as bindings.
39 The \fBclass\fR option may not be changed with the \fBconfigure\fR
40 widget command.
41 .LP
42 .nf
43 Name:   \fBheight\fR
44 Class:  \fBHeight\fR
45 Command-Line Switch:    \fB\-height\fR
46 .fi
47 .IP
48 Specifies the desired height for the window in screen lines.
49 If this option is equal to zero then the window will
50 not request any size at all.
51 .LP
52 .nf
53 Name:   \fBwidth\fR
54 Class:  \fBWidth\fR
55 Command-Line Switch:    \fB\-width\fR
56 .fi
57 .IP
58 Specifies the desired width for the window in screen columns.
59 If this option is equal to zero then the window will
60 not request any size at all.
61 .BE
62
63 .SH DESCRIPTION
64 .PP
65 The \fBtoplevel\fR command creates a new toplevel widget (given
66 by the \fIpathName\fR argument).  Additional
67 options, described above, may be specified on the command line
68 or in the option database
69 to configure aspects of the toplevel such as its background color
70 and relief.  The \fBtoplevel\fR command returns the
71 path name of the new window.
72 .PP
73 A toplevel is similar to a frame except that it is created as a
74 top-level window: its parent with respect to screen real estate
75 is the terminal's screen rather than the logical parent from its
76 path name.  The primary
77 purpose of a toplevel is to serve as a container for dialog boxes
78 and other collections of widgets.  The only visible features
79 of a toplevel are its background color, attributes and border.
80
81 .SH "WIDGET COMMAND"
82 .PP
83 The \fBtoplevel\fR command creates a new Tcl command whose
84 name is the same as the path name of the toplevel's window.  This
85 command may be used to invoke various
86 operations on the widget.  It has the following general form:
87 .DS C
88 \fIpathName option \fR?\fIarg arg ...\fR?
89 .DE
90 \fIPathName\fR is the name of the command, which is the same as
91 the toplevel widget's path name.  \fIOption\fR and the \fIarg\fRs
92 determine the exact behavior of the command.  The following
93 commands are possible for toplevel widgets:
94 .TP
95 \fIpathName \fBcget\fR \fIoption\fR
96 Returns the current value of the configuration option given
97 by \fIoption\fR.
98 \fIOption\fR may have any of the values accepted by the \fBtoplevel\fR
99 command.
100 .TP
101 \fIpathName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
102 Query or modify the configuration options of the widget.
103 If no \fIoption\fR is specified, returns a list describing all of
104 the available options for \fIpathName\fR. If \fIoption\fR is specified
105 with no \fIvalue\fR, then the command returns a list describing the
106 one named option (this list will be identical to the corresponding
107 sublist of the value returned if no \fIoption\fR is specified).  If
108 one or more \fIoption\-value\fR pairs are specified, then the command
109 modifies the given widget option(s) to have the given value(s);  in
110 this case the command returns an empty string.
111 \fIOption\fR may have any of the values accepted by the \fBtoplevel\fR
112 command.
113
114 .SH PLACEMENT
115 The only means to place a toplevel widget on the screen is the
116 \fBplace\fR geometry manager.
117
118 .SH BINDINGS
119 .PP
120 When a new toplevel is created, it has no default event bindings:
121 toplevels are not intended to be interactive.
122
123 .SH KEYWORDS
124 toplevel, widget, place