This file is indexed.

/usr/share/doc/tk-tile/html/widget.html is in tk-tile 0.8.2-2.1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
<html>
<head>
<link rel="stylesheet" href="manpage.css"><title>Tile package reference: widget</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: tmml-html.xsl,v $ $Revision: 1.12 $">
</head><body>
<div class="header">
<div class="navbar" align="center">
<a href="#SECTid8206658">NAME</a> · <a href="#SECTid82066d0">DESCRIPTION</a> · <a href="#SECTid8206748">STANDARD OPTIONS</a> · <a href="#SECTid8206c48">SCROLLABLE WIDGET OPTIONS</a> · <a href="#SECTid8206fe0">LABEL OPTIONS</a> · <a href="#SECTid8207a30">COMPATIBILITY OPTIONS</a> · <a href="#SECTid8207c38">COMMANDS</a> · <a href="#SECTid8208458">WIDGET STATES</a> · <a href="#SECTid8208b60">EXAMPLES</a> · <a href="#SECTid8208bd8">SEE ALSO</a> · <a href="#SECTid8208c50">KEYWORDS</a>
</div><hr class="navsep">
</div><div class="body">



<h2><a name="SECTid8206658">NAME</a></h2><p class="namesection">
<b class="names">widget - </b><br>Standard options and commands supported by Tile widgets</p>
<h2><a name="SECTid82066d0">DESCRIPTION</a></h2><p>This manual describes common widget options and commands.
</p>
<h2><a name="SECTid8206748">STANDARD OPTIONS</a></h2><p>The following options are supported by all Tile widgets:
</p><div class="table"><table width="100%" rules="none" cellpadding="5%">
<thead><tr class="heading">
<th width="20%">Name</th><th width="40%">Database name</th><th width="40%">Database class</th>
</tr></thead><tr class="syntax">
<td width="20%" align="left"><a name="stdopt_-class">-class</a></td><td width="40%" align="left">(N/A)</td><td width="40%" align="left">(N/A)</td>
</tr><tr class="desc">
<td class="padding" width="20%"> </td><td class="argdesc" width="80%" align="left" colspan="2">Specifies the window class.
The class is used when querying the option database 
for the window's other options, to determine the default
bindtags for the window, and to select the widget's default
layout and style.
This is a read-only option: 
it may only be specified when the window is created,
and may not be changed with the <b>configure</b> widget command.
</td>
</tr><tr class="syntax">
<td width="20%" align="left"><a name="stdopt_-cursor">-cursor</a></td><td width="40%" align="left">cursor</td><td width="40%" align="left">Cursor</td>
</tr><tr class="desc">
<td class="padding" width="20%"> </td><td class="argdesc" width="80%" align="left" colspan="2">Specifies the mouse cursor to be used for the widget.
See <b class="fun">Tk_GetCursor</b> and <i>cursors(n)</i> in the Tk reference manual
for the legal values.
If set to the empty string (the default),
the cursor is inherited from the parent widget.
</td>
</tr><tr class="syntax">
<td width="20%" align="left"><a name="stdopt_-takefocus">-takefocus</a></td><td width="40%" align="left">takeFocus</td><td width="40%" align="left">TakeFocus</td>
</tr><tr class="desc">
<td class="padding" width="20%"> </td><td class="argdesc" width="80%" align="left" colspan="2">Determines whether the window accepts the focus during keyboard traversal.  
Either <b>0</b>, <b>1</b>, a command prefix (to which the widget path
is appended, and which should return <b>0</b> or <b>1</b>), 
or the empty string.
See <i>options(n)</i> in the Tk reference manual for the full description.
</td>
</tr><tr class="syntax">
<td width="20%" align="left"><a name="stdopt_-style">-style</a></td><td width="40%" align="left">style</td><td width="40%" align="left">Style</td>
</tr><tr class="desc">
<td class="padding" width="20%"> </td><td class="argdesc" width="80%" align="left" colspan="2">May be used to specify a custom widget style.
</td>
</tr>
</table></div>
<h2><a name="SECTid8206c48">SCROLLABLE WIDGET OPTIONS</a></h2><p>The following options are supported by widgets that
are controllable by a scrollbar.  
See <i>scrollbar(n)</i> for more information
</p><div class="table"><table width="100%" rules="none" cellpadding="5%">
<thead><tr class="heading">
<th width="20%">Name</th><th width="40%">Database name</th><th width="40%">Database class</th>
</tr></thead><tr class="syntax">
<td width="20%" align="left"><a name="stdopt_-xscrollcommand">-xscrollcommand</a></td><td width="40%" align="left">xScrollCommand</td><td width="40%" align="left">ScrollCommand</td>
</tr><tr class="desc">
<td class="padding" width="20%"> </td><td class="argdesc" width="80%" align="left" colspan="2">A command prefix, used to communicate with horizontal scrollbars.
<p>When the view in the widget's window changes, the widget will
generate a Tcl command by concatenating the scroll command and
two numbers.
Each of the numbers is a fraction between 0 and 1 indicating
a position in the document; 0 indicates the beginning,
and 1 indicates the end.
The first fraction indicates the first information in the widget
that is visible in the window, and the second fraction indicates
the information just after the last portion that is visible.
</p><p>Typically the <b>xScrollCommand</b> option consists of the path name 
of a <b>scrollbar</b> widget followed by ``set'', e.g. ``.x.scrollbar set''.
This will cause the scrollbar to be updated whenever the view in the 
window changes.
</p><p>If this option is set to the empty string (the default),
then no command will be executed.
</p>
</td>
</tr><tr class="syntax">
<td width="20%" align="left"><a name="stdopt_-yscrollcommand">-yscrollcommand</a></td><td width="40%" align="left">yScrollCommand</td><td width="40%" align="left">ScrollCommand</td>
</tr><tr class="desc">
<td class="padding" width="20%"> </td><td class="argdesc" width="80%" align="left" colspan="2">A command prefix, used to communicate with vertical scrollbars.
See the description of <b>-xscrollcommand</b> above for details.
</td>
</tr>
</table></div>
<h2><a name="SECTid8206fe0">LABEL OPTIONS</a></h2><p>The following options are supported by labels, buttons,
and other button-like widgets:
</p><div class="table"><table width="100%" rules="none" cellpadding="5%">
<thead><tr class="heading">
<th width="20%">Name</th><th width="40%">Database name</th><th width="40%">Database class</th>
</tr></thead><tr class="syntax">
<td width="20%" align="left"><a name="stdopt_-text">-text</a></td><td width="40%" align="left">text</td><td width="40%" align="left">Text</td>
</tr><tr class="desc">
<td class="padding" width="20%"> </td><td class="argdesc" width="80%" align="left" colspan="2">Specifies a text string to be displayed inside the widget
(unless overridden by <b>-textvariable</b>).
</td>
</tr><tr class="syntax">
<td width="20%" align="left"><a name="stdopt_-textvariable">-textvariable</a></td><td width="40%" align="left">textVariable</td><td width="40%" align="left">Variable</td>
</tr><tr class="desc">
<td class="padding" width="20%"> </td><td class="argdesc" width="80%" align="left" colspan="2">Specifies the name of variable whose value will be used
in place of the <b>-text</b> resource.
</td>
</tr><tr class="syntax">
<td width="20%" align="left"><a name="stdopt_-underline">-underline</a></td><td width="40%" align="left">underline</td><td width="40%" align="left">Underline</td>
</tr><tr class="desc">
<td class="padding" width="20%"> </td><td class="argdesc" width="80%" align="left" colspan="2">If set, specifies the integer index (0-based) of a character to underline 
in the text string.
The underlined character is used for mnemonic activation
(see <i>keynav(n)</i>).
</td>
</tr><tr class="syntax">
<td width="20%" align="left"><a name="stdopt_-image">-image</a></td><td width="40%" align="left">image</td><td width="40%" align="left">Image</td>
</tr><tr class="desc">
<td class="padding" width="20%"> </td><td class="argdesc" width="80%" align="left" colspan="2">Specifies an image to display.
This is a list of 1 or more elements.
The first element is the default image name.
The rest of the list is a sequence of <i>statespec / value</i> pairs
as per <b>style map</b>, specifying different images to use when
the widget is in a particular state or combination of states.
All images in the list should have the same size.
</td>
</tr><tr class="syntax">
<td width="20%" align="left"><a name="stdopt_-compound">-compound</a></td><td width="40%" align="left">compound</td><td width="40%" align="left">Compound</td>
</tr><tr class="desc">
<td class="padding" width="20%"> </td><td class="argdesc" width="80%" align="left" colspan="2">Specifies how to display the image relative to the text,
in the case both <b>-text</b> and <b>-image</b> are present.
Valid values are: 
<dl>

