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 xtbr

source files: xtbr.[ch]

SYNTAX

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

DESCRIPTION

As usual, :GET/:SET are used to manipulate both values with special significance to the MENU 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 constituting a title for the viewport.

:LABEL-FONT is an integer from 0 to 11 inclusive indentifying the hershey font in which to display the viewport title etc.

:VERTICAL-MARGIN is the spacing between the viewport title and the frustum edges, expressed as a fraction of the total width of the widget.

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

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

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

:LABEL-DEPTH is the depth of the slot containing the viewport title, expressed as a fraction of the total width of the widget.

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

:STATE can be either :RUN, in which case XG.3D.GUI will normally redraw the contents of the viewport every frame, or :STOP, in which case XG.3D.GUI will avoid redrawing the contents of the window constantly.

:SIZE can be :BIG, in which case XG.3D.GUI will give nearly all of the window to the viewport, :NORMAL, or :CLOSED, in which case the viewport will not be drawn at all, and the viewframe will be shrunk and stowed at the margin of the screen.

:VIEWFRAME-CAMERA is the camera which will draw the viewframe. The class-viewframe instance will set this camera to draw a slightly larger area than the :VIEWPORT-CAMERA (to accomodate the frame).

:VIEWPORT-CAMERA is the camera which will actually draw the contents of the viewport.

:CHANGE-HOOK function(s) will be called whenever the viewframe/viewport changes :STATE for any reason. EXCEPTION: If the :STATE of a viewframe is changed by a change-hook, the change-hook functions are *not* re-invoked. This is to prevent infinite recursions if a changehook adjusts the viewframe :STATE.

When change-hook functions are invoked, XG.3D.GUI-CURRENT-WIDGET is set to the current viewframe object: :GET may then be used to read the :STATE, :VIEWPORT-CAMERA, or whatever else might be of interest.

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 label field on the viewframe. This is normally used to bring up an application-specific widget panel.


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