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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [itcl/] [iwidgets3.0.0/] [doc/] [buttonbox.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
'\" @(#) buttonbox.n 1.21 94/12/17 16:04:44
8
'/"
9
.so man.macros
10
.HS buttonbox iwid
11
.BS
12
'\" Note:  do not modify the .SH NAME line immediately below!
13
.SH NAME
14
buttonbox \- Create and manipulate a manager widget for buttons
15
.SH SYNOPSIS
16
\fBbuttonbox\fI \fIpathName \fR?\fIoptions\fR?
17
.SH "INHERITANCE"
18
itk::Widget <- buttonbox
19
.SH "STANDARD OPTIONS"
20
.LP
21
.nf
22
.ta 4c 8c 12c
23
\fBbackground\fR        \fBcursor\fR
24
.fi
25
.LP
26
See the "options" manual entry for details on the standard options.
27
.SH "WIDGET-SPECIFIC OPTIONS"
28
.ta 4c 8c 12c
29
.LP
30
.nf
31
Name:   \fBorient\fR
32
Class:  \fBOrient\fR
33
Command-Line Switch:    \fB-orient\fR
34
.fi
35
.IP
36
Orientation of the button box: \fBhorizontal\fR or \fBvertical\fR.  The default
37
is horizontal.
38
.LP
39
.nf
40
Name:   \fBpadX\fR
41
Class:  \fBPadX\fR
42
Command-Line Switch:    \fB-padx\fR
43
.fi
44
.IP
45
Specifies a non-negative padding distance to leave between the button group and
46
the outer edge of the button box in the x direction.  The value may be
47
given in any of the forms acceptable to \fBTk_GetPixels\fR.  The default
48
is 5 pixels.
49
.LP
50
.nf
51
Name:   \fBpadY\fR
52
Class:  \fBPadY\fR
53
Command-Line Switch:    \fB-pady\fR
54
.fi
55
.IP
56
Specifies a non-negative padding distance to leave between the button group and
57
the outer edge of the button box in the y direction.  The value may be given
58
in any of the forms acceptable to \fBTk_GetPixels\fR.  The default is 5 pixels.
59
.LP
60
.BE
61
 
62
.SH DESCRIPTION
63
.PP
64
The \fBbuttonbox\fR command creates a manager widget for controlling
65
buttons.  The button box also supports the display and invocation
66
of a default button.  The button box can be configured either horizontally
67
or vertically.
68
 
69
.SH "METHODS"
70
.PP
71
The \fBbuttonbox\fR command creates a new Tcl command whose
72
name is \fIpathName\fR.  This
73
command may be used to invoke various
74
operations on the widget.  It has the following general form:
75
.DS C
76
\fIpathName option \fR?\fIarg arg ...\fR?
77
.DE
78
\fIOption\fR and the \fIarg\fRs
79
determine the exact behavior of the command.
80
.PP
81
Many of the widget commands for the buttonbox take as one argument an
82
indicator of which button of the button box to operate on.  These
83
indicators are called \fIindexes\fR and allow reference and manipulation
84
of buttons regardless of their current map state.  buttonbox indexes
85
may be specified in any of the following forms:
86
.TP 12
87
\fInumber\fR
88
Specifies the button numerically, where 0 corresponds to the
89
left/top-most button of the button box.
90
.TP 12
91
\fBend\fR
92
Indicates the right/bottom-most button of the button box.
93
.TP 12
94
\fBdefault\fR
95
Indicates the current default button of the button box.  This is the
96
button with the default ring displayed.
97
.TP 12
98
\fIpattern\fR
99
If the index doesn't satisfy one of the above forms then this
100
form is used.  \fIPattern\fR is pattern-matched against the tag of
101
each button in the button box, in order from left/top to right/left,
102
until a matching entry is found.  The rules of \fBTcl_StringMatch\fR
103
are used.
104
 
105
.SH "WIDGET-SPECIFIC METHODS"
106
.TP
107
\fIpathName \fBadd\fR \fItag\fR \fIargs\fR
108
Add a button distinguished by \fItag\fR to the end of the button box.
109
If additional arguments are present they specify options to be applied
110
to the button.  See \fBPushButton\fR for information on the options
111
available.
112
.TP
113
\fIpathName \fBbuttonconfigure\fR \fIindex\fR ?\fIoptions\fR?
114
This command is similar to the \fBconfigure\fR command, except that
115
it applies to the options for an individual button,
116
whereas \fBconfigure\fR applies to the options for the button box as a whole.
117
\fIOptions\fR may have any of the values accepted by the \fBPushButton\fR
118
command.  If \fIoptions\fR are specified, options are modified
119
as indicated in the command and the command returns an empty string.
120
If no \fIoptions\fR are specified, returns a list describing
121
the current options for entry \fIindex\fR (see \fBTk_ConfigureInfo\fR for
122
information on the format of this list).
123
.TP
124
\fIpathName \fBcget\fR \fIoption\fR
125
Returns the current value of the configuration option given
126
by \fIoption\fR.
127
\fIOption\fR may have any of the values accepted by the \fBbuttonbox\fR
128
command.
129
.TP
130
\fIpathName\fR \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
131
Query or modify the configuration options of the widget.
132
If no \fIoption\fR is specified, returns a list describing all of
133
the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
134
information on the format of this list).  If \fIoption\fR is specified
135
with no \fIvalue\fR, then the command returns a list describing the
136
one named option (this list will be identical to the corresponding
137
sublist of the value returned if no \fIoption\fR is specified).  If
138
one or more \fIoption\-value\fR pairs are specified, then the command
139
modifies the given widget option(s) to have the given value(s);  in
140
this case the command returns an empty string.
141
\fIOption\fR may have any of the values accepted by the \fBbuttonbox\fR
142
command.
143
.TP
144
\fIpathName \fBdefault\fR \fIindex\fR
145
Sets the default button to the button given by \fIindex\fR.  This causes
146
the default ring to appear arround the specified button.
147
.TP
148
\fIpathName \fBdelete\fR \fIindex\fR
149
Deletes the button given by \fIindex\fR from the button box.
150
.TP
151
\fIpathName \fBhide\fR \fIindex\fR
152
Hides the button denoted by \fIindex\fR.  This doesn't remove the button
153
permanently, just inhibits its display.
154
.TP
155
\fIpathName \fBindex \fIindex\fR
156
Returns the numerical index corresponding to \fIindex\fR.
157
.TP
158
\fIpathName \fBinsert \fIindex\fR \fItag\fR ?\fIoption value option value ...\fR?
159
Same as the \fBadd\fR command except that it inserts the new
160
button just before the one given by \fIindex\fR, instead of appending
161
to the end of the button box.  The \fIoption\fR, and \fIvalue\fR
162
arguments have the same interpretation as for the \fBadd\fR widget
163
command.
164
.TP
165
\fIpathName \fBinvoke\fR \fI?index?\fR
166
Invoke the command associated with a button.  If no arguments
167
are given then the current default button is invoked, otherwise the argument
168
is expected to be a button \fIindex\fR.
169
.TP
170
\fIpathName \fBshow\fR \fIindex\fR
171
Display a previously hidden button denoted by \fIindex\fR.
172
.SH EXAMPLE
173
.DS
174
 buttonbox .bb
175
 
176
 .bb add Yes -text Yes -command "puts Yes"
177
 .bb add No -text No -command "puts No"
178
 .bb add Maybe -text Maybe -command "puts Maybe"
179
 .bb default Yes
180
 
181
 pack .bb -expand yes -fill both
182
.DE
183
.SH AUTHOR
184
Bret A. Schuhmacher
185
.DE
186
Mark L. Ulferts
187
.SH KEYWORDS
188
buttonbox, pushbutton, button, widget

powered by: WebSVN 2.1.0

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