<dt>text</dt>
<dd>Display text only.
</dd>


<dt>image</dt>
<dd>Display image only.
</dd>


<dt>center</dt>
<dd>Display text centered on top of image.
</dd>


<dt>top</dt>
<dd></dd>


<dt>bottom</dt>
<dd></dd>


<dt>left</dt>
<dd></dd>


<dt>right</dt>
<dd>Display image above, below, left of, or right of the text, respectively.
</dd>


<dt>none</dt>
<dd>The default; display the image if present, otherwise the text.
</dd>

</dl>
</td>
</tr><tr class="syntax">
<td width="20%" align="left"><a name="stdopt_-width">-width</a></td><td width="40%" align="left">width</td><td width="40%" align="left">Width</td>
</tr><tr class="desc">
<td class="padding" width="20%"> </td><td class="argdesc" width="80%" align="left" colspan="2">If greater than zero, specifies how much space, in character widths, 
to allocate for the text label.  
If less than zero, specifies a minimum width.
If zero or unspecified, the natural width of the text label is used.

</td>
</tr>
</table></div>
<h2><a name="SECTid8207a30">COMPATIBILITY OPTIONS</a></h2><div class="table"><table width="100%" rules="none" cellpadding="5%">
<thead><tr class="heading">
<th width="20%">Name</th><th width="40%">Database name</th><th width="40%">Database class</th>
</tr></thead><tr class="syntax">
<td width="20%" align="left"><a name="stdopt_-state">-state</a></td><td width="40%" align="left">state</td><td width="40%" align="left">State</td>
</tr><tr class="desc">
<td class="padding" width="20%"> </td><td class="argdesc" width="80%" align="left" colspan="2">May be set to <b>normal</b> or <b>disabled</b>
to control the <b>disabled</b> state bit.
This is a write-only option:
setting it changes the widget state, 
but the <b>state</b> widget command 
does not affect the <b>-state</b> option.

