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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [tix/] [man/] [ChkList.html] - Blame information for rev 1781

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
 
2
 
3
 
4
<TITLE>tixCheckList - Create and manipulate tixCheckList widgets</TITLE>
5
<Center><H2>tixCheckList - Create and manipulate tixCheckList widgets</H2></Center><hr>
6
 
7
</pre><H3>SYNOPSIS</H3>
8
<B>tixCheckList<I> <I>pathName ?<I>options</I></B>?
9
<P>
10
</pre><H3>SUPER-CLASS</H3>
11
The <B>TixCheckList</B></I> class is derived from the <B>TixTree</B></I> class
12
and inherits all the commands, options and subwidgets of its
13
super-class.
14
</pre><H3>STANDARD OPTIONS</H3>
15
<B>TixCheckList</B></I> 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>browseCmd</B></I>
22
Class:          <B>BrowseCmd</B></I>
23
Switch:         <B>-browsecmd</B></I>
24
</code></code></code></pre>
25
<UL>
26
Specifies a command to call whenever the user browses on an entry
27
(usually by single-clicking on the entry). The command is called with
28
one argument, the pathname of the entry.
29
</UL>
30
<P>
31
<pre><code><code><code>
32
Name:           <B>command</B></I>
33
Class:          <B>Command</B></I>
34
Switch:         <B>-command</B></I>
35
</code></code></code></pre>
36
<UL>
37
Specifies a command to call whenever the user activates an entry
38
(usually by double-clicking on the entry). The command
39
is called with one argument, the pathname of the entry.
40
</UL>
41
<P>
42
<pre><code><code><code>
43
Name:           <B>radio</B></I>
44
Class:          <B>Radio</B></I>
45
Switch:         <B>-radio</B></I>
46
</code></code></code></pre>
47
<UL>
48
A Boolean value. If set to true, the user can select at most one item
49
at a time; if set to false, the user can select as many items as
50
possible.
51
</UL>
52
</pre><H3>SUBWIDGETS</H3>
53
<P>
54
<pre><code><code><code>
55
Name:           <B>hlist</B></I>
56
Class:          <B>TixHList</B></I>
57
</code></code></code></pre>
58
<UL>
59
The hierarchical listbox that displays the CheckList.
60
</UL>
61
<P>
62
<pre><code><code><code>
63
Name:           <B>hsb</B></I>
64
Class:          <B>Scrollbar</B></I>
65
</code></code></code></pre>
66
<UL>
67
The horizontal scrollbar subwidget.
68
</UL>
69
<P>
70
<pre><code><code><code>
71
Name:           <B>vsb</B></I>
72
Class:          <B>Scrollbar</B></I>
73
</code></code></code></pre>
74
<UL>
75
The vertical scrollbar subwidget.
76
</UL>
77
</pre><HR>
78
</pre><H3>DESCRIPTION</H3>
79
<P>
80
The <B>tixCheckList</B></I> command creates a new window (given by the
81
<I>pathName</I></B> argument) and makes it into a CheckList widget.
82
Additional options, described above, may be specified on the command
83
line or in the option database to configure aspects of the CheckList
84
widget such as its cursor and relief.
85
 
86
The CheckList widget displays a list of items to be selected by the
87
user. CheckList acts similarly to the Tk checkbutton or radiobutton
88
widgets, except it is capable of handling many more items than
89
checkbuttons or radiobuttons.
90
 
91
The items are contained in the <B>hlist</B></I> subwidget.  Each item may
92
be in one of the following status: <B>on</B></I> (indicated by a check
93
bitmap), <B>off</B></I> (indicated by a cross bitmap) <B>default</B></I>
94
(indicated by a gray box bitmap) or <B>none</B></I>, in which case the item
95
will not be accompanied by a bitmap. The items whose status is
96
<B>on</B></I>, <B>off</B></I> or <B>default</B></I> are called the <I>selectable</I></B>
97
items and can be checked or crossed by the user. All selectable
98
entries must be of the type <B>imagetext</B></I>.
99
 
