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 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850
|
'\" t
...\" Scale.sgm /main/13 1996/09/30 13:14:06 rws $
.de P!
.fl
\!!1 setgray
.fl
\\&.\"
.fl
\!!0 setgray
.fl \" force out current output buffer
\!!save /psv exch def currentpoint translate 0 0 moveto
\!!/showpage{}def
.fl \" prolog
.sy sed -e 's/^/!/' \\$1\" bring in postscript file
\!!psv restore
.
.de pF
.ie \\*(f1 .ds f1 \\n(.f
.el .ie \\*(f2 .ds f2 \\n(.f
.el .ie \\*(f3 .ds f3 \\n(.f
.el .ie \\*(f4 .ds f4 \\n(.f
.el .tm ? font overflow
.ft \\$1
..
.de fP
.ie !\\*(f4 \{\
. ft \\*(f4
. ds f4\"
' br \}
.el .ie !\\*(f3 \{\
. ft \\*(f3
. ds f3\"
' br \}
.el .ie !\\*(f2 \{\
. ft \\*(f2
. ds f2\"
' br \}
.el .ie !\\*(f1 \{\
. ft \\*(f1
. ds f1\"
' br \}
.el .tm ? font underflow
..
.ds f1\"
.ds f2\"
.ds f3\"
.ds f4\"
.ta 8n 16n 24n 32n 40n 48n 56n 64n 72n
.TH "XmScale" "library call"
.SH "NAME"
\fBXmScale\fP \(em The Scale widget class
.iX "XmScale"
.iX "widget class" "Scale"
.SH "SYNOPSIS"
.PP
.nf
#include <Xm/Scale\&.h>
.fi
.SH "DESCRIPTION"
.PP
Scale is used by an application to indicate a
value from within a range of values, and it allows the user to input or modify
a value from the same range\&.
.PP
A Scale has an elongated rectangular region similar to a
ScrollBar\&. A slider inside this region
indicates the current value along the Scale\&. The user can also
modify the Scale\&'s value by moving the slider within the
rectangular region of the Scale\&. A Scale can also include a label set
located outside the Scale region\&.
These can indicate the relative value at various positions
along the scale\&.
The placement of this label depends on the \fBXmNlayoutDirection\fP
resource of the widget\&.
.PP
A Scale can be either input/output or output only\&. An input/output
Scale\&'s value can be set by the application and also
modified by the user with the slider\&. An output-only Scale
is used strictly as an indicator of the current value of something
and cannot be modified interactively by the user\&.
The \fBXmScale\fP resource \fBXmNeditable\fP specifies whether the user can
interactively modify the Scale\&'s value\&.
.PP
The user can specify resources in a resource file for the automatically
created gadget that contains the title of the Scale widget\&. The name of the
gadget is \fBTitle\fP\&.
The placement of the title depends on the
\fBXmNlayoutDirection\fP
resource of the widget\&. The direction of the title is based on
the widget\&'s layout direction\&.
.PP
Scale uses the \fBXmQTspecifyRenderTable\fP trait, and
holds the \fBXmQTtransfer\fP trait\&.
.SS "Data Transfer Behavior"
.PP
Scale supports dragging of the representation of the Scale value from
the Scale when the value is displayed
and when the value of the \fBXmNenableUnselectableDrag\fP resource
of \fBXmDisplay\fP is set to True\&.
.PP
As a source of data, Scale supports the following targets and associated
conversions of data to these targets:
.IP "\fBCOMPOUND_TEXT\fP" 10
The widget transfers a string representation of \fBXmNvalue\fP as type
\fBCOMPOUND_TEXT\fP\&.
.IP "\fBUTF8_STRING\fP" 10
The widget transfers a string representation of \fBXmNvalue\fP as type
\fBUTF8_STRING\fP\&.
.IP "\fBSTRING\fP" 10
The widget transfers a string representation of \fBXmNvalue\fP as type
\fBSTRING\fP\&.
.IP "\fB_MOTIF_CLIPBOARD_TARGETS\fP" 10
The widget transfers, as type \fBATOM\fP, a list of the targets it
supports for the \fBCLIPBOARD\fP selection\&.
These include \fBSTRING\fP, \fBCOMPOUND_TEXT\fP and \fBUTF8_STRING\fP\&.
.IP "\fB_MOTIF_EXPORT_TARGETS\fP" 10
The widget transfers, as type \fBATOM\fP, a list of the targets to be
used as the value of the DragContext\&'s \fBXmNexportTargets\fP in a
drag-and-drop transfer\&.
These include \fBSTRING\fP, \fBCOMPOUND_TEXT\fP and \fBUTF8_STRING\fP\&.
.PP
As a source of data, Scale also supports the following standard Motif
targets:
.IP "\fBBACKGROUND\fP" 10
The widget transfers \fBXmNbackground\fP as type \fBPIXEL\fP\&.
.IP "\fBCLASS\fP" 10
The widget finds the first shell in the widget hierarchy that has a
\fBWM_CLASS\fP property and transfers the contents as text in the
current locale\&.
.IP "\fBCLIENT_WINDOW\fP" 10
The widget finds the first shell in the widget hierarchy and transfers
its window as type \fBWINDOW\fP\&.
.IP "\fBCOLORMAP\fP" 10
The widget transfers \fBXmNcolormap\fP as type \fBCOLORMAP\fP\&.
.IP "\fBFOREGROUND\fP" 10
The widget transfers \fBXmNforeground\fP as type \fBPIXEL\fP\&.
.IP "\fBNAME\fP" 10
The widget finds the first shell in the widget hierarchy that has a
\fBWM_NAME\fP property and transfers the contents as text in the current
locale\&.
.IP "\fBTARGETS\fP" 10
The widget transfers, as type \fBATOM\fP, a list of the targets it
supports\&.
These include the standard targets in this list\&.
These also include \fBSTRING\fP, \fBCOMPOUND_TEXT\fP and
\fBUTF8_STRING\fP\&.
.IP "\fBTIMESTAMP\fP" 10
The widget transfers the timestamp used to acquire the selection as type
\fBINTEGER\fP\&.
.IP "\fB_MOTIF_RENDER_TABLE\fP" 10
The widget transfers \fBXmNrenderTable\fP if it exists, or else the
default text render table, as type \fBSTRING\fP\&.
.IP "\fB_MOTIF_ENCODING_REGISTRY\fP" 10
The widget transfers its encoding registry as type \fBSTRING\fP\&.
The value is a list of NULL separated items in the
form of tag encoding pairs\&.
This target symbolizes the transfer target for the
Motif Segment Encoding Registry\&.
Widgets and applications can use this Registry to register
text encoding formats for specified render table tags\&.
Applications access this Registry by calling
\fBXmRegisterSegmentEncoding\fP and \fBXmMapSegmentEncoding\fP\&.
.SS "Descendants"
.PP
Scale automatically creates the descendants shown in the
following table\&.
An application can use \fBXtNameToWidget\fP to gain access
to the named descendant\&. In addition, a user or an application
can use the named descendant when specifying resource values\&.
.TS
tab() box;
l| l| l.
\fBNamed Descendant\fP\fBClass\fP\fBIdentity\fP
___
=
___
\fBScrollbar\fP\fBXmScrollBar\fPscroll bar
___
\fBTitle\fP\fBXmLabelGadget\fPtitle of scale
___
.TE
.SS "Classes"
.PP
Scale inherits behavior, resources, and traits from
\fBCore\fP, \fBComposite\fP, \fBConstraint\fP, and \fBXmManager\fP
classes\&.
.PP
The class pointer is \fBxmScaleWidgetClass\fP\&.
.PP
The class name is \fBXmScale\fP\&.
.SS "New Resources"
.PP
The following table defines a set of widget resources used by the programmer
to specify data\&. The programmer can also set the resource values for the
inherited classes to set attributes for this widget\&. To reference a
resource by name or by class in a \fB\&.Xdefaults\fP file, remove the \fBXmN\fP or
\fBXmC\fP prefix and use the remaining letters\&. To specify one of the defined
values for a resource in a \fB\&.Xdefaults\fP file, remove the \fBXm\fP prefix and use
the remaining letters (in either lowercase or uppercase, but include any
underscores between words)\&.
The codes in the access column indicate if the given resource can be
set at creation time (C),
set by using \fBXtSetValues\fP (S),
retrieved by using \fBXtGetValues\fP (G), or is not applicable (N/A)\&.
.PP
.TS
tab() box;
c s s s s
l| l| l| l| l.
\fBXmScale Resource Set\fP
\fBName\fP\fBClass\fP\fBType\fP\fBDefault\fP\fBAccess\fP
_____
XmNconvertCallbackXmCCallbackXtCallbackListNULLC
_____
XmNdecimalPointsXmCDecimalPointsshort0CSG
_____
XmNdragCallbackXmCCallbackXtCallbackListNULLC
_____
XmNeditableXmCEditableBooleanTrueCSG
_____
XmNfontListXmCFontListXmFontListdynamicCSG
_____
XmNhighlightOnEnterXmCHighlightOnEnterBooleanFalseCSG
_____
XmNhighlightThicknessXmCHighlightThicknessDimension2CSG
_____
XmNmaximumXmCMaximumint100CSG
_____
XmNminimumXmCMinimumint0CSG
_____
XmNorientationXmCOrientationunsigned charXmVERTICALCSG
_____
XmNprocessingDirectionXmCProcessingDirectionunsigned chardynamicCSG
_____
XmNscaleHeightXmCScaleHeightDimension0CSG
_____
XmNscaleMultipleXmCScaleMultipleintdynamicCSG
_____
XmNscaleWidthXmCScaleWidthDimension0CSG
_____
XmNrenderTableXmCRenderTableXmRenderTabledynamicCSG
_____
XmNshowArrowsXmCShowArrowsXtEnumXmNONECSG
_____
XmNshowValueXmCShowValueXtEnumXmNONECSG
_____
XmNsliderMarkXmCSliderMarkXtEnumdynamicCSG
_____
XmNsliderVisualXmCSliderVisualXtEnumdynamicCSG
_____
XmNslidingModeXmCSlidingModeXtEnumXmSLIDERCSG
_____
XmNtitleStringXmCTitleStringXmStringNULLCSG
_____
XmNvalueXmCValueintdynamicCSG
_____
XmNvalueChangedCallbackXmCCallbackXtCallbackListNULLC
_____
.TE
.IP "\fBXmNconvertCallback\fP" 10
Specifies a list of callbacks called when the Scale is asked to convert
a selection\&.
The type of the structure whose address is passed to these callbacks is
\fBXmConvertCallbackStruct\fR\&.
The reason is \fBXmCR_OK\fP\&.
.IP "\fBXmNdecimalPoints\fP" 10
Specifies the number of decimal points to shift the slider value when
displaying it\&. For example, a slider value of 2,350
and an \fBXmdecimalPoints\fP
value of 2 results in a display value of 23\&.50\&.
The value must not be negative\&.
.IP "\fBXmNdragCallback\fP" 10
Specifies the list of callbacks that is called
when the slider position changes as the slider is being
dragged\&. The reason sent by the callback is \fBXmCR_DRAG\fP\&.
.IP "\fBXmNeditable\fP" 10
Specifies how the Scale scrollbar will react to user input\&. This
resource can be True or False values, as follows:
.RS
.IP "\fBTrue\fP" 10
Allows the scrollbar to be sensitive to user input\&. This is the
default value\&.
.IP "\fBFalse\fP" 10
Makes the Scale scrollbar insensitive to user input\&. The visual is not
greyed out\&. This value would mostly be used in \fBXmTHERMOMETER\fP
mode\&.
.RE
.IP "" 10
When \fBXmNeditable\fP is used on a widget
it sets the dropsite to \fBXmDROP_SITE_ACTIVE\fP\&.
.IP "\fBXmNfontList\fP" 10
Specifies the font list to use for the title text string specified by
\fBXmNtitleString\fP, and the label displayed when \fBXmNshowValue\fP
is True\&. The font list is an obsolete structure, and is retained only
for compatibility with earlier releases of Motif\&. See the
\fBXmNrenderTable\fP resource\&.
.IP "\fBXmNhighlightOnEnter\fP" 10
Specifies whether the highlighting rectangle is drawn when the cursor moves
into the widget\&.
If the shell\&'s focus policy is \fBXmEXPLICIT\fP, this resource is
ignored, and the widget is highlighted when it has the focus\&.
If the shell\&'s focus policy
is \fBXmPOINTER\fP and if this resource is
True, the highlighting rectangle is drawn when the the cursor moves into
the widget\&.
If the shell\&'s focus
policy is \fBXmPOINTER\fP and if this resource is
False, the highlighting rectangle is not drawn when the the cursor moves
into the widget\&.
The default is False\&.
.IP "\fBXmNhighlightThickness\fP" 10
Specifies the size of the
slider\&'s border drawing rectangle used for enter window and
traversal highlight drawing\&.
.IP "\fBXmNmaximum\fP" 10
Specifies the slider\&'s maximum value\&.
\fBXmNmaximum\fP must be greater than \fBXmNminimum\fP\&.
.IP "\fBXmNminimum\fP" 10
Specifies the slider\&'s minimum value\&.
\fBXmNmaximum\fP must be greater than \fBXmNminimum\fP\&.
.IP "\fBXmNorientation\fP" 10
Displays Scale vertically or horizontally\&.
This resource can have values of \fBXmVERTICAL\fP and \fBXmHORIZONTAL\fP\&.
.IP "\fBXmNprocessingDirection\fP" 10
Specifies whether the value for \fBXmNmaximum\fP is on the right or
left side of \fBXmNminimum\fP for horizontal Scales
or above or below \fBXmNminimum\fP for vertical Scales\&.
This resource can have values of \fBXmMAX_ON_TOP, XmMAX_ON_BOTTOM,
XmMAX_ON_LEFT\fP, and \fBXmMAX_ON_RIGHT\fP\&.
If the Scale is oriented vertically, the default value is
\fBXmMAX_ON_TOP\fP\&.
If the XmScale is oriented horizontally, the default value
depends on the \fBXmNlayoutDirection\fP resource of the widget\&.
.IP "\fBXmNrenderTable\fP" 10
Specifies the render table to use for the title text string specified
by \fBXmNtitleString\fP, and the label displayed when
\fBXmNshowValue\fP is True\&. If this value is NULL at initialization,
the parent hierarchy is searched for an ancestor that holds the
\fBXmQTspecifyRenderTable\fP trait\&. If such an ancestor is found, the
render table is initialized to the \fBXmLABEL_RENDER_TABLE\fP value of
the ancestor widget\&. If no such ancestor is found, the default is
implementation dependent\&. If a font list (\fBXmNfontList\fP) and a
render table are both specified, the render table will take
precedence\&. Refer to \fBXmRenderTable\fP(3) for more information on
the creation and structure of a render table\&.
.IP "\fBXmNscaleHeight\fP" 10
Specifies the height of the slider area\&.
The value should be in the specified unit type (the default is pixels)\&.
If no value is specified a default height is computed\&.
.IP "\fBXmNscaleMultiple\fP" 10
Specifies the amount to move the slider when the user takes an action
that moves the slider by a multiple increment\&.
The default is (\fBXmNmaximum\fP - \fBXmNminimum\fP) divided by 10,
with a minimum of 1\&.
.IP "\fBXmNscaleWidth\fP" 10
Specifies the width of the slider area\&.
The value should be in the specified unit type (the default is pixels)\&.
If no value is specified a default width is computed\&.
.IP "\fBXmNshowArrows\fP" 10
Specifies whether the arrows are displayed
and how they are to be displayed\&. This resource can take the
following values:
.RS
.IP "\fBXmEACH_SIDE\fP" 10
Indicates that one arrow is displayed on each end of the ScrollBar slider\&.
.IP "\fBXmMAX_SIDE\fP" 10
Indicates that one arrow is displayed on the \fBXmNmaximum\fP side of
the ScrollBar slider\&.
.IP "\fBXmMIN_SIDE\fP" 10
Indicates that one arrow is displayed on the \fBXmNminimum\fP side of
the ScrollBar slider\&.
.IP "\fBXmNONE\fP" 10
Indicates that no arrows are displayed\&.
.RE
.IP "" 10
\fBXmNONE\fP is the default value\&.
.IP "\fBXmNshowValue\fP" 10
Specifies whether a label for the current slider
value should be displayed next to the slider\&. If the value is
\fBXmNEAR_SLIDER\fP, the current slider value is displayed\&. If the
value is \fBXmNONE\fP, no slider value is displayed\&.
If the value is \fBXmNEAR_BORDER\fP, the current slider value is
displayed near the border\&.
.IP "\fBXmNsliderMark\fP" 10
Specifies the shape the slider is to be displayed in\&. This resource
can take the following values:
.RS
.IP "\fBXmETCHED_LINE\fP" 10
Specifies the slider as an etched line\&. This is the default when
\fBXmNslidingMode\fP is \fBXmSLIDER\fP\&.
.IP "\fBXmNONE\fP" 10
Specifies the slider as a foregrounded rectangle\&. This is the default when
\fBXmNslidingMode\fP is \fBXmTHERMOMETER\fP and the Scale scrollbar is
insensitive to user input (\fBXmNeditable\fP is \fBFalse\fP\&.
.IP "\fBXmROUND_MARK\fP" 10
Specifies the slider as a shadowed circle\&. This is the default when
\fBXmNslidingMode\fP is \fBXmTHERMOMETER\fP and the Scale scrollbar is
sensitive to user input (\fBXmNeditable\fP is \fBTrue\fP\&.
.IP "\fBXmTHUMB_MARK\fP" 10
Specifies the slider as a series of three etched lines centered in the
middle of the slider\&.
.RE
.IP "\fBXmNslidingMode\fP" 10
Specifies the mode the slider works in\&. There are two possible modes:
.RS
.IP "\fBXmSLIDER\fP" 10
Allows the slider to move freely between the minimum and maximum ends
of the scale\&. This is the default value\&.
.IP "\fBXmTHERMOMETER\fP" 10
Forces the slider to be anchored to one side of the trough area\&.
.RE
.IP "\fBXmNsliderVisual\fP" 10
Specifies the color of the slider visual\&.
This resource can take
the following values:
.RS
.IP "\fBXmBACKGROUND_COLOR\fP" 10
Specifies that the slider visual is in the background color\&.
.IP "\fBXmFOREGROUND_COLOR\fP" 10
Specifies that the slider visual is in the foreground color\&.
.IP "\fBXmSHADOWED_BACKGROUND\fP" 10
Specifies that the slider visual is in the background color, with a shadow\&.
This is the
default when the \fBXmNslidingModel\fP resource is \fBXmSLIDER\fP\&.
.IP "\fBXmTROUGH_COLOR\fP" 10
Specifies that the slider visual is in the trough color\&. This is the
default when the \fBXmNslidingModel\fP resource is \fBXmTHERMOMETER\fP\&.
.RE
.IP "\fBXmNtitleString\fP" 10
Specifies the title text string to appear in the Scale widget window\&.
.IP "\fBXmNvalue\fP" 10
Specifies the slider\&'s current position along the scale,
between \fBXmNminimum\fP and \fBXmNmaximum\fP\&.
The value is constrained to be within these inclusive bounds\&.
The initial value of this resource is the larger of 0 (zero)
and \fBXmNminimum\fP\&.
.IP "\fBXmNvalueChangedCallback\fP" 10
Specifies the list of callbacks that is called
when the value of the slider has changed\&. The reason
sent by the callback is \fBXmCR_VALUE_CHANGED\fP\&.
.SS "Inherited Resources"
.PP
Scale inherits behavior and resources from the
superclasses described in the following tables\&.
For a complete description of each resource, refer to the
reference page for that superclass\&.
.PP
.TS
tab() box;
c s s s s
l| l| l| l| l.
\fBXmManager Resource Set\fP
\fBName\fP\fBClass\fP\fBType\fP\fBDefault\fP\fBAccess\fP
_____
XmNbottomShadowColorXmCBottomShadowColorPixeldynamicCSG
_____
XmNbottomShadowPixmapXmCBottomShadowPixmapPixmapXmUNSPECIFIED_PIXMAPCSG
_____
XmNforegroundXmCForegroundPixeldynamicCSG
_____
XmNhelpCallbackXmCCallbackXtCallbackListNULLC
_____
XmNhighlightColorXmCHighlightColorPixeldynamicCSG
_____
XmNhighlightPixmapXmCHighlightPixmapPixmapdynamicCSG
_____
XmNinitialFocusXmCInitialFocusWidgetNULLCSG
_____
XmNlayoutDirectionXmCLayoutDirectionXmDirectiondynamicCG
_____
XmNnavigationTypeXmCNavigationTypeXmNavigationTypeXmTAB_GROUPCSG
_____
XmNpopupHandlerCallbackXmCCallbackXtCallbackListNULLC
_____
XmNshadowThicknessXmCShadowThicknessDimension2CSG
_____
XmNstringDirectionXmCStringDirectionXmStringDirectiondynamicCG
_____
XmNtopShadowColorXmCTopShadowColorPixeldynamicCSG
_____
XmNtopShadowPixmapXmCTopShadowPixmapPixmapdynamicCSG
_____
XmNtraversalOnXmCTraversalOnBooleanTrueCSG
_____
XmNunitTypeXmCUnitTypeunsigned chardynamicCSG
_____
XmNuserDataXmCUserDataXtPointerNULLCSG
_____
.TE
.PP
.TS
tab() box;
c s s s s
l| l| l| l| l.
\fBComposite Resource Set\fP
\fBName\fP\fBClass\fP\fBType\fP\fBDefault\fP\fBAccess\fP
_____
XmNchildrenXmCReadOnlyWidgetListNULLG
_____
XmNinsertPositionXmCInsertPositionXtOrderProcNULLCSG
_____
XmNnumChildrenXmCReadOnlyCardinal0G
_____
.TE
.PP
.TS
tab() box;
c s s s s
l| l| l| l| l.
\fBCore Resource Set\fP
\fBName\fP\fBClass\fP\fBType\fP\fBDefault\fP\fBAccess\fP
_____
XmNacceleratorsXmCAcceleratorsXtAcceleratorsdynamicCSG
_____
XmNancestorSensitiveXmCSensitiveBooleandynamicG
_____
XmNbackgroundXmCBackgroundPixeldynamicCSG
_____
XmNbackgroundPixmapXmCPixmapPixmapXmUNSPECIFIED_PIXMAPCSG
_____
XmNborderColorXmCBorderColorPixelXtDefaultForegroundCSG
_____
XmNborderPixmapXmCPixmapPixmapXmUNSPECIFIED_PIXMAPCSG
_____
XmNborderWidthXmCBorderWidthDimension0CSG
_____
XmNcolormapXmCColormapColormapdynamicCG
_____
XmNdepthXmCDepthintdynamicCG
_____
XmNdestroyCallbackXmCCallbackXtCallbackListNULLC
_____
XmNheightXmCHeightDimensiondynamicCSG
_____
XmNinitialResourcesPersistentXmCInitialResourcesPersistentBooleanTrueC
_____
XmNmappedWhenManagedXmCMappedWhenManagedBooleanTrueCSG
_____
XmNscreenXmCScreenScreen *dynamicCG
_____
XmNsensitiveXmCSensitiveBooleanTrueCSG
_____
XmNtranslationsXmCTranslationsXtTranslationsdynamicCSG
_____
XmNwidthXmCWidthDimensiondynamicCSG
_____
XmNxXmCPositionPosition0CSG
_____
XmNyXmCPositionPosition0CSG
_____
.TE
.SS "Callback Information"
.PP
A pointer to the following structure is passed to the
\fBXmNdragCallback\fP and \fBXmNvalueChangedCallback\fP procedures:
.PP
.nf
typedef struct
{
int \fIreason\fP;
XEvent \fI* event\fP;
int \fIvalue\fP;
} XmScaleCallbackStruct;
.fi
.IP "\fIreason\fP" 10
Indicates why the callback was invoked
.IP "\fIevent\fP" 10
Points to the \fBXEvent\fP that triggered the callback
.IP "\fIvalue\fP" 10
Is the new slider value
.PP
A pointer to the following structure is passed to the
\fBXmNconvertCallback\fP procedures:
.PP
.nf
typedef struct
{
int \fIreason\fP;
XEvent *\fIevent\fP;
Atom \fIselection\fP;
Atom \fItarget\fP;
XtPointer \fIsource_data\fP;
XtPointer \fIlocation_data\fP;
int \fIflags\fP;
XtPointer \fIparm\fP;
int \fIparm_format\fP;
unsigned long \fIparm_length\fP;
int \fIstatus\fP;
XtPointer \fIvalue\fP;
Atom \fItype\fP;
int \fIformat\fP;
unsigned long \fIlength\fP;
} XmConvertCallbackStruct;
.fi
.IP "\fIreason\fP" 10
Indicates why the callback was invoked\&.
.IP "\fIevent\fP" 10
Points to the \fBXEvent\fP that triggered the callback\&.
It can be NULL\&.
.IP "\fIselection\fP" 10
Indicates the selection for which conversion is being requested\&.
Possible values are \fBCLIPBOARD\fP, \fBPRIMARY\fP, \fBSECONDARY\fP,
and \fB_MOTIF_DROP\fP\&.
.IP "\fItarget\fP" 10
Indicates the conversion target\&.
.IP "\fIsource_data\fP" 10
Contains information about the selection source\&.
When the selection is \fB_MOTIF_DROP\fP, \fIsource_data\fP is the
DragContext\&.
Otherwise, it is NULL\&.
.IP "\fBlocation_data\fP" 10
Contains information about the location of data to be converted\&.
If the value is NULL, the data to be transferred consists of the
widget\&'s current selection\&.
.IP "\fIflags\fP" 10
Indicates the status of the conversion\&. Following are the possible
values:
.RS
.IP "\fBXmCONVERTING_NONE\fP" 10
This flag is currently unused\&.
.IP "\fBXmCONVERTING_PARTIAL\fP" 10
The target widget was able to be converted, but some data was lost\&.
.IP "\fBXmCONVERTING_SAME\fP" 10
The conversion target is the source of the data to be transferred\&.
.IP "\fBXmCONVERTING_TRANSACT\fP" 10
This flag is currently unused\&.
.RE
.IP "\fIparm\fP" 10
Contains parameter data for this target\&.
If no parameter data exists, the value is NULL\&.
.IP "" 10
When \fIselection\fP is \fBCLIPBOARD\fP and \fItarget\fP is
\fB_MOTIF_CLIPBOARD_TARGETS\fP or
\fB_MOTIF_DEFERRED_CLIPBOARD_TARGETS\fP, the value is the requested
operation (\fBXmCOPY\fP, \fBXmMOVE\fP, or \fBXmLINK\fP)\&.
.IP "\fIparm_format\fP" 10
Specifies whether the data in \fIparm\fP should be viewed
as a list of \fIchar\fP, \fIshort\fP, or \fIlong\fP quantities\&.
Possible values are 0 (when \fIparm\fP is NULL),
8 (when the data in \fIparm\fP should be viewed as a list of \fIchar\fPs),
16 (when the data in \fIparm\fP should be viewed as a list of \fIshort\fPs),
or 32 (when the data in \fIparm\fP should be viewed as a list of \fIlong\fPs)\&.
Note that \fIparm_format\fP symbolizes a data type, not the number of bits
in each list element\&.
For example, on some machines, a \fIparm_format\fP of 32 means that
the data in \fIparm\fP should be viewed as a list of 64-bit quantities,
not 32-bit quantities\&.
.IP "\fIparm_length\fP" 10
Specifies the number of elements of data in \fIparm\fP, where each
element has the size specified by \fIparm_format\fP\&.
When \fIparm\fP is NULL, the value is 0\&.
.IP "\fIstatus\fP" 10
An IN/OUT member that specifies the status of the conversion\&.
The initial value is \fBXmCONVERT_DEFAULT\fP\&.
The callback procedure can set this member to one of the following
values:
.RS
.IP "\fBXmCONVERT_DEFAULT\fP" 10
This value means that the widget class conversion procedure, if any, is
called after the callback procedures return\&.
If the widget class conversion procedure produces any data, it
overwrites the data provided by the callback procedures in the \fIvalue\fP
member\&.
.IP "\fBXmCONVERT_MERGE\fP" 10
This value means that the widget class conversion procedure, if any, is
called after the callback procedures return\&.
If the widget class conversion procedure produces any data, it appends
its data to the data provided by the callback procedures in the
\fIvalue\fP member\&.
This value is intended for use with targets that result in lists of
data, such as \fBTARGETS\fP\&.
.IP "\fBXmCONVERT_DONE\fP" 10
This value means that the callback procedure has successfully finished
the conversion\&.
The widget class conversion procedure, if any, is not called after the
callback procedures return\&.
.IP "\fBXmCONVERT_REFUSE\fP" 10
This value means that the callback procedure has terminated the
conversion process without completing the requested conversion\&.
The widget class conversion procedure, if any, is not called after the
callback procedures return\&.
.RE
.IP "\fIvalue\fP" 10
An IN/OUT parameter that contains any data that the callback procedure
produces as a result of the conversion\&.
The initial value is NULL\&.
If the callback procedure sets this member, it must ensure that the
\fItype\fP, \fIformat\fP, and \fIlength\fP members correspond
to the data in \fIvalue\fP\&.
The callback procedure is responsible for allocating, but not for
freeing, memory when it sets this member\&.
.IP "\fItype\fP" 10
An IN/OUT parameter that indicates the type of the data in the
\fIvalue\fP member\&.
The initial value is \fBINTEGER\fP\&.
.IP "\fIformat\fP" 10
An IN/OUT parameter that specifies whether the data in \fIvalue\fP should
be viewed as a list of \fIchar\fP, \fIshort\fP, or \fIlong\fP quantities\&.
The initial value is 8\&.
The callback procedure can set this member to 8 (for a list of \fIchar\fP),
16 (for a list of \fIshort\fP), or 32 (for a list of \fIlong\fP)\&.
.IP "\fIlength\fP" 10
An IN/OUT member that specifies the number of elements of data in
\fIvalue\fP, where each element has the size symbolized by \fIformat\fP\&.
The initial value is 0\&.
.SS "Behavior"
.PP
XmScale has the following behavior:
.IP "\fB<Btn1Down>\fP\ or\ \fB<Btn2Down>\fP:" 10
\fBIn the region between an end of the Scale and the slider\fP:
Moves the slider by one multiple increment in
the direction of the end of the
Scale and calls the \fBXmNvalueChangedCallback\fP callbacks\&.
If \fBXmNprocessingDirection\fP is \fBXmMAX_ON_RIGHT\fP or
\fBXmMAX_ON_BOTTOM\fP, movement toward
the right or
bottom increments the Scale value,
and movement toward the left or top decrements the Scale value\&.
If \fBXmNprocessingDirection\fP is \fBXmMAX_ON_LEFT\fP or
\fBXmMAX_ON_TOP\fP, movement toward the right or
bottom decrements the Scale value,
and movement toward the left or top increments the Scale value\&.
If the button is held down longer than a delay period, the slider is
moved again by the same increment and the same callbacks are called\&.
.IP "" 10
\fBIn slider:\fP
Activates the interactive dragging of the slider\&.
.IP "\fB<Btn2Down>\fP\ in\ value\ label:" 10
Drags the contents of the label showing the current slider value\&.
This action sets the \fBXmNconvertProc\fP of the DragContext to a
function that calls the \fBXmNconvertCallback\fP procedures, possibly
multiple times, for the \fB_MOTIF_DROP\fP selection\&.
.IP "\fB<Btn1Motion>\fP\ or\ \fB<Btn2Motion>\fP:" 10
If the button press occurs within the slider, the subsequent motion
events move the slider to the position of the pointer and call the
callbacks for \fBXmNdragCallback\fP\&.
.IP "\fB<Btn1Up>\fP\ or\ \fB<Btn2Up>\fP:" 10
If the button press occurs within the slider and the slider position
is changed, the callbacks for \fBXmNvalueChangedCallback\fP are called\&.
.IP "\fB<Ctrl>\fP\fB<Btn1Down>\fP:" 10
\fBIn the region between an end of the Scale and the slider\fP:
Moves the slider to that end of the Scale and calls the
\fBXmNvalueChangedCallback\fP callbacks\&.
If \fBXmNprocessingDirection\fP is \fBXmMAX_ON_RIGHT\fP or
\fBXmMAX_ON_BOTTOM\fP,
movement toward the right or bottom increments the Scale value,
and movement toward
the left or top
decrements
the Scale value\&.
If \fBXmNprocessingDirection\fP is \fBXmMAX_ON_LEFT\fP or
\fBXmMAX_ON_TOP\fP, movement toward the right or
bottom decrements the Scale value,
and movement toward the left or top increments the Scale value\&.
.IP "\fB<Key>\fP\fB<osfUp>\fP:" 10
For vertical Scales,
moves the slider up one increment and calls the
\fBXmNvalueChangedCallback\fP callbacks\&.
If \fBXmNprocessingDirection\fP is \fBXmMAX_ON_TOP\fP, movement toward
the top increments the Scale value\&.
If \fBXmNprocessingDirection\fP is \fBXmMAX_ON_BOTTOM\fP, movement toward
the top decrements the Scale value\&.
.IP "\fB<Key>\fP\fB<osfDown>\fP:" 10
For vertical Scales,
moves the slider down one increment and calls the
\fBXmNvalueChangedCallback\fP callbacks\&.
If \fBXmNprocessingDirection\fP is \fBXmMAX_ON_BOTTOM\fP, movement toward
the bottom increments the Scale value\&.
If \fBXmNprocessingDirection\fP is \fBXmMAX_ON_TOP\fP, movement toward
the bottom decrements the Scale value\&.
.IP "\fB<Key>\fP\fB<osfLeft>\fP:" 10
For horizontal Scales,
moves the slider one increment to the left and calls the
\fBXmNvalueChangedCallback\fP callbacks\&.
If \fBXmNprocessingDirection\fP is \fBXmMAX_ON_LEFT\fP, movement toward
the left increments the Scale value\&.
If \fBXmNprocessingDirection\fP is \fBXmMAX_ON_RIGHT\fP, movement toward
the left decrements the Scale value\&.
.IP "\fB<Key>\fP\fB<osfRight>\fP:" 10
For horizontal Scales,
moves the slider one increment to the right and calls the
\fBXmNvalueChangedCallback\fP callbacks\&.
If \fBXmNprocessingDirection\fP is \fBXmMAX_ON_RIGHT\fP, movement toward
the right increments the Scale value\&.
If \fBXmNprocessingDirection\fP is \fBXmMAX_ON_LEFT\fP, movement toward
the right decrements the Scale value\&.
.IP "\fB<Ctrl>\fP\fB<Key>\fP\fB<osfUp>\fP\ or\ \fB<Key>\fP\fB<osfPageUp>\fP:" 10
For vertical Scales,
moves the slider up one multiple increment and calls the
\fBXmNvalueChangedCallback\fP callbacks\&.
If \fBXmNprocessingDirection\fP is \fBXmMAX_ON_TOP\fP, movement toward
the top increments the Scale value\&.
If \fBXmNprocessingDirection\fP is \fBXmMAX_ON_BOTTOM\fP, movement toward
the top decrements the Scale value\&.
.IP "\fB<Ctrl>\fP\fB<Key>\fP\fB<osfDown>\fP\ or\ \fB<Key>\fP\fB<osfPageDown>\fP:" 10
For vertical Scales,
moves the slider down one multiple increment and calls the
\fBXmNvalueChangedCallback\fP callbacks\&.
If \fBXmNprocessingDirection\fP is \fBXmMAX_ON_BOTTOM\fP, movement toward
the bottom increments the Scale value\&.
If \fBXmNprocessingDirection\fP is \fBXmMAX_ON_TOP\fP, movement toward
the bottom decrements the Scale value\&.
.IP "\fB<Ctrl>\fP\fB<Key>\fP\fB<osfLeft>\fP\ or\ \fB<Key>\fP\fB<osfPageLeft>\fP:" 10
For horizontal Scales,
moves the slider one multiple increment to the left and calls the
\fBXmNvalueChangedCallback\fP callbacks\&.
If \fBXmNprocessingDirection\fP is \fBXmMAX_ON_LEFT\fP, movement toward
the left increments the Scale value\&.
If \fBXmNprocessingDirection\fP is \fBXmMAX_ON_RIGHT\fP, movement toward
the left decrements the Scale value\&.
.IP "\fB<Ctrl>\fP\fB<Key>\fP\fB<osfRight>\fP\ or\ \fB<Key>\fP\fB<osfPageRight>\fP:" 10
For horizontal Scales,
moves the slider one multiple increment to the right and calls the
\fBXmNvalueChangedCallback\fP callbacks\&.
If \fBXmNprocessingDirection\fP is \fBXmMAX_ON_RIGHT\fP, movement toward
the right increments the Scale value\&.
If \fBXmNprocessingDirection\fP is \fBXmMAX_ON_LEFT\fP, movement toward
the right decrements the Scale value\&.
.IP "\fB<Key>\fP\fB<osfBeginLine>\fP\ or\ \fB<Key>\fP\fB<osfBeginData>\fP:" 10
Moves the slider to the minimum value and calls the
\fBXmNvalueChangedCallback\fP callbacks\&.
.IP "\fB<Key>\fP\fB<osfEndLine>\fP\ or\ \fB<Key>\fP\fB<osfEndData>\fP:" 10
Moves the slider to the maximum value and calls the
\fBXmNvalueChangedCallback\fP callbacks\&.
.IP "\fB<Key>\fP\fB<osfNextField>\fP:" 10
Traverses to the first item in the next tab group\&. If
the current tab group is the last entry in the tab group list, it
wraps to the beginning of the tab group list\&.
.IP "\fB<Key>\fP\fB<osfPrevField>\fP:" 10
Traverses to the first item in the previous tab group\&.
If the beginning of the tab group list is reached, it wraps to the end
of the tab group list\&.
.IP "\fB<Key>\fP\fB<osfHelp>\fP:" 10
Calls the callbacks for \fBXmNhelpCallback\fP if any exist\&.
If there are no help
callbacks for this widget, this action calls the help callbacks
for the nearest ancestor that has them\&.
.SS "Virtual Bindings"
.PP
The bindings for virtual keys are vendor specific\&.
For information about bindings for virtual buttons and keys, see \fBVirtualBindings\fP(3)\&.
.SH "RELATED"
.PP
\fBComposite\fP(3), \fBConstraint\fP(3), \fBCore\fP(3),
\fBXmCreateScale\fP(3),
\fBXmManager\fP(3),
\fBXmScaleGetValue\fP(3),
\fBXmScaleSetValue\fP(3),
\fBXmVaCreateScale\fP(3), and
\fBXmVaCreateManagedScale\fP(3)\&.
|