</td>
</tr>
</table></div>
<h2><a name="SECTid8207c38">COMMANDS</a></h2><dl>

<dt>
<i class="m">pathName</i> <b>cget</b> <i class="m">option</i>
</dt>
<dd>Returns the current value of the configuration option given
by <i>option</i>.
</dd>


<dt>
<i class="m">pathName</i> <b>configure</b> ?<i class="m">option</i>? ?<i class="m">value option value ...</i>?</dt>
<dd>Query or modify the configuration options of the widget.
If one or more <i>option-value</i> pairs are specified,
then the command modifies the given widget option(s) 
to have the given value(s); 
in this case the command returns an empty string.
If <i>option</i> is specified with no <i>value</i>, 
then the command returns a list describing the named option:
the elements of the list are the 
option name, database name, database class, default value, 
and current value.
If no <i>option</i> is specified, returns a list describing all of
the available options for <i>pathName</i>.
</dd>


<dt>
<i class="m">pathName</i> <b>instate</b> <i class="m">statespec</i> ?<i class="m">script</i>?</dt>
<dd>Test the widget's state.
If <i>script</i> is not specified, returns 1 if 
the widget state matches <i>statespec</i> and 0 otherwise.
If <i>script</i> is specified, equivalent to
<pre class="example">
if {[<i>pathName</i> instate <i>stateSpec</i>]} <i>script</i>
</pre>
</dd>


