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

Subversion Repositories or1k

[/] [or1k/] [tags/] [start/] [insight/] [itcl/] [iwidgets3.0.0/] [doc/] [checkbox.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
'\" @(#) checkbox.n 1.21 94/12/17 16:04:44
8
'/"
9
.so man.macros
10
.HS checkbox iwid
11
.BS
12
'\" Note:  do not modify the .SH NAME line immediately below!
13
.SH NAME
14
checkbox \- Create and manipulate a checkbox widget
15
.SH SYNOPSIS
16
\fBcheckbox\fI \fIpathName \fR?\fIoptions\fR?
17
.SH "INHERITANCE"
18
itk::Widget <- labeledframe <- checkbox
19
.SH "STANDARD OPTIONS"
20
.LP
21
.nf
22
.ta 4c 8c 12c
23
\fBbackground\fR        \fBborderWidth\fR       \fBcursor\fR    \fBdisabledForeground\fR
24
\fBforeground\fR        \fBrelief\fR    \fBselectColor\fR
25
.fi
26
.LP
27
See the "options" manual entry for details on the standard options.
28
.SH "INHERITED OPTIONS"
29
.LP
30
.nf
31
.ta 4c 8c 12c
32
\fBlabelBitmap\fR       \fBlabelFont\fR \fBlabelImage\fR        \fBlabelMargin\fR
33
\fBlabelPos\fR  \fBlabelText\fR \fBlabelVariable\fR
34
.fi
35
.LP
36
See the "labeledframe" class manual entry for details on the
37
inherited options.
38
.SH "WIDGET-SPECIFIC OPTIONS"
39
.LP
40
.nf
41
Name:   \fBcommand\fR
42
Class:  \fBCommand\fR
43
Command-Line Switch:    \fB-command\fR
44
.fi
45
.IP
46
Specifies a Tcl command procedure to be evaluated following a  change in
47
the current check box selection.
48
.LP
49
.BE
50
 
51
.SH DESCRIPTION
52
.PP
53
The \fBcheckbox\fR command creates a check button box widget
54
capable of adding, inserting, deleting, selecting, and configuring
55
checkbuttons as well as obtaining the currently selected button.
56
 
57
.SH "METHODS"
58
.PP
59
The \fBcheckbox\fR command creates a new Tcl command whose
60
name is \fIpathName\fR.  This
61
command may be used to invoke various
62
operations on the widget.  It has the following general form:
63
.DS C
64
\fIpathName option \fR?\fIarg arg ...\fR?
65
.DE
66
\fIOption\fR and the \fIarg\fRs
67
determine the exact behavior of the command.
68
.PP
69
Many of the widget commands for the \fBcheckbox\fR take as one argument an
70
indicator of which checkbutton of the checkbox to operate on.  These indicators
71
are called \fIindexes\fR and allow reference and manipulation of checkbuttons.
72
Checkbox indexes may be specified in any of the following forms:
73
.TP 12
74
\fInumber\fR
75
Specifies the checkbutton numerically, where 0 corresponds to the top
76
checkbutton of the checkbox.
77
.TP 12
78
\fBend\fR
79
Indicates the last checkbutton of the checkbox.
80
.TP 12
81
\fIpattern\fR
82
If the index doesn't satisfy one of the above forms then this
83
form is used.  \fIPattern\fR is pattern-matched against the tag of
84
each checkbutton in the checkbox, in order from top to bottom,
85
until a matching entry is found.  The rules of \fBTcl_StringMatch\fR
86
are used.
87
 
88
.SH "WIDGET-SPECIFIC METHODS"
89
.TP
90
\fIpathName \fBadd\fR \fItag\fR ?\fIoption value option value\fR?
91
Adds a new checkbutton to the checkbuttond window on the bottom.  The command
92
takes additional options which are passed on to the checkbutton as construction
93
arguments.  These include the standard Tk checkbutton options.  The tag is
94
returned.
95
.TP
96
\fIpathName \fBbuttonconfigure\fR \fIindex\fR ?\fIoptions\fR?
97
This command is similar to the \fBconfigure\fR command, except that
98
it applies to the options for an individual checkbutton,
99
whereas \fBconfigure\fRapplies to the options for the checkbox as a whole.
100
\fIOptions\fR may have any of the values accepted by the \fBadd\fR
101
widget command.  If \fIoptions\fR are specified, options are modified
102
as indicated in the command and the command returns an empty string.
103
If no \fIoptions\fR are specified, returns a list describing
104
the current options for entry \fIindex\fR (see \fBTk_ConfigureInfo\fR for
105
information on the format of this list).
106
.TP
107
\fIpathName \fBcget\fR \fIoption\fR
108
Returns the current value of the configuration option given
109
by \fIoption\fR.
110
\fIOption\fR may have any of the values accepted by the \fBcheckbox\fR
111
command.
112
.TP
113
\fIpathName\fR \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
114
Query or modify the configuration options of the widget.
115
If no \fIoption\fR is specified, returns a list describing all of
116
the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
117
information on the format of this list).  If \fIoption\fR is specified
118
with no \fIvalue\fR, then the command returns a list describing the
119
one named option (this list will be identical to the corresponding
120
sublist of the value returned if no \fIoption\fR is specified).  If
121
one or more \fIoption\-value\fR pairs are specified, then the command
122
modifies the given widget option(s) to have the given value(s);  in
123
this case the command returns an empty string.
124
\fIOption\fR may have any of the values accepted by the \fBcheckbox\fR
125
command.
126
.TP
127
\fIpathName \fBdelete\fR \fIindex\fR
128
Deletes a specified checkbutton given an \fIindex\fR.
129
.TP
130
\fIpathName \fBdeselect\fR \fIindex\fR
131
Deselects a specified checkbutton given an \fIindex\fR.
132
.TP
133
\fIpathName \fBflash\fR \fIindex\fR
134
Flashes a specified checkbutton given an \fIindex\fR.
135
.TP
136
\fIpathName \fBget\fR ?\fIindex\fR?
137
Returns the tags of the currently selected checkbuttons or the
138
selection status of specific checkbutton when given an index.
139
.TP
140
\fIpathName \fBindex\fR \fIindex\fR
141
Returns the numerical index corresponding to index.
142
.TP
143
\fIpathName \fBinsert \fIindex\fR \fItag\fR ?\fIoption value option value ...\fR?
144
Same as the \fBadd\fR command except that it inserts the new
145
checkbutton just before the one given by \fIindex\fR, instead of appending
146
to the end of the checkbox.  The \fIoption\fR, and \fIvalue\fR
147
arguments have the same interpretation as for the \fBadd\fR widget
148
command.
149
.TP
150
\fIpathName \fBselect\fR \fIindex\fR
151
Selects a specified checkbutton given an \fIindex\fR.
152
 
153
.SH EXAMPLE
154
.DS
155
 checkbox .cb -labeltext Styles
156
 .cb add bold -text Bold
157
 .cb add italic -text Italic
158
 .cb add underline -text Underline
159
 .cb select underline
160
 
161
 pack .cb -padx 10 -pady 10 -fill both -expand yes
162
.DE
163
 
164
.SH AUTHOR
165
John A. Tucker
166
.SH KEYWORDS
167
checkbox, widget

powered by: WebSVN 2.1.0

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