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 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442
|
<!-- manual page source format generated by RosettaMan v2.5a6, -->
<!-- available via anonymous ftp from ftp.cs.berkeley.edu:/ucb/people/phelps/tcltk/rman.tar.Z -->
<HTML>
<HEAD>
<TITLE>man page(1) manual page</TITLE>
</HEAD>
<BODY>
<A HREF="#toc">Table of Contents</A><P>
_________________________________________________________________
<P>
<H2><A NAME="sect1" HREF="#toc1"><B>NAME</B></A></H2>
<B>toolbar</B> - Create and manipulate a tool bar
<P>
<H2><A NAME="sect2" HREF="#toc2"><B>SYNOPSIS</B></A></H2>
<B>toolbar</B> <I>pathName</I> ?<I>options</I>?
<P>
<H2><A NAME="sect3" HREF="#toc3"><B>STANDARD</B> <B>OPTIONS</B></A></H2>
<DL>
<DT><B>activeBackground</B> <DD> <B>font</B> <B>insertForegroundselectForeground</B>
</DD>
</DL>
<DL>
<DT><B>activeForeground</B> <DD> <B>foreground</B> <B>orientstate</B>
<B>background</B> <B>highlightBackground</B> <B>relieftroughColor</B>
</DD>
</DL>
<DL>
<DT><B>borderWidth</B> <DD> <B>highlightColor</B> <B>selectBackgroundcursor</B>
</DD>
</DL>
<DL>
<DT><B>highlightThickness</B> <DD> <B>selectBorderWidthdisabledForegroundinsertBackground</B>
<B>selectColor</B>
<P>
</DD>
</DL>
See the "options" manual entry for details on the standard
options. For widgets added to the toolbar, these options
will be propogated if the widget supports the option. For
example, all widgets that support a font option will be
changed if the the toolbar's font option is configured.
<P>
<H2><A NAME="sect4" HREF="#toc4"><B>WIDGET-SPECIFIC</B> <B>OPTIONS</B></A></H2>
<DL>
<DT>Name: <DD> <B>balloonBackground</B>
</DD>
</DL>
<DL>
<DT>Class: <DD> <B>BalloonBackground</B>
</DD>
</DL>
<DL>
<DT>Command-Line Switch: <DD> <B>-ballooonbackground</B>
<P>
</DD>
</DL>
Specifies the background color of the balloon help
displayed at the bottom center of a widget on the toolbar
that has a non empty string for its balloonStr
option. The default color is yellow.
<P>
<DL>
<DT>Name: <DD> <B>balloonDelay1</B>
</DD>
</DL>
<DL>
<DT>Class: <DD> <B>BalloonDelay1</B>
</DD>
</DL>
<DL>
<DT>Command-Line Switch: <DD> <B>-balloondelay1</B>
<P>
</DD>
</DL>
Specifies the length of time (in milliseconds) to wait
before initially posting a balloon help hint window.
This delay is in effect whenever 1) the mouse leaves
the toolbar, or 2) a toolbar item is selected with the
mouse button.
<P>
<DL>
<DT>Name: <DD> <B>balloonDelay2</B>
</DD>
</DL>
<DL>
<DT>Class: <DD> <B>BalloonDelay2</B>
</DD>
</DL>
<DL>
<DT>Command-Line Switch: <DD> <B>-balloondelay2</B>
<P>
</DD>
</DL>
Specifies the length of time (in milliseconds) to wait
before continuing to post balloon help hint windows.
This delay is in effect after the first time a balloon
hint window is activated. It remains in effect until 1)
the mouse leaves the toolbar, or 2) a toolbar item is
selected with the mouse button.
<P>
<DL>
<DT>Name: <DD> <B>balloonFont</B>
</DD>
</DL>
<DL>
<DT>Class: <DD> <B>BalloonFont</B>
</DD>
</DL>
<DL>
<DT>Command-Line Switch: <DD> <B>-balloonfont</B>
<P>
</DD>
</DL>
Specifies the font of the balloon help text displayed
at the bottom center of a widget on the toolbar that
has a non empty string for its balloonStr option. The
default font is 6x10.
<P>
<DL>
<DT>Name: <DD> <B>balloonForeground</B>
</DD>
</DL>
<DL>
<DT>Class: <DD> <B>BalloonForeground</B>
</DD>
</DL>
<DL>
<DT>Command-Line Switch: <DD> <B>-ballooonforeground</B>
<P>
</DD>
</DL>
Specifies the foreground color of the balloon help
displayed at the bottom center of a widget on the toolbar
that has a non empty string for its balloonStr
option. The default color is black.
<P>
<DL>
<DT>Name: <DD> <B>helpVariable</B>
</DD>
</DL>
<DL>
<DT>Class: <DD> <B>HelpVariable</B>
</DD>
</DL>
<DL>
<DT>Command-Line Switch: <DD> <B>-helpvariable</B>
<P>
</DD>
</DL>
Specifies the global variable to update whenever the
mouse is in motion over a toolbar widget. This global
variable is updated with the current value of the
active widget's helpStr. Other widgets can "watch" this
variable with the trace command, or as is the case with
entry or label widgets, they can set their textVariable
to the same global variable. This allows for a simple
implementation of a help status bar. Whenever the mouse
leaves a menu entry, the helpVariable is set to the
empty string {}.
<P>
<DL>
<DT>Name: <DD> <B>orient</B>
</DD>
</DL>
<DL>
<DT>Class: <DD> <B>Orient</B>
</DD>
</DL>
<DL>
<DT>Command-Line Switch: <DD> <B>-orient</B>
<P>
</DD>
</DL>
Specifies the orientation of the toolbar. Must be
either horizontal or vertical.<BR>
_________________________________________________________________
<P>
<H2><A NAME="sect5" HREF="#toc5"><B>DESCRIPTION</B></A></H2>
The <B>toolbar</B> command creates a new window (given by the pathName
argument) and makes it into a <B>toolbar</B> widget. Additional
options, described above may be specified on the command
line or in the option database to configure aspects of
the toolbar such as its colors, font, and orientation. The
<B>toolbar</B> command returns its pathName argument. At the time
this command is invoked, there must not exist a window named
pathName, but pathName's parent must exist.
<P>
A <B>toolbar</B> is a widget that displays a collection of widgets
arranged either in a row or a column (depending on the value
of the -orient option). This collection of widgets is usually
for user convenience to give access to a set of commands
or settings. Any widget may be placed on a toolbar.
However, command or value-oriented widgets (such as button,
radiobutton, etc.) are usually the most useful kind of widgets
to appear on a toolbar.
<P>
In addition, the toolbar adds two new options to all widgets
that are added to it. These are the <B>helpStr</B> and <B>balloonStr</B>
options. See the discussion for the widget command add
below.
<P>
<H2><A NAME="sect6" HREF="#toc6"><B>WIDGET-SPECIFIC</B> <B>METHODS</B></A></H2>
The toolbar command creates a new Tcl command whose name is
pathName. This command may be used to invoke various operations
on the widget. It has the following general form:
<P>
<I>pathName</I> <I>option</I> ?<I>arg</I> <I>arg</I> ...?
<P>
Option and args determine the exact behavior of the command.
<P>
Many of the widget commands for a toolbar take as one argument
an indicator of which widget item of the toolbar to
operate on. The indicator is called an <B>index</B> and may be
specified in any of the following forms:
<P>
<I>number</I><BR>
Specifies the widget numerically, where 0 corresponds
to the first widget in the notebook, 1 to the second,
and so on. (For horizontal, 0 is the leftmost; for
vertical, 0 is the topmost).
<P>
<B>end</B> Specifes the last widget in the toolbar's index. If the
toolbar is empty this will return -1.
<P>
<B>last</B> Same as end.
<P>
<I>pattern</I><BR>
If the index doesn't satisfy any of the above forms,
then this form is used. Pattern is pattern-matched
against the widgetName of each widget in the toolbar,
in order from the first to the last widget, until a
matching entry is found. An exact match must occur.
<P>
The following commands are possible for toolbar widgets:
<P>
<I>pathName</I> <B>add</B> <I>widgetCommand</I> <I>widgetName</I> ?<I>option</I> <I>value</I>?
Adds a widget with the command widgetCommand whose name
is widgetName to the toolbar. If widgetCommand is
radiobutton or checkbutton, its packing is slightly
padded to match the geometry of button widgets. In
addition, the indicatorOn option is false by default
and the selectColor is that of the toolbar background
by default. This allows Radiobutton and Checkbutton
widgets to be added as icons by simply setting their
bitmap or image options. If additional arguments are
present, they are the set of available options that the
widget type of <I>widgetCommand</I> supports. In addition they
may also be one of the following options:
<P>
<DL>
<DT><B>-helpstr</B> <I>value</I><DD>
Specifes the help string to associate with the
widget. When the mouse moves over the widget, the
variable denoted by <B>helpVariable</B> is set to
<B>helpStr</B>. Another widget can bind to the helpVariable
and thus track status help.
<P>
</DD>
</DL>
<DL>
<DT><B>-balloonstr</B> <I>value</I><DD>
Specifes the string to display in a balloon window
for this widget. A balloon window is a small popup
window centered at the bottom of the widget. Usually
the <B>balloonStr</B> value is the name of the item
on the toolbar. It is sometimes known as a hint
window.
<P>
</DD>
</DL>
When the mouse moves into an item on the toolbar,
a timer is set based on the value of <B>balloonDelay1</B>.
If the mouse stays inside the item for <B>balloonDelay1</B>,
the balloon window will pop up
displaying the <B>balloonStr</B> value. Once the balloon
window is posted, a new timer based on <B>balloonDelay2</B>
is set. This is typically a shorter timer. If
the mouse is moved to another item, the window is
unposted and a new window will be posted over the
item if the shorter delay time is satisfied.
<P>
While the balloon window is posted, it can also be
unposted if the item is selected. In this case the
timer is reset to <B>balloonDelay1</B>. Whenever the
mouse leaves the toolbar, the timer is also reset
to <B>balloonDelay1</B>.
<P>
This window posting/unposting model is the same
model used in the Windows95 environment.
<P>
<I>pathName</I> <B>cget</B> <I>option</I><BR>
Returns the current value of the configuration option
given by <I>option</I>.
<P>
<I>pathName</I> <B>configure</B> ?<I>option</I> <I>value</I>?<BR>
Query or modify the configuration options of the
widget. If no <I>option</I> is specified, returns a list
describing all of the available options for pathName
(see Tk_ConfigureInfo for information on the format of
this list). If <I>option</I> is specified with no value, then
the command returns a list describing the one named
option (this list will be identical to the corresponding
sublist of the value returned if no option is
specified). If one or more option-value 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.
<P>
<I>pathName</I> <B>delete</B> <I>index</I> ?<I>index2</I>?<BR>
This command deletes all items between <I>index</I> and <I>index2</I>
inclusive. If <I>index2</I> is omitted then it defaults to
<I>index</I>. Returns an empty string.
<P>
<I>pathName</I> <B>index</B> <I>index</I><BR>
Returns the widget's numerical index for the entry
corresponding to <I>index</I>. If <I>index</I> is not found, -1 is
returned.
<P>
<I>value</I>?<BR>
<I>pathName</I> <B>insert</B> <I>beforeIndex</I> <I>widgetCommand</I> <I>widgetName</I> ?<I>option</I>
<P>
Insert a new item named <I>widgetName</I> with the
command <I>widgetCommand</I> before the item specified by
<I>beforeIndex</I>. If <I>widgetCommand</I> is <B>radiobutton</B> or <B>checkbutton</B>,
its packing is slightly padded to match the
geometry of button widgets. In addition, the <B>indicatorOn</B>
option is <B>false</B> by default and the <B>selectColor</B> is
that of the toolbar background by default. This allows
<B>Radiobutton</B> and <B>Checkbutton</B> widgets to be added as
icons by simply setting their <B>bitmap</B> or <B>image</B> options.
The set of available options is the same as specified
in the <B>ad</B> command.
<P>
<I>pathName</I> <B>itemcget</B> <I>index</I> <I>option</I><BR>
Returns the current value of the configuration option
given by <I>option</I> for index. The item type of <I>index</I>
determines the valid available options.
<P>
<I>pathName</I> <B>itemconfigure</B> <I>index</I> ?<I>option</I> <I>value</I>?
Query or modify the configuration options of the widget
of the toolbar specified by <I>index</I>. If no option is
specified, returns a list describing all of the available
options for <I>index</I> (see <B>Tk_ConfigureInfo</B> for information
on the format of this list). If <I>option</I> is specified
with no value, then the command returns a list
describing the one named option (this list will be
identical to the corresponding sublist of the value
returned if no option is specified). If one or more
option-value 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. The item type of <I>index</I> determines the valid
available options. The set of available options is the
same as specified in the <B>ad</B> command.
<P>
<H2><A NAME="sect7" HREF="#toc7"><B>EXAMPLE</B></A></H2>
toolbar .tb -helpvariable statusVar
<P>
<DL>
<DT>.tb add button item1 \<DD>
-helpstr "Save It" -bitmap @./icons/Tool_32_box.xbm \
-balloonstr "Save" -command {puts 1}
.tb add button item2 \
-helpstr "Save It" -bitmap @./icons/Tool_32_brush.xbm \
-balloonstr "Save" -command {puts 1}
.tb add button item3 \
-helpstr "Save It" -bitmap @./icons/Tool_32_cut.xbm \
-balloonstr "Save" -command {puts 1}
.tb add button item4 \
-helpstr "Save It" -bitmap @./icons/Tool_32_draw.xbm \
-balloonstr "Save" -command {puts 1}
.tb add button item5 \
-bitmap @./icons/Tool_32_erase.xbm -helpstr "Play It" \
-command {puts 2}
.tb add frame filler \
-borderwidth 1 -width 10 -height 10
.tb add radiobutton item6 \
-bitmap @./icons/Tool_32_oval.xbm -command {puts 4} \
-variable result -value OPEN -helpstr "Radio Button # 1" \
-balloonstr "Radio"
.tb add radiobutton item7 \
-bitmap @./icons/Tool_32_line.xbm -command {puts 5} \
-variable result -value CLOSED
.tb add checkbutton item8 \
-bitmap @./icons/Tool_32_text.xbm -command {puts 6} \
-variable checkit -onvalue yes -offvalue no
.tb add checkbutton check2 \
-bitmap @./icons/Tool_32_points.xbm -command {puts 7} \
-variable checkit2 -onvalue yes -offvalue no
<P>
</DD>
</DL>
pack .tb -side top -anchor nw
<P>
<H2><A NAME="sect8" HREF="#toc8"><B>AUTHOR</B></A></H2>
Bill Scott
<P>
<H2><A NAME="sect9" HREF="#toc9"><B>KEYWORDS</B></A></H2>
toolbar, button, radiobutton, checkbutton, iwidgets, widget
<P>
<HR><P>
<A NAME="toc"><B>Table of Contents</B></A><P>
<UL>
<LI><A NAME="toc1" HREF="#sect1">NAME</A></LI>
<LI><A NAME="toc2" HREF="#sect2">SYNOPSIS</A></LI>
<LI><A NAME="toc3" HREF="#sect3">STANDARD OPTIONS</A></LI>
<LI><A NAME="toc4" HREF="#sect4">WIDGET-SPECIFIC OPTIONS</A></LI>
<LI><A NAME="toc5" HREF="#sect5">DESCRIPTION</A></LI>
<LI><A NAME="toc6" HREF="#sect6">WIDGET-SPECIFIC METHODS</A></LI>
<LI><A NAME="toc7" HREF="#sect7">EXAMPLE</A></LI>
<LI><A NAME="toc8" HREF="#sect8">AUTHOR</A></LI>
<LI><A NAME="toc9" HREF="#sect9">KEYWORDS</A></LI>
</UL>
</BODY></HTML>
|