100
The items whose status is <B>none</B></I> cannot be checked or crossed by
101
the user; usually they are included in the <B>hlist</B></I> subwidget only
102
for explanation purposes or as separators.
103
 
104
Initially, all the items have a <I>none</I></B> status. To make an item
105
selectable, you can call the <B>setstatus</B></I> command to change its
106
status (see below).
107
 
108
Notice that CheckList is a subclass of the TixTree widget and thus is
109
is capable of displaying a hierachy of selectable entries. When
110
necessary, you can call the <B>setmode</B></I> method (see
111
<B>TixTree(n)</B></I>) to define the hierachical structure of the
112
selectable entries.
113
</pre><H3>WIDGET COMMANDS</H3>
114
<P>
115
The <B>tixCheckList</B></I> command creates a new Tcl command whose name is
116
be used to invoke various operations on the widget. It has the
117
following general form:
118
<pre>
119
<I>pathName option </I></B>?<I>arg arg ...</I></B>?
120
<P>
121
</pre>
122
<I>PathName</I></B> is the name of the command, which is the same as the
123
determine the exact behavior of the command. The following commands
124
are possible for CheckList widgets:
125
<DL>
126
<DT> <I>pathName <B>getselection</B></I> ?<I>status</I></B>?
127
</I></B>
128
<DD> Returns a list of items whose status matches <I>status</I></B>. If
129
<I>status</I></B> is not specified, the list of items in the "<B>on</B></I>"
130
status will be returned.
131
</DL>
132
<DL>
133
<DT> <I>pathName <B>getstatus</B></I> <I>entryPath</I></B>
134
</I></B>
135
<DD> Returns the current status of <I>entryPath</I></B>.
136
</DL>
137
<DL>
138
<DT> <I>pathName <B>setstatus</B></I> <I>entryPath status</I></B>
139
</I></B>
140
<DD> Sets the status of <I>entryPath</I></B> to be <I>status</I></B>. A bitmap will
141
be displayed next to the entry its status is <B>on</B></I>, <B>off</B></I> or
142
<B>default</B></I>.
143
</DL>
144
<DL>
145
<DT> <I>pathName <B>subwidget <I> name ?args?</I></B>
146
</I></B>
147
<DD> When no options are given, this command returns the pathname of the
148
subwidget of the specified name.
149
 
150
When options are given, the widget command of the specified subwidget
151
will be called with these options.
152
</DL>
153
</pre><H3>EXAMPLE</H3>
154
<P>
155
This example creates several choices for the user to select.
156
<P>
157
\fC
158
<pre><code><code><code>
159
 tixCheckList .c
160
 .c subwidget hlist add choice1 -itemtype imagetext -text "Choice 1"
161
 .c subwidget hlist add choice2 -itemtype imagetext -text "Choice 2"
162
 .c subwidget hlist add choice3 -itemtype imagetext -text "Choice 3"
163
 .c setstatus choice1 on
164
 .c setstatus choice2 off
165
 .c setstatus choice3 off
166
 pack .c
167
</code></code></code></pre>
168
</B></I>
169
</pre><H3>BINDINGS</H3>
170
<P>
171
The basic mouse and keyboard bindings of the CheckList widget are the
172
same as the bindings of the TixTree widget.
173
 
174
In addition, the status of the entries in the CheckList are toggled
175
under the following conditions:
176
<UL>
177
[1] <BR>
178
When the user press the mouse button over an entry.
179
</UL>
180
<UL>
181
[2] <BR>
182
When the user press the &lt;space&gt; key over an entry.
183
</UL>
184
<UL>
185
[3] <BR>
186
When the user press the &lt;Return&gt; key over an entry.
187
</UL>
188
</pre><H3>KEYWORDS</H3>
189
Tix(n), tixHList(n), tixTree(n)
190
<!Serial 851729142>
191
<hr><i>Last modified Fri Jan 17 23:00:21 EST 1997 </i> ---
192
<i>Serial 853731295</i>

powered by: WebSVN 2.1.0

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