Structural Informatics Group (SIG) logo
Home | Projects | Demos | Downloads | Publications | Local Info | About Us | New site
Go to the first, previous, next, last section, table of contents.

;GET ;SET etc xs1d

source files: xs1d.[ch]

SYNTAX

(SEND <xs1d> :GET <:PROPERTY> [<default-value>])
(SEND <xs1d> :SET <:PROPERTY> <value>)
(SEND <xs1d> :REMPROP <:PROPERTY>)
(SEND <xs1d> :PROPERTY-LIST-LENGTH)
(SEND <xs1d> :PROPERTY-LIST-NTH <fix:index> [<default-value>])

DESCRIPTION

As usual, :GET/:SET are used to manipulate both values with special significance to the SLIDER instance, and propertylist values passively stored for the benefit of the user.

If :GET does not find the requested property, it returns <default-value> if one was provided, otherwise signals an error.

Numeric properties may in general be supplied as float or ints indifferently. If NIL is provided where a numeric property was expected, nothing is done. (This is a feature, not a bug.)

:REMPROP removes the given property from the propertylist, returning (:PROPERTY . <val>) if the property was successfully removed, else NIL.

:PROPERTY-LIST-LENGTH and :PROPERTY-LIST-NTH are provided to allow iteration through all properties on thing, the latter's <default-value> works just as on :GET.

:LABEL is a lisp string identifying the quantity controlled.

:LABEL-FONT and :LIMIT-FONT are integers from 0 to 11 inclusive indentifying the hershey font in which to display the label and numeric values (respectively) of the slider.

:X is the current value of the slider.

:MIN-X and :MAX-X are the limiting values between which the slider runs.

:ENFORCE-MIN-X and :ENFORCE-MAX-X are currently unused.

:NEUTRAL-X is currently unused.

:LAST-DELTA-X is a read-only property remembering the last change in :X.

:VERTICAL-MARGIN is the spacing between the slider holes, expressed as a fraction of the total width of the widget.

:HORIZONTAL-MARGIN is the spacing between the slider holes and the sides of the widget, expressed as a fraction of the total width of the widget.

:SLIDER-HEIGHT is the height of the bottom of the slot containing the slider, expressed as a fraction of the total width of the widget. If this is set to zero, the widget will lack a visible slider.

:LIMITS-HEIGHT is the height of the bottom of the slot containing the limit labels, expressed as a fraction of the total width of the widget. If this is set to zero, the widget will lack visible limit labels.

:LABEL-HEIGHT is the height of the bottom of the slot containing the label and value, expressed as a fraction of the total width of the widget. If this is set to zero, the widget will lack visible label and value.

:SLIDER-LENGTH is the length of the slider, as a fraction of the slot length: this facilitates using the slider as a classical elevator, with the percentage of the sliderslot filled by the slider providing a cue to the percentage of the scrolled object which is currently visible. Lengths which xs1d feels are too large or too small get silently adjusted.

:FRUSTUM-DEPTH is the depth of the main frustum, expressed as a fraction of the total width of the widget.

:SLIDER-DEPTH is the depth of the slot containing the slider, expressed as a fraction of the total width of the widget.

:LIMITS-DEPTH is the depth of the slot containing the limit values, expressed as a fraction of the total width of the widget.

:LABEL-DEPTH is the depth of the slot containing the label and value, expressed as a fraction of the total width of the widget.

Class-slider instances tend to silently ignore or modify values for the above quantities if they consider them silly.

:CHANGE-HOOK function(s) will be called whenever the value of the slider changes for any reason. EXCEPTION: If the value of a slider is changed by a change-hook, the change-hook functions are *not* re-invoked. This is to prevent infinite recursions in the common case of a changehook wishing to adjust the slider value.

When change-hook functions are invoked, XG.3D.GUI-CURRENT-WIDGET is set to the current slider object: :GET may then be used to read the current value from it. This is the normal way of having a slider control something.

The remaining hooks are primarily for specialized needs -- if you want to highlight an object while it is being controlled, you may do so with appropriate click hooks, for example.

If a :DOWN-CLICK-HOOK, :DRAG-HOOK, or :UPCLICK-HOOK is provided, they will be invoked whenever the user downclicks (respectively, drags or upclicks) the slider proper (as opposed to the body, label or limit fields).


Go to the first, previous, next, last section, table of contents.