1 |
578 |
markom |
'\"
|
2 |
|
|
'\" Copyright (c) 1996 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 |
|
|
'\" @(#) feedback.n
|
8 |
|
|
'/"
|
9 |
|
|
.so man.macros
|
10 |
|
|
.HS feedback iwid
|
11 |
|
|
.BS
|
12 |
|
|
'\" Note: do not modify the .SH NAME line immediately below!
|
13 |
|
|
.SH NAME
|
14 |
|
|
feedback \- Create and manipulate a feedback widget to display feedback on
|
15 |
|
|
the current status of an ongoing operation to the user.
|
16 |
|
|
.SH SYNOPSIS
|
17 |
|
|
\fBfeedback\fI \fIpathName \fR?\fIoptions\fR?
|
18 |
|
|
.SH "INHERITANCE"
|
19 |
|
|
itk::Widget <- Labeledwidget <- Feedback
|
20 |
|
|
.SH "STANDARD OPTIONS"
|
21 |
|
|
.LP
|
22 |
|
|
.nf
|
23 |
|
|
.ta 4c 8c 12c
|
24 |
|
|
\fBbackground\fR \fBcursor\fR \fBforeground\fR \fBhighlightColor\fR
|
25 |
|
|
\fBhighlightThickness\fR
|
26 |
|
|
.fi
|
27 |
|
|
.LP
|
28 |
|
|
See the "options" manual entry for details on the standard options.
|
29 |
|
|
.SH "INHERITED OPTIONS"
|
30 |
|
|
.LP
|
31 |
|
|
.nf
|
32 |
|
|
.ta 4c 8c 12c
|
33 |
|
|
\fBlabelBitmap\fR \fBlabelFont\fR \fBlabelImage\fR \fBlabelMargin\fR
|
34 |
|
|
\fBlabelPos\fR \fBlabelText\fR \fBlabelVariable\fR
|
35 |
|
|
.fi
|
36 |
|
|
.LP
|
37 |
|
|
See the "labeledwidget" class manual entry for details on the inherited options.
|
38 |
|
|
.SH "WIDGET-SPECIFIC OPTIONS"
|
39 |
|
|
.LP
|
40 |
|
|
.nf
|
41 |
|
|
Name: \fBbarcolor\fR
|
42 |
|
|
Class: \fBBarColor\fR
|
43 |
|
|
Command-Line Switch: \fB-barcolor\fR
|
44 |
|
|
.fi
|
45 |
|
|
.IP
|
46 |
|
|
Specifies the color of the status bar, in any of the forms
|
47 |
|
|
acceptable to \fBTk_GetColor\fR. The default is DodgerBlue.
|
48 |
|
|
.LP
|
49 |
|
|
.nf
|
50 |
|
|
Name: \fBbarheight\fR
|
51 |
|
|
Class: \fBBarHeight\fR
|
52 |
|
|
Command-Line Switch: \fB-barheight\fR
|
53 |
|
|
.fi
|
54 |
|
|
.IP
|
55 |
|
|
Specifies the height of the status bar, in any of the forms
|
56 |
|
|
acceptable to \fBTk_GetPixels\fR. The default is 20.
|
57 |
|
|
.LP
|
58 |
|
|
.nf
|
59 |
|
|
Name: \fBtroughColor\fR
|
60 |
|
|
Class: \fBTroughColor\fR
|
61 |
|
|
Command-Line Switch: \fB-troughcolor\fR
|
62 |
|
|
.fi
|
63 |
|
|
.IP
|
64 |
|
|
Specifies the color of the frame in which the status bar sits,
|
65 |
|
|
in any of the forms acceptable to \fBTk_GetColor\fR. The default is white.
|
66 |
|
|
.LP
|
67 |
|
|
.nf
|
68 |
|
|
Name: \fBsteps\fR
|
69 |
|
|
Class: \fBSteps\fR
|
70 |
|
|
Command-Line Switch: \fB-steps\fR
|
71 |
|
|
.fi
|
72 |
|
|
.IP
|
73 |
|
|
Specifies the total number of steps for the status bar. The default is 10.
|
74 |
|
|
.LP
|
75 |
|
|
|
76 |
|
|
.SH DESCRIPTION
|
77 |
|
|
.PP
|
78 |
|
|
The \fBfeedback\fR command creates a widget to display feedback on
|
79 |
|
|
the current status of an ongoing operation to the user. Display is given as
|
80 |
|
|
a percentage and as a thermometer type bar. Options exist for adding a label
|
81 |
|
|
and controlling its position.
|
82 |
|
|
|
83 |
|
|
.SH "METHODS"
|
84 |
|
|
.PP
|
85 |
|
|
The \fBfeedback\fR command creates a new Tcl command whose
|
86 |
|
|
name is \fIpathName\fR. This command may be used to invoke various
|
87 |
|
|
operations on the widget. It has the following general form:
|
88 |
|
|
.DS C
|
89 |
|
|
\fIpathName option \fR?\fIarg arg ...\fR?
|
90 |
|
|
.DE
|
91 |
|
|
\fIOption\fR and the \fIarg\fRs
|
92 |
|
|
determine the exact behavior of the command. The following
|
93 |
|
|
commands are possible for scrolledtext widgets:
|
94 |
|
|
|
95 |
|
|
.SH "WIDGET-SPECIFIC METHODS"
|
96 |
|
|
.TP
|
97 |
|
|
\fIpathName \fBcget\fR \fIoption\fR
|
98 |
|
|
Returns the current value of the configuration option given
|
99 |
|
|
by \fIoption\fR.
|
100 |
|
|
\fIOption\fR may have any of the values accepted by the \fBscrolledhtml\fR
|
101 |
|
|
command.
|
102 |
|
|
.TP
|
103 |
|
|
\fIpathName\fR \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
|
104 |
|
|
Query or modify the configuration options of the widget.
|
105 |
|
|
If no \fIoption\fR is specified, returns a list describing all of
|
106 |
|
|
the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
|
107 |
|
|
information on the format of this list). If \fIoption\fR is specified
|
108 |
|
|
with no \fIvalue\fR, then the command returns a list describing the
|
109 |
|
|
one named option (this list will be identical to the corresponding
|
110 |
|
|
sublist of the value returned if no \fIoption\fR is specified). If
|
111 |
|
|
one or more \fIoption\-value\fR pairs are specified, then the command
|
112 |
|
|
modifies the given widget option(s) to have the given value(s); in
|
113 |
|
|
this case the command returns an empty string.
|
114 |
|
|
\fIOption\fR may have any of the values accepted by the \fBfeedback\fR
|
115 |
|
|
command.
|
116 |
|
|
.TP
|
117 |
|
|
\fIpathName\fR \fBreset\fR
|
118 |
|
|
Reset the current number of steps completed to 0, and configures the
|
119 |
|
|
percentage complete label text to 0%
|
120 |
|
|
.TP
|
121 |
|
|
\fIpathName\fR \fBstep\fR ?\fIinc\fR?
|
122 |
|
|
Increase the current number of steps completed by the amount specified
|
123 |
|
|
by \fIinc\fR. \fIInc\fR defaults to 1.
|
124 |
|
|
|
125 |
|
|
.SH EXAMPLE
|
126 |
|
|
.DS
|
127 |
|
|
feedback .fb -labeltext "Status" -steps 20
|
128 |
|
|
pack .fb -padx 10 -pady 10 -fill both -expand yes
|
129 |
|
|
|
130 |
|
|
for {set i 0} {$i < 20} {incr i} {
|
131 |
|
|
.fb step
|
132 |
|
|
after 500
|
133 |
|
|
}
|
134 |
|
|
.DE
|
135 |
|
|
.SH ACKNOWLEDGEMENTS
|
136 |
|
|
Sam Shen
|
137 |
|
|
.IP
|
138 |
|
|
This code is based largely on his feedback.tcl code from tk inspect. The
|
139 |
|
|
original feedback code is copyright 1995 Lawrence Berkeley Laboratory.
|
140 |
|
|
.LP
|
141 |
|
|
.SH AUTHOR
|
142 |
|
|
Kris Raney
|
143 |
|
|
.SH KEYWORDS
|
144 |
|
|
feedback, widget
|