<dt>
<i class="m">pathName</i> <b>state</b> ?<i class="m">stateSpec</i>?</dt>
<dd>Modify or inquire widget state.
If <i>stateSpec</i> is present, sets the widget state: 
for each flag in <i>stateSpec</i>, sets the corresponding flag
or clears it if prefixed by an exclamation point.
<p>Returns a new state spec indicating which flags were changed:
</p><pre class="example">
set changes [<i>pathName</i> state <i>spec</i>] ; 
<i>pathName</i> state $changes
</pre><p>will restore <i>pathName</i> to the original state.
If <i>stateSpec</i> is not specified, 
returns a list of the currently-enabled state flags.
</p>
</dd>

</dl>
<h2><a name="SECTid8208458">WIDGET STATES</a></h2><p>The widget state is a bitmap of independent state flags.
Widget state flags include:
</p><dl>

<dt><b>active</b></dt>
<dd>The mouse cursor is over the widget 
and pressing a mouse button will cause some action to occur.
(aka "prelight" (Gnome), "hot" (Windows), "hover").
</dd>


<dt><b>disabled</b></dt>
<dd>Widget is disabled under program control 
(aka "unavailable", "inactive") 
</dd>


<dt><b>focus</b></dt>
<dd>Widget has keyboard focus 
</dd>


<dt><b>pressed</b></dt>
<dd>Widget is being pressed (aka "armed" in Motif). 
</dd>


<dt><b>selected</b></dt>
<dd>"On", "true", or "current" for things like checkbuttons and radiobuttons. 
</dd>


<dt><b>background</b></dt>
<dd>Windows and the Mac have a notion of an "active" or foreground window.
The <b>background</b> state is set for widgets in a background window,
and cleared for those in the foreground window.
</dd>


<dt><b>readonly</b></dt>
<dd>Widget should not allow user modification.
</dd>


<dt><b>alternate</b></dt>
<dd>A widget-specific alternate display format.
For example, used for checkbuttons and radiobuttons 
in the "tristate" or "mixed" state,
and for buttons with <b>-default active</b>.
</dd>


<dt><b>invalid</b></dt>
<dd>The widget's value is invalid.
(Potential uses: scale widget value out of bounds, 
entry widget value failed validation.)
</dd>

</dl><p>A <i>state specification</i> or <i>stateSpec</i> is a list
of state names, optionally prefixed with an exclamation point (!)
indicating that the bit is off.
</p>
<h2><a name="SECTid8208b60">EXAMPLES</a></h2><pre class="example">
set b [ttk::button .b]

# Disable the widget:
$b state disabled			

# Invoke the widget only if it is currently pressed and enabled:
$b instate {pressed !disabled} { .b invoke }	

# Reenable widget:
$b state !disabled			
</pre>
<h2><a name="SECTid8208bd8">SEE ALSO</a></h2><p class="seealso">
<a href="tile-intro.html">tile-intro(n)</a>, <a href="style.html">style(n)</a>
</p>
<h2><a name="SECTid8208c50">KEYWORDS</a></h2><p class="keywords">
<a class="keyword" href="keyword-index.html#KW-state">state</a>, <a class="keyword" href="keyword-index.html#KW-configure">configure</a>, <a class="keyword" href="keyword-index.html#KW-option">option</a>
</p>
</div><hr class="navsep"><div class="navbar" align="center">
<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a>
</div>
</body>
</html>