Package Documentation

Object: NODE-MIXIN (The :GWL Package)
Mixins: LAYOUT-MIXIN, VANILLA-MIXIN

Description

Generates a default GWL user interface with a model-inputs area, user-navigable tree with child applications, graphics view with controls, and rule display. Child objects should be of type node-mixin or application-mixin. Child hidden-objects may be of any type. The ui-display-list-objects is appended up automatically from those of the children.


Input Slots (optional)

AFTER-PRESENT! [from BASE-HTML-SHEET] void

This is an empty function by default, but can be overridden in the respondent of a form, to do some processing after the respondent's write-html-sheet function runs to present the object.


AFTER-SET! [from BASE-HTML-SHEET] void

This is an empty function by default, but can be overridden in the requestor of a form, to do some processing after the requestor's form values are set into the specified bashee.


AVAILABLE-IMAGE-FORMATS [from LAYOUT-MIXIN] list of keyword symbols

Determines which formats are available in the Preferences. Defaults to :png, :jpeg, and :vrml.


BASHEE [from SKELETON-UI-ELEMENT] gdl object

Object to have its settable computed-slots and/or query-plist set from the fields on the form upon submission. Defaults to self.


BEFORE-PRESENT! [from BASE-HTML-SHEET] void

This is an empty function by default, but can be overridden in the respondent of a form, to do some processing before the respondent's write-html-sheet function runs to present the object. This can be useful especially for objects which are subclasses of higher-level mixins such as application-mixin and node-mixin, where you do not have direct access to the write-html-sheet function and typically only define the model-inputs function. It is not always reliable to do processing in the model-inputs function, since some slots which depend on your intended modifications may already have been evaluated by the time the model-inputs function runs.


BEFORE-RESPONSE! [from BASE-HTML-SHEET] void

This is an empty function by default, but can be overridden in a user specialization of base-html-sheet, to do some processing before the header-plist is evaluated and before the HTTP response is actually initiated.


BEFORE-SET! [from BASE-HTML-SHEET] void

This is an empty function by default, but can be overridden in the requestor of a form, to do some processing before the requestor's form values are set into the specified bashee.


BODY-BGCOLOR [from LAYOUT-MIXIN] keyword symbol

Color keyword from *color-table* for the body background. Defaults to :blue-sky.


BOUNDING-BOX [from BASE-OBJECT] list of two 3d points

The left front bottom and right rear top corners, in global coordinates, of the rectangular volume bounding the tree of geometric objects rooted at this object.


CENTER [from BASE-OBJECT] 3d point

Indicates in global coordinates where the center of the reference box of this object should be located.


CHECK-SANITY? [from BASE-HTML-SHEET] boolean

Determines whether a a sanity check is done (with the check-sanity function) before presenting the response page if this page is a respondent. Default is NIL.


DEFAULT-TREE-DEPTH integer

Determines how many descendant levels to show in the tree initially. Default is 1.


DOM-ID [from SKELETON-UI-ELEMENT] string

This is the auto-computed dom-id which should be used for rendering this section. If you use the main-div HTML string for rendering this object as a page section, then you do not have to generate the :div tag yourself - the main-div will be a string of HTML which is wrapped in the correct :div tag already.


FORCE-VALIDATION-FOR [from SKELETON-UI-ELEMENT] list of gdl objects of type form-control

The validation-function will be forced on these objects when a form is submitted, even if the object's html form-control does not happen to be included in the values submitted with the form. Defaults to nil.


HEIGHT [from BASE-OBJECT] number

Z-axis dimension of the reference box. Defaults to zero.


HIDDEN? [from VANILLA-MIXIN*] boolean

Indicates whether the object should effectively be a hidden-object even if specified in :objects. Default is nil.


HTML-SECTIONS [from SKELETON-UI-ELEMENT]

List of HTML sections to be scanned and possibly replaced in response to GDL Ajax calls. Override this slot at your own risk. The default is all sections who are most recently laid out on the respondent sheet, and this is set programmatically every time the sheet section's main-div is demanded.


HTML-SECTIONS-VALID [from SKELETON-UI-ELEMENT]

List of valid HTML sections to be scanned and possibly replaced in response to GDL Ajax calls. Override this slot at your own risk. The default is all sections who are most recently laid out on the respondent sheet, and this is set programmatically every time the sheet section's main-div is demanded.


IMAGE-FILE [from BASE-OBJECT] pathname or string

Points to a pre-existing image file to be displayed instead of actual geometry for this object. Defaults to nil


IMAGE-FORMAT [from BASE-HTML-GRAPHICS-SHEET] keyword symbol

Determines the default image format. Defaults to :png


INNER-HTML [from SKELETON-UI-ELEMENT] string

This can be used with (str .) [in cl-who] or (:princ .) [in htmlGen] to output this section of the page, without the wrapping :div tag [so if you use this, your code would be responsible for wrapping the :div tag with :id (the dom-id).]


INPUTS-BGCOLOR [from LAYOUT-MIXIN] keyword symbol

Color keyword from *color-table* for the model-inputs area background. Defaults to :aquamarine.


INPUTS-TITLE [from LAYOUT-MIXIN] string

Title for the model-inputs section. Defaults to "Model Inputs".


JS-TO-EVAL [from SKELETON-UI-ELEMENT] string of valid javascript

This Javascript will be send with the Ajax response, and evaluated after the innerHTML for this section has been replaced.


LENGTH [from GEOMETRY-VIEW-MIXIN] number

Length ("height" of screen window) of the graphics viewport. Default is 300.


LOCAL-BOX [from BASE-OBJECT] list of two 3d points

The left front bottom and right rear top corners, in global coordinates, of the rectangular volume bounding this geometric object.


MULTIPART-FORM? [from LAYOUT-MIXIN] boolean

Determines whether the embedded form will support multipart MIME parts. Defaults to NIL.


NODE-UI-DISPLAY-LIST-OBJECTS gdl object list

Appends additional objects to the automatically-appended ui-display-list-objects from the children.


OBLIQUENESS [from BASE-OBJECT] 3x3 orthonormal matrix of double-float numbers

This is synonymous with the orientation.


ONCLICK-FUNCTION [from BASE-OBJECT] lambda function of zero arguments, or nil

If non-nil, this function gets invoked when the user clicks the object in graphics front-ends which support this functionality, e.g. SVG/Raphael and X3DOM.


ORDERED-FORM-CONTROLS [from SKELETON-UI-ELEMENT] list of gdl objects, which should be of type 'base-form-control

.

[Note -- this slot is not really necessary for protecting out-of-bounds sequence references anymore, the form-control processor protects against this by itself now].

These objects are validated and bashed first, in the order given. If the cardinality of one form-control depends on another as in the example below, then you should list those dependent objects first. Default is nil.

examples:
 
...
  
  :computed-slots ((number-of-nozzles (the number-of-nozzles-form value))
	    (ordered-form-controls 
	     (append (list-elements (the inner-flange-form))
		     (list (the number-of-nozzles-form)))))
  
  :objects
  ((inner-flange-form
    :type 'menu-form-control 
    :choice-plist (list :hey "hey" :now "now")
    :default :hey
    :sequence (:size (the number-of-nozzles)))
   (number-of-nozzles-form
    :type 'text-form-control 
    :prompt "Number of Shell Nozzles Required: "
    :domain :number     
    :default 0)

ORIENTATION [from BASE-OBJECT] 3x3 matrix of double-float numbers

Indicates the absolute Rotation Matrix used to create the coordinate system of this object. This matrix is given in absolute terms (i.e. with respect to the root's orientation), and is generally created with the alignment function. It should be an orthonormal matrix, meaning each row is a vector with a magnitude of one (1.0).


OTHER-RULES [from LAYOUT-MIXIN] list of gdl objects of type base-rule-object or (preferably) gwl-base-rule-object

. Links to these will be displayed in the other-rules section. Default to the collection of all objects of type base-rule-object from this node in the tree down to the leaves, whose violated? message evaluates to NIL.


OTHER-RULES-BGCOLOR [from LAYOUT-MIXIN] keyword symbol

Color keyword from *color-table* for the other-rules area background. Defaults to :aquamarine.


OTHER-RULES-TITLE [from LAYOUT-MIXIN] string

Title for the other-rules section. Defaults to "Other Rules".


PAGE-TITLE [from LAYOUT-MIXIN] string

The title to display on the page and in the tree. Defaults to (the strings-for-display).


POSSIBLE-NILS [from SKELETON-UI-ELEMENT] list of keyword symbols

Messages corresponding to form fields which could be missing from form submission (e.g. checkbox fields). Defaults to the names of any children or hidden-children of type menu-form-control or checkbox-form-control.


PRESET-ALL? [from SKELETON-UI-ELEMENT] boolean

This switch determines whether all form-controls should be preset before the final setting, in order to allow any interdependencies to be detected for validation or detecting changed values. If this is specified as a non-nil value, then any nil values of (the preset?) on individual form controls will be ignored. If this is specified as nil, then (the preset?) of individual form-controls (default of these is also nil) will be respected. Default is nil.


PROCESS-COOKIES! [from BASE-HTML-SHEET] void

This is an empty function by default, but can be overridden in a user specialization of base-html-sheet, to do some processing before the header-plist is evaluated and before the HTTP response is actually initiated, but after the cookies-received have been set.


RETURN-OBJECT [from BASE-HTML-SHEET] gdl object

Default object to which control will return with the write-back-link method


ROOT [from VANILLA-MIXIN*] gdl instance

The root-level node in this object's ``tree'' (instance hierarchy).


SAFE-CHILDREN [from VANILLA-MIXIN*] list of gdl instances

All objects from the :objects specification, including elements of sequences as flat lists. Any children which throw errors come back as a plist with error information


SHOW-TITLE? [from LAYOUT-MIXIN] boolean

Indicates whether to display the title at the top of the page. Defaults to T.


STANDARD-VIEWS [from BASE-HTML-GRAPHICS-SHEET] plist of keywords and 3d vectors

. Indicates the views to show in the graphics controls.


STRINGS-FOR-DISPLAY [from VANILLA-MIXIN*] string or list of strings

Determines how the name of objects of this type will be printed in most places. This defaults to the name-for-display (generally the part's name as specified in its parent), followed by an index number if the part is an element of a sequence.


TARGET [from BASE-HTML-SHEET] string

Name of a browser frame or window to display this page. Default of NIL indicates to use the same window.


TRANSITORY-SLOTS [from BASE-HTML-SHEET] list of keyword symbols

Messages corresponding to form fields which should not be retained against Updates to the model (e.g. calls to the update! function or hitting the Update button or link in the browser in development mode). Defaults to NIL (the empty list).


TREE-BGCOLOR [from LAYOUT-MIXIN] keyword symbol

Color keyword from *color-table* for the tree area background. Defaults to :aquamarine.


TREE-TITLE [from LAYOUT-MIXIN] string

Title for the Tree section. Defaults to "Assembly Tree" if the tree-root is only a subclass of application-mixin, and "Assembly Tree" if the tree-root is an actual node with child applications.


USE-BSPLINES? [from BASE-HTML-GRAPHICS-SHEET] boolean

Determines whether to use native bspline data in the vrml


VIOLATED-RULES [from LAYOUT-MIXIN] list of gdl objects of type base-rule-object or (preferably) gwl-base-rule-object

. Links to these will be displayed in the other-rules section. Default to the collection of all objects of type base-rule-object from this node in the tree down to the leaves, whose violated? message evaluates to non-NIL.


VIOLATED-RULES-BGCOLOR [from LAYOUT-MIXIN] keyword symbol

Color keyword from *color-table* for the violated-rules area background. Defaults to :aquamarine.


VIOLATED-RULES-TITLE [from LAYOUT-MIXIN] string

Title for the violated-rules section. Defaults to "Violated Rules".


VISIBLE-CHILDREN [from VANILLA-MIXIN*] list of gdl instances

Additional objects to display in Tatu tree. Typically this would be a subset of hidden-children. Defaults to NIL.


WIDTH [from GEOMETRY-VIEW-MIXIN] number

Width of the graphics viewport. Default is 300.



Input Slots (optional, settable)

DIGITATION-MODE [from BASE-HTML-GRAPHICS-SHEET] keyword symbol, one of :zoom-and-center, :report-point, or :measure-distance

.

  • If :zoom-and-center, sets the user-center and user-scale accordingly when graphics area is clicked.
  • If :report-point, the slot digitized-point is set with the x y value.
  • If measure-distance, the slot :digitized-distance is set with the resultant distance.
Default is :zoom-and-center


VIEW [from BASE-HTML-GRAPHICS-SHEET] keyword symbol

Determines the default view from the standard-views. Defaults to :trimetric.


ZOOM-FACTOR [from BASE-HTML-GRAPHICS-SHEET] number

The factor used for zooming in or out.


ZOOM-MODE [from BASE-HTML-GRAPHICS-SHEET] keyword symbol, one of :in, :out, or :none, or nil

If :in, then clicks in the graphics area will increase the zoom factor by (the zoom-factor). If :out, then clicks will decrease the factor by that amount. If :none or nil, then clicks will have no effect.



Input Slots (optional, defaulting)

DISPLAY-CONTROLS [from BASE-OBJECT] plist

May contain keywords and values indicating display characteristics for this object. The following keywords are recognized currently:

:color
color keyword from the *color-table* parameter, or an HTML-style hexidecimal RGB string value, e.g. "#FFFFFF" for pure white. Defaults to :black.
:line-thickness
an integer, defaulting to 1, indicating relative line thickness for wireframe representations of this object.
:dash-pattern
(currently PDF/PNG/JPEG only). This is a list of two or three numbers which indicate the length, in pixels, of the dashes and blank spaces in a dashed line. The optional third number indicates how far into the line or curve to start the dash pattern.


DISPLAY-RULES? [from LAYOUT-MIXIN] boolean

Indicates whether the Rules panel should be displayed. Defaults to T.


DISPLAY-TREE? [from LAYOUT-MIXIN] boolean

Indicates whether the Tree area should be displayed. Defaults to T.


GRAPHICS-HEIGHT [from LAYOUT-MIXIN] integer

Height (top to bottom on screen) in pixels of the graphics area. Defaults to 500.


GRAPHICS-WIDTH [from LAYOUT-MIXIN] integer

Height (left to right on screen) in pixels of the graphics area. Defaults to 500.


RESPONDENT [from SKELETON-UI-ELEMENT] gdl object

Object to respond to the form submission. Defaults to self.


USE-STANDARD-SAVED-SLOTS? [from LAYOUT-MIXIN] boolean

Determines whether the standard-saved-slots are automatically used by default for the saved-slots. This is a trickle-down slot so its value will be passed to descendent objects automatically. The default value is NIL.



Computed Slots

UI-DISPLAY-LIST-LEAVES [from LAYOUT-MIXIN] list of gdl objects

This should be overridden with a list of objects of your choice. These objects (not their leaves, but these actual nodes) will be scaled to fit and displayed in the graphics area. Defaults to NIL.


UI-DISPLAY-LIST-OBJECTS list of gdl object roots

The leaves of these objects will be displayed in the graphics. Defaults to the appended result of children's ui-display-list-objects.


Package Documentation