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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [tix/] [man/] [Control.html] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
 
2
 
3
 
4
<TITLE>tixControl - Create and manipulate tixControl widgets</TITLE>
5
<Center><H2>tixControl - Create and manipulate tixControl widgets</H2></Center><hr>
6
 
7
</pre><H3>SYNOPSIS</H3>
8
<B>tixControl<I> <I>pathName ?<I>options</I></B>?
9
<P>
10
</pre><H3>SUPER-CLASS</H3>
11
The <B>TixControl</B></I> class is derived from the <B>TixLabelWidget</B></I>
12
class and inherits all the commands, options and subwidgets of its
13
super-class.
14
</pre><H3>STANDARD OPTIONS</H3>
15
The Control widget supports all the standard options of a frame
16
widget. See the <B>options(n)</B></I> manual entry for details on the
17
standard options.
18
</pre><H3>WIDGET-SPECIFIC OPTIONS</H3>
19
<P>
20
<pre><code><code><code>
21
Name:           <B>allowEmpty</B></I>
22
Class:          <B>AllowEmpty</B></I>
23
Switch:         <B>-allowempty</B></I>
24
</code></code></code></pre>
25
<UL>
26
Specifies whether the Control widget should allow the empty string
27
as a valid input.
28
</UL>
29
<P>
30
<pre><code><code><code>
31
Name:           <B>autorepeat</B></I>
32
Class:          <B>AutoRepeat</B></I>
33
Switch:         <B>-autorepeat</B></I>
34
</code></code></code></pre>
35
<UL>
36
Specifies whether the Control widget should have autorepeat behavior.
37
If set to be "true", the value of the Control widget will be
38
automatically incremented or decremented when the user holds down the
39
mouse button over the arrow buttons. Only values "true" and
40
"false" will be recognized.
41
</UL>
42
<P>
43
<pre><code><code><code>
44
Name:           <B>command</B></I>
45
Class:          <B>Command</B></I>
46
Switch:         <B>-command</B></I>
47
</code></code></code></pre>
48
<UL>
49
Specifies the command to be called when the <B>-value</B></I> option of
50
the Control widget is changed.  The command will be called with one
51
arguments -- the new value of the Control widget.
52
</UL>
53
<P>
54
<pre><code><code><code>
55
Name:           <B>decrCmd</B></I>
56
Class:          <B>DecrCmd</B></I>
57
Switch:         <B>-decrcmd</B></I>
58
</code></code></code></pre>
59
<UL>
60
Specifies a TCL command to be called when the the user presses the
61
down-arrow button subwidget. This command is called with one parameter
62
-- the current <B>-value</B></I> of this Control widget. This
63
command is to decrement this value by one step, according to its own
64
definition of "decrement", and return the decremented value, which
65
will be stored in the <B>-value</B></I> of this Control widget.
66
</UL>
67
<P>
68
<pre><code><code><code>
69
Name:           <B>disableCallback</B></I>
70
Class:          <B>DisableCallback</B></I>
71
Switch:         <B>-disablecallback</B></I>
72
</code></code></code></pre>
73
<UL>
74
A boolean value indicating whether callbacks should be disabled. When
75
set to true, the TCL command specified by the <B>-command</B></I> option
76
is not executed when the <B>-value</B></I> of the Control widget
77
changes.
78
</UL>
79
<P>
80
<pre><code><code><code>
81
Name:           <B>disableForeground</B></I>
82
Class:          <B>DisableForeground</B></I>
83
Switch:         <B>-disableforeground</B></I>
84
</code></code></code></pre>
85
<UL>
86
The foreground color to use for of the entry subwidget when the
87
Control widget is disabled.
88
</UL>
89
<P>
90
<pre><code><code><code>
91
Name:           <B>incrCmd</B></I>
92
Class:          <B>IncrCmd</B></I>
93
Switch:         <B>-incrcmd</B></I>
94
</code></code></code></pre>
95
<UL>
96
Specifies a TCL command to be called when the the user presses the
97
up-arrow button subwidget. This command is called with one parameter
98
-- the current <B>-value</B></I> of this Control widget. This
99
command is to increment this value by one step, according to its own
100
definition of "increment", and return the incremented value, which
101
will be stored in the <B>-value</B></I> of this Control widget.
102
</UL>
103
<P>
104
<pre><code><code><code>
105
Name:           <B>initwait</B></I>
106
Class:          <B>Initwait</B></I>
107
Switch:         <B>-initwait</B></I>
108
</code></code></code></pre>
109
<UL>
110
Specifies how long the Control widget should wait initially before
111
it starts to automatically increment or decrement its value in the
112
autorepeat mode. In milliseconds.
113
</UL>
114
<P>
115
<pre><code><code><code>
116
Name:           <B>integer</B></I>
117
Class:          <B>Integer</B></I>
118
Switch:         <B>-integer</B></I>
119
</code></code></code></pre>
120
<UL>
121
A Boolean value specifying whether only integer numbers are accepted.
122
</UL>
123
<P>
124
<pre><code><code><code>
125
Name:           <B>label</B></I>
126
Class:          <B>Label</B></I>
127
Switch:         <B>-label</B></I>
128
</code></code></code></pre>
129
<UL>
130
Specifies the string to display as the label of this Control widget.
131
</UL>
132
<P>
133
<pre><code><code><code>
134
Name:           <B>labelSide</B></I>
135
Class:          <B>LabelSide</B></I>
136
Switch:         <B>-labelside</B></I>
137
</code></code></code></pre>
138
<UL>
139
Specifies where the label should be displayed relative to the entry
140
subwidget. Valid options are: <B>top</B></I>, <B>left</B></I>, <B>right</B></I>,
141
<B>bottom</B></I>, <B>none</B></I> or <B>acrosstop</B></I>.
142
</UL>
143
<P>
144
<pre><code><code><code>
145
Name:           <B>max</B></I>
146
Class:          <B>Max</B></I>
147
Switch:         <B>-max</B></I>
148
Alias:          <B>-ulimit</B></I>
149
</code></code></code></pre>
150
<UL>
151
Specifies the upper limit of the value of the Control widget. When set
152
to empty string, the Control widget has no upper limit.
153
</UL>
154
<P>
155
<pre><code><code><code>
156
Name:           <B>min</B></I>
157
Class:          <B>Min</B></I>
158
Switch:         <B>-min</B></I>
159
Alias:          <B>-llimit</B></I>
160
</code></code></code></pre>
161
<UL>
162
Specifies the lower limit of the value of the Control widget.When set
163
to empty string, the Control widget has no lower limit.
164
</UL>
165
<P>
166
<pre><code><code><code>
167
Name:           <B>repeatRate</B></I>
168
Class:          <B>RepeatRate</B></I>
169
Switch:         <B>-repeatrate</B></I>
170
</code></code></code></pre>
171
<UL>
172
Specifies how often the value of the Control widget should be
173
incremented or decremented when it is in the autorepeat mode. In
174
milliseconds.
175
</UL>
176
<P>
177
<pre><code><code><code>
178
Name:           <B>selectMode</B></I>
179
Class:          <B>SelectMode</B></I>
180
Switch:         <B>-selectmode</B></I>
181
</code></code></code></pre>
182
<UL>
183
Specifies how the Control widget should react to \fC&lt;KeyPress&gt;</B></I>
184
events. When set to "immediate", any user keyboard inputs will
185
immediately change the <B>-value</B></I> option. When set to "normal", the
186
user keyboard inputs will be copied to the <B>-value</B></I> option only
187
if the\fC &lt;Return&gt;</B></I> key is pressed or the keyboard focus is
188
changed. The use of the immediate mode is discouraged. For effective
189
use of the Control widget, one should use the normal mode together
190
with the <B>update</B></I> widget command (see below).
191
</UL>
192
<P>
193
<pre><code><code><code>
194
Name:           <B>state</B></I>
195
Class:          <B>State</B></I>
196
Switch:         <B>-state</B></I>
197
</code></code></code></pre>
198
<UL>
199
Specifies the whether the Control widget is normal or
200
disabled.  Only the values "normal" and "disabled" are recognized.
201
</UL>
202
<P>
203
<pre><code><code><code>
204
Name:           <B>step</B></I>
205
Class:          <B>Step</B></I>
206
Switch:         <B>-step</B></I>
207
</code></code></code></pre>
208
<UL>
209
Specifies by how much the value of the Control widget should be
210
incremented or decrmented when the user press the arrow buttons.
211
</UL>
212
<P>
213
<pre><code><code><code>
214
Name:           <B>validateCmd</B></I>
215
Class:          <B>ValidateCmd</B></I>
216
Switch:         <B>-validatecmd</B></I>
217
</code></code></code></pre>
218
<UL>
219
Specifies a TCL command to be called when the -value of the
220
Control widget is about to change. This command is called
221
with one parameter -- the new <B>-value</B></I> entered by the user. This
222
command is to validate this new value by returning a value it deems
223
valid.
224
</UL>
225
<P>
226
<pre><code><code><code>
227
Name:           <B>value</B></I>
228
Class:          <B>Value</B></I>
229
Switch:         <B>-value</B></I>
230
</code></code></code></pre>
231
<UL>
232
Specifies the value of the Control widget.
233
</UL>
234
<P>
235
<pre><code><code><code>
236
Name:           <B>variable</B></I>
237
Class:          <B>Variable</B></I>
238
Switch:         <B>-variable</B></I>
239
</code></code></code></pre>
240
<UL>
241
Specifies the global variable in which the value of the
242
Control widget should be stored. The value of the Control widget
243
will be automatically updated when this variable is changed.
244
</UL>
245
</pre><H3>SUBWIDGETS</H3>
246
<P>
247
<pre><code><code><code>
248
Name:           <B>decr</B></I>
249
Class:          <B>Button</B></I>
250
</code></code></code></pre>
251
<UL>
252
The down arrow button.
253
</UL>
254
<P>
255
<pre><code><code><code>
256
Name:           <B>entry</B></I>
257
Class:          <B>Entry</B></I>
258
</code></code></code></pre>
259
<UL>
260
The entry that shows the value of this Control widget.
261
</UL>
262
<P>
263
<pre><code><code><code>
264
Name:           <B>incr</B></I>
265
Class:          <B>Button</B></I>
266
</code></code></code></pre>
267
<UL>
268
The up arrow button.
269
</UL>
270
<P>
271
<pre><code><code><code>
272
Name:           <B>label</B></I>
273
Class:          <B>Label</B></I>
274
</code></code></code></pre>
275
<UL>
276
The label subwidget.
277
</UL>
278
</pre><HR>
279
</pre><H3>DESCRIPTION</H3>
280
<P>
281
The <B>tixControl</B></I> command creates a new window (given by the
282
<I>pathName</I></B> argument) and makes it into a Control widget.
283
Additional options, described above, may be specified on the command
284
line or in the option database to configure aspects of the
285
Control widget such as its cursor and relief.
286
 
