1 |
578 |
markom |
'\"
|
2 |
|
|
'\" Copyright (c) 1997 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 |
|
|
'\" @(#) timefield.n 1.0 97/04/30 16:04:44
|
8 |
|
|
'/"
|
9 |
|
|
.so man.macros
|
10 |
|
|
.HS timefield iwid
|
11 |
|
|
.BS
|
12 |
|
|
'\" Note: do not modify the .SH NAME line immediately below!
|
13 |
|
|
.SH NAME
|
14 |
|
|
timefield \- Create and manipulate a time field widget
|
15 |
|
|
.SH SYNOPSIS
|
16 |
|
|
\fBtimefield\fI \fIpathName \fR?\fIoptions\fR?
|
17 |
|
|
.SH "INHERITANCE"
|
18 |
|
|
itk::Widget <- LabeledWidget <- timefield
|
19 |
|
|
.SH "STANDARD OPTIONS"
|
20 |
|
|
.LP
|
21 |
|
|
.nf
|
22 |
|
|
.ta 4c 8c 12c
|
23 |
|
|
\fBbackground\fR \fBborderWidth\fR \fBcursor\fR \fBexportSelection\fR
|
24 |
|
|
\fBforeground\fR \fBhighlightColor\fR \fBhighlightThickness\fR \fBinsertBackground\fR
|
25 |
|
|
\fBjustify\fR \fBrelief\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 |
|
|
\fBdisabledForeground\fR \fBlabelBitmap\fR \fBlabelFont\fR \fBlabelImage\fR
|
34 |
|
|
\fBlabelMargin\fR \fBlabelPos\fR \fBlabelText\fR \fBlabelVariable\fR
|
35 |
|
|
\fBstate\fR
|
36 |
|
|
.fi
|
37 |
|
|
.LP
|
38 |
|
|
See the "labeledwidget" class manual entry for details on the
|
39 |
|
|
inherited options.
|
40 |
|
|
.SH "WIDGET-SPECIFIC OPTIONS"
|
41 |
|
|
.LP
|
42 |
|
|
.nf
|
43 |
|
|
Name: \fBchildSitePos\fR
|
44 |
|
|
Class: \fBPosition\fR
|
45 |
|
|
Command-Line Switch: \fB-childsitepos\fR
|
46 |
|
|
.fi
|
47 |
|
|
.IP
|
48 |
|
|
Specifies the position of the child site in the time field: \fBn\fR,
|
49 |
|
|
\fBs\fR, \fBe\fR, or \fBw\fR. The default is e.
|
50 |
|
|
.LP
|
51 |
|
|
.nf
|
52 |
|
|
Name: \fBcommand\fR
|
53 |
|
|
Class: \fBCommand\fR
|
54 |
|
|
Command-Line Switch: \fB-command\fR
|
55 |
|
|
.fi
|
56 |
|
|
.IP
|
57 |
|
|
Specifies a Tcl command to be executed upon detection of a Return key
|
58 |
|
|
press event.
|
59 |
|
|
.LP
|
60 |
|
|
.nf
|
61 |
|
|
Name: \fBstate\fR
|
62 |
|
|
Class: \fBState\fR
|
63 |
|
|
Command-Line Switch: \fB-state\fR
|
64 |
|
|
.fi
|
65 |
|
|
.IP
|
66 |
|
|
Specifies one of two states for the timefield: \fBnormal\fR or \fBdisabled\fR.
|
67 |
|
|
If the timefield is disabled then input is not accepted. The default is
|
68 |
|
|
normal.
|
69 |
|
|
.LP
|
70 |
|
|
.nf
|
71 |
|
|
Name: \fBtextBackground\fR
|
72 |
|
|
Class: \fBBackground\fR
|
73 |
|
|
Command-Line Switch: \fB-textbackground\fR
|
74 |
|
|
.fi
|
75 |
|
|
.IP
|
76 |
|
|
Background color for inside textual portion of the entry field. The value
|
77 |
|
|
may be given in any of the forms acceptable to \fBTk_GetColor\fR.
|
78 |
|
|
.LP
|
79 |
|
|
.nf
|
80 |
|
|
Name: \fBtextFont\fR
|
81 |
|
|
Class: \fBFont\fR
|
82 |
|
|
Command-Line Switch: \fB-textfont\fR
|
83 |
|
|
.fi
|
84 |
|
|
.IP
|
85 |
|
|
Name of font to use for display of text in timefield. The value
|
86 |
|
|
may be given in any of the forms acceptable to \fBTk_GetFont\fR.
|
87 |
|
|
.LP
|
88 |
|
|
.BE
|
89 |
|
|
|
90 |
|
|
.SH DESCRIPTION
|
91 |
|
|
.PP
|
92 |
|
|
The \fBtimefield\fR command creates an enhanced text entry widget for
|
93 |
|
|
the purpose of time entry with various degrees of built-in intelligence.
|
94 |
|
|
.DE
|
95 |
|
|
|
96 |
|
|
.SH "METHODS"
|
97 |
|
|
.PP
|
98 |
|
|
The \fBtimefield\fR command creates a new Tcl command whose
|
99 |
|
|
name is \fIpathName\fR. This
|
100 |
|
|
command may be used to invoke various
|
101 |
|
|
operations on the widget. It has the following general form:
|
102 |
|
|
.DS C
|
103 |
|
|
\fIpathName option \fR?\fIarg arg ...\fR?
|
104 |
|
|
.DE
|
105 |
|
|
\fIOption\fR and the \fIarg\fRs
|
106 |
|
|
determine the exact behavior of the command. The following
|
107 |
|
|
commands are possible for timefield widgets:
|
108 |
|
|
.SH "WIDGET-SPECIFIC METHODS"
|
109 |
|
|
.TP
|
110 |
|
|
\fIpathName \fBcget\fR \fIoption\fR
|
111 |
|
|
Returns the current value of the configuration option given
|
112 |
|
|
by \fIoption\fR.
|
113 |
|
|
\fIOption\fR may have any of the values accepted by the \fBtimefield\fR
|
114 |
|
|
command.
|
115 |
|
|
.TP
|
116 |
|
|
\fIpathName\fR \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
|
117 |
|
|
Query or modify the configuration options of the widget.
|
118 |
|
|
If no \fIoption\fR is specified, returns a list describing all of
|
119 |
|
|
the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
|
120 |
|
|
information on the format of this list). If \fIoption\fR is specified
|
121 |
|
|
with no \fIvalue\fR, then the command returns a list describing the
|
122 |
|
|
one named option (this list will be identical to the corresponding
|
123 |
|
|
sublist of the value returned if no \fIoption\fR is specified). If
|
124 |
|
|
one or more \fIoption\-value\fR pairs are specified, then the command
|
125 |
|
|
modifies the given widget option(s) to have the given value(s); in
|
126 |
|
|
this case the command returns an empty string.
|
127 |
|
|
\fIOption\fR may have any of the values accepted by the \fBtimefield\fR
|
128 |
|
|
command.
|
129 |
|
|
.TP
|
130 |
|
|
\fIpathName \fBget\fR ?\fBformat\fR?
|
131 |
|
|
Returns the current contents of the timefield in a format of
|
132 |
|
|
string or as an integer clock value using the \fB-string\fR and \fB-clicks\fR
|
133 |
|
|
format options respectively. The default is by string. Reference the
|
134 |
|
|
clock command for more information on obtaining times and their
|
135 |
|
|
formats.
|
136 |
|
|
.TP
|
137 |
|
|
\fIpathName \fBisvalid\fR
|
138 |
|
|
Returns a boolean indication of the validity of the currently
|
139 |
|
|
displayed time value. For example, 12:59:59 is valid whereas
|
140 |
|
|
25:59:59 is invalid.
|
141 |
|
|
.TP
|
142 |
|
|
\fIpathName \fBshow\fR \fItime\fR
|
143 |
|
|
Changes the currently displayed time to be that of the time
|
144 |
|
|
argument. The time may be specified either as a string, an
|
145 |
|
|
integer clock value or the keyword "now" (the default).
|
146 |
|
|
Reference the clock command for more information on obtaining
|
147 |
|
|
times and their formats.
|
148 |
|
|
|
149 |
|
|
.SH "COMPONENTS"
|
150 |
|
|
.LP
|
151 |
|
|
.nf
|
152 |
|
|
Name: \fBtime\fR
|
153 |
|
|
Class: \fBEntry\fR
|
154 |
|
|
.fi
|
155 |
|
|
.IP
|
156 |
|
|
The time component provides the entry field for time input and display.
|
157 |
|
|
See the "entry" widget manual entry for details on the time component item.
|
158 |
|
|
.fi
|
159 |
|
|
|
160 |
|
|
.SH EXAMPLE
|
161 |
|
|
.DS
|
162 |
|
|
proc returnCmd {} {
|
163 |
|
|
puts [.tf get]
|
164 |
|
|
}
|
165 |
|
|
|
166 |
|
|
timefield .tf -command returnCmd
|
167 |
|
|
pack .tf -fill x -expand yes -padx 10 -pady 10
|
168 |
|
|
.DE
|
169 |
|
|
.SH AUTHOR
|
170 |
|
|
John A. Tucker
|
171 |
|
|
.DE
|
172 |
|
|
Mark L. Ulferts
|
173 |
|
|
.LP
|
174 |
|
|
.SH KEYWORDS
|
175 |
|
|
timefield, widget
|