OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [tags/] [start/] [insight/] [itcl/] [iwidgets3.0.0/] [doc/] [mainwindow.n] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
'\"
2
'\" Copyright (c) 1995 DSC Technologies Corporation
3
'\"
4
'\" See the file "license.terms" for information on usage and redistribution
5
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
6
'\"
7
'\" @(#) mainwindow.n 1.21 94/12/17 16:04:44
8
'/"
9
.so man.macros
10
.HS mainwindow iwid
11
.BS
12
'\" Note:  do not modify the .SH NAME line immediately below!
13
.SH NAME
14
mainwindow \- Create and manipulate a mainwindow widget
15
.SH SYNOPSIS
16
\fBmainwindow\fI \fIpathName \fR?\fIoptions\fR?
17
.SH "INHERITANCE"
18
itk::Toplevel <- shell <- mainwindow
19
.SH "STANDARD OPTIONS"
20
.LP
21
.nf
22
.ta 4c 8c 12c
23
\fBbackground\fR        \fBcursor\fR    \fBdisabledForeground\fR        \fBfont\fR
24
\fBforeground\fR        \fBhighlightBackground\fR       \fBhighlightColor\fR    \fBhighlightThickness\fR
25
.fi
26
.LP
27
See the "options" manual entry for details on the standard options.
28
.SH "ASSOCIATED OPTIONS"
29
.LP
30
.nf
31
.ta 4c 8c 12c
32
\fBballoonBackground\fR \fBballoonDelay1\fR     \fBballoonDelay2\fR     \fBballonFont\fR
33
\fBballoonForeground\fR
34
.fi
35
.LP
36
See the "toolbar" manual entry for details on the above associated options.
37
.SH "INHERITED OPTIONS"
38
.LP
39
.nf
40
.ta 4c 8c 12c
41
\fBtitle\fR
42
.fi
43
.LP
44
See the "Toplevel" manual entry for details on the above inherited options.
45
.LP
46
.nf
47
.ta 4c 8c 12c
48
\fBheight\fR    \fBmaster\fR    \fBmodality\fR  \fBpadX\fR
49
\fBpadY\fR      \fBwidth\fR
50
.fi
51
.LP
52
See the "shell" manual entry for details on the above inherited options.
53
 
54
.SH "WIDGET-SPECIFIC OPTIONS"
55
.LP
56
.nf
57
Name:   \fBhelpLine\fR
58
Class:  \fBHelpLine\fR
59
Command-Line Switch:    \fB-helpline\fR
60
.fi
61
.IP
62
Specifies whether or not to display the help line.  The value
63
may be given in any of the forms acceptable to Tk_GetBoolean.
64
The default is yes.
65
.LP
66
.nf
67
Name:   \fBmenuBarBackground\fR
68
Class:  \fBBackground\fR
69
Command-Line Switch:    \fB-menubarbackground\fR
70
.fi
71
.IP
72
Specifies the normal background color for the menubar.
73
.LP
74
.nf
75
Name:   \fBmenuBarFont\fR
76
Class:  \fBFont\fR
77
Command-Line Switch:    \fB-menubarfont\fR
78
.fi
79
.IP
80
Specifies the font to use when drawing text inside the menubar.
81
.LP
82
.nf
83
Name:   \fBmenuBarForeround\fR
84
Class:  \fBForeground\fR
85
Command-Line Switch:    \fB-menubarforeground\fR
86
.fi
87
.IP
88
Specifies the normal foreground color for the menubar.
89
.LP
90
.nf
91
Name:   \fBstatusLine\fR
92
Class:  \fBStatusLine\fR
93
Command-Line Switch:    \fB-statusline\fR
94
.fi
95
.IP
96
Specifies whether or not to display the status line.  The value
97
may be given in any of the forms acceptable to Tk_GetBoolean.
98
The default is yes.
99
.LP
100
.nf
101
Name:   \fBtoolBarBackground\fR
102
Class:  \fBBackground\fR
103
Command-Line Switch:    \fB-toolbarbackground\fR
104
.fi
105
.IP
106
Specifies the normal background color for the toolbar.
107
.LP
108
.nf
109
Name:   \fBtoolBarFont\fR
110
Class:  \fBFont\fR
111
Command-Line Switch:    \fB-toolbarfont\fR
112
.fi
113
.IP
114
Specifies the font to use when drawing text inside the toolbar.
115
.LP
116
.nf
117
Name:   \fBtoolBarForeround\fR
118
Class:  \fBForeground\fR
119
Command-Line Switch:    \fB-toolbarforeground\fR
120
.fi
121
.IP
122
Specifies the normal foreground color for the toolbar.
123
.BE
124
 
125
.SH DESCRIPTION
126
.PP
127
The \fBmainwindow\fR command creates a mainwindow shell which contains
128
a menubar, toolbar, mousebar, childsite, status line, and help line.
129
Each item may be filled and configured to suit individual needs.
130
 
131
.SH "METHODS"
132
.PP
133
The \fBmainwindow\fR command create a new Tcl command whose
134
name is \fIpathName\fR.  This command may be used to invoke various
135
operations on the widget.  It has the following general form:
136
.DS C
137
\fIpathName option \fR?\fIarg arg ...\fR?
138
.DE
139
\fIOption\fR and the \fIarg\fRs
140
determine the exact behavior of the command.  The following
141
commands are possible for mainwindow widgets:
142
.SH "INHERITED METHODS"
143
.LP
144
.nf
145
.ta 4c 8c 12c
146
\fBactivate\fR  \fBcenter\fR    \fBdeactivate\fR
147
.fi
148
.LP
149
See the "shell" manual entry for details on the above inherited methods.
150
.SH "WIDGET-SPECIFIC METHODS"
151
.TP
152
\fIpathName \fBcget\fR \fIoption\fR
153
Returns the current value of the configuration option given
154
by \fIoption\fR.
155
\fIOption\fR may have any of the values accepted by the \fBmainwindow\fR
156
command.
157
.TP
158
\fIpathName \fBchildsite\fR
159
Returns the pathname of the child site widget.
160
.TP
161
\fIpathName\fR \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
162
Query or modify the configuration options of the widget.
163
If no \fIoption\fR is specified, returns a list describing all of
164
the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
165
information on the format of this list).  If \fIoption\fR is specified
166
with no \fIvalue\fR, then the command returns a list describing the
167
one named option (this list will be identical to the corresponding
168
sublist of the value returned if no \fIoption\fR is specified).  If
169
one or more \fIoption\-value\fR pairs are specified, then the command
170
modifies the given widget option(s) to have the given value(s);  in
171
this case the command returns an empty string.
172
\fIOption\fR may have any of the values accepted by the \fBmainwindow\fR
173
command.
174
.TP
175
\fIpathName \fBmenubar\fR ?\fIargs\fR?
176
The \fBmenubar\fR method provides access to the menubar.  Invoked with
177
no arguments it returns the pathname of the menubar.  With arguments,
178
they are evaluated against the menubar which in effect provides
179
access to the entire API of the menubar.  See the "menubar" manual
180
entry for details on the commands available in the menubar.
181
.TP
182
\fIpathName \fBmousebar\fR ?\fIargs\fR?
183
The \fBmousebar\fR method provides access to the mousebar which is a
184
vertical toolbar.  Invoked with no arguments it returns the pathname
185
of the mousebar.  With arguments, they are evaluated against the mousebar
186
which in effect provides access to the entire API of the underlying
187
toolbar.  See the "toolbar" manual entry for details on the commands
188
available in the mousebar.
189
.TP
190
\fIpathName \fBmsgd\fR ?\fIargs\fR?
191
The \fBmsgd\fR method provides access to the messagedialog contained
192
in the mainwindow.  Invoked with no arguments it returns the pathname
193
of the messagedialog.  With arguments, they are evaluated against the
194
messagedialog which in effect provides access to the entire API of the
195
messagedialog.  See the "messagedialog" manual
196
entry for details on the commands available in the messagedialog.
197
.TP
198
\fIpathName \fBtoolbar\fR ?\fIargs\fR?
199
The \fBtoolbar\fR method provides access to the toolbar.  Invoked with
200
no arguments it returns the pathname of the toolbar.  With arguments,
201
they are evaluated against the toolbar which in effect provides
202
access to the entire API of the toolbar.  See the "toolbar" manual
203
entry for details on the commands available in the toolbar.
204
 
205
.SH "COMPONENTS"
206
.LP
207
.nf
208
Name:   \fBhelp\fR
209
Class:  \fBLabel\fR
210
.fi
211
.IP
212
The help component provides a location for displaying any help
213
strings provided in the menubar, toolbar, or mousebar.  See the "label"
214
widget manual entry for details on the help component item.
215
.LP
216
.nf
217
Name:   \fBmenubar\fR
218
Class:  \fBMenubar\fR
219
.fi
220
.IP
221
The menubar component is the menubar located at the top of the window.
222
See the "menubar" widget manual entry for details on the menubar
223
component item.
224
.LP
225
.nf
226
Name:   \fBmousebar\fR
227
Class:  \fBToolbar\fR
228
.fi
229
.IP
230
The mousebar component is the vertical toolbar located on the right side
231
of the window.  See the "toolbar" widget manual entry for details on
232
the mousebar component item.
233
.LP
234
.nf
235
Name:   \fBmsgd\fR
236
Class:  \fBMessagedialog\fR
237
.fi
238
.IP
239
The msgd component is a messagedialog which may be reconfigured as needed
240
and used repeatedly throughout the application.  See the "messagedialog"
241
widget manual entry for details on the messagedialog component item.
242
.LP
243
.nf
244
Name:   \fBstatus\fR
245
Class:  \fBLabel\fR
246
.fi
247
.IP
248
The status component provides a location for displaying application
249
status information.  See the "label" widget manual entry for details
250
on the status component item.
251
.LP
252
.nf
253
Name:   \fBtoolbar\fR
254
Class:  \fBToolbar\fR
255
.fi
256
.IP
257
The toolbar component is the horizontal toolbar located on the top
258
of the window.  See the "toolbar" widget manual entry for details on
259
the toolbar component item.
260
.fi
261
 
262
.SH EXAMPLE
263
.DS
264
 mainwindow .mw
265
 
266
 #
267
 # Add a File menubutton
268
 #
269
 .mw menubar add menubutton file -text "File" -underline 0 -padx 8 -pady 2 \\
270
    -menu {options -tearoff no
271
           command new -label "New" -underline 0 \\
272
               -helpstr "Create a new file"
273
           command open -label "Open ..." -underline 0 \\
274
               -helpstr "Open an existing file"
275
           command save -label "Save" -underline 0 \\
276
               -helpstr "Save the current file"
277
           command saveas -label "Save As ..." -underline 5 \\
278
               -helpstr "Save the file as a differnet name"
279
           command print -label "Print" -underline 0 \\
280
               -helpstr "Print the file"
281
           separator sep1
282
           command close -label "Close" -underline 0 \\
283
               -helpstr "Close the file"
284
           separator sep2
285
           command exit -label "Exit" -underline 1 \\
286
               -helpstr "Exit this application"
287
    }
288
 
289
 #
290
 # Install a scrolledtext widget in the childsite.
291
 #
292
 scrolledtext [.mw childsite].st
293
 pack [.mw childsite].st -fill both -expand yes
294
 
295
 #
296
 # Activate the main window.
297
 #
298
 .mw activate
299
.DE
300
.SH AUTHOR
301
Mark L. Ulferts
302
.DE
303
John A. Tucker
304
.LP
305
.SH KEYWORDS
306
mainwindow, shell, widget

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.