287
The Control widget is also known as the <B>SpinBox</B></I> widget.
288
It is generally used to control a value. The user can adjust the value
289
by pressing the two arrow buttons or by entering the value directly
290
into the entry. The new value will be checked against the user-defined
291
upper and lower limits.
292
</pre><H3>WIDGET COMMANDS</H3>
293
<P>
294
The <B>tixControl</B></I> command creates a new Tcl command whose name is
295
command may be used to invoke various operations on the widget. It has
296
the following general form:
297
<pre>
298
<I>pathName option </I></B>?<I>arg arg ...</I></B>?
299
<P>
300
</pre>
301
<I>PathName</I></B> is the name of the command, which is the same as the
302
determine the exact behavior of the command.  The following commands
303
are possible for Control widgets:
304
<DL>
305
<DT> <I>pathName <B>cget</B></I> <I>option</I></B>
306
</I></B>
307
<DD> Returns the current value of the configuration option given by
308
<I>option</I></B>. <I>Option</I></B> may have any of the values accepted by the
309
<B>tixControl</B></I> command.
310
</DL>
311
<DL>
312
<DT> <I>pathName <B>configure</B></I> ?<I>option</I></B>? <I>?value option value ...</I></B>?
313
</I></B>
314
<DD> Query or modify the configuration options of the widget.  If no
315
<I>option</I></B> is specified, returns a list describing all of the
316
available options for <I>pathName</I></B> (see <B>Tk_ConfigureInfo</B></I> for
317
information on the format of this list).  If <I>option</I></B> is specified
318
with no <I>value</I></B>, then the command returns a list describing the
319
one named option (this list will be identical to the corresponding
320
sublist of the value returned if no <I>option</I></B> is specified).  If
321
one or more <I>option-value</I></B> pairs are specified, then the command
322
modifies the given widget option(s) to have the given value(s); in
323
this case the command returns an empty string.  <I>Option</I></B> may have
324
any of the values accepted by the <B>tixControl</B></I> command.
325
</DL>
326
<DL>
327
<DT> <I>pathName <B>decr</B></I>
328
</I></B>
329
<DD> Decrements the value of the Control widget by the step specified
330
by the <I>-step</I></B> option.
331
</DL>
332
<DL>
333
<DT> <I>pathName <B>incr</B></I>
334
</I></B>
335
<DD> Increments the value of the Control widget by the step
336
specified by the <I>-step</I></B> option.
337
</DL>
338
<DL>
339
<DT> <I>pathName <B>invoke</B></I>
340
</I></B>
341
<DD> Causes the command specified by the <I>-command</I></B> option to be
342
invoked.
343
</DL>
344
<DL>
345
<DT> <I>pathName <B>update</B></I>
346
</I></B>
347
<DD> If the user has modified the entry using keyboard inputs, the update
348
command will <B>update</B></I> the <B>-value</B></I> of this Control
349
"normal", one should call the <B>update</B></I> command on this widget
350
before examining its <B>-value</B></I> option. This command has no effect
351
in if the <B>-selectmode</B></I> option is set to "immediate".
352
</DL>
353
<DL>
354
<DT> <I>pathName <B>subwidget <I> name ?args?</I></B>
355
</I></B>
356
<DD> When no options are given, this command returns the pathname of the
357
subwidget of the specified name.
358
 
359
When options are given, the widget command of the specified subwidget
360
will be called with these options.
361
</DL>
362
</pre><H3>BINDINGS</H3>
363
<P>
364
When the user presses the up/down arrow buttons (or press the &lt;Up&gt; and
365
&lt;Down&gt; arrow keys on the keyboard), the value of the tixControl widget
366
is adjusted according to the <B>-validatecmd</B></I>, <B>-incrcmd</B></I>,
367
<B>-decrcmd</B></I>, <B>-step</B></I>, <B>-max</B></I> and <B>-min</B></I> options.
368
</pre><H3>KEYWORDS</H3>
369
Tix(n)
370
<hr><i>Last modified Sun Jan 19 22:34:20 EST 1997 </i> ---
371
<i>Serial 853731296</i>

powered by: WebSVN 2.1.0

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