Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / tools / perl-5.8.0 / lib / site_perl / 5.8.0 / sun4-solaris / Tk / Toplevel.pod
CommitLineData
86530b38
AT
1# Copyright (c) 1990-1994 The Regents of the University of California.
2# Copyright (c) 1994-1996 Sun Microsystems, Inc.
3# See the file "license.terms" for information on usage and redistribution
4# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
5#
6#
7
8=head1 NAME
9
10Tk::Toplevel - Create and manipulate Toplevel widgets
11
12=for category Tk Widget Classes
13
14=head1 SYNOPSIS
15
16S< >I<$toplevel> = I<$parent>-E<gt>B<Toplevel>(?I<options>?);
17
18=head1 STANDARD OPTIONS
19
20B<-borderwidth> B<-highlightbackground> B<-highlightthickness> B<-takefocus>
21B<-class> B<-highlightcolor> B<-relief>
22B<-cursor>
23
24See L<Tk::options> for details of the standard options.
25
26=head1 WIDGET-SPECIFIC OPTIONS
27
28=over 4
29
30=item Name: B<background>
31
32=item Class: B<Background>
33
34=item Switch: B<-background>
35
36This option is the same as the standard B<background> option
37except that its value may also be specified as an undefined value.
38In this case, the widget will display no background or border, and
39no colors will be consumed from its colormap for its background
40and border.
41
42=item Name: B<colormap>
43
44=item Class: B<Colormap>
45
46=item Switch: B<-colormap>
47
48Specifies a colormap to use for the window.
49The value may be either B<new>, in which case a new colormap is
50created for the window and its children, or the name of another
51window (which must be on the same screen and have the same visual
52as $widget), in which case the new window will use the colormap
53from the specified window.
54If the B<colormap> option is not specified, the new window
55uses the default colormap of its screen.
56This option may not be changed with the B<configure>
57method.
58
59=item Name: B<container>
60
61=item Class: B<Container>
62
63=item Switch: B<-container>
64
65The value must be a boolean. If true, it means that this window will
66be used as a container in which some other application will be embedded
67(for example, a Tk toplevel can be embedded using the B<-use> option).
68The window will support the appropriate window manager protocols for
69things like geometry requests. The window should not have any
70children of its own in this application.
71This option may not be changed with the B<configure>
72method.
73
74=item Name: B<height>
75
76=item Class: B<Height>
77
78=item Switch: B<-height>
79
80Specifies the desired height for the window in any of the forms
81acceptable to B<Tk_GetPixels>.
82If this option is less than or equal to zero then the window will
83not request any size at all.
84
85=item Name: B<menu>
86
87=item Class: B<Menu>
88
89=item Switch: B<-menu>
90
91Specifies a menu widget to be used as a menubar. On the Macintosh, the
92menubar will be displayed accross the top of the main monitor. On
93Microsoft Windows and all UNIX platforms, the menu will appear accross
94the toplevel window as part of the window dressing maintained by the
95window manager.
96
97=item Name: B<"">
98
99=item Class: B<"">
100
101=item Switch: B<-screen>
102
103Specifies the screen on which to place the new window.
104Any valid screen name may be used, even one associated with a
105different display.
106Defaults to the same screen as its parent.
107This option is special in that it may not be specified via the option
108database, and it may not be modified with the B<configure>
109method.
110
111=item Name: B<use>
112
113=item Class: B<Use>
114
115=item Switch: B<-use>
116
117This option is used for embedding. If the value isn't an empty string,
118it must be the the window identifier of a container window, specified as
119a hexadecimal string like the ones returned by the B<winfo id>
120command. The toplevel widget will be created as a child of the given
121container instead of the root window for the screen. If the container
122window is in a Tk application, it must be a frame or toplevel widget for
123which the B<-container> option was specified.
124This option may not be changed with the B<configure>
125method.
126
127=item Name: B<visual>
128
129=item Class: B<Visual>
130
131=item Switch: B<-visual>
132
133Specifies visual information for the new window in any of the
134forms accepted by B<Tk_GetVisual>.
135If this option is not specified, the new window will use the default
136visual for its screen.
137The B<visual> option may not be modified with the B<configure>
138method.
139
140=item Name: B<width>
141
142=item Class: B<Width>
143
144=item Switch: B<-width>
145
146Specifies the desired width for the window in any of the forms
147acceptable to B<Tk_GetPixels>.
148If this option is less than or equal to zero then the window will
149not request any size at all.
150
151=back
152
153=head1 DESCRIPTION
154
155The B<Toplevel> method creates a new toplevel widget (given
156by the $widget argument). Additional
157options, described above, may be specified on the command line
158or in the option database
159to configure aspects of the toplevel such as its background color
160and relief. The B<toplevel> command returns the
161path name of the new window.
162
163A toplevel is similar to a frame except that it is created as a
164top-level window: its X parent is the root window of a screen
165rather than the logical parent from its path name. The primary
166purpose of a toplevel is to serve as a container for dialog boxes
167and other collections of widgets. The only visible features
168of a toplevel are its background color and an optional 3-D border
169to make the toplevel appear raised or sunken.
170
171=head1 WIDGET METHODS
172
173The B<Toplevel> method creates a widget object.
174This object supports the B<configure> and B<cget> methods
175described in L<Tk::options> which can be used to enquire and
176modify the options described above.
177The widget also inherits all the methods provided by the generic
178L<Tk::Widget|Tk::Widget> class, and the L<Tk::Wm|Tk::Wm> class.
179
180=head1 BINDINGS
181
182When a new toplevel is created, it has no default event bindings:
183toplevels are not intended to be interactive.
184
185=head1 SEE ALSO
186
187L<Tk::Widget|Tk::Widget>
188L<Tk::Wm|Tk::Wm>
189
190=head1 KEYWORDS
191
192toplevel, widget
193
194=cut
195