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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [itcl/] [iwidgets3.0.0/] [doc/] [watch.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
'\" @(#) watch.n
8
'\"
9
.so man.macros
10
.HS watch iwid
11
.BS
12
'\" Note:  do not modify the .SH NAME line immediately below!
13
.SH NAME
14
watch \- Create and manipulate time with a watch widgets
15
.SH SYNOPSIS
16
\fBwatch\fI \fIpathName \fR?\fIoptions\fR?
17
.SH "INHERITANCE"
18
itk::Widget <- Watch
19
 
20
.SH "STANDARD OPTIONS"
21
.LP
22
.nf
23
.ta 4c 8c 12c
24
\fBbackground\fR        \fBcursor\fR    \fBforeground\fR        \fBrelief\fR
25
.fi
26
.LP
27
See the "options" manual entry for details on the standard options.
28
.SH "ASSOCIATED OPTIONS"
29
.LP
30
See the "Canvas" manual entry for details on the above associated options.
31
 
32
.SH "WIDGET-SPECIFIC OPTIONS"
33
.LP
34
.nf
35
Name:   \fBclockColor\fR
36
Class:  \fBColorfR
37
Command-Line Switch:    \fB-clockcolor\fR
38
.fi
39
.IP
40
Fill color for the main oval encapsulating the watch, in any of the forms
41
acceptable to \fBTk_GetColor\fR.  The default is "White".
42
.nf
43
.LP
44
Name:   \fBclockStipple\fR
45
Class:  \fBBitmapfR
46
Command-Line Switch:    \fB-clockstipple\fR
47
.fi
48
.IP
49
Bitmap for the main oval encapsulating the watch, in any of the forms
50
acceptable to \fBTk_GetBitmap\fR.  The default is "".
51
.LP
52
.nf
53
Name:   \fBheight\fR
54
Class:  \fBHeight\fR
55
Command-Line Switch:    \fB-height\fR
56
.fi
57
.IP
58
Specifies the height of the watch widget in any of the forms
59
acceptable to \fBTk_GetPixels\fR.  The default height is 175 pixels.
60
.LP
61
.nf
62
Name:   \fBhourColor\fR
63
Class:  \fBColorfR
64
Command-Line Switch:    \fB-hourcolor\fR
65
.fi
66
.IP
67
Fill color for the hour hand, in any of the forms acceptable to \fBTk_GetColor\fR.
68
The default is "Red".
69
.LP
70
.nf
71
Name:   \fBhourRadius\fR
72
Class:  \fBRadius\fR
73
Command-Line Switch:    \fB-hourradius\fR
74
.fi
75
.IP
76
Specifies the radius of the hour hand as a percentage of the radius
77
from the center to the out perimeter of the clock.
78
The value must be a fraction <= 1.  The default is ".5".
79
.LP
80
.nf
81
Name:   \fBminuteColor\fR
82
Class:  \fBColorfR
83
Command-Line Switch:    \fB-minutecolor\fR
84
.fi
85
.IP
86
Fill color for the minute hand, in any of the forms acceptable to \fBTk_GetColor\fR.
87
The default is "Yellow".
88
.LP
89
.nf
90
Name:   \fBminuteRadius\fR
91
Class:  \fBRadius\fR
92
Command-Line Switch:    \fB-minuteradius\fR
93
.fi
94
.IP
95
Specifies the radius of the minute hand as a percentage of the radius
96
from the center to the out perimeter of the clock.
97
The value must be a fraction <= 1.  The default is ".8".
98
.LP
99
.nf
100
Name:   \fBpivotColor\fR
101
Class:  \fBColorfR
102
Command-Line Switch:    \fB-pivotcolor\fR
103
.fi
104
.IP
105
Fill color for the circle in which the watch hands rotate
106
in any of the forms acceptable to \fBTk_GetColor\fR.
107
The default is "White".
108
.LP
109
.nf
110
Name:   \fBpivotRadius\fR
111
Class:  \fBRadius\fR
112
Command-Line Switch:    \fB-pivotradius\fR
113
.fi
114
.IP
115
Specifies the radius of the circle in which the watch hands rotate
116
as a percentage of the radius.  The value must be a fraction <= 1.
117
The default is ".1".
118
.LP
119
.nf
120
Name:   \fBsecondColor\fR
121
Class:  \fBColorfR
122
Command-Line Switch:    \fB-secondcolor\fR
123
.fi
124
.IP
125
Fill color for the second hand, in any of the forms acceptable to \fBTk_GetColor\fR.
126
The default is "Black".
127
.LP
128
.nf
129
Name:   \fBsecondRadius\fR
130
Class:  \fBRadius\fR
131
Command-Line Switch:    \fB-secondradius\fR
132
.fi
133
.IP
134
Specifies the radius of the second hand as a percentage of the radius
135
from the center to the out perimeter of the clock.
136
The value must be a fraction <= 1.  The default is ".9".
137
.LP
138
.nf
139
Name:   \fBshowAmPm\fR
140
Class:  \fBShosAmPm\fR
141
Command-Line Switch:    \fB-showampm\fR
142
.fi
143
.IP
144
Specifies whether the AM/PM radiobuttons should be displayed, in any
145
of the forms acceptable to \fBTcl_GetBoolean\fR.  The default is yes.
146
.LP
147
.nf
148
Name:   \fBstate\fR
149
Class:  \fBState\fR
150
Command-Line Switch:    \fB-state\fR
151
.fi
152
.IP
153
Specifies the editable state for the hands on the watch.  In a normal
154
state, the user can select and move the hands via mouse button 1.  The
155
valid values are \fBnormal\fR, and \fBdisabled\fR.  The defult is normal.
156
.LP
157
.nf
158
Name:   \fBtickColor\fR
159
Class:  \fBColorfR
160
Command-Line Switch:    \fB-tickcolor\fR
161
.fi
162
.IP
163
Fill color for the 60 ticks around the perimeter of the watch,
164
in any of the forms acceptable to \fBTk_GetColor\fR.  The default is "Black".
165
.LP
166
.nf
167
Name:   \fBwidth\fR
168
Class:  \fBWidth\fR
169
Command-Line Switch:    \fB-width\fR
170
.fi
171
.IP
172
Specifies the width of the watch widget in any of the forms
173
acceptable to \fBTk_GetPixels\fR.  The default height is 155 pixels.
174
.BE
175
 
176
.SH DESCRIPTION
177
.PP
178
 
179
The \fBwatch\fR command creates a watch with hour, minute, and
180
second hands modifying the time value.
181
 
182
.SH "METHODS"
183
.PP
184
The \fBwatch\fR command creates a new Tcl command whose
185
name is \fIpathName\fR. This command may be used to invoke various
186
operations on the widget. It has the following general form:
187
.DS C
188
\fIpathName option \fR?\fIarg arg ...\fR?
189
.DE
190
\fIOption\fR and the \fIarg\fRs
191
determine the exact behavior of the command. The following
192
commands are possible for watch widgets:
193
 
194
.SH "WIDGET-SPECIFIC METHODS"
195
.TP
196
\fIpathName \fBcget\fR \fIoption\fR
197
Returns the current value of the configuration option given
198
by \fIoption\fR.
199
\fIOption\fR may have any of the values accepted by the \fBwatch\fR
200
command.
201
.TP
202
\fIpathName\fR \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
203
Query or modify the configuration options of the widget.
204
If no \fIoption\fR is specified, returns a list describing all of
205
the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
206
information on the format of this list).  If \fIoption\fR is specified
207
with no \fIvalue\fR, then the command returns a list describing the
208
one named option (this list will be identical to the corresponding
209
sublist of the value returned if no \fIoption\fR is specified).  If
210
one or more \fIoption\-value\fR pairs are specified, then the command
211
modifies the given widget option(s) to have the given value(s);  in
212
this case the command returns an empty string.
213
\fIOption\fR may have any of the values accepted by the \fBwatch\fR
214
command.
215
.TP
216
\fIpathName \fBget\fR ?\fBformat\fR?
217
Returns the current time of the watch in a format of
218
string or as an integer clock value using the \fB-string\fR and \fB-clicks\fR
219
format options respectively.  The default is by string.  Reference the
220
clock command for more information on obtaining time and its
221
formats.
222
.TP
223
\fIpathName \fBshow\fR \fItime\fR
224
Changes the currently displayed time to be that of the time
225
argument.  The time may be specified either as a string, an
226
integer clock value or the keyword "now".  Reference the clock
227
command for more information on obtaining time and its format.
228
.TP
229
\fIpathName \fBwatch\fR ?\fBargs\fR?
230
Evaluates the specifieds \fBargs\fR against the canvas component.
231
 
232
.ta 4c
233
.SH "COMPONENTS"
234
.LP
235
.nf
236
Name:   \fBcanvas\fR
237
Class:  \fBCanvas\fR
238
.fi
239
.IP
240
The canvas component is the where the clock is drawn.  See the
241
Canvas widget manual entry for details.
242
.LP
243
.nf
244
Name:   \fBframe\fR
245
Class:  \fBFrame\fR
246
.fi
247
.IP
248
The frame component is the where the "AM" and "PM" radiobuttons are displayed.
249
See the Frame widget manual entry for details.
250
.LP
251
.nf
252
Name:   \fBam\fR
253
Class:  \fBRadiobutton\fR
254
.fi
255
.IP
256
The am component indicates whether on not the time is relative to "AM".
257
See the Radiobutton widget manual entry for details.
258
.LP
259
.nf
260
Name:   \fBpm\fR
261
Class:  \fBRadiobutton\fR
262
.fi
263
.IP
264
The pm component indicates whether on not the time is relative to "PM".
265
See the Radiobutton widget manual entry for details.
266
.fi
267
 
268
.SH EXAMPLE
269
.DS
270
watch .w -state disabled -showampm no -width 155 -height 155
271
pack .w -padx 10 -pady 10 -fill both -expand yes
272
 
273
while {1} {
274
  after 1000
275
  .w show
276
  update
277
}
278
.DE
279
.SH AUTHOR
280
John Tucker
281
.DE
282
Mark L. Ulferts
283
.SH KEYWORDS
284
watch, hand, ticks, pivot, widget
285
 

powered by: WebSVN 2.1.0

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