(FILECREATED "30-Nov-84 10:04:28" {AZTEC}<TRILLIUM>BIRTHDAY84>ITEMTYPES>IDO-DISPLAYER-ITEMTYPES.;1 84640 changes to: (VARS IDO-DISPLAYER-ITEMTYPESCOMS) previous date: "29-Aug-84 15:58:06" {AZTEC}<TRILLIUM>BIRTHDAY84>IDO-DISPLAYER-ITEMTYPES.;1) (PRETTYCOMPRINT IDO-DISPLAYER-ITEMTYPESCOMS) (RPAQQ IDO-DISPLAYER-ITEMTYPESCOMS ((ITEMTYPES COMPOSITE.INDICATOR CONDITIONAL.INDICATOR CQ.CONCEPT LIGHT.BAR.2.DIMENSION LIGHT.BAR.DISCRETE LIGHT.BAR.REGION.W/BKGD LIGHT.BAR.REGION.W/VARIABLE.BKGD PICTURE.VARIABLE.PLACEMENT PICTURE.VARIABLE.PLACEMENT.W/BKGD QS.ANIMATION SCALE.W/INDICATOR TEXTURED.LIGHT VARIABLE.INDICATOR VARIABLE.PICTURE.VARIABLE.PLACEMENT.W/BKGD) (P (COMPILE.INTERNAL.FNS.IF.NECESSARY)))) (READ.ITEMTYPE COMPOSITE.INDICATOR 5) (\TYPE ITEM.TYPE NAME COMPOSITE.INDICATOR COMMENT "A dynamic collage that allows several indicator, looking at several cells, and are combined using any of the BITBLT operations" KIND DISPLAYER PARAMETERS ((\TYPE PARAMETER NAME PLACEMENT TYPE (POSITION) DEFAULT (100 . 100) COMMENT "The position of the left-hand corner of the background bitmap") (\TYPE PARAMETER NAME BACKGROUND.PICTURE TYPE (BITMAP.NAME) DEFAULT NIL COMMENT "A picture that is the static background -- If NIL, the background is white") (\TYPE PARAMETER NAME CELLS TYPE (LIST (CELL)) DEFAULT (CELL.1 CELL.2) COMMENT "The cells that the indicators display") (\TYPE PARAMETER NAME LIST.OF.INDICATORS TYPE (LIST (STRUCTURE ((BITMAP (BITMAP.NAME)) (OFFSET (POSITION)) (BITBLT.OPERATION (ONEOF (REPLACE PAINT INVERT ERASE))) (CONDITION.EXPRESSION (FORM)) ))) DEFAULT ((EXAMPLE.BITMAP (5 . 5) PAINT (EQUAL CELL.1 4)) (SIMPLE.BUTTON.BITMAP (10 . 10) INVERT (EQUAL CELL.2 3))) COMMENT "A list of bitmaps, with their offsets and respective BITBLT operations. The bitmaps are laid down in the order specified by the list. The condition.expression for each bitmap is evaluated, and if the value is True (non-NIL), the indicator is displayed using it's BITBLT.Operation" )) OTHER (FNS ((SHOW SHOW.COMPOSITE.INDICATOR) (DISPLAY DISPLAY.COMPOSITE.INDICATOR) (BOUNDING.BOX BOUNDING.BOX.COMPOSITE.INDICATOR))) CLASSES (DISPLAYER)) (DEFINEQ (SHOW.COMPOSITE.INDICATOR [LAMBDA (ITEM) (* KKM "17-NOV-83 17:47") NIL]) (DISPLAY.COMPOSITE.INDICATOR [LAMBDA (ITEM FRAME) (* edited: "26-Aug-84 16:06") (PROG ((BOUNDING.BOX (GET.PARAMQ ITEM BOUNDING.BOX COMPOSITE.INDICATOR)) (POSITION (GET.PARAMQ ITEM PLACEMENT)) (BACKGROUND.BITMAP (GET.PARAMQ ITEM BACKGROUND.PICTURE)) (LIST.OF.INDICATORS (GET.PARAMQ ITEM LIST.OF.INDICATORS)) X Y REGION.WIDTH REGION.HEIGHT X.OFFSET Y.OFFSET SCRATCH.BITMAP CELLS CELL.VALUES) (SETQ BACKGROUND.BITMAP (AND BACKGROUND.BITMAP (FIND.BITMAP))) (SETQ X (fetch (REGION LEFT) of BOUNDING.BOX)) (SETQ Y (fetch (REGION BOTTOM) of BOUNDING.BOX)) (SETQ X.OFFSET (IDIFFERENCE X (fetch (POSITION XCOORD) of POSITION))) (SETQ Y.OFFSET (IDIFFERENCE Y (fetch (POSITION YCOORD) of POSITION))) [SETQ SCRATCH.BITMAP (BITMAPCREATE (SETQ REGION.WIDTH (fetch (REGION WIDTH) of BOUNDING.BOX) ) (SETQ REGION.HEIGHT (fetch (REGION HEIGHT) of BOUNDING.BOX] (AND BACKGROUND.BITMAP (BITBLT BACKGROUND.BITMAP 0 0 SCRATCH.BITMAP 0 0 NIL NIL (QUOTE INPUT) (QUOTE REPLACE) BLACKSHADE)) (SETQ CELLS (GET.PARAMQ ITEM CELLS)) [SETQ CELL.VALUES (for CELL in CELLS collect (CONS CELL (GET.CURRENT.VALUE CELL] [for INDICATOR in LIST.OF.INDICATORS do (COND ((EVALA (CADDDR INDICATOR) CELL.VALUES) (BITBLT (FIND.BITMAP (CAR INDICATOR)) 0 0 SCRATCH.BITMAP (IDIFFERENCE (CAADR INDICATOR) X.OFFSET) (IDIFFERENCE (CDADR INDICATOR) Y.OFFSET) NIL NIL (QUOTE INPUT) (CADDR INDICATOR) BLACKSHADE] (BITBLT SCRATCH.BITMAP 0 0 CURRENT.DSP X Y REGION.WIDTH REGION.HEIGHT (QUOTE INPUT) (QUOTE REPLACE]) (BOUNDING.BOX.COMPOSITE.INDICATOR [LAMBDA (ITEM) (* edited: "26-Aug-84 16:06") (PROG ((LIST.OF.INDICATORS (GET.PARAMQ ITEM LIST.OF.INDICATORS COMPOSITE.INDICATOR)) (BACKGROUND.BITMAP (GET.PARAMQ ITEM BACKGROUND.PICTURE)) (PLACEMENT (GET.PARAMQ ITEM PLACEMENT)) X Y MINLEFT MINBOTTOM MAXRIGHT MAXTOP BOX POINT) [SETQ BACKGROUND.BITMAP (COND (BACKGROUND.BITMAP (FIND.BITMAP BACKGROUND.BITMAP] (SETQ MINLEFT (SETQ X (fetch (POSITION XCOORD) of PLACEMENT))) (SETQ MINBOTTOM (SETQ Y (fetch (POSITION YCOORD) of PLACEMENT))) (SETQ MAXRIGHT (COND (BACKGROUND.BITMAP (IPLUS X (fetch (BITMAP BITMAPWIDTH) of BACKGROUND.BITMAP))) (T X))) (SETQ MAXTOP (COND (BACKGROUND.BITMAP (IPLUS Y (fetch (BITMAP BITMAPHEIGHT) of BACKGROUND.BITMAP))) (T Y))) [for INDICATOR in LIST.OF.INDICATORS bind (LEFT BOTTOM RIGHT TOP BITMAP) do (SETQ BITMAP (FIND.BITMAP (CAR INDICATOR))) [COND ((COND ([IGREATERP MINLEFT (SETQ LEFT (IPLUS X (CAADR INDICATOR] (SETQ MINLEFT LEFT] (COND ([IGREATERP MINBOTTOM (SETQ BOTTOM (IPLUS Y (CDADR INDICATOR] (SETQ MINBOTTOM BOTTOM))) (COND ((IGREATERP (SETQ RIGHT (IPLUS LEFT (fetch (BITMAP BITMAPWIDTH) of BITMAP))) MAXRIGHT) (SETQ MAXRIGHT RIGHT))) (COND ((IGREATERP (SETQ TOP (IPLUS BOTTOM (fetch (BITMAP BITMAPHEIGHT) of BITMAP))) MAXTOP) (SETQ MAXTOP TOP] (RETURN (create REGION LEFT ← MINLEFT BOTTOM ← MINBOTTOM WIDTH ←(IDIFFERENCE MAXRIGHT MINLEFT) HEIGHT ←(IDIFFERENCE MAXTOP MINBOTTOM]) ) (READ.ITEMTYPE CONDITIONAL.INDICATOR 5) (\TYPE ITEM.TYPE NAME CONDITIONAL.INDICATOR COMMENT "A bitmap which gets INVERTed into the frame based on the value of a conditional expression" KIND DISPLAYER PARAMETERS ((\TYPE PARAMETER NAME PLACEMENT TYPE (POSITION) DEFAULT (100 . 100) COMMENT "The lower left corner of the bitmap") (\TYPE PARAMETER NAME BITMAP TYPE (BITMAP.NAME) DEFAULT SIMPLE.BUTTON.BITMAP COMMENT "The bitmap") (\TYPE PARAMETER NAME ON-COLOR TYPE (COLOR.NAME) DEFAULT BLACK COMMENT "The color of the indicator when on") (\TYPE PARAMETER NAME OFF-COLOR TYPE ( COLOR.NAME) DEFAULT WHITE COMMENT "The color of the indicator when off") (\TYPE PARAMETER NAME CELLS TYPE (LIST (CELL)) DEFAULT (CELL.1) COMMENT "The cell whose value the light displays") (\TYPE PARAMETER NAME CONDITION TYPE (FORM) DEFAULT T COMMENT "The expression to determine if the indicator is on")) OTHER (FNS ((BOUNDING.BOX BOUNDING.BOX.CONDITIONAL.INDICATOR) (SHOW SHOW.CONDITIONAL.INDICATOR) (DISPLAY DISPLAY.CONDITIONAL.INDICATOR))) CLASSES (DISPLAYER)) (DEFINEQ (BOUNDING.BOX.CONDITIONAL.INDICATOR [LAMBDA (ITEM) (* edited: "26-Aug-84 16:08") (PROG ((BITMAP (GET.PARAMQ ITEM BITMAP CONDITIONAL.INDICATOR)) POS) (OR (BITMAPP BITMAP) (SETQ BITMAP (FIND.BITMAP BITMAP))) (SETQ POS (GET.PARAMQ ITEM PLACEMENT)) (RETURN (LIST (fetch (POSITION XCOORD) of POS) (fetch (POSITION YCOORD) of POS) (fetch (BITMAP BITMAPWIDTH) of BITMAP) (fetch (BITMAP BITMAPHEIGHT) of BITMAP]) (SHOW.CONDITIONAL.INDICATOR [LAMBDA (ITEM) (* edited: "26-Aug-84 16:08") (SET.PARAMQ ITEM ON/OFF (QUOTE OFF) CONDITIONAL.INDICATOR]) (DISPLAY.CONDITIONAL.INDICATOR [LAMBDA (ITEM FRAME) (* edited: "26-Aug-84 16:09") (PROG (BITMAP CELLS CONDITION POSITION T1 T2 ON-COLOR OFF-COLOR) (SETQ POSITION (GET.PARAMQ ITEM PLACEMENT CONDITIONAL.INDICATOR)) (SETQ BITMAP (GET.PARAMQ ITEM BITMAP)) (OR (BITMAPP BITMAP) (SETQ BITMAP (FIND.BITMAP BITMAP))) (SETQ CELLS (GET.PARAMQ ITEM CELLS)) (SETQ CONDITION (GET.PARAMQ ITEM CONDITION)) [SETQ T1 (EVALA CONDITION (for CELL in CELLS collect (CONS CELL (GET.CURRENT.VALUE CELL] (SETQ T2 (EQ (GET.PARAMQ ITEM ON/OFF) (QUOTE ON))) (SETQ ON-COLOR (GET.PARAMQ ITEM ON-COLOR)) (SETQ OFF-COLOR (GET.PARAMQ ITEM OFF-COLOR)) (COND [(AND T1 (NOT T2)) (* TURN IT ON) (SET.PARAMQ ITEM ON/OFF (QUOTE ON)) (COND ((AND (EQ ON-COLOR (QUOTE BLACK)) (EQ OFF-COLOR (QUOTE WHITE))) (* FLIP IT) (SHOW.COLORED.BITMAP BITMAP POSITION NIL (QUOTE INPUT) (QUOTE INVERT) NIL (QUOTE BLACK) (QUOTE WHITE))) (T (* SET IT ON) (SHOW.COLORED.BITMAP BITMAP POSITION NIL (QUOTE INPUT) (QUOTE PAINT) NIL ON-COLOR (QUOTE CLEAR] ((AND T2 (NOT T1)) (* TURN IT OFF) (SET.PARAMQ ITEM ON/OFF (QUOTE OFF)) (COND ((AND (EQ ON-COLOR (QUOTE BLACK)) (EQ OFF-COLOR (QUOTE WHITE))) (* FLIP IT) (SHOW.COLORED.BITMAP BITMAP POSITION NIL (QUOTE INPUT) (QUOTE INVERT) NIL (QUOTE BLACK) (QUOTE WHITE))) (T (* SET IT OFF) (SHOW.COLORED.BITMAP BITMAP POSITION NIL (QUOTE INPUT) (QUOTE PAINT) NIL OFF-COLOR (QUOTE CLEAR]) ) (READ.ITEMTYPE CQ.CONCEPT 5) (\TYPE ITEM.TYPE NAME CQ.CONCEPT COMMENT "A highly specialized itemtype for a particular Copy Quality concept" KIND DISPLAYER PARAMETERS (( \TYPE PARAMETER NAME PLACEMENT TYPE (POSITION) DEFAULT (100 . 100) COMMENT "The placement of the lower left corner") (\TYPE PARAMETER NAME CELLS TYPE (STRUCTURE (( DARKNESS.CELL (CELL)) (CONTRAST.CELL (CELL)))) DEFAULT (DARKNESS CONTRAST) COMMENT "A list of cells (DARKNESS CONTRAST) whose values are reflected by the window in the region") (\TYPE PARAMETER NAME MINIMUM.DARKNESS TYPE (INTEGER) DEFAULT 1 COMMENT "The minimum value (vertical position)") (\TYPE PARAMETER NAME MAXIMUM.DARKNESS TYPE (INTEGER) DEFAULT 7 COMMENT "The maximum value (vertical position)") (\TYPE PARAMETER NAME BACKGROUND.BITMAP TYPE (BITMAP.NAME) DEFAULT EXAMPLE.BITMAP COMMENT "The background picture to be displayed") (\TYPE PARAMETER NAME LINE.THICKNESS TYPE (INTEGER) DEFAULT 3 COMMENT "The width of the lines") (\TYPE PARAMETER NAME SEGMENT.HEIGHT TYPE (INTEGER) DEFAULT 30 COMMENT "The height in pixels of each segment") (\TYPE PARAMETER NAME LEFT.BLOCK.WIDTH TYPE (INTEGER) DEFAULT 40 COMMENT "The width in pixels of the left (darkness) side of the block")) OTHER (FNS (( BOUNDING.BOX BOUNDING.BOX.CQ.CONCEPT) (SHOW SHOW.CQ.CONCEPT) (DISPLAY DISPLAY.CQ.CONCEPT))) CLASSES (DISPLAYER)) (DEFINEQ (BOUNDING.BOX.CQ.CONCEPT [LAMBDA (ITEM) (* edited: "26-Aug-84 16:10") (* (KKM) "11-FEB-83 10:26") (PROG ((BITMAP (GET.PARAMQ ITEM BACKGROUND.BITMAP CQ.CONCEPT)) POS) (OR (BITMAPP BITMAP) (SETQ BITMAP (FIND.BITMAP BITMAP))) (SETQ POS (GET.PARAMQ ITEM PLACEMENT)) (RETURN (LIST (fetch (POSITION XCOORD) of POS) (fetch (POSITION YCOORD) of POS) (fetch (BITMAP BITMAPWIDTH) of BITMAP) (fetch (BITMAP BITMAPHEIGHT) of BITMAP]) (SHOW.CQ.CONCEPT [LAMBDA (ITEM) (* edited: "14-MAY-82 11:44") NIL]) (DISPLAY.CQ.CONCEPT [LAMBDA (ITEM FRAME) (* edited: "26-Aug-84 16:12") (PROG (CELLS DARKNESS CONTRAST POS BITMAP MIN MAX X Y WIDTH HEIGHT SEGMENT.HEIGHT BLOCK.WIDTH THICKNESS DARKNESS.HEIGHT HALF.CONTRAST HALF.CONTRAST.HEIGHT BOTTOM.EDGE.HEIGHT TOP.DARKNESS.HEIGHT TOP.HEIGHT TOP.EDGE) (SETQ POS (GET.PARAMQ ITEM PLACEMENT CQ.CONCEPT)) (SETQ MIN (GET.PARAMQ ITEM MINIMUM.DARKNESS)) (SETQ MAX (GET.PARAMQ ITEM MAXIMUM.DARKNESS)) (SETQ CELLS (GET.PARAMQ ITEM CELLS)) (SETQ DARKNESS (IDIFFERENCE (GET.CURRENT.VALUE (CAR CELLS)) MIN)) (SETQ CONTRAST (GET.CURRENT.VALUE (CADR CELLS))) (SETQ SEGMENT.HEIGHT (GET.PARAMQ ITEM SEGMENT.HEIGHT)) (SETQ BLOCK.WIDTH (GET.PARAMQ ITEM LEFT.BLOCK.WIDTH)) (SETQ THICKNESS (GET.PARAMQ ITEM LINE.THICKNESS)) (SETQ BITMAP (GET.PARAMQ ITEM BACKGROUND.BITMAP)) [SETQ BITMAP (BITMAPCOPY (OR (BITMAPP BITMAP) (FIND.BITMAP BITMAP] (SETQ WIDTH (fetch (BITMAP BITMAPWIDTH) of BITMAP)) (SETQ HEIGHT (fetch (BITMAP BITMAPHEIGHT) of BITMAP)) (SETQ X (fetch (POSITION XCOORD) of POS)) (SETQ Y (fetch (POSITION YCOORD) of POS)) (SETQ DARKNESS.HEIGHT (ITIMES DARKNESS SEGMENT.HEIGHT)) (SETQ HALF.CONTRAST (RSH (SUB1 CONTRAST) 1)) [SETQ BOTTOM.EDGE.HEIGHT (MAX 0 (IDIFFERENCE DARKNESS.HEIGHT (SETQ HALF.CONTRAST.HEIGHT (ITIMES HALF.CONTRAST SEGMENT.HEIGHT] (SETQ TOP.DARKNESS.HEIGHT (ITIMES (ADD1 DARKNESS) SEGMENT.HEIGHT)) (SETQ TOP.HEIGHT (MIN (IDIFFERENCE HEIGHT TOP.DARKNESS.HEIGHT) HALF.CONTRAST.HEIGHT)) (SETQ TOP.EDGE (IDIFFERENCE (IPLUS TOP.DARKNESS.HEIGHT TOP.HEIGHT) THICKNESS)) (BITBLT NIL 0 0 BITMAP 0 DARKNESS.HEIGHT THICKNESS SEGMENT.HEIGHT (QUOTE TEXTURE) (QUOTE PAINT) 65535) (BITBLT NIL 0 0 BITMAP 0 DARKNESS.HEIGHT (IPLUS BLOCK.WIDTH THICKNESS) THICKNESS (QUOTE TEXTURE) (QUOTE PAINT) 65535) (BITBLT NIL 0 0 BITMAP 0 (MIN (IDIFFERENCE TOP.DARKNESS.HEIGHT THICKNESS) (IDIFFERENCE HEIGHT THICKNESS)) (IPLUS BLOCK.WIDTH THICKNESS) THICKNESS (QUOTE TEXTURE) (QUOTE PAINT) 65535) (BITBLT NIL 0 0 BITMAP BLOCK.WIDTH BOTTOM.EDGE.HEIGHT THICKNESS (IDIFFERENCE DARKNESS.HEIGHT BOTTOM.EDGE.HEIGHT) (QUOTE TEXTURE) (QUOTE PAINT) 65535) (BITBLT NIL 0 0 BITMAP BLOCK.WIDTH TOP.DARKNESS.HEIGHT THICKNESS TOP.HEIGHT (QUOTE TEXTURE) (QUOTE PAINT) 65535) (BITBLT NIL 0 0 BITMAP BLOCK.WIDTH BOTTOM.EDGE.HEIGHT (IDIFFERENCE WIDTH BLOCK.WIDTH) THICKNESS (QUOTE TEXTURE) (QUOTE PAINT) 65535) (BITBLT NIL 0 0 BITMAP BLOCK.WIDTH TOP.EDGE (IDIFFERENCE WIDTH BLOCK.WIDTH) THICKNESS (QUOTE TEXTURE) (QUOTE PAINT) 65535) (BITBLT NIL 0 0 BITMAP (IDIFFERENCE WIDTH THICKNESS) BOTTOM.EDGE.HEIGHT THICKNESS (IPLUS (IDIFFERENCE TOP.EDGE BOTTOM.EDGE.HEIGHT) THICKNESS) (QUOTE TEXTURE) (QUOTE PAINT) 65535) (BITBLT BITMAP 0 0 CURRENT.DSP X Y WIDTH HEIGHT (QUOTE INPUT) (QUOTE REPLACE]) ) (READ.ITEMTYPE LIGHT.BAR.2.DIMENSION 5) (\TYPE ITEM.TYPE NAME LIGHT.BAR.2.DIMENSION COMMENT "A two-dimensional light.bar whose region on the screen is affected by the value of 4 cells" KIND DISPLAYER PARAMETERS ((\TYPE PARAMETER NAME PLACEMENT TYPE (REGION) DEFAULT (100 100 30 30) COMMENT "The region which the item fills") (\TYPE PARAMETER NAME CELLS TYPE (STRUCTURE ((TOP.CELL (CELL) ) (BOTTOM.CELL (CELL)) (LEFT.CELL (CELL)) (RIGHT.CELL (CELL)))) DEFAULT (CELL.1 CELL.2 CELL.3 CELL.4) COMMENT "A list of cells (TOP BOTTOM LEFT RIGHT) whose values are reflected by the window in the region") ( \TYPE PARAMETER NAME HORIZONTAL.MINIMUM TYPE (INTEGER) DEFAULT 1 COMMENT "The minimum value to be indicated in the horizontal direction") (\TYPE PARAMETER NAME HORIZONTAL.MAXIMUM TYPE (INTEGER) DEFAULT 10 COMMENT "The maximum value to be indicated in the horizontal direction") (\TYPE PARAMETER NAME VERTICAL.MINIMUM TYPE (INTEGER) DEFAULT 1 COMMENT "The minimum value to be indicated in the vertical direction") (\TYPE PARAMETER NAME VERTICAL.MAXIMUM TYPE (INTEGER) DEFAULT 10 COMMENT "The maximum value to be indicated in the vertical direction") ( \TYPE PARAMETER NAME WINDOW.OPERATION TYPE (ONEOF (REPLACE PAINT INVERT ERASE)) DEFAULT REPLACE COMMENT "Operation for BITBLT for window area of region") (\TYPE PARAMETER NAME WINDOW.TEXTURE TYPE (SHADE) DEFAULT 0 COMMENT "Texture for BITBLT for window area of region") (\TYPE PARAMETER NAME MARGIN.OPERATION TYPE (ONEOF (REPLACE PAINT INVERT ERASE)) DEFAULT REPLACE COMMENT "Operation for BITBLT for margin portion of region") (\TYPE PARAMETER NAME MARGIN.TEXTURE TYPE ( SHADE) DEFAULT 43605 COMMENT "Texture for BITBLT for margin portion of region") (\TYPE PARAMETER NAME BORDER.THICKNESS TYPE (INTEGER) DEFAULT 2 COMMENT "The width of the border seperating the window and the margin") (\TYPE PARAMETER NAME BORDER.OPERATION TYPE (ONEOF (REPLACE PAINT INVERT ERASE)) DEFAULT REPLACE COMMENT "The BITBLT operation for the border") (\TYPE PARAMETER NAME BORDER.TEXTURE TYPE (SHADE) DEFAULT 65535 COMMENT "Texture for the border seperating the window from the margin")) OTHER (FNS ((SHOW SHOW.LIGHT.BAR.2.DIMENSION) (DISPLAY DISPLAY.LIGHT.BAR.2.DIMENSION))) CLASSES (DISPLAYER)) (DEFINEQ (SHOW.LIGHT.BAR.2.DIMENSION [LAMBDA (ITEM) (* edited: "14-MAY-82 11:44") NIL]) (DISPLAY.LIGHT.BAR.2.DIMENSION [LAMBDA (ITEM FRAME) (* edited: "26-Aug-84 16:14") (PROG (CELLS CURRENT.TOP CURRENT.BOTTOM CURRENT.LEFT CURRENT.RIGHT REGION HMAX HMIN VMAX VMIN X Y WIDTH HEIGHT VSCALE HSCALE VSTEPS HSTEPS HEIGHT.BOTTOM Y.MIDDLE HEIGHT.MIDDLE X.MIDDLE X.RIGHT WIDTH.LEFT WIDTH.MIDDLE Y.TOP WINDOW.OPERATION WINDOW.TEXTURE MARGIN.OPERATION MARGIN.TEXTURE BORDER.THICKNESS BORDER.OPERATION BORDER.TEXTURE) (SETQ REGION (GET.PARAMQ ITEM PLACEMENT LIGHT.BAR.2.DIMENSION)) (SETQ HMIN (GET.PARAMQ ITEM HORIZONTAL.MINIMUM)) (SETQ HMAX (GET.PARAMQ ITEM HORIZONTAL.MAXIMUM)) (SETQ VMIN (GET.PARAMQ ITEM VERTICAL.MINIMUM)) (SETQ VMAX (GET.PARAMQ ITEM VERTICAL.MAXIMUM)) (SETQ CELLS (GET.PARAMQ ITEM CELLS)) (SETQ CURRENT.TOP (IDIFFERENCE (GET.CURRENT.VALUE (CAR CELLS)) VMIN)) (SETQ CURRENT.BOTTOM (IDIFFERENCE (GET.CURRENT.VALUE (CADR CELLS)) VMIN)) (SETQ CURRENT.LEFT (IDIFFERENCE (GET.CURRENT.VALUE (CADDR CELLS)) HMIN)) (SETQ CURRENT.RIGHT (IDIFFERENCE (GET.CURRENT.VALUE (CADDDR CELLS)) HMIN)) (SETQ WINDOW.OPERATION (GET.PARAMQ ITEM WINDOW.OPERATION)) (SETQ WINDOW.TEXTURE (GET.PARAMQ ITEM WINDOW.TEXTURE)) (SETQ MARGIN.OPERATION (GET.PARAMQ ITEM MARGIN.OPERATION)) (SETQ MARGIN.TEXTURE (GET.PARAMQ ITEM MARGIN.TEXTURE)) (SETQ BORDER.THICKNESS (GET.PARAMQ ITEM BORDER.THICKNESS)) (SETQ BORDER.OPERATION (GET.PARAMQ ITEM BORDER.OPERATION)) (SETQ BORDER.TEXTURE (GET.PARAMQ ITEM BORDER.TEXTURE)) (SETQ WIDTH (fetch (REGION WIDTH) of REGION)) (SETQ HEIGHT (fetch (REGION HEIGHT) of REGION)) (SETQ X (fetch (REGION LEFT) of REGION)) (SETQ Y (fetch (REGION BOTTOM) of REGION)) (SETQ VSTEPS (IDIFFERENCE VMAX VMIN)) (SETQ VSCALE (FQUOTIENT HEIGHT VSTEPS)) (SETQ HSTEPS (IDIFFERENCE HMAX HMIN)) (SETQ HSCALE (FQUOTIENT WIDTH HSTEPS)) (SETQ HEIGHT.BOTTOM (FIX (PLUS (TIMES VSCALE CURRENT.BOTTOM) .99))) (SETQ Y.MIDDLE (IPLUS Y HEIGHT.BOTTOM)) (SETQ HEIGHT.MIDDLE (FIX (PLUS (TIMES VSCALE (IDIFFERENCE VSTEPS (IPLUS CURRENT.TOP CURRENT.BOTTOM))) .99))) (SETQ WIDTH.LEFT (FIX (PLUS (TIMES HSCALE CURRENT.LEFT) .99))) (SETQ WIDTH.MIDDLE (FIX (PLUS (TIMES HSCALE (IDIFFERENCE (IDIFFERENCE HSTEPS CURRENT.LEFT) CURRENT.RIGHT)) .99))) (SETQ X.MIDDLE (IPLUS X WIDTH.LEFT)) (SETQ X.RIGHT (IPLUS X (IPLUS WIDTH.LEFT WIDTH.MIDDLE))) (SETQ Y.TOP (IPLUS Y.MIDDLE HEIGHT.MIDDLE)) (* Display the Bottom region) (OR (EQ CURRENT.BOTTOM 0) (BITBLT NIL 0 0 CURRENT.DSP X Y WIDTH HEIGHT.BOTTOM (QUOTE TEXTURE) MARGIN.OPERATION MARGIN.TEXTURE REGION)) (* Display the Left region) (OR (EQ CURRENT.LEFT 0) (BITBLT NIL 0 0 CURRENT.DSP X Y.MIDDLE WIDTH.LEFT HEIGHT.MIDDLE (QUOTE TEXTURE) MARGIN.OPERATION MARGIN.TEXTURE REGION)) (* Display the Right region) (OR (EQ CURRENT.RIGHT 0) (BITBLT NIL 0 0 CURRENT.DSP X.RIGHT Y.MIDDLE (ADD1 (IDIFFERENCE WIDTH (IPLUS WIDTH.LEFT WIDTH.MIDDLE))) HEIGHT.MIDDLE (QUOTE TEXTURE) MARGIN.OPERATION MARGIN.TEXTURE REGION)) (* Display the Top region) (OR (EQ CURRENT.TOP 0) (BITBLT NIL 0 0 CURRENT.DSP X Y.TOP WIDTH (ADD1 (IDIFFERENCE HEIGHT (IPLUS HEIGHT.BOTTOM HEIGHT.MIDDLE))) (QUOTE TEXTURE) MARGIN.OPERATION MARGIN.TEXTURE REGION)) (COND ((AND (ILESSP (IPLUS CURRENT.TOP CURRENT.BOTTOM) VSTEPS) (ILESSP (IPLUS CURRENT.RIGHT CURRENT.LEFT) HSTEPS)) (* Display the window) (BITBLT NIL 0 0 CURRENT.DSP X.MIDDLE Y.MIDDLE WIDTH.MIDDLE HEIGHT.MIDDLE (QUOTE TEXTURE) WINDOW.OPERATION WINDOW.TEXTURE REGION) (* Display the border ontop of the window) (BITBLT NIL 0 0 CURRENT.DSP X.MIDDLE Y.MIDDLE BORDER.THICKNESS HEIGHT.MIDDLE (QUOTE TEXTURE) BORDER.OPERATION BORDER.TEXTURE REGION) (BITBLT NIL 0 0 CURRENT.DSP (IDIFFERENCE X.RIGHT BORDER.THICKNESS) Y.MIDDLE BORDER.THICKNESS HEIGHT.MIDDLE (QUOTE TEXTURE) BORDER.OPERATION BORDER.TEXTURE REGION) (BITBLT NIL 0 0 CURRENT.DSP X.MIDDLE Y.MIDDLE WIDTH.MIDDLE BORDER.THICKNESS (QUOTE TEXTURE) BORDER.OPERATION BORDER.TEXTURE REGION) (BITBLT NIL 0 0 CURRENT.DSP X.MIDDLE (SUB1 (IDIFFERENCE Y.TOP BORDER.THICKNESS)) WIDTH.MIDDLE BORDER.THICKNESS (QUOTE TEXTURE) BORDER.OPERATION BORDER.TEXTURE REGION]) ) (READ.ITEMTYPE LIGHT.BAR.DISCRETE 5) (\TYPE ITEM.TYPE NAME LIGHT.BAR.DISCRETE COMMENT "A bar of gray which varies in length on the value of a cell" KIND DISPLAYER PARAMETERS ((\TYPE PARAMETER NAME PLACEMENT TYPE (REGION) DEFAULT (100 100 30 30) COMMENT "The region which the bar fills") (\TYPE PARAMETER NAME CELL TYPE (CELL) DEFAULT CELL.1 COMMENT "The cell whose value the light/bar indicates") (\TYPE PARAMETER NAME MINIMUM.VALUE TYPE (INTEGER) DEFAULT 1 COMMENT "The minimum value to be indicated") (\TYPE PARAMETER NAME MAXIMUM.VALUE TYPE ( INTEGER) DEFAULT 10 COMMENT "The maximum value to be indicated") (\TYPE PARAMETER NAME DIRECTION TYPE (ONEOF (LEFT RIGHT BOTTOM TOP)) DEFAULT BOTTOM COMMENT "The side of the rectangle corresponding to the minimum value") (\TYPE PARAMETER NAME SPACING TYPE ( INTEGER) DEFAULT 2 COMMENT "Spacing between elements in screen points") (\TYPE PARAMETER NAME ELEMENTS TYPE (INTEGER) DEFAULT 1 COMMENT "The number of active elements") (\TYPE PARAMETER NAME SOURCE TYPE (ONEOF (INPUT INVERT MERGE TEXTURE)) DEFAULT INPUT COMMENT "Source for BITBLT") (\TYPE PARAMETER NAME OPERATION TYPE (ONEOF (REPLACE PAINT INVERT ERASE)) DEFAULT REPLACE COMMENT "Operation for BITBLT") (\TYPE PARAMETER NAME TEXTURE TYPE (SHADE) DEFAULT 65535 COMMENT "Texture for BITBLT") (\TYPE PARAMETER NAME BACKOP TYPE (ONEOF (REPLACE PAINT INVERT ERASE)) DEFAULT ERASE COMMENT "Operation for erasing the bar graph") (\TYPE PARAMETER NAME BACKSHADE TYPE ( SHADE) DEFAULT 65535 COMMENT "Texture used to erase the Bar Graph")) OTHER (FNS ((SHOW SHOW.LIGHT.BAR.DISCRETE) (DISPLAY DISPLAY.LIGHT.BAR.DISCRETE))) CLASSES (DISPLAYER)) (DEFINEQ (SHOW.LIGHT.BAR.DISCRETE [LAMBDA (ITEM) (* edited: "26-Aug-84 16:16") (PROG (MIN MAX LENGTH BOTTOM ORG.MAP HEIGHT WIDTH REGION OPERATION TEXTURE RANGE DIRECTION SPACING) (SETQ SPACING (GET.PARAMQ ITEM SPACING LIGHT.BAR.DISCRETE)) (SETQ REGION (GET.PARAMQ ITEM PLACEMENT LIGHT.BAR.DISCRETE)) (SETQ MIN (GET.PARAMQ ITEM MINIMUM.VALUE LIGHT.BAR.DISCRETE)) (SETQ OPERATION (GET.PARAMQ ITEM OPERATION LIGHT.BAR.DISCRETE)) (SETQ DIRECTION (GET.PARAMQ ITEM DIRECTION LIGHT.BAR.DISCRETE)) (SETQ TEXTURE (GET.PARAMQ ITEM TEXTURE LIGHT.BAR.DISCRETE)) (SETQ MAX (GET.PARAMQ ITEM MAXIMUM.VALUE LIGHT.BAR.DISCRETE)) (SETQ HEIGHT (fetch (REGION HEIGHT) of REGION)) (SETQ WIDTH (fetch (REGION WIDTH) of REGION)) (SETQ ORG.MAP (BITMAPCREATE WIDTH HEIGHT)) (SETQ RANGE (SUB1 (IDIFFERENCE MAX MIN))) (SELECTQ DIRECTION ((BOTTOM TOP) (SETQ LENGTH (IQUOTIENT HEIGHT (IDIFFERENCE MAX MIN))) (for I from 0 to RANGE do (BITBLT NIL 0 0 ORG.MAP 0 (ITIMES I LENGTH) WIDTH (IDIFFERENCE LENGTH SPACING) (QUOTE TEXTURE) OPERATION TEXTURE))) ((LEFT RIGHT) (SETQ WIDTH (IQUOTIENT WIDTH (IDIFFERENCE MAX MIN))) (for I from 0 to RANGE do (BITBLT NIL 0 0 ORG.MAP (ITIMES I WIDTH) 0 (IDIFFERENCE WIDTH SPACING) HEIGHT (QUOTE TEXTURE) OPERATION TEXTURE))) NIL) (SET.PARAMQ ITEM ORG.MAP ORG.MAP DISCRETE.LIGHT.BAR]) (DISPLAY.LIGHT.BAR.DISCRETE [LAMBDA (ITEM FRAME) (* edited: "26-Aug-84 16:17") (PROG (CURRENT.VALUE REGION SPACING MAX MIN DIRECTION SOURCE OPERATION TEXTURE LENGTH ILENGTH ORG.MAP BOTTOM MAXLEN ESHADE EOP ELEMENTS SEGLENGTH START.POINT) (SETQ REGION (GET.PARAMQ ITEM PLACEMENT LIGHT.BAR.DISCRETE)) (SETQ MIN (GET.PARAMQ ITEM MINIMUM.VALUE)) (SETQ MAX (IDIFFERENCE (GET.PARAMQ ITEM MAXIMUM.VALUE) MIN)) (SETQ MIN 0) (SETQ ELEMENTS (GET.PARAMQ ITEM ELEMENTS)) (SETQ CURRENT.VALUE (GET.CURRENT.VALUE (GET.PARAMQ ITEM CELL))) (SETQ START.POINT (MAX (IDIFFERENCE CURRENT.VALUE ELEMENTS) MIN)) (SETQ START.POINT (MIN START.POINT MAX)) (SETQ CURRENT.VALUE (MAX CURRENT.VALUE MIN)) (SETQ CURRENT.VALUE (MIN MAX CURRENT.VALUE)) (* MIN MAX & CURRENT; DE-REFERENCED *) (SETQ ORG.MAP (GET.PARAMQ ITEM ORG.MAP)) (SETQ SPACING (GET.PARAMQ ITEM SPACING)) (SETQ BOTTOM (fetch (REGION BOTTOM) of REGION)) (SETQ DIRECTION (GET.PARAMQ ITEM DIRECTION)) (SETQ ESHADE (GET.PARAMQ ITEM BACKSHADE)) (SETQ EOP (GET.PARAMQ ITEM BACKOP)) (SETQ SEGLENGTH (SELECTQ DIRECTION ((LEFT RIGHT) (IQUOTIENT (fetch (REGION WIDTH) of REGION) MAX)) ((TOP BOTTOM) (IQUOTIENT (fetch (REGION HEIGHT) of REGION) MAX)) (TROUBLE.WITH.TRILLIUM "Unrecognized DIRECTION" DIRECTION))) (SETQ OPERATION (GET.PARAMQ ITEM OPERATION)) (SETQ TEXTURE (GET.PARAMQ ITEM TEXTURE)) (SETQ ILENGTH (ITIMES (IDIFFERENCE CURRENT.VALUE START.POINT) SEGLENGTH)) (SETQ MAXLEN (ITIMES SEGLENGTH MAX)) (SELECTQ DIRECTION (LEFT (BITBLT NIL 0 0 CURRENT.DSP (fetch (REGION LEFT) of REGION) BOTTOM MAXLEN (fetch (REGION HEIGHT) of REGION) (QUOTE TEXTURE) EOP ESHADE) (BITBLT ORG.MAP 0 0 CURRENT.DSP (IPLUS (ITIMES SEGLENGTH START.POINT) (fetch (REGION LEFT) of REGION)) BOTTOM ILENGTH (fetch (REGION HEIGHT) of REGION) (QUOTE INPUT) (QUOTE PAINT) TEXTURE)) (RIGHT (BITBLT NIL 0 0 CURRENT.DSP (fetch (REGION LEFT) of REGION) BOTTOM MAXLEN (fetch (REGION HEIGHT) of REGION) (QUOTE TEXTURE) EOP ESHADE) (BITBLT ORG.MAP 0 0 CURRENT.DSP (IPLUS (ITIMES SEGLENGTH (IDIFFERENCE MAX CURRENT.VALUE)) (fetch (REGION LEFT) of REGION)) BOTTOM ILENGTH (fetch (REGION HEIGHT) of REGION) (QUOTE INPUT) (QUOTE PAINT) TEXTURE)) (TOP (BITBLT NIL 0 0 CURRENT.DSP (fetch (REGION LEFT) of REGION) BOTTOM (fetch (REGION WIDTH) of REGION) MAXLEN (QUOTE TEXTURE) EOP ESHADE) (BITBLT ORG.MAP 0 0 CURRENT.DSP (fetch (REGION LEFT) of REGION) (IPLUS BOTTOM (ITIMES SEGLENGTH (IDIFFERENCE MAX CURRENT.VALUE))) (fetch (REGION WIDTH) of REGION) ILENGTH (QUOTE INPUT) (QUOTE PAINT) TEXTURE)) (BOTTOM (BITBLT NIL 0 0 CURRENT.DSP (fetch (REGION LEFT) of REGION) BOTTOM (fetch (REGION WIDTH) of REGION) MAXLEN (QUOTE TEXTURE) EOP ESHADE) (BITBLT ORG.MAP 0 0 CURRENT.DSP (fetch (REGION LEFT) of REGION) (IPLUS BOTTOM (ITIMES SEGLENGTH START.POINT)) (fetch (REGION WIDTH) of REGION) ILENGTH (QUOTE INPUT) (QUOTE PAINT) TEXTURE)) (TROUBLE.WITH.TRILLIUM "Unrecognized DIRECTION" DIRECTION]) ) (READ.ITEMTYPE LIGHT.BAR.REGION.W/BKGD 5) (\TYPE ITEM.TYPE NAME LIGHT.BAR.REGION.W/BKGD COMMENT "A two-dimensional light bar with a bacground picture" KIND DISPLAYER PARAMETERS ((\TYPE PARAMETER NAME PLACEMENT TYPE (POSITION) DEFAULT (100 . 100) COMMENT "The placement of the lower left corner" ) (\TYPE PARAMETER NAME CELLS TYPE (STRUCTURE ((TOP.CELL (CELL)) (BOTTOM.CELL (CELL)) ( LEFT.CELL (CELL)) (RIGHT.CELL (CELL)))) DEFAULT (CELL.1 CELL.2 CELL.3 CELL.4) COMMENT "A list of cells (TOP BOTTOM LEFT RIGHT) whose values are reflected by the window in the region") ( \TYPE PARAMETER NAME HORIZONTAL.MINIMUM TYPE (INTEGER) DEFAULT 1 COMMENT "The minimum value to be indicated in the horizontal direction") (\TYPE PARAMETER NAME HORIZONTAL.MAXIMUM TYPE (INTEGER) DEFAULT 10 COMMENT "The maximum value to be indicated in the horizontal direction") (\TYPE PARAMETER NAME VERTICAL.MINIMUM TYPE (INTEGER) DEFAULT 1 COMMENT "The minimum value to be indicated in the vertical direction") (\TYPE PARAMETER NAME VERTICAL.MAXIMUM TYPE (INTEGER) DEFAULT 10 COMMENT "The maximum value to be indicated in the vertical direction") ( \TYPE PARAMETER NAME BACKGROUND.BITMAP TYPE (BITMAP.NAME) DEFAULT EXAMPLE.BITMAP COMMENT "The background picture to be displayed") (\TYPE PARAMETER NAME WINDOW.OPERATION TYPE (ONEOF ( REPLACE PAINT INVERT ERASE)) DEFAULT PAINT COMMENT "Operation for BITBLT for window area of region") (\TYPE PARAMETER NAME WINDOW.TEXTURE TYPE (SHADE) DEFAULT 0 COMMENT "Texture for BITBLT for window area of region") (\TYPE PARAMETER NAME MARGIN.OPERATION TYPE (ONEOF (REPLACE PAINT INVERT ERASE)) DEFAULT REPLACE COMMENT "Operation for BITBLT for margin portion of region") (\TYPE PARAMETER NAME MARGIN.TEXTURE TYPE ( SHADE) DEFAULT 65535 COMMENT "Texture for BITBLT for margin portion of region") (\TYPE PARAMETER NAME BORDER.THICKNESS TYPE (INTEGER) DEFAULT 2 COMMENT "The width of the border seperating the window and the margin") (\TYPE PARAMETER NAME BORDER.OPERATION TYPE (ONEOF (REPLACE PAINT INVERT ERASE)) DEFAULT REPLACE COMMENT "The BITBLT operation for the border") (\TYPE PARAMETER NAME BORDER.TEXTURE TYPE (SHADE) DEFAULT 65535 COMMENT "Texture for the border seperating the window from the margin")) OTHER (FNS (( BOUNDING.BOX BOUNDING.BOX.LIGHT.BAR.REGION.W/BKGD) (SHOW SHOW.LIGHT.BAR.REGION.W/BKGD) (DISPLAY DISPLAY.LIGHT.BAR.REGION.W/BKGD))) CLASSES (DISPLAYER)) (DEFINEQ (BOUNDING.BOX.LIGHT.BAR.REGION.W/BKGD [LAMBDA (ITEM) (* edited: "26-Aug-84 16:19") (* (KKM) "11-FEB-83 10:26") (PROG ((BITMAP (GET.PARAMQ ITEM BACKGROUND.BITMAP LIGHT.BAR.REGION.W/BKGD)) POS) (OR (BITMAPP BITMAP) (SETQ BITMAP (FIND.BITMAP BITMAP))) (SETQ POS (GET.PARAMQ ITEM PLACEMENT)) (RETURN (LIST (fetch (POSITION XCOORD) of POS) (fetch (POSITION YCOORD) of POS) (fetch (BITMAP BITMAPWIDTH) of BITMAP) (fetch (BITMAP BITMAPHEIGHT) of BITMAP]) (SHOW.LIGHT.BAR.REGION.W/BKGD [LAMBDA (ITEM) (* edited: "14-MAY-82 11:44") NIL]) (DISPLAY.LIGHT.BAR.REGION.W/BKGD [LAMBDA (ITEM FRAME) (* edited: "26-Aug-84 16:21") (PROG (CELLS CURRENT.TOP CURRENT.BOTTOM CURRENT.LEFT CURRENT.RIGHT POS BITMAP HMAX HMIN VMAX VMIN X Y WIDTH HEIGHT VSCALE HSCALE VSTEPS HSTEPS Y.MIDDLE HEIGHT.MIDDLE X.LEFT WIDTH.RIGHT X.RIGHT Y.TOP WIDTH.MIDDLE WINDOW.OPERATION WINDOW.TEXTURE MARGIN.OPERATION MARGIN.TEXTURE BORDER.THICKNESS BORDER.OPERATION BORDER.TEXTURE HALF.BORDER Y.MIDDLE.LESS.BORDER) (SETQ POS (GET.PARAMQ ITEM PLACEMENT LIGHT.BAR.REGION.W/BKGD)) (SETQ HMIN (GET.PARAMQ ITEM HORIZONTAL.MINIMUM)) (SETQ HMAX (GET.PARAMQ ITEM HORIZONTAL.MAXIMUM)) (SETQ VMIN (GET.PARAMQ ITEM VERTICAL.MINIMUM)) (SETQ VMAX (GET.PARAMQ ITEM VERTICAL.MAXIMUM)) (SETQ CELLS (GET.PARAMQ ITEM CELLS)) (SETQ CURRENT.TOP (IDIFFERENCE (GET.CURRENT.VALUE (CAR CELLS)) VMIN)) (SETQ CURRENT.BOTTOM (IDIFFERENCE (GET.CURRENT.VALUE (CADR CELLS)) VMIN)) (SETQ CURRENT.LEFT (IDIFFERENCE (GET.CURRENT.VALUE (CADDR CELLS)) HMIN)) (SETQ CURRENT.RIGHT (IDIFFERENCE (GET.CURRENT.VALUE (CADDDR CELLS)) HMIN)) (SETQ WINDOW.OPERATION (GET.PARAMQ ITEM WINDOW.OPERATION)) (SETQ WINDOW.TEXTURE (GET.PARAMQ ITEM WINDOW.TEXTURE)) (SETQ MARGIN.OPERATION (GET.PARAMQ ITEM MARGIN.OPERATION)) (SETQ MARGIN.TEXTURE (GET.PARAMQ ITEM MARGIN.TEXTURE)) (SETQ BORDER.THICKNESS (GET.PARAMQ ITEM BORDER.THICKNESS)) (SETQ BORDER.OPERATION (GET.PARAMQ ITEM BORDER.OPERATION)) (SETQ BORDER.TEXTURE (GET.PARAMQ ITEM BORDER.TEXTURE)) (SETQ BITMAP (GET.PARAMQ ITEM BACKGROUND.BITMAP)) [SETQ BITMAP (BITMAPCOPY (OR (BITMAPP BITMAP) (FIND.BITMAP BITMAP] (SETQ WIDTH (fetch (BITMAP BITMAPWIDTH) of BITMAP)) (SETQ HEIGHT (fetch (BITMAP BITMAPHEIGHT) of BITMAP)) (SETQ X (fetch (POSITION XCOORD) of POS)) (SETQ Y (fetch (POSITION YCOORD) of POS)) (SETQ VSTEPS (IDIFFERENCE VMAX VMIN)) (SETQ VSCALE (FQUOTIENT HEIGHT VSTEPS)) (SETQ HSTEPS (IDIFFERENCE HMAX HMIN)) (SETQ HSCALE (FQUOTIENT WIDTH HSTEPS)) (SETQ Y.MIDDLE (FIX (PLUS (TIMES VSCALE CURRENT.BOTTOM) .99))) (SETQ HEIGHT.MIDDLE (FIX (PLUS (TIMES VSCALE (IDIFFERENCE VSTEPS (IPLUS CURRENT.TOP CURRENT.BOTTOM))) .99))) (SETQ X.LEFT (FIX (PLUS (TIMES HSCALE CURRENT.LEFT) .99))) (SETQ WIDTH.RIGHT (FIX (PLUS (TIMES HSCALE CURRENT.RIGHT) .99))) (SETQ X.RIGHT (IDIFFERENCE WIDTH WIDTH.RIGHT)) (SETQ WIDTH.MIDDLE (IDIFFERENCE X.RIGHT X.LEFT)) (SETQ Y.TOP (IPLUS Y.MIDDLE HEIGHT.MIDDLE)) (SETQ HALF.BORDER (IQUOTIENT BORDER.THICKNESS 2)) (SETQ Y.MIDDLE.LESS.BORDER (IDIFFERENCE Y.MIDDLE HALF.BORDER)) (OR (EQ CURRENT.BOTTOM 0) (BITBLT NIL 0 0 BITMAP 0 0 WIDTH Y.MIDDLE (QUOTE TEXTURE) MARGIN.OPERATION MARGIN.TEXTURE)) (OR (EQ CURRENT.LEFT 0) (BITBLT NIL 0 0 BITMAP 0 Y.MIDDLE X.LEFT HEIGHT.MIDDLE (QUOTE TEXTURE) MARGIN.OPERATION MARGIN.TEXTURE)) (OR (EQ CURRENT.RIGHT 0) (BITBLT NIL 0 0 BITMAP X.RIGHT Y.MIDDLE WIDTH.RIGHT HEIGHT.MIDDLE (QUOTE TEXTURE) MARGIN.OPERATION MARGIN.TEXTURE)) (OR (EQ CURRENT.TOP 0) (BITBLT NIL 0 0 BITMAP 0 Y.TOP WIDTH (FIX (PLUS (TIMES VSCALE CURRENT.TOP) .99)) (QUOTE TEXTURE) MARGIN.OPERATION MARGIN.TEXTURE)) (COND ((AND (ILESSP (IPLUS CURRENT.TOP CURRENT.BOTTOM) VSTEPS) (ILESSP (IPLUS CURRENT.RIGHT CURRENT.LEFT) HSTEPS)) (BITBLT NIL 0 0 BITMAP X.LEFT Y.MIDDLE WIDTH.MIDDLE HEIGHT.MIDDLE (QUOTE TEXTURE) WINDOW.OPERATION WINDOW.TEXTURE) (BITBLT NIL 0 0 BITMAP (IDIFFERENCE X.LEFT HALF.BORDER) Y.MIDDLE.LESS.BORDER BORDER.THICKNESS (IPLUS HEIGHT.MIDDLE BORDER.THICKNESS) (QUOTE TEXTURE) BORDER.OPERATION BORDER.TEXTURE) (BITBLT NIL 0 0 BITMAP (IDIFFERENCE X.RIGHT HALF.BORDER) Y.MIDDLE.LESS.BORDER BORDER.THICKNESS (IPLUS HEIGHT.MIDDLE BORDER.THICKNESS) (QUOTE TEXTURE) BORDER.OPERATION BORDER.TEXTURE) (BITBLT NIL 0 0 BITMAP X.LEFT Y.MIDDLE.LESS.BORDER WIDTH.MIDDLE BORDER.THICKNESS (QUOTE TEXTURE) BORDER.OPERATION BORDER.TEXTURE) (BITBLT NIL 0 0 BITMAP X.LEFT (IDIFFERENCE Y.TOP HALF.BORDER) WIDTH.MIDDLE BORDER.THICKNESS (QUOTE TEXTURE) BORDER.OPERATION BORDER.TEXTURE))) (BITBLT BITMAP 0 0 CURRENT.DSP X Y NIL NIL (QUOTE INPUT) (QUOTE REPLACE]) ) (READ.ITEMTYPE LIGHT.BAR.REGION.W/VARIABLE.BKGD 5) (\TYPE ITEM.TYPE NAME LIGHT.BAR.REGION.W/VARIABLE.BKGD COMMENT "A two-dimensional light bar whose background is the value of a cell" KIND DISPLAYER PARAMETERS (( \TYPE PARAMETER NAME PLACEMENT TYPE (POSITION) DEFAULT (100 . 100) COMMENT "The placement of the lower left corner") (\TYPE PARAMETER NAME CELLS TYPE (STRUCTURE (( BACKGROUND.CELL (CELL)) (TOP.CELL (CELL)) (BOTTOM.CELL (CELL)) (LEFT.CELL (CELL)) (RIGHT.CELL (CELL)))) DEFAULT (CELL.1 CELL.2 CELL.3 CELL.4 CELL.5) COMMENT "A list of cells (BACKGROUND TOP BOTTOM LEFT RIGHT) whose values affect the item") (\TYPE PARAMETER NAME BITMAPS TYPE (LIST (STRUCTURE ((BITMAP (BITMAP.NAME)) (VALUE (CONSTANT))))) DEFAULT (( OFFPAGE.BUTTON.BITMAP VALUE.1) (SIMPLE.BUTTON.BITMAP VALUE.2) (EXTERNAL.BUTTON.BITMAP VALUE.3)) COMMENT "A list of bitmap/reference.value pairs for the background") (\TYPE PARAMETER NAME ALIGNMENT TYPE (ONEOF (CENTER LOWER.LEFT LOWER.RIGHT UPPER.LEFT UPPER.RIGHT)) DEFAULT LOWER.LEFT COMMENT "The point of alignment for the background bitmaps") (\TYPE PARAMETER NAME DIVISION.CHOICE TYPE ( ONEOF (#PIXELS.PER.DIVISION #DIVISIONS.OVER.TOTAL.DIMENSION)) DEFAULT #DIVISIONS.OVER.TOTAL.DIMENSION COMMENT "The minimum value to be indicated in the horizontal direction") (\TYPE PARAMETER NAME HORIZONTAL.MINIMUM TYPE (INTEGER) DEFAULT 0 COMMENT "The minimum value to be indicated in the horizontal direction") (\TYPE PARAMETER NAME HORIZONTAL.DIVISION TYPE (INTEGER) DEFAULT 10 COMMENT "Either the number of pixels per division OR the number of divisions over the total dimension") ( \TYPE PARAMETER NAME VERTICAL.MINIMUM TYPE (INTEGER) DEFAULT 0 COMMENT "The minimum value to be indicated in the vertical direction") (\TYPE PARAMETER NAME VERTICAL.DIVISION TYPE (INTEGER) DEFAULT 10 COMMENT "Either the number of pixels per division OR the number of divisions over the total dimension") ( \TYPE PARAMETER NAME WINDOW.OPERATION TYPE (ONEOF (REPLACE PAINT INVERT ERASE)) DEFAULT PAINT COMMENT "Operation for BITBLT for window area of region") (\TYPE PARAMETER NAME WINDOW.TEXTURE TYPE (SHADE) DEFAULT 0 COMMENT "Texture for BITBLT for window area of region") (\TYPE PARAMETER NAME MARGIN.OPERATION TYPE (ONEOF (REPLACE PAINT INVERT ERASE)) DEFAULT REPLACE COMMENT "Operation for BITBLT for margin portion of region") (\TYPE PARAMETER NAME MARGIN.TEXTURE TYPE ( SHADE) DEFAULT 65535 COMMENT "Texture for BITBLT for margin portion of region") (\TYPE PARAMETER NAME BORDER.THICKNESS TYPE (INTEGER) DEFAULT 2 COMMENT "The width of the border seperating the window and the margin") (\TYPE PARAMETER NAME BORDER.OPERATION TYPE (ONEOF (REPLACE PAINT INVERT ERASE)) DEFAULT REPLACE COMMENT "The BITBLT operation for the border") (\TYPE PARAMETER NAME BORDER.TEXTURE TYPE (SHADE) DEFAULT 65535 COMMENT "Texture for the border seperating the window from the margin")) OTHER (FNS (( BOUNDING.BOX BOUNDING.BOX.LIGHT.BAR.REGION.W/VARIABLE.BKGD) (SHOW SHOW.LIGHT.BAR.REGION.W/VARIABLE.BKGD) (DISPLAY DISPLAY.LIGHT.BAR.REGION.W/VARIABLE.BKGD))) CLASSES (DISPLAYER)) (DEFINEQ (BOUNDING.BOX.LIGHT.BAR.REGION.W/VARIABLE.BKGD [LAMBDA (ITEM) (* edited: "26-Aug-84 16:28") (PROG ((BITMAPS (GET.PARAMQ ITEM BITMAPS LIGHT.BAR.REGION.W/VARIABLE.BKGD)) POS (MAX.WIDTH 0) (MAX.HEIGHT 0)) (SETQ POS (GET.PARAMQ ITEM PLACEMENT)) [for ENTRY in BITMAPS bind BITMAP do [SETQ MAX.WIDTH (MAX MAX.WIDTH (fetch (BITMAP BITMAPWIDTH) of (SETQ BITMAP (FIND.BITMAP (CAR ENTRY] (SETQ MAX.HEIGHT (MAX MAX.HEIGHT (fetch (BITMAP BITMAPHEIGHT) of BITMAP] (RETURN (LIST (fetch (POSITION XCOORD) of POS) (fetch (POSITION YCOORD) of POS) MAX.WIDTH MAX.HEIGHT]) (SHOW.LIGHT.BAR.REGION.W/VARIABLE.BKGD [LAMBDA (ITEM) (* edited: "26-Aug-84 16:29") (SET.PARAMQ ITEM OLD.BITMAP NIL LIGHT.BAR.REGION.W/VARIABLE.BACKGROUND) (SET.PARAMQ ITEM OLD.POSITION NIL]) (DISPLAY.LIGHT.BAR.REGION.W/VARIABLE.BKGD [LAMBDA (ITEM FRAME) (* edited: "26-Aug-84 16:30") (PROG (CELLS CURRENT.BACKGROUND CURRENT.TOP CURRENT.BOTTOM CURRENT.LEFT CURRENT.RIGHT POS OLD.POS BITMAP BITMAPS OLD.BITMAP DIVISION.CHOICE HMAX HMIN VMAX VMIN X Y WIDTH HEIGHT VSCALE HSCALE VSTEPS HSTEPS Y.MIDDLE HEIGHT.MIDDLE X.LEFT WIDTH.RIGHT X.RIGHT Y.TOP WIDTH.MIDDLE WINDOW.OPERATION WINDOW.TEXTURE MARGIN.OPERATION MARGIN.TEXTURE BORDER.THICKNESS BORDER.OPERATION BORDER.TEXTURE HALF.BORDER Y.MIDDLE.LESS.BORDER) (SETQ CELLS (GET.PARAMQ ITEM CELLS LIGHT.BAR.REGION.W/VARIABLE.BKGD)) (SETQ CURRENT.BACKGROUND (GET.CURRENT.VALUE (CAR CELLS))) (SETQ BITMAPS (GET.PARAMQ ITEM BITMAPS)) [SETQ BITMAP (for BITMAP in BITMAPS do (RETURN (CAR BITMAP)) when (EQUAL CURRENT.BACKGROUND (CADR BITMAP] [SETQ BITMAP (BITMAPCOPY (OR (BITMAPP BITMAP) (FIND.BITMAP BITMAP] (SETQ WIDTH (fetch (BITMAP BITMAPWIDTH) of BITMAP)) (SETQ HEIGHT (fetch (BITMAP BITMAPHEIGHT) of BITMAP)) (SETQ POS (TRANSLATE (GET.PARAMQ ITEM PLACEMENT) (SELECTQ (GET.PARAMQ ITEM ALIGNMENT) (CENTER (VECTOR/TIMES (BITMAP/DIAGONAL BITMAP) -.5)) (LOWER.LEFT (CONS 0 0)) (LOWER.RIGHT (CONS (MINUS WIDTH) 0)) (UPPER.LEFT (CONS 0 (MINUS HEIGHT))) (UPPER.RIGHT (VECTOR/TIMES (BITMAP/DIAGONAL (FIND.BITMAP BITMAP)) -1)) NIL))) (SETQ DIVISION.CHOICE (GET.PARAMQ ITEM DIVISION.CHOICE)) (SETQ HMIN (GET.PARAMQ ITEM HORIZONTAL.MINIMUM)) (SETQ HMAX (ADD1 (IPLUS (COND ((EQ DIVISION.CHOICE (QUOTE #PIXELS.PER.DIVISION)) (IQUOTIENT WIDTH (GET.PARAMQ ITEM HORIZONTAL.DIVISION))) (T (GET.PARAMQ ITEM HORIZONTAL.DIVISION))) HMIN))) (SETQ VMIN (GET.PARAMQ ITEM VERTICAL.MINIMUM)) (SETQ VMAX (ADD1 (IPLUS (COND ((EQ DIVISION.CHOICE (QUOTE #PIXELS.PER.DIVISION)) (IQUOTIENT HEIGHT (GET.PARAMQ ITEM VERTICAL.DIVISION))) (T (GET.PARAMQ ITEM VERTICAL.DIVISION))) VMIN))) (SETQ CURRENT.TOP (IDIFFERENCE (GET.CURRENT.VALUE (CADR CELLS)) VMIN)) (SETQ CURRENT.BOTTOM (IDIFFERENCE (GET.CURRENT.VALUE (CADDR CELLS)) VMIN)) (SETQ CURRENT.LEFT (IDIFFERENCE (GET.CURRENT.VALUE (CADDDR CELLS)) HMIN)) (SETQ CURRENT.RIGHT (IDIFFERENCE (GET.CURRENT.VALUE (CAR (NTH CELLS 5))) HMIN)) (SETQ WINDOW.OPERATION (GET.PARAMQ ITEM WINDOW.OPERATION)) (SETQ WINDOW.TEXTURE (GET.PARAMQ ITEM WINDOW.TEXTURE)) (SETQ MARGIN.OPERATION (GET.PARAMQ ITEM MARGIN.OPERATION)) (SETQ MARGIN.TEXTURE (GET.PARAMQ ITEM MARGIN.TEXTURE)) (SETQ BORDER.THICKNESS (GET.PARAMQ ITEM BORDER.THICKNESS)) (SETQ BORDER.OPERATION (GET.PARAMQ ITEM BORDER.OPERATION)) (SETQ BORDER.TEXTURE (GET.PARAMQ ITEM BORDER.TEXTURE)) (SETQ OLD.BITMAP (GET.PARAMQ ITEM OLD.BITMAP)) (SETQ OLD.POS (GET.PARAMQ ITEM OLD.POSITION)) (SETQ X (fetch (POSITION XCOORD) of POS)) (SETQ Y (fetch (POSITION YCOORD) of POS)) (SETQ VSTEPS (IDIFFERENCE VMAX VMIN)) (SETQ VSCALE (FQUOTIENT HEIGHT VSTEPS)) (SETQ HSTEPS (IDIFFERENCE HMAX HMIN)) (SETQ HSCALE (FQUOTIENT WIDTH HSTEPS)) (SETQ Y.MIDDLE (FIX (PLUS (TIMES VSCALE CURRENT.BOTTOM) .99))) (SETQ HEIGHT.MIDDLE (FIX (PLUS (TIMES VSCALE (IDIFFERENCE VSTEPS (IPLUS CURRENT.TOP CURRENT.BOTTOM))) .99))) (SETQ X.LEFT (FIX (PLUS (TIMES HSCALE CURRENT.LEFT) .99))) (SETQ WIDTH.RIGHT (FIX (PLUS (TIMES HSCALE CURRENT.RIGHT) .99))) (SETQ X.RIGHT (IDIFFERENCE WIDTH WIDTH.RIGHT)) (SETQ WIDTH.MIDDLE (IDIFFERENCE X.RIGHT X.LEFT)) (SETQ Y.TOP (IPLUS Y.MIDDLE HEIGHT.MIDDLE)) (SETQ HALF.BORDER (IQUOTIENT BORDER.THICKNESS 2)) (SETQ Y.MIDDLE.LESS.BORDER (IDIFFERENCE Y.MIDDLE HALF.BORDER)) (* If the background is different, white-out the area of the old bitmap first) (COND ((AND OLD.BITMAP (NOT (EQUAL OLD.BITMAP BITMAP))) (BITBLT OLD.BITMAP 0 0 CURRENT.DSP (fetch (POSITION XCOORD) of OLD.POS) (fetch (POSITION YCOORD) of OLD.POS) (fetch (BITMAP BITMAPWIDTH) of OLD.BITMAP) (fetch (BITMAP BITMAPHEIGHT) of OLD.BITMAP) (QUOTE TEXTURE) (QUOTE REPLACE) WHITESHADE))) (SET.PARAMQ ITEM OLD.BITMAP BITMAP) (SET.PARAMQ ITEM OLD.POSITION POS) (OR (EQ CURRENT.BOTTOM 0) (BITBLT NIL 0 0 BITMAP 0 0 WIDTH Y.MIDDLE (QUOTE TEXTURE) MARGIN.OPERATION MARGIN.TEXTURE)) (OR (EQ CURRENT.LEFT 0) (BITBLT NIL 0 0 BITMAP 0 Y.MIDDLE X.LEFT HEIGHT.MIDDLE (QUOTE TEXTURE) MARGIN.OPERATION MARGIN.TEXTURE)) (OR (EQ CURRENT.RIGHT 0) (BITBLT NIL 0 0 BITMAP X.RIGHT Y.MIDDLE WIDTH.RIGHT HEIGHT.MIDDLE (QUOTE TEXTURE) MARGIN.OPERATION MARGIN.TEXTURE)) (OR (EQ CURRENT.TOP 0) (BITBLT NIL 0 0 BITMAP 0 Y.TOP WIDTH (FIX (PLUS (TIMES VSCALE CURRENT.TOP) .99)) (QUOTE TEXTURE) MARGIN.OPERATION MARGIN.TEXTURE)) (COND ((AND (ILESSP (IPLUS CURRENT.TOP CURRENT.BOTTOM) VSTEPS) (ILESSP (IPLUS CURRENT.RIGHT CURRENT.LEFT) HSTEPS)) (BITBLT NIL 0 0 BITMAP X.LEFT Y.MIDDLE WIDTH.MIDDLE HEIGHT.MIDDLE (QUOTE TEXTURE) WINDOW.OPERATION WINDOW.TEXTURE) (BITBLT NIL 0 0 BITMAP (IDIFFERENCE X.LEFT HALF.BORDER) Y.MIDDLE.LESS.BORDER BORDER.THICKNESS (IPLUS HEIGHT.MIDDLE BORDER.THICKNESS) (QUOTE TEXTURE) BORDER.OPERATION BORDER.TEXTURE) (BITBLT NIL 0 0 BITMAP (IDIFFERENCE X.RIGHT HALF.BORDER) Y.MIDDLE.LESS.BORDER BORDER.THICKNESS (IPLUS HEIGHT.MIDDLE BORDER.THICKNESS) (QUOTE TEXTURE) BORDER.OPERATION BORDER.TEXTURE) (BITBLT NIL 0 0 BITMAP X.LEFT Y.MIDDLE.LESS.BORDER WIDTH.MIDDLE BORDER.THICKNESS (QUOTE TEXTURE) BORDER.OPERATION BORDER.TEXTURE) (BITBLT NIL 0 0 BITMAP X.LEFT (IDIFFERENCE Y.TOP HALF.BORDER) WIDTH.MIDDLE BORDER.THICKNESS (QUOTE TEXTURE) BORDER.OPERATION BORDER.TEXTURE))) (BITBLT BITMAP 0 0 CURRENT.DSP X Y NIL NIL (QUOTE INPUT) (QUOTE REPLACE]) ) (READ.ITEMTYPE PICTURE.VARIABLE.PLACEMENT 5) (\TYPE ITEM.TYPE NAME PICTURE.VARIABLE.PLACEMENT COMMENT "A two-dimensional light.bar whose region on the screen is affected by the value of 4 cells" KIND DISPLAYER PARAMETERS ((\TYPE PARAMETER NAME PLACEMENT TYPE (REGION) DEFAULT (100 100 100 100) COMMENT "The region which the item fills") (\TYPE PARAMETER NAME CELLS TYPE (STRUCTURE (( HORIZONTAL.POSITION (CELL)) (VERTICAL.POSITION (CELL)))) DEFAULT (CELL.1 CELL.2) COMMENT "A pair of cells (HORIZONTAL VERTICAL) that determine the position of the picture on the background") (\TYPE PARAMETER NAME HORIZONTAL.MINIMUM TYPE (INTEGER) DEFAULT 1 COMMENT "The minimum value to be indicated in the horizontal direction") (\TYPE PARAMETER NAME HORIZONTAL.MAXIMUM TYPE (INTEGER) DEFAULT 10 COMMENT "The maximum value to be indicated in the horizontal direction") (\TYPE PARAMETER NAME VERTICAL.MINIMUM TYPE (INTEGER) DEFAULT 1 COMMENT "The minimum value to be indicated in the vertical direction") (\TYPE PARAMETER NAME VERTICAL.MAXIMUM TYPE (INTEGER) DEFAULT 10 COMMENT "The maximum value to be indicated in the vertical direction") ( \TYPE PARAMETER NAME PICTURE TYPE (BITMAP.NAME) DEFAULT SIMPLE.BUTTON.BITMAP COMMENT "The picture to be move within the region") (\TYPE PARAMETER NAME OPERATION TYPE (ONEOF (REPLACE PAINT INVERT ERASE)) DEFAULT REPLACE COMMENT "Operation for BITBLT for window area of region") ( \TYPE PARAMETER NAME BACKGROUND.TEXTURE TYPE (SHADE) DEFAULT 0 COMMENT "Texture for BITBLT for window area of region")) OTHER (FNS ((SHOW SHOW.PICTURE.VARIABLE.PLACEMENT) (DISPLAY DISPLAY.PICTURE.VARIABLE.PLACEMENT))) CLASSES (DISPLAYER)) (DEFINEQ (SHOW.PICTURE.VARIABLE.PLACEMENT [LAMBDA (ITEM) (* edited: "26-Aug-84 16:31") (SET.PARAMQ ITEM OLD.X -1 PICTURE.VARIABLE.PLACEMENT) (SET.PARAMQ ITEM OLD.Y -1]) (DISPLAY.PICTURE.VARIABLE.PLACEMENT [LAMBDA (ITEM FRAME) (* edited: "26-Aug-84 16:32") (PROG (REGION LEFT BOTTOM WIDTH HEIGHT HMIN HMAX VMIN VMAX CELLS CURRENT.X CURRENT.Y OLD.X OLD.Y OPERATION BACKGROUND.TEXTURE BITMAP BITMAP.WIDTH BITMAP.HEIGHT) (SETQ REGION (GET.PARAMQ ITEM PLACEMENT PICTURE.VARIABLE.PLACEMENT)) (SETQ LEFT (fetch (REGION LEFT) of REGION)) (SETQ BOTTOM (fetch (REGION BOTTOM) of REGION)) (SETQ WIDTH (fetch (REGION WIDTH) of REGION)) (SETQ HEIGHT (fetch (REGION HEIGHT) of REGION)) (SETQ HMIN (GET.PARAMQ ITEM HORIZONTAL.MINIMUM)) (SETQ HMAX (GET.PARAMQ ITEM HORIZONTAL.MAXIMUM)) (SETQ VMIN (GET.PARAMQ ITEM VERTICAL.MINIMUM)) (SETQ VMAX (GET.PARAMQ ITEM VERTICAL.MAXIMUM)) (SETQ CELLS (GET.PARAMQ ITEM CELLS)) (SETQ CURRENT.X (IDIFFERENCE (GET.CURRENT.VALUE (CAR CELLS)) HMIN)) (SETQ CURRENT.Y (IDIFFERENCE (GET.CURRENT.VALUE (CADR CELLS)) VMIN)) (* Originally written to save the old position and only redisplay that portion of the region. Changed because of difficulty in aligning texture of portion) (* (SETQ OLD.X (GET.PARAMQ ITEM OLD.X)) (SETQ OLD.Y (GET.PARAMQ ITEM OLD.Y))) (SETQ OPERATION (GET.PARAMQ ITEM OPERATION)) (SETQ BACKGROUND.TEXTURE (GET.PARAMQ ITEM BACKGROUND.TEXTURE)) (SETQ BITMAP (FIND.BITMAP (GET.PARAMQ ITEM PICTURE))) (SETQ BITMAP.WIDTH (fetch (BITMAP BITMAPWIDTH) of BITMAP)) (SETQ BITMAP.HEIGHT (fetch (BITMAP BITMAPHEIGHT) of BITMAP)) (* (COND ((ILESSP OLD.X 0) (* start from scratch) (BITBLT NIL 0 0 CURRENT.DSP LEFT BOTTOM WIDTH HEIGHT (QUOTE TEXTURE) (QUOTE REPLACE) BACKGROUND.TEXTURE)) (T (* restore old position) (BITBLT BITMAP 0 0 CURRENT.DSP (IPLUS LEFT (TIMES OLD.X (FQUOTIENT WIDTH (IDIFFERENCE HMAX HMIN)))) (IPLUS BOTTOM (TIMES OLD.Y (FQUOTIENT HEIGHT (IDIFFERENCE HMAX HMIN)))) BITMAP.WIDTH BITMAP.HEIGHT (QUOTE TEXTURE) (QUOTE REPLACE) BACKGROUND.TEXTURE REGION)))) (BITBLT NIL 0 0 CURRENT.DSP LEFT BOTTOM WIDTH HEIGHT (QUOTE TEXTURE) (QUOTE REPLACE) BACKGROUND.TEXTURE) (BITBLT BITMAP 0 0 CURRENT.DSP [IPLUS LEFT (TIMES CURRENT.X (FQUOTIENT (IDIFFERENCE WIDTH BITMAP.WIDTH) (IDIFFERENCE HMAX HMIN] [IPLUS BOTTOM (TIMES CURRENT.Y (FQUOTIENT (IDIFFERENCE HEIGHT BITMAP.HEIGHT) (IDIFFERENCE HMAX HMIN] BITMAP.WIDTH BITMAP.HEIGHT (QUOTE INPUT) OPERATION NIL REGION) (* (SET.PARAMQ ITEM OLD.X CURRENT.X) (SET.PARAMQ ITEM OLD.Y CURRENT.Y)) ]) ) (READ.ITEMTYPE PICTURE.VARIABLE.PLACEMENT.W/BKGD 5) (\TYPE ITEM.TYPE NAME PICTURE.VARIABLE.PLACEMENT.W/BKGD COMMENT "A moveable picture with a second picture for its background." KIND DISPLAYER PARAMETERS ((\TYPE PARAMETER NAME PLACEMENT TYPE (POSITION) DEFAULT (100 . 100) COMMENT "The position of the left-hand corner of the background bitmap") (\TYPE PARAMETER NAME CELLS TYPE ( STRUCTURE ((HORIZONTAL.POSITION (CELL)) (VERTICAL.POSITION (CELL)))) DEFAULT (CELL.1 CELL.2) COMMENT "A pair of cells (HORIZONTAL VERTICAL) that determine the position of the picture on the background") (\TYPE PARAMETER NAME HORIZONTAL.MINIMUM TYPE (INTEGER) DEFAULT 1 COMMENT "The minimum value to be indicated in the horizontal direction") (\TYPE PARAMETER NAME HORIZONTAL.MAXIMUM TYPE (INTEGER) DEFAULT 10 COMMENT "The maximum value to be indicated in the horizontal direction") (\TYPE PARAMETER NAME VERTICAL.MINIMUM TYPE (INTEGER) DEFAULT 1 COMMENT "The minimum value to be indicated in the vertical direction") (\TYPE PARAMETER NAME VERTICAL.MAXIMUM TYPE (INTEGER) DEFAULT 10 COMMENT "The maximum value to be indicated in the vertical direction") ( \TYPE PARAMETER NAME PICTURE TYPE (BITMAP.NAME) DEFAULT SIMPLE.BUTTON.BITMAP COMMENT "The picture to be moved within the region") (\TYPE PARAMETER NAME BACKGROUND.PICTURE TYPE ( BITMAP.NAME) DEFAULT EXAMPLE.BITMAP COMMENT "The picture thast is the background region") (\TYPE PARAMETER NAME OPERATION TYPE (ONEOF (REPLACE PAINT INVERT ERASE)) DEFAULT REPLACE COMMENT "Operation for BITBLT for window area of region")) OTHER (FNS ((SHOW SHOW.PICTURE.VARIABLE.PLACEMENT.W/BKGD) (DISPLAY DISPLAY.PICTURE.VARIABLE.PLACEMENT.W/BKGD) ( BOUNDING.BOX BOUNDING.BOX.PICTURE.VARIABLE.PLACEMENT.W/BKGD))) CLASSES (DISPLAYER)) (DEFINEQ (SHOW.PICTURE.VARIABLE.PLACEMENT.W/BKGD [LAMBDA (ITEM) (* edited: "26-Aug-84 16:33") (SET.PARAMQ ITEM OLD.X -1 PICTURE.VARIABLE.PLACEMENT.W/BKGD) (SET.PARAMQ ITEM OLD.Y -1]) (DISPLAY.PICTURE.VARIABLE.PLACEMENT.W/BKGD [LAMBDA (ITEM FRAME) (* edited: "26-Aug-84 16:34") (PROG (POS X Y HMIN HMAX VMIN VMAX CELLS CURRENT.X CURRENT.Y OLD.X OLD.Y OPERATION BACKGROUND.BITMAP BACKGROUND.WIDTH BACKGROUND.HEIGHT BITMAP BITMAP.WIDTH BITMAP.HEIGHT CLIPPING.REGION X.BITMAP Y.BITMAP) [SETQ X (fetch (POSITION XCOORD) of (SETQ POS (GET.PARAMQ ITEM PLACEMENT PICTURE.VARIABLE.PLACEMENT.W/BKGD] (SETQ Y (fetch (POSITION YCOORD) of POS)) (SETQ HMIN (GET.PARAMQ ITEM HORIZONTAL.MINIMUM)) (SETQ HMAX (GET.PARAMQ ITEM HORIZONTAL.MAXIMUM)) (SETQ VMIN (GET.PARAMQ ITEM VERTICAL.MINIMUM)) (SETQ VMAX (GET.PARAMQ ITEM VERTICAL.MAXIMUM)) (SETQ CELLS (GET.PARAMQ ITEM CELLS)) (SETQ CURRENT.X (IDIFFERENCE (GET.CURRENT.VALUE (CAR CELLS)) HMIN)) (SETQ CURRENT.Y (IDIFFERENCE (GET.CURRENT.VALUE (CADR CELLS)) VMIN)) (SETQ OLD.X (GET.PARAMQ ITEM OLD.X)) (SETQ OLD.Y (GET.PARAMQ ITEM OLD.Y)) (SETQ OPERATION (GET.PARAMQ ITEM OPERATION)) (SETQ BITMAP (FIND.BITMAP (GET.PARAMQ ITEM PICTURE))) (SETQ BITMAP.WIDTH (fetch (BITMAP BITMAPWIDTH) of BITMAP)) (SETQ BITMAP.HEIGHT (fetch (BITMAP BITMAPHEIGHT) of BITMAP)) [SETQ BACKGROUND.BITMAP (BITMAPCOPY (FIND.BITMAP (GET.PARAMQ ITEM BACKGROUND.PICTURE] (SETQ BACKGROUND.WIDTH (fetch (BITMAP BITMAPWIDTH) of BACKGROUND.BITMAP)) (SETQ BACKGROUND.HEIGHT (fetch (BITMAP BITMAPHEIGHT) of BACKGROUND.BITMAP)) (SETQ CLIPPING.REGION (create REGION LEFT ← X BOTTOM ← Y WIDTH ← BACKGROUND.WIDTH HEIGHT ← BACKGROUND.HEIGHT)) (COND ((ILESSP OLD.X 0) (* start from scratch) (BITBLT BACKGROUND.BITMAP 0 0 CURRENT.DSP X Y BACKGROUND.WIDTH BACKGROUND.HEIGHT (QUOTE INPUT) (QUOTE REPLACE))) (T (* restore old position) (BITBLT BACKGROUND.BITMAP [SETQ X.BITMAP (TIMES OLD.X (FQUOTIENT (IDIFFERENCE BACKGROUND.WIDTH BITMAP.WIDTH) (IDIFFERENCE HMAX HMIN] [SETQ Y.BITMAP (TIMES OLD.Y (FQUOTIENT (IDIFFERENCE BACKGROUND.HEIGHT BITMAP.HEIGHT) (IDIFFERENCE HMAX HMIN] CURRENT.DSP (IPLUS X X.BITMAP) (IPLUS Y Y.BITMAP) BITMAP.WIDTH BITMAP.HEIGHT (QUOTE INPUT) (QUOTE REPLACE) NIL CLIPPING.REGION))) (BITBLT BITMAP 0 0 CURRENT.DSP [IPLUS X (TIMES CURRENT.X (FQUOTIENT (IDIFFERENCE BACKGROUND.WIDTH BITMAP.WIDTH) (IDIFFERENCE HMAX HMIN] [IPLUS Y (TIMES CURRENT.Y (FQUOTIENT (IDIFFERENCE BACKGROUND.HEIGHT BITMAP.HEIGHT) (IDIFFERENCE HMAX HMIN] BITMAP.WIDTH BITMAP.HEIGHT (QUOTE INPUT) OPERATION NIL CLIPPING.REGION) (SET.PARAMQ ITEM OLD.X CURRENT.X) (SET.PARAMQ ITEM OLD.Y CURRENT.Y]) (BOUNDING.BOX.PICTURE.VARIABLE.PLACEMENT.W/BKGD [LAMBDA (ITEM) (* edited: "26-Aug-84 16:34") (PROG ((BITMAP (GET.PARAMQ ITEM BACKGROUND.PICTURE PICTURE.VARIABLE.PLACEMENT.W/BKGD)) POS) (OR (BITMAPP BITMAP) (SETQ BITMAP (FIND.BITMAP BITMAP))) (SETQ POS (GET.PARAMQ ITEM PLACEMENT)) (RETURN (LIST (fetch (POSITION XCOORD) of POS) (fetch (POSITION YCOORD) of POS) (fetch (BITMAP BITMAPWIDTH) of BITMAP) (fetch (BITMAP BITMAPHEIGHT) of BITMAP]) ) (READ.ITEMTYPE QS.ANIMATION 5) (\TYPE ITEM.TYPE NAME QS.ANIMATION COMMENT "A bitmap which gets INVERTed into the frame" KIND DISPLAYER PARAMETERS ((\TYPE PARAMETER NAME PLACEMENT TYPE (POSITION) DEFAULT (170 . 170) COMMENT "A place on the screen so that it can be referenced" GRID.TYPE (LOCATION)) (\TYPE PARAMETER NAME BITMAP.LIST TYPE (LIST (STRUCTURE ((RDRDRD (CONSTANT)) (NAMEDED (LIST (BITMAP.NAME)))))) DEFAULT ((1 (SIMPLE.BUTTON.BITMAP SIMPLE.BUTTON.BITMAP)) (2 (SIMPLE.BUTTON.BITMAP SIMPLE.BUTTON.BITMAP))) COMMENT "A list of bitmaps that will be turned ON/OFF when the conditional operation is true.") (\TYPE PARAMETER NAME CELL TYPE (CELL) DEFAULT CELL.1 COMMENT "CELL whose value is used for the conditional test.") (\TYPE PARAMETER NAME OPERATION TYPE (ONEOF ( REPLACE PAINT INVERT ERASE)) DEFAULT REPLACE COMMENT "Operation for BITBLT") (\TYPE PARAMETER NAME TEXTURE TYPE (SHADE) DEFAULT 65535 COMMENT "Texture for BITBLT")) OTHER (FNS ((ANALYZE ANALYZE.QS.ANIMATION) (SHOW SHOW.QS.ANIMATION) (DISPLAY DISPLAY.QS.ANIMATION) (BOUNDING.BOX BOUNDING.BOX.QS.ANIMATION) (OTHER FIND.BITMAP.PLACEMENT) (RESET RESET.QS.ANIMATION))) CLASSES ( DISPLAYER)) (DEFINEQ (ANALYZE.QS.ANIMATION [LAMBDA (ITEM) (* KKM " 6-JAN-84 16:34") (PROG (BITMAP.LIST MAPS PLACEMENT.MAP) (SETQ BITMAP.LIST (GET.FIELDQ ITEM BITMAP.LIST QS.ANIMATION)) (SETQ PLACEMENT.MAP (CONS)) (* CONSTRUCT A LIST OF BITMAPS AND PLACEMENTS) [for X in BITMAP.LIST do (TCONC PLACEMENT.MAP (LIST (CAR X) (for Y in (CADR X) collect (LIST (FIND.BITMAP Y) (FIND.BITMAP.PLACEMENT Y] (SET.FIELDQ ITEM PLACEMENT.MAP (CAR PLACEMENT.MAP) QS.ANIMATION]) (SHOW.QS.ANIMATION [LAMBDA (ITEM) (* KKM " 6-JAN-84 13:27") (PROG (CURRENT.VALUE MAP.LIST OPERATION TEXTURE) (SETQ CURRENT.VALUE (GET.CURRENT.VALUE (GET.FIELDQ ITEM CELL))) (SETQ OPERATION (GET.FIELDQ ITEM OPERATION)) (SETQ MAP.LIST (GET.FIELDQ ITEM PLACEMENT.MAP)) (SETQ TEXTURE (GET.FIELDQ ITEM TEXTURE)) (for X in MAP.LIST do (COND ((ILESSP (CAR X) CURRENT.VALUE) (for Y in (CADR X) do (BITBLT (CAR Y) 0 0 CURRENT.DSP (fetch (POSITION XCOORD) of (CADR Y)) (fetch (POSITION YCOORD) of (CADR Y)) (fetch (BITMAP BITMAPWIDTH) of (CAR Y)) (fetch (BITMAP BITMAPHEIGHT) of (CAR Y)) (QUOTE INPUT) OPERATION TEXTURE]) (DISPLAY.QS.ANIMATION [LAMBDA (ITEM FRAME) (* DDM "23-JUN-83 07:42") (PROG (CURRENT.VALUE MAP.LIST OPERATION TEXTURE) (SETQ CURRENT.VALUE (GET.CURRENT.VALUE (GET.FIELDQ ITEM CELL))) (SETQ OPERATION (GET.FIELDQ ITEM OPERATION)) (SETQ MAP.LIST (GET.FIELDQ ITEM PLACEMENT.MAP)) (SETQ TEXTURE (GET.FIELDQ ITEM TEXTURE)) (for X in MAP.LIST do (COND ((EQ (CAR X) CURRENT.VALUE) (for Y in (CADR X) do (BITBLT (CAR Y) 0 0 CURRENT.DSP (fetch (POSITION XCOORD) of (CADR Y)) (fetch (POSITION YCOORD) of (CADR Y)) (fetch (BITMAP BITMAPWIDTH) of (CAR Y)) (fetch (BITMAP BITMAPHEIGHT) of (CAR Y)) (QUOTE INPUT) OPERATION TEXTURE]) (BOUNDING.BOX.QS.ANIMATION [LAMBDA (ITEM) (* DDM "21-JUN-83 08:00") (PROG (LOCATION) (SETQ LOCATION (GET.FIELDQ ITEM PLACEMENT QS.ANIMATION)) (RETURN (BOUNDING.BOX.FOR.SEGMENTS (fetch (LOCATION X) of LOCATION) (fetch (LOCATION Y) of LOCATION) 1 1]) (FIND.BITMAP.PLACEMENT [LAMBDA (BITMAP.NAME) (* DDM "18-MAY-83 13:29") (OR (for FRAME bind (FRAMELIST BITMAP) in (APPEND (OR (LISTGET CURRENT.FRAME.CLASSES (QUOTE BITMAP.FRAMES)) (QUOTE (BITMAPS))) (LIST (GET.FIELDQ CURRENT.FRAME NAME FRAME))) when [SETQ BITMAP (for ITEM in (GET.FIELDQ (FIND.FRAME CURRENT.INTERFACE FRAME) ITEMS FRAME) when (AND (EQ (ITEM.TYPE ITEM) (QUOTE BITMAP)) (EQ (GET.FIELDQ ITEM NAME) BITMAP.NAME)) do (RETURN (GET.FIELDQ ITEM PLACEMENT] do (RETURN BITMAP)) (QUOTE (10 . 10]) (RESET.QS.ANIMATION [LAMBDA (ITEM) (* KKM "12-DEC-83 15:53") (SET.FIELDQ ITEM PLACEMENT.MAP NIL QS.ANIMATION]) ) (READ.ITEMTYPE SCALE.W/INDICATOR 5) (\TYPE ITEM.TYPE NAME SCALE.W/INDICATOR COMMENT "A moveable picture with a second picture for its background- the background is divided into segments NIL." KIND DISPLAYER PARAMETERS ((\TYPE PARAMETER NAME PLACEMENT TYPE (POSITION) DEFAULT (100 . 100) COMMENT "The position of the left-hand corner of the background bitmap") (\TYPE PARAMETER NAME CELL TYPE (CELL) DEFAULT CELL.1 COMMENT "The cell whose value is displayed by the position of the indicator") (\TYPE PARAMETER NAME MINIMUM TYPE (INTEGER) DEFAULT 1 COMMENT "The minimum value to be indicated") (\TYPE PARAMETER NAME MAXIMUM TYPE (INTEGER) DEFAULT 10 COMMENT "The maximum value to be indicated") (\TYPE PARAMETER NAME DIRECTION TYPE (ONEOF (HORIZONTAL VERTICAL)) DEFAULT HORIZONTAL COMMENT "The direction of the scale") (\TYPE PARAMETER NAME INDICATOR TYPE (BITMAP.NAME) DEFAULT SIMPLE.BUTTON.BITMAP COMMENT "The picture to be moved along the scale") (\TYPE PARAMETER NAME INDICATOR.ALIGNMENT TYPE (ONEOF (CENTER LEFT/BOTTOM RIGHT/TOP)) DEFAULT CENTER COMMENT "The alignment of the INDICATOR on the scale points") (\TYPE PARAMETER NAME BACKGROUND.PICTURE TYPE (BITMAP.NAME) DEFAULT EXAMPLE.BITMAP COMMENT "The picture that is the background (scale)") (\TYPE PARAMETER NAME OPERATION TYPE (ONEOF (REPLACE PAINT INVERT ERASE)) DEFAULT REPLACE COMMENT "The BITBLT operation for the INDICATOR onto the scale")) OTHER (FNS ((SHOW SHOW.SCALE.W/INDICATOR) (DISPLAY DISPLAY.SCALE.W/INDICATOR) (BOUNDING.BOX BOUNDING.BOX.SCALE.W/INDICATOR))) CLASSES ( DISPLAYER)) (DEFINEQ (SHOW.SCALE.W/INDICATOR [LAMBDA (ITEM) (* edited: "26-Aug-84 16:36") (PROG ((BACKGROUND.BITMAP (GET.PARAMQ ITEM BACKGROUND.PICTURE SCALE.W/INDICATOR)) (INDICATOR.BITMAP (GET.PARAMQ ITEM INDICATOR)) EXTENDED.BACKGROUND INDICATOR.WIDTH INDICATOR.HEIGHT POS DIRECTION INDICATOR.ALIGNMENT) (SET.PARAMQ ITEM OLD.VALUE -1 SCALE.W/INDICATOR) (OR (BITMAPP BACKGROUND.BITMAP) (SETQ BACKGROUND.BITMAP (FIND.BITMAP BACKGROUND.BITMAP))) (OR (BITMAPP INDICATOR.BITMAP) (SETQ INDICATOR.BITMAP (FIND.BITMAP INDICATOR.BITMAP))) (SETQ INDICATOR.WIDTH (fetch (BITMAP BITMAPWIDTH) of INDICATOR.BITMAP)) (SETQ INDICATOR.HEIGHT (fetch (BITMAP BITMAPHEIGHT) of INDICATOR.BITMAP)) (SETQ POS (GET.PARAMQ ITEM PLACEMENT)) (SETQ DIRECTION (GET.PARAMQ ITEM DIRECTION)) (SETQ INDICATOR.ALIGNMENT (GET.PARAMQ ITEM INDICATOR.ALIGNMENT)) [SETQ EXTENDED.BACKGROUND (BITMAPCREATE (IPLUS (fetch (BITMAP BITMAPWIDTH) of BACKGROUND.BITMAP) (COND ((EQ DIRECTION (QUOTE HORIZONTAL)) INDICATOR.WIDTH) (T 0))) (IPLUS (fetch (BITMAP BITMAPHEIGHT) of BACKGROUND.BITMAP) (COND ((EQ DIRECTION (QUOTE VERTICAL)) INDICATOR.HEIGHT) (T 0] (BITBLT BACKGROUND.BITMAP 0 0 EXTENDED.BACKGROUND (COND ((EQ DIRECTION (QUOTE HORIZONTAL)) (SELECTQ INDICATOR.ALIGNMENT (CENTER (RSH INDICATOR.WIDTH 1)) (RIGHT/TOP INDICATOR.WIDTH) (LEFT/BOTTOM 0) NIL)) (T 0)) (COND ((EQ DIRECTION (QUOTE VERTICAL)) (SELECTQ INDICATOR.ALIGNMENT (CENTER (RSH INDICATOR.HEIGHT 1)) (RIGHT/TOP INDICATOR.HEIGHT) (LEFT/BOTTOM 0) NIL)) (T 0)) (fetch (BITMAP BITMAPWIDTH) of BACKGROUND.BITMAP) (fetch (BITMAP BITMAPHEIGHT) of BACKGROUND.BITMAP) (QUOTE INPUT) (QUOTE REPLACE)) (SET.PARAMQ ITEM EXTENDED.BACKGROUND EXTENDED.BACKGROUND]) (DISPLAY.SCALE.W/INDICATOR [LAMBDA (ITEM FRAME) (* edited: "26-Aug-84 16:37") (PROG (POS X Y MIN MAX CURRENT.VALUE OLD.VALUE DIRECTION OPERATION EXTENDED.BACKGROUND.BITMAP BACKGROUND.BITMAP BACKGROUND.WIDTH BACKGROUND.HEIGHT INDICATOR.BITMAP INDICATOR.WIDTH INDICATOR.HEIGHT INDICATOR.ALIGNMENT CLIPPING.REGION X.BITMAP Y.BITMAP) [SETQ X (fetch (POSITION XCOORD) of (SETQ POS (GET.PARAMQ ITEM PLACEMENT SCALE.W/INDICATOR] (SETQ Y (fetch (POSITION YCOORD) of POS)) (SETQ MIN (GET.PARAMQ ITEM MINIMUM)) (SETQ MAX (GET.PARAMQ ITEM MAXIMUM)) (SETQ CURRENT.VALUE (IDIFFERENCE (GET.CURRENT.VALUE (GET.PARAMQ ITEM CELL)) MIN)) (SETQ OLD.VALUE (GET.PARAMQ ITEM OLD.VALUE)) (SETQ DIRECTION (GET.PARAMQ ITEM DIRECTION)) (SETQ OPERATION (GET.PARAMQ ITEM OPERATION)) (SETQ INDICATOR.BITMAP (FIND.BITMAP (GET.PARAMQ ITEM INDICATOR))) (SETQ INDICATOR.WIDTH (fetch (BITMAP BITMAPWIDTH) of INDICATOR.BITMAP)) (SETQ INDICATOR.HEIGHT (fetch (BITMAP BITMAPHEIGHT) of INDICATOR.BITMAP)) (SETQ INDICATOR.ALIGNMENT (GET.PARAMQ ITEM INDICATOR.ALIGNMENT)) (SETQ EXTENDED.BACKGROUND.BITMAP (BITMAPCOPY (GET.PARAMQ ITEM EXTENDED.BACKGROUND))) (SETQ BACKGROUND.BITMAP (FIND.BITMAP (GET.PARAMQ ITEM BACKGROUND.PICTURE))) (SETQ BACKGROUND.WIDTH (fetch (BITMAP BITMAPWIDTH) of BACKGROUND.BITMAP)) (SETQ BACKGROUND.HEIGHT (fetch (BITMAP BITMAPHEIGHT) of BACKGROUND.BITMAP)) (SETQ CLIPPING.REGION (create REGION LEFT ←(IDIFFERENCE X (COND ((EQ DIRECTION (QUOTE HORIZONTAL)) (SELECTQ INDICATOR.ALIGNMENT (LEFT/BOTTOM 0) (CENTER (RSH INDICATOR.WIDTH 1)) (RIGHT/TOP INDICATOR.WIDTH) NIL)) (T 0))) BOTTOM ←(IDIFFERENCE Y (COND ((EQ DIRECTION (QUOTE VERTICAL)) (SELECTQ INDICATOR.ALIGNMENT (LEFT/BOTTOM 0) (CENTER (RSH INDICATOR.HEIGHT 1)) (RIGHT/TOP INDICATOR.HEIGHT) NIL)) (T 0))) WIDTH ←(fetch (BITMAP BITMAPWIDTH) of EXTENDED.BACKGROUND.BITMAP) HEIGHT ←(fetch (BITMAP BITMAPHEIGHT) of EXTENDED.BACKGROUND.BITMAP))) (COND ((ILESSP OLD.VALUE 0) (* start from scratch) (BITBLT BACKGROUND.BITMAP 0 0 CURRENT.DSP X Y BACKGROUND.WIDTH BACKGROUND.HEIGHT (QUOTE INPUT) (QUOTE REPLACE))) (T (* restore old position) (BITBLT EXTENDED.BACKGROUND.BITMAP (SETQ X.BITMAP (COND [(EQ DIRECTION (QUOTE HORIZONTAL)) (TIMES OLD.VALUE (FQUOTIENT BACKGROUND.WIDTH (IDIFFERENCE MAX MIN] (T 0))) (SETQ Y.BITMAP (COND [(EQ DIRECTION (QUOTE VERTICAL)) (TIMES OLD.VALUE (FQUOTIENT BACKGROUND.HEIGHT (IDIFFERENCE MAX MIN] (T 0))) CURRENT.DSP [IPLUS X (IDIFFERENCE X.BITMAP (COND ((EQ DIRECTION (QUOTE HORIZONTAL)) (SELECTQ INDICATOR.ALIGNMENT (CENTER (RSH INDICATOR.WIDTH 1)) (RIGHT/TOP INDICATOR.WIDTH) 0)) (T 0] [IPLUS Y (IDIFFERENCE Y.BITMAP (COND ((EQ DIRECTION (QUOTE VERTICAL)) (SELECTQ INDICATOR.ALIGNMENT (CENTER (RSH INDICATOR.HEIGHT 1)) (RIGHT/TOP INDICATOR.HEIGHT) 0)) (T 0] INDICATOR.WIDTH INDICATOR.HEIGHT (QUOTE INPUT) (QUOTE REPLACE) NIL CLIPPING.REGION))) (BITBLT INDICATOR.BITMAP 0 0 CURRENT.DSP (IPLUS X (COND ((EQ DIRECTION (QUOTE HORIZONTAL)) (IDIFFERENCE (TIMES CURRENT.VALUE (FQUOTIENT BACKGROUND.WIDTH (IDIFFERENCE MAX MIN))) (SELECTQ INDICATOR.ALIGNMENT (LEFT/BOTTOM 0) (CENTER (RSH INDICATOR.WIDTH 1)) (RIGHT/TOP INDICATOR.WIDTH) NIL))) (T 0))) (IPLUS Y (COND ((EQ DIRECTION (QUOTE VERTICAL)) (IDIFFERENCE (TIMES CURRENT.VALUE (FQUOTIENT BACKGROUND.HEIGHT (IDIFFERENCE MAX MIN))) (SELECTQ INDICATOR.ALIGNMENT (LEFT/BOTTOM 0) (CENTER (RSH INDICATOR.HEIGHT 1)) (RIGHT/TOP INDICATOR.HEIGHT) NIL))) (T 0))) INDICATOR.WIDTH INDICATOR.HEIGHT (QUOTE INPUT) OPERATION NIL CLIPPING.REGION) (SET.PARAMQ ITEM OLD.VALUE CURRENT.VALUE]) (BOUNDING.BOX.SCALE.W/INDICATOR [LAMBDA (ITEM) (* edited: "26-Aug-84 16:38") (PROG ((BACKGROUND.BITMAP (GET.PARAMQ ITEM EXTENDED.BACKGROUND SCALE.W/INDICATOR)) POS DIRECTION INDICATOR.ALIGNMENT (INDICATOR.BITMAP (GET.PARAMQ ITEM INDICATOR)) INDICATOR.WIDTH INDICATOR.HEIGHT) (OR (BITMAPP BACKGROUND.BITMAP) (SETQ BACKGROUND.BITMAP (FIND.BITMAP BACKGROUND.BITMAP))) (OR (BITMAPP INDICATOR.BITMAP) (SETQ INDICATOR.BITMAP (FIND.BITMAP INDICATOR.BITMAP))) (SETQ INDICATOR.WIDTH (fetch (BITMAP BITMAPWIDTH) of INDICATOR.BITMAP)) (SETQ INDICATOR.HEIGHT (fetch (BITMAP BITMAPHEIGHT) of INDICATOR.BITMAP)) (SETQ POS (GET.PARAMQ ITEM PLACEMENT)) (SETQ DIRECTION (GET.PARAMQ ITEM DIRECTION)) (SETQ INDICATOR.ALIGNMENT (GET.PARAMQ ITEM INDICATOR.ALIGNMENT)) (RETURN (create REGION LEFT ←(IDIFFERENCE (fetch (POSITION XCOORD) of POS) (COND ((EQ DIRECTION (QUOTE HORIZONTAL)) (SELECTQ INDICATOR.ALIGNMENT (CENTER (RSH INDICATOR.WIDTH 1)) (RIGHT/TOP INDICATOR.WIDTH) 0)) (T 0))) BOTTOM ←(IDIFFERENCE (fetch (POSITION YCOORD) of POS) (COND ((EQ DIRECTION (QUOTE VERTICAL)) (SELECTQ INDICATOR.ALIGNMENT (CENTER (RSH INDICATOR.HEIGHT 1)) (RIGHT/TOP INDICATOR.HEIGHT) 0)) (T 0))) WIDTH ←(fetch (BITMAP BITMAPWIDTH) of BACKGROUND.BITMAP) HEIGHT ←(fetch (BITMAP BITMAPHEIGHT) of BACKGROUND.BITMAP]) ) (READ.ITEMTYPE TEXTURED.LIGHT 5) (\TYPE ITEM.TYPE NAME TEXTURED.LIGHT COMMENT "A light: textured region which inverts to reflect the value of the cell" KIND DISPLAYER PARAMETERS ( (\TYPE PARAMETER NAME PLACEMENT TYPE (REGION) DEFAULT (100 100 30 30) COMMENT "The region which will be black when the light is on") (\TYPE PARAMETER NAME CELL TYPE (CELL) DEFAULT CELL.1 COMMENT "The cell whose value the light displays") (\TYPE PARAMETER NAME REFERENCE.VALUE TYPE (CONSTANT) DEFAULT VALUE.1 COMMENT "The value to compare with the cell's value" ) (\TYPE PARAMETER NAME TEXTURE TYPE (SHADE) DEFAULT 65535 COMMENT "The texture o be inverted onto the screen")) OTHER (FNS ((SHOW SHOW.TEXTURED.LIGHT) (DISPLAY DISPLAY.TEXTURED.LIGHT))) CLASSES (DISPLAYER)) (DEFINEQ (SHOW.TEXTURED.LIGHT [LAMBDA (ITEM) (* edited: "26-Aug-84 16:38") (SET.PARAMQ ITEM ON/OFF (QUOTE OFF) TEXTURED.LIGHT]) (DISPLAY.TEXTURED.LIGHT [LAMBDA (ITEM FRAME) (* edited: "26-Aug-84 16:39") (PROG (REFERENCE.VALUE CURRENT.VALUE REGION T1 T2) (SETQ REGION (GET.PARAMQ ITEM PLACEMENT TEXTURED.LIGHT)) (SETQ REFERENCE.VALUE (GET.PARAMQ ITEM REFERENCE.VALUE)) (SETQ CURRENT.VALUE (GET.CURRENT.VALUE (GET.PARAMQ ITEM CELL))) (SETQ T1 (EQUAL REFERENCE.VALUE CURRENT.VALUE)) (SETQ T2 (EQ (GET.PARAMQ ITEM ON/OFF) (QUOTE ON))) (COND ((OR (AND T1 (NOT T2)) (AND (NOT T1) T2)) [SET.PARAMQ ITEM ON/OFF (COND (T2 (QUOTE OFF)) (T (QUOTE ON] (FLIP.BOX (BIGGER.BOX (BOUNDING.BOX ITEM)) (GET.PARAMQ ITEM TEXTURE]) ) (READ.ITEMTYPE VARIABLE.INDICATOR 5) (\TYPE ITEM.TYPE NAME VARIABLE.INDICATOR COMMENT "A picture whose graphic (BITMAP.NAME) is contained in a cell, and redisplays when the CELL changes" KIND DISPLAYER PARAMETERS ((\TYPE PARAMETER NAME PLACEMENT TYPE (POSITION) DEFAULT (100 . 100) COMMENT "The lower left corner of the bitmap") (\TYPE PARAMETER NAME CELL TYPE (CELL) DEFAULT CELL.1 COMMENT "The cell whose value must be a valid bitmap name, and is displayed as static artwork" )) OTHER (FNS ((BOUNDING.BOX BOUNDING.BOX.VARIABLE.INDICATOR) (SHOW SHOW.VARIABLE.INDICATOR) ( DISPLAY DISPLAY.VARIABLE.INDICATOR))) CLASSES (DISPLAYER)) (DEFINEQ (BOUNDING.BOX.VARIABLE.INDICATOR [LAMBDA (ITEM) (* edited: "26-Aug-84 16:40") (PROG ((BITMAP (GET.CURRENT.VALUE (GET.PARAMQ ITEM CELL VARIABLE.INDICATOR))) POS) (OR (BITMAPP BITMAP) (SETQ BITMAP (FIND.BITMAP BITMAP))) (SETQ POS (GET.PARAMQ ITEM PLACEMENT)) (RETURN (LIST (fetch (POSITION XCOORD) of POS) (fetch (POSITION YCOORD) of POS) (fetch (BITMAP BITMAPWIDTH) of BITMAP) (fetch (BITMAP BITMAPHEIGHT) of BITMAP]) (SHOW.VARIABLE.INDICATOR [LAMBDA (ITEM) (* edited: "26-Aug-84 16:40") (SET.PARAMQ ITEM OLD.BITMAP NIL VARIABLE.INDICATOR]) (DISPLAY.VARIABLE.INDICATOR [LAMBDA (ITEM FRAME) (* edited: "26-Aug-84 16:41") (PROG (REFERENCE.VALUE BITMAP OLD.BITMAP CURRENT.VALUE POSITION T1 T2 ON-COLOR OFF-COLOR) (SETQ POSITION (GET.PARAMQ ITEM PLACEMENT VARIABLE.INDICATOR)) (SETQ OLD.BITMAP (GET.PARAMQ ITEM OLD.BITMAP)) (SETQ BITMAP (GET.CURRENT.VALUE (GET.PARAMQ ITEM CELL))) (OR (BITMAPP BITMAP) (SETQ BITMAP (FIND.BITMAP BITMAP))) [COND ((NOT (EQUAL OLD.BITMAP BITMAP)) [COND ((BITMAPP OLD.BITMAP) (SHOW.COLORED.BITMAP OLD.BITMAP POSITION NIL (QUOTE INPUT) (QUOTE INVERT) NIL (QUOTE BLACK) (QUOTE WHITE] (SHOW.COLORED.BITMAP BITMAP POSITION NIL (QUOTE INPUT) (QUOTE INVERT) NIL (QUOTE BLACK) (QUOTE WHITE] (SET.PARAMQ ITEM OLD.BITMAP BITMAP]) ) (READ.ITEMTYPE VARIABLE.PICTURE.VARIABLE.PLACEMENT.W/BKGD 5) (\TYPE ITEM.TYPE NAME VARIABLE.PICTURE.VARIABLE.PLACEMENT.W/BKGD COMMENT "A moveable picture with a second picture for its background." KIND DISPLAYER PARAMETERS ((\TYPE PARAMETER NAME PLACEMENT TYPE (POSITION) DEFAULT (100 . 100) COMMENT "The position of the left-hand corner of the background bitmap") (\TYPE PARAMETER NAME CELLS TYPE ( STRUCTURE ((HORIZONTAL.POSITION (CELL)) (VERTICAL.POSITION (CELL)))) DEFAULT (CELL.1 CELL.2) COMMENT "A pair of cells (HORIZONTAL VERTICAL) that determine the position of the picture on the background") (\TYPE PARAMETER NAME HORIZONTAL.MINIMUM TYPE (INTEGER) DEFAULT 1 COMMENT "The minimum value to be indicated in the horizontal direction") (\TYPE PARAMETER NAME HORIZONTAL.MAXIMUM TYPE (INTEGER) DEFAULT 10 COMMENT "The maximum value to be indicated in the horizontal direction") (\TYPE PARAMETER NAME VERTICAL.MINIMUM TYPE (INTEGER) DEFAULT 1 COMMENT "The minimum value to be indicated in the vertical direction") (\TYPE PARAMETER NAME VERTICAL.MAXIMUM TYPE (INTEGER) DEFAULT 10 COMMENT "The maximum value to be indicated in the vertical direction") ( \TYPE PARAMETER NAME BACKGROUND.PICTURE TYPE (BITMAP.NAME) DEFAULT EXAMPLE.BITMAP COMMENT "The picture thast is the background region") (\TYPE PARAMETER NAME PICTURE.CELL TYPE (CELL) DEFAULT CELL.1 COMMENT "The cell whose value is the picture to be moved within the region") (\TYPE PARAMETER NAME OPERATION TYPE (ONEOF (REPLACE PAINT INVERT ERASE)) DEFAULT REPLACE COMMENT "Operation for BITBLT for window area of region")) OTHER (FNS ((SHOW SHOW.VARIABLE.PICTURE.VARIABLE.PLACEMENT.W/BKGD) (DISPLAY DISPLAY.VARIABLE.PICTURE.VARIABLE.PLACEMENT.W/BKGD) (BOUNDING.BOX BOUNDING.BOX.VARIABLE.PICTURE.VARIABLE.PLACEMENT.W/BKGD))) CLASSES (DISPLAYER)) (DEFINEQ (SHOW.VARIABLE.PICTURE.VARIABLE.PLACEMENT.W/BKGD [LAMBDA (ITEM) (* edited: "26-Aug-84 16:02") (SET.PARAMQ ITEM OLD.BITMAP NIL VARIABLE.PICTURE.VARIABLE.PLACEMENT.W/BKGD]) (DISPLAY.VARIABLE.PICTURE.VARIABLE.PLACEMENT.W/BKGD [LAMBDA (ITEM FRAME) (* edited: "26-Aug-84 16:03") (PROG (POS X Y HMIN HMAX VMIN VMAX CELLS CURRENT.X CURRENT.Y OLD.X OLD.Y OPERATION BACKGROUND.BITMAP BACKGROUND.WIDTH BACKGROUND.HEIGHT BITMAP OLD.BITMAP OLD.BITMAP.WIDTH OLD.BITMAP.HEIGHT BITMAP.WIDTH BITMAP.HEIGHT CLIPPING.REGION X.BITMAP Y.BITMAP) [SETQ X (fetch (POSITION XCOORD) of (SETQ POS (GET.PARAMQ ITEM PLACEMENT VARIABLE.PICTURE.VARIABLE.PLACEMENT.W/BKGD] (SETQ Y (fetch (POSITION YCOORD) of POS)) (SETQ HMIN (GET.PARAMQ ITEM HORIZONTAL.MINIMUM)) (SETQ HMAX (GET.PARAMQ ITEM HORIZONTAL.MAXIMUM)) (SETQ VMIN (GET.PARAMQ ITEM VERTICAL.MINIMUM)) (SETQ VMAX (GET.PARAMQ ITEM VERTICAL.MAXIMUM)) (SETQ CELLS (GET.PARAMQ ITEM CELLS)) (SETQ CURRENT.X (IDIFFERENCE (GET.CURRENT.VALUE (CAR CELLS)) HMIN)) (SETQ CURRENT.Y (IDIFFERENCE (GET.CURRENT.VALUE (CADR CELLS)) VMIN)) (SETQ OPERATION (GET.PARAMQ ITEM OPERATION)) (SETQ OLD.BITMAP (GET.PARAMQ ITEM OLD.BITMAP)) (SETQ BITMAP (GET.CURRENT.VALUE (GET.PARAMQ ITEM PICTURE.CELL))) (OR (BITMAPP BITMAP) (SETQ BITMAP (FIND.BITMAP BITMAP))) (SETQ BITMAP.WIDTH (fetch (BITMAP BITMAPWIDTH) of BITMAP)) (SETQ BITMAP.HEIGHT (fetch (BITMAP BITMAPHEIGHT) of BITMAP)) [SETQ BACKGROUND.BITMAP (BITMAPCOPY (FIND.BITMAP (GET.PARAMQ ITEM BACKGROUND.PICTURE] (SETQ BACKGROUND.WIDTH (fetch (BITMAP BITMAPWIDTH) of BACKGROUND.BITMAP)) (SETQ BACKGROUND.HEIGHT (fetch (BITMAP BITMAPHEIGHT) of BACKGROUND.BITMAP)) (SETQ CLIPPING.REGION (create REGION LEFT ← X BOTTOM ← Y WIDTH ← BACKGROUND.WIDTH HEIGHT ← BACKGROUND.HEIGHT)) (COND ((NOT (EQUAL OLD.BITMAP BITMAP)) (* start from scratch) (BITBLT BACKGROUND.BITMAP 0 0 CURRENT.DSP X Y BACKGROUND.WIDTH BACKGROUND.HEIGHT (QUOTE INPUT) (QUOTE REPLACE))) (T (* otherwise restore old position) (SETQ OLD.BITMAP.WIDTH (fetch (BITMAP BITMAPWIDTH) of OLD.BITMAP)) (SETQ OLD.BITMAP.HEIGHT (fetch (BITMAP BITMAPHEIGHT) of OLD.BITMAP)) (SETQ OLD.X (GET.PARAMQ ITEM OLD.X)) (SETQ OLD.Y (GET.PARAMQ ITEM OLD.Y)) (BITBLT BACKGROUND.BITMAP [SETQ X.BITMAP (TIMES OLD.X (FQUOTIENT (IDIFFERENCE BACKGROUND.WIDTH OLD.BITMAP.WIDTH) (IDIFFERENCE HMAX HMIN] [SETQ Y.BITMAP (TIMES OLD.Y (FQUOTIENT (IDIFFERENCE BACKGROUND.HEIGHT OLD.BITMAP.HEIGHT) (IDIFFERENCE HMAX HMIN] CURRENT.DSP (IPLUS X X.BITMAP) (IPLUS Y Y.BITMAP) OLD.BITMAP.WIDTH OLD.BITMAP.HEIGHT (QUOTE INPUT) (QUOTE REPLACE) NIL CLIPPING.REGION))) (BITBLT BITMAP 0 0 CURRENT.DSP [IPLUS X (TIMES CURRENT.X (FQUOTIENT (IDIFFERENCE BACKGROUND.WIDTH BITMAP.WIDTH) (IDIFFERENCE HMAX HMIN] [IPLUS Y (TIMES CURRENT.Y (FQUOTIENT (IDIFFERENCE BACKGROUND.HEIGHT BITMAP.HEIGHT) (IDIFFERENCE HMAX HMIN] BITMAP.WIDTH BITMAP.HEIGHT (QUOTE INPUT) OPERATION NIL CLIPPING.REGION) (SET.PARAMQ ITEM OLD.X CURRENT.X) (SET.PARAMQ ITEM OLD.Y CURRENT.Y) (SET.PARAMQ ITEM OLD.BITMAP BITMAP]) (BOUNDING.BOX.VARIABLE.PICTURE.VARIABLE.PLACEMENT.W/BKGD [LAMBDA (ITEM) (* edited: "26-Aug-84 16:04") (PROG ((BITMAP (GET.PARAMQ ITEM BACKGROUND.PICTURE VARIABLE.PICTURE.VARIABLE.PLACEMENT.W/BKGD)) POS) (OR (BITMAPP BITMAP) (SETQ BITMAP (FIND.BITMAP BITMAP))) (SETQ POS (GET.PARAMQ ITEM PLACEMENT)) (RETURN (LIST (fetch (POSITION XCOORD) of POS) (fetch (POSITION YCOORD) of POS) (fetch (BITMAP BITMAPWIDTH) of BITMAP) (fetch (BITMAP BITMAPHEIGHT) of BITMAP]) ) (COMPILE.INTERNAL.FNS.IF.NECESSARY) (DECLARE: DONTCOPY (FILEMAP (NIL (2288 6074 (SHOW.COMPOSITE.INDICATOR 2298 . 2428) (DISPLAY.COMPOSITE.INDICATOR 2430 . 4328) (BOUNDING.BOX.COMPOSITE.INDICATOR 4330 . 6072)) (7150 9823 (BOUNDING.BOX.CONDITIONAL.INDICATOR 7160 . 7704) (SHOW.CONDITIONAL.INDICATOR 7706 . 7898) (DISPLAY.CONDITIONAL.INDICATOR 7900 . 9821)) ( 11212 15278 (BOUNDING.BOX.CQ.CONCEPT 11222 . 11848) (SHOW.CQ.CONCEPT 11850 . 11975) ( DISPLAY.CQ.CONCEPT 11977 . 15276)) (17583 22802 (SHOW.LIGHT.BAR.2.DIMENSION 17593 . 17729) ( DISPLAY.LIGHT.BAR.2.DIMENSION 17731 . 22800)) (24502 29851 (SHOW.LIGHT.BAR.DISCRETE 24512 . 26195) ( DISPLAY.LIGHT.BAR.DISCRETE 26197 . 29849)) (32319 37879 (BOUNDING.BOX.LIGHT.BAR.REGION.W/BKGD 32329 . 32981) (SHOW.LIGHT.BAR.REGION.W/BKGD 32983 . 33121) (DISPLAY.LIGHT.BAR.REGION.W/BKGD 33123 . 37877)) ( 41056 48634 (BOUNDING.BOX.LIGHT.BAR.REGION.W/VARIABLE.BKGD 41066 . 41789) ( SHOW.LIGHT.BAR.REGION.W/VARIABLE.BKGD 41791 . 42044) (DISPLAY.LIGHT.BAR.REGION.W/VARIABLE.BKGD 42046 . 48632)) (50334 53464 (SHOW.PICTURE.VARIABLE.PLACEMENT 50344 . 50565) ( DISPLAY.PICTURE.VARIABLE.PLACEMENT 50567 . 53462)) (55271 59250 ( SHOW.PICTURE.VARIABLE.PLACEMENT.W/BKGD 55281 . 55516) (DISPLAY.PICTURE.VARIABLE.PLACEMENT.W/BKGD 55518 . 58666) (BOUNDING.BOX.PICTURE.VARIABLE.PLACEMENT.W/BKGD 58668 . 59248)) (60458 64177 ( ANALYZE.QS.ANIMATION 60468 . 61117) (SHOW.QS.ANIMATION 61119 . 62038) (DISPLAY.QS.ANIMATION 62040 . 62961) (BOUNDING.BOX.QS.ANIMATION 62963 . 63325) (FIND.BITMAP.PLACEMENT 63327 . 64005) ( RESET.QS.ANIMATION 64007 . 64175)) (65783 74242 (SHOW.SCALE.W/INDICATOR 65793 . 67932) ( DISPLAY.SCALE.W/INDICATOR 67934 . 72592) (BOUNDING.BOX.SCALE.W/INDICATOR 72594 . 74240)) (75016 75957 (SHOW.TEXTURED.LIGHT 75026 . 75204) (DISPLAY.TEXTURED.LIGHT 75206 . 75955)) (76607 78279 ( BOUNDING.BOX.VARIABLE.INDICATOR 76617 . 77173) (SHOW.VARIABLE.INDICATOR 77175 . 77355) ( DISPLAY.VARIABLE.INDICATOR 77357 . 78277)) (80140 84582 ( SHOW.VARIABLE.PICTURE.VARIABLE.PLACEMENT.W/BKGD 80150 . 80378) ( DISPLAY.VARIABLE.PICTURE.VARIABLE.PLACEMENT.W/BKGD 80380 . 83980) ( BOUNDING.BOX.VARIABLE.PICTURE.VARIABLE.PLACEMENT.W/BKGD 83982 . 84580))))) STOP