The Hgauge Display Class

The hgauge display class displays a scalar number in graphical and also (optionally) digital form. The graphical representation shows a slider extending from the value of the min attribute to the value of the variable; the scale continues to the value of the max attribute. If the variable value is out of the min-max range, the slider occupies all or none of the slider slot, but the value label shows the correct number.

Labels for the minimum and maximum values can be specified in the mintitle and maxtitle attributes; their location, font, and color can be set using mintitlejustify, mintitlefont, mintitlefg, etc. Tick size is controlled by majorticksize and minorticksize, and the number of ticks between major ticks by minortickcount. Parallel sets of attributes, label... and value..., govern aspects of the scale and the value label, although labelout and out do not conform to this parallel naming convention. There are sliderbg, sliderheight, and sliderwidth attributes; for an hgauge, sliderwidth is ignored because the width depends upon the value. Other properties are covered by the usual attributes: title, subtitle, bg, etc.

For comparison, the three closely related classes vgauge, hscale, and vscale are also shown in the figure.

Visual Representation
     (a;b;c;d)30 40 50 60
     `a`b`c`d is `hgauge `hscale `vgauge `vscale
     `a`b`c`d has `title,<("hgauge a";"hscale b";"vgauge c";"vscale d")
     show `a`b`c`d
     `a`b`c`d has ((`x;3);(`x;3;`y;155);(`x;225);(`x;416))

Attributes

See the "Display Attributes" chapter for details concerning all the attributes that apply to objects in the hgauge display class, as well as lists of colors and fonts. The keys in the Table of All Display Attributes that pertain to this class are hG, ALL, CNFT, GS, NFT, and TOP.

The attributes that are meaningful for the hgauge display class (other than the print... attributes) are:

active
ancestors
arrowdown
arrowkeys
arrowleft
arrowlist
arrowright
arrowup
at
atsector
b
bg
bound
class
clear
deiconized
doc
downto
dynamic
eval
evaluate
execute
exit
extent
f1-f12
fg
fkeys
focus
followers
followertree
font
foot
freeze
fullscreen
H
h
has
head
hide
hl
hlthickness
icon
iconic
iconized
icontitle
inc
incurrentworkspace
is
l
labelfg
labelfont
labelinc
labeljustify
labelout1
leader
leftto
literal
lower
majorticksize
mapped
max
maxtitle
maxtitlefg
maxtitlefont
maxtitlejustify
min
minortickcount
minorticksize
mintitle
mintitlefg
mintitlefont
mintitlejustify
naturalsize
notify
out1
outofcurrentworkspace
pageinc
parent
pin
preset
primary
r
raise
realize
refresh
request
resize
resizeable
rightto
script
sensitive
set
settings
shadowthickness
shell
shelltitle
show
sliderbg
sliderheight
sliderwidth
state
stateself
subtitle
subtitlefg
subtitlefont
subtitlejustify
syncshow
t
tabfrom
tablist
tabto
title
titlefg
titlefont
titlejustify
upto
valuefg
valuefont
valuejustify
vcol
vcols
verify
vrow
vrows
W
w
ws
X
x
xs
Y
y
ys
YX
yx
yxs
(Point the mouse cursor to an attribute to display a short description at the bottom of the screen)

1. Note that labelout is used to format the scale labels and out to format the value label.


doc@aplusdev.org© Copyright 1995–2008 Morgan Stanley Dean Witter & Co. All rights reserved.