3.20 gauge%
Implements: control<%>
A gauge is a horizontal or vertical bar for displaying the output
value of a bounded integer quantity. Each gauge has an adjustable
range, and the gauge's current value is always between 0 and its
range, inclusive. Use
set-value to set the value of the gauge.
(->newgauge% (label_) (range_) (parent_) [(style_)] [(font_)] [(enabled_)] [(vert-margin_)] [(horiz-margin_)] [(min-width_)] [(min-height_)] [(stretchable-width_)] [(stretchable-height_)])gauge%object
label: string (up to 200 characters) or#f
range: exact integer in [1, 10000]
parent:frame%,dialog%,panel%, orpane%object
style='(horizontal): list of symbols in'(horizontal vertical vertical-label horizontal-label deleted)
font=:normal-control-fontfont%object
enabled=#t: boolean
vert-margin=2: exact integer in [0, 1000]
horiz-margin=2: exact integer in [0, 1000]
min-width=0: exact integer in [0, 10000]
min-height=0: exact integer in [0, 10000]
stretchable-width=#t for: boolean'horizontalstyle, #f for'vertical
stretchable-height=#t for: boolean'verticalstyle, #f for'horizontalIf
labelis a string, it is used as the gauge label; otherwise the gauge does not display a label.If an ampersand (``&'') occurs in
label, it is specially parsed; under Windows and X, the character following an ampersand is underlined in the displayed control to indicate a keyboard mnemonic. (Under Mac OS X, mnemonic underlines are not shown.) The mnemonic is meaningless for a gauge (as far ason-traverse-charis concerned), but it is supported for consistency with other control types. A programmer may assign a meaning to the mnemonic, e.g., by overridingon-traverse-char.The
rangeargument is an integer specifying the maximum value of the gauge (inclusive). The minimum gauge value is always0.The
stylelist must include either'horizontal, specifying a horizontal gauge, or'vertical, specifying a vertical gauge. Ifstyleincludes'vertical-label, then the gauge is created with a label above the control; ifstyledoes not include'vertical-label(and optionally includes'horizontal-label), then the label is created to the left of the gauge. Ifstyleincludes'deleted, then the gauge is created as hidden, and it does not affect its parent's geometry; the gauge can be made active later by callingparent'sadd-childmethod.The
fontargument determines the font for the control. For information about theenabledargument, seewindow<%>. For information about thehoriz-marginandvert-marginarguments, seesubarea<%>. For information about themin-width,min-height,stretchable-width, andstretchable-heightarguments, seearea<%>.
Methods
get-range
get-value
set-range
set-value
All Methods
accept-drop-files from window<%>
client->screen from window<%>
command from control<%>
enable from window<%>
focus from window<%>
get-client-size from window<%>
get-cursor from window<%>
get-font from control<%>
get-graphical-min-size from area<%>
get-handle from window<%>
get-height from window<%>
get-label from window<%>
get-parent from area<%>
get-plain-label from window<%>
get-range from gauge%
get-size from window<%>
get-top-level-window from area<%>
get-value from gauge%
get-width from window<%>
get-x from window<%>
get-y from window<%>
has-focus? from window<%>
horiz-margin from subarea<%>
is-enabled? from window<%>
is-shown? from window<%>
min-height from area<%>
min-width from area<%>
on-drop-file from window<%>
on-focus from window<%>
on-move from window<%>
on-size from window<%>
on-subwindow-char from window<%>
on-subwindow-event from window<%>
on-superwindow-enable from window<%>
on-superwindow-show from window<%>
popup-menu from window<%>
refresh from window<%>
screen->client from window<%>
set-cursor from window<%>
set-label from window<%>
set-range from gauge%
set-value from gauge%
show from window<%>
stretchable-height from area<%>
stretchable-width from area<%>
vert-margin from subarea<%>