home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / languages / tcl / tk3.3b1 / doc / toplevel.n < prev    next >
Encoding:
Text File  |  1993-04-01  |  5.1 KB  |  118 lines

  1. '\"
  2. '\" Copyright (c) 1990 The Regents of the University of California.
  3. '\" All rights reserved.
  4. '\"
  5. '\" Permission is hereby granted, without written agreement and without
  6. '\" license or royalty fees, to use, copy, modify, and distribute this
  7. '\" documentation for any purpose, provided that the above copyright
  8. '\" notice and the following two paragraphs appear in all copies.
  9. '\"
  10. '\" IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
  11. '\" FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
  12. '\" ARISING OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
  13. '\" CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  14. '\"
  15. '\" THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
  16. '\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
  17. '\" AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
  18. '\" ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
  19. '\" PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
  20. '\" 
  21. '\" $Header: /user6/ouster/wish/man/RCS/toplevel.n,v 1.7 93/04/01 09:53:01 ouster Exp $ SPRITE (Berkeley)
  22. '/" 
  23. .so man.macros
  24. .HS toplevel tk
  25. .BS
  26. '\" Note:  do not modify the .SH NAME line immediately below!
  27. .SH NAME
  28. toplevel \- Create and manipulate toplevel widgets
  29. .SH SYNOPSIS
  30. \fBtoplevel\fI \fIpathName \fR?\fB\-screen \fIscreenName\fR? ?\fB\-class \fIclassName\fR? ?\fIoptions\fR?
  31. .SH "STANDARD OPTIONS"
  32. .LP
  33. .nf
  34. .ta 4c 8c 12c
  35. \fBbackground\fR    \fBgeometry\fR
  36. \fBborderWidth\fR    \fBrelief\fR
  37. .fi
  38. .LP
  39. See the ``options'' manual entry for details on the standard options.
  40. .SH "WIDGET-SPECIFIC OPTIONS"
  41. .BE
  42.  
  43. .SH DESCRIPTION
  44. .PP
  45. The \fBtoplevel\fR command creates a new toplevel widget (given
  46. by the \fIpathName\fR argument).  Additional
  47. options, described above, may be specified on the command line
  48. or in the option database
  49. to configure aspects of the toplevel such as its background color
  50. and relief.  The \fBtoplevel\fR command returns the
  51. path name of the new window.
  52. .PP
  53. A toplevel is similar to a frame except that it is created as a
  54. top-level window:  its X parent is the root window of a screen
  55. rather than the logical parent from its path name.  The primary
  56. purpose of a toplevel is to serve as a container for dialog boxes
  57. and other collections of widgets.  The only features
  58. of a toplevel are its background color and an optional 3-D border
  59. to make the toplevel appear raised or sunken.
  60. .PP
  61. Two special command-line options may be provided to the \fBtoplevel\fR
  62. command:  \fB\-class\fR and \fB\-screen\fR.  If \fB\-class\fR
  63. is specified, then the new widget's class will be set to
  64. \fIclassName\fR instead of \fBToplevel\fR.  Changing the class of
  65. a toplevel widget may be useful
  66. in order to use a special class name in database options referring
  67. to this widget and its children.  The \fB\-screen\fR option
  68. may be used to place the window on a different screen than the
  69. window's logical parent.  Any valid screen name may be used, even
  70. one associated with a different display.
  71. .PP
  72. Note:  \fB\-class\fR and \fB\-screen\fR are handled
  73. differently than other command-line options.  They may not be specified
  74. using the option database (these options must have been processed
  75. before the new window has been created enough to use the option database;
  76. in particular, the new class name will affect the lookup of options
  77. in the database).  In addition, \fB\-class\fR and \fB\-screen\fR
  78. may not be queried or changed using the \fBconfig\fR command described
  79. below.  However, the \fBwinfo class\fR command may be used to query
  80. the class of a window, and \fBwinfo screen\fR may be used to query
  81. its screen.
  82.  
  83. .SH "WIDGET COMMAND"
  84. .PP
  85. The \fBtoplevel\fR command creates a new Tcl command whose
  86. name is the same as the path name of the toplevel's window.  This
  87. command may be used to invoke various
  88. operations on the widget.  It has the following general form:
  89. .DS C
  90. \fIpathName option \fR?\fIarg arg ...\fR?
  91. .DE
  92. \fIPathName\fR is the name of the command, which is the same as
  93. the toplevel widget's path name.  \fIOption\fR and the \fIarg\fRs
  94. determine the exact behavior of the command.  The following
  95. commands are possible for toplevel widgets:
  96. .TP
  97. \fIpathName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
  98. Query or modify the configuration options of the widget.
  99. If no \fIoption\fR is specified, returns a list describing all of
  100. the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
  101. information on the format of this list).  If \fIoption\fR is specified
  102. with no \fIvalue\fR, then the command returns a list describing the
  103. one named option (this list will be identical to the corresponding
  104. sublist of the value returned if no \fIoption\fR is specified).  If
  105. one or more \fIoption\-value\fR pairs are specified, then the command
  106. modifies the given widget option(s) to have the given value(s);  in
  107. this case the command returns an empty string.
  108. \fIOption\fR may have any of the values accepted by the \fBtoplevel\fR
  109. command.
  110.  
  111. .SH BINDINGS
  112. .PP
  113. When a new toplevel is created, it has no default event bindings:
  114. toplevels are not intended to be interactive.
  115.  
  116. .SH KEYWORDS
  117. toplevel, widget
  118.