DIRECTORY NodeStyleWorks USING [colorOps, DoStyleOp, glueOps, Param, ParamRec, realOps, RegisterStyleCommand], Rope USING [ROPE], TJaM USING [CommandProc, CvX, Execute, Frame]; NodeStyleWorks4Impl: CEDAR PROGRAM IMPORTS NodeStyleWorks, TJaM EXPORTS NodeStyleWorks ~ BEGIN OPEN NodeStyleWorks; Frame: TYPE ~ TJaM.Frame; ROPE: TYPE ~ Rope.ROPE; opsList: LIST OF RECORD[name: ATOM, op: TJaM.CommandProc] _ NIL; Preregister: PROC [param: Param, op: TJaM.CommandProc] RETURNS [Param] ~ { opsList _ CONS[[param.opName, op], opsList]; RETURN [param]; }; RegisterWorks4: PUBLIC PROC [frame: Frame] ~ { WHILE opsList # NIL DO RegisterStyleCommand[frame, opsList.first.name, opsList.first.op]; opsList _ opsList.rest; ENDLOOP; TJaM.Execute[frame, TJaM.CvX[prolog]]; }; prolog: ROPE _ " (firstFolio) 1 StyleParam (firstVisibleFolio) 1 StyleParam (lastDropFolio) 1 StyleParam (firstHeaders) 0 StyleParam (maxVerticalExpansion) 3 StyleParam (maxHorizontalExpansion) 1 fil StyleParam (sided) 1 StyleParam (keep) 0 pt StyleParam (keepStretch) 1 fil StyleParam (columnGap) 0.5 in StyleParam (topIndentStretch) 0 StyleParam (bottomIndentStretch) 0 StyleParam (hyphenation) (No) StyleParam (hyphenCode) 45 StyleParam (pageRotation) 0 StyleParam (pageRotationVerso) 0 StyleParam (mediumColor) {mediumBrightness mediumSaturation mediumHue} .cvx .def (mediumHue) 0 StyleParam (mediumSaturation) 0 StyleParam (mediumBrightness) 1 StyleParam "; LetterspacingOp: TJaM.CommandProc ~ { DoStyleOp[frame, letterspacingParam] }; letterspacingParam: Param _ Preregister[NEW[real ParamRec _ [realOps, $letterspacing, real[letterspacing]]], LetterspacingOp]; LetterspacingStretchOp: TJaM.CommandProc ~ { DoStyleOp[frame, letterspacingStretchParam] }; letterspacingStretchParam: Param _ Preregister[NEW[real ParamRec _ [realOps, $letterspacingStretch, real[letterspacingStretch]]], LetterspacingStretchOp]; LetterspacingShrinkOp: TJaM.CommandProc ~ { DoStyleOp[frame, letterspacingShrinkParam] }; letterspacingShrinkParam: Param _ Preregister[NEW[real ParamRec _ [realOps, $letterspacingShrink, real[letterspacingShrink]]], LetterspacingShrinkOp]; LetterspacingGlueOp: TJaM.CommandProc ~ { DoStyleOp[frame, letterspacingGlueParam] }; letterspacingGlueParam: Param _ Preregister[NEW[glue ParamRec _ [glueOps, $letterspacingGlue, glue[letterspacing, letterspacingStretch, letterspacingShrink]]], LetterspacingGlueOp]; PagebreakOp: TJaM.CommandProc ~ { DoStyleOp[frame, pagebreakParam] }; pagebreakParam: Param _ Preregister[NEW[real ParamRec _ [realOps, $pagebreak, real[pagebreak]]], PagebreakOp]; PagebreakStretchOp: TJaM.CommandProc ~ { DoStyleOp[frame, pagebreakStretchParam] }; pagebreakStretchParam: Param _ Preregister[NEW[real ParamRec _ [realOps, $pagebreakStretch, real[pagebreakStretch]]], PagebreakStretchOp]; PagebreakShrinkOp: TJaM.CommandProc ~ { DoStyleOp[frame, pagebreakShrinkParam] }; pagebreakShrinkParam: Param _ Preregister[NEW[real ParamRec _ [realOps, $pagebreakShrink, real[pagebreakShrink]]], PagebreakShrinkOp]; PagebreakGlueOp: TJaM.CommandProc ~ { DoStyleOp[frame, pagebreakGlueParam] }; pagebreakGlueParam: Param _ Preregister[NEW[glue ParamRec _ [glueOps, $pagebreakGlue, glue[pagebreak, pagebreakStretch, pagebreakShrink]]], PagebreakGlueOp]; UnderlineThicknessOp: TJaM.CommandProc ~ { DoStyleOp[frame, underlineThicknessParam] }; underlineThicknessParam: Param _ Preregister[NEW[real ParamRec _ [realOps, $underlineThickness, real[underlineThickness]]], UnderlineThicknessOp]; UnderlineDescentOp: TJaM.CommandProc ~ { DoStyleOp[frame, underlineDescentParam] }; underlineDescentParam: Param _ Preregister[NEW[real ParamRec _ [realOps, $underlineDescent, real[underlineDescent]]], UnderlineDescentOp]; UnderlineHueOp: TJaM.CommandProc ~ { DoStyleOp[frame, underlineHueParam] }; underlineHueParam: Param _ Preregister[NEW[real ParamRec _ [realOps, $underlineHue, real[underlineHue]]], UnderlineHueOp]; UnderlineSaturationOp: TJaM.CommandProc ~ { DoStyleOp[frame, underlineSaturationParam] }; underlineSaturationParam: Param _ Preregister[NEW[real ParamRec _ [realOps, $underlineSaturation, real[underlineSaturation]]], UnderlineSaturationOp]; UnderlineBrightnessOp: TJaM.CommandProc ~ { DoStyleOp[frame, underlineBrightnessParam] }; underlineBrightnessParam: Param _ Preregister[NEW[real ParamRec _ [realOps, $underlineBrightness, real[underlineBrightness]]], UnderlineBrightnessOp]; UnderlineColorOp: TJaM.CommandProc ~ { DoStyleOp[frame, underlineColorParam] }; underlineColorParam: Param _ Preregister[NEW[color ParamRec _ [colorOps, $underlineColor, color[underlineHue, underlineSaturation, underlineBrightness]]], UnderlineColorOp]; StrikeoutThicknessOp: TJaM.CommandProc ~ { DoStyleOp[frame, strikeoutThicknessParam] }; strikeoutThicknessParam: Param _ Preregister[NEW[real ParamRec _ [realOps, $strikeoutThickness, real[strikeoutThickness]]], StrikeoutThicknessOp]; StrikeoutAscentOp: TJaM.CommandProc ~ { DoStyleOp[frame, strikeoutAscentParam] }; strikeoutAscentParam: Param _ Preregister[NEW[real ParamRec _ [realOps, $strikeoutAscent, real[strikeoutAscent]]], StrikeoutAscentOp]; StrikeoutHueOp: TJaM.CommandProc ~ { DoStyleOp[frame, strikeoutHueParam] }; strikeoutHueParam: Param _ Preregister[NEW[real ParamRec _ [realOps, $strikeoutHue, real[strikeoutHue]]], StrikeoutHueOp]; StrikeoutSaturationOp: TJaM.CommandProc ~ { DoStyleOp[frame, strikeoutSaturationParam] }; strikeoutSaturationParam: Param _ Preregister[NEW[real ParamRec _ [realOps, $strikeoutSaturation, real[strikeoutSaturation]]], StrikeoutSaturationOp]; StrikeoutBrightnessOp: TJaM.CommandProc ~ { DoStyleOp[frame, strikeoutBrightnessParam] }; strikeoutBrightnessParam: Param _ Preregister[NEW[real ParamRec _ [realOps, $strikeoutBrightness, real[strikeoutBrightness]]], StrikeoutBrightnessOp]; StrikeoutColorOp: TJaM.CommandProc ~ { DoStyleOp[frame, strikeoutColorParam] }; strikeoutColorParam: Param _ Preregister[NEW[color ParamRec _ [colorOps, $strikeoutColor, color[strikeoutHue, strikeoutSaturation, strikeoutBrightness]]], StrikeoutColorOp]; OutlineBoxThicknessOp: TJaM.CommandProc ~ { DoStyleOp[frame, outlineBoxThicknessParam] }; outlineBoxThicknessParam: Param _ Preregister[NEW[real ParamRec _ [realOps, $outlineBoxThickness, real[outlineboxThickness]]], OutlineBoxThicknessOp]; OutlineBoxBearoffOp: TJaM.CommandProc ~ { DoStyleOp[frame, outlineBoxBearoffParam] }; outlineBoxBearoffParam: Param _ Preregister[NEW[real ParamRec _ [realOps, $outlineBoxBearoff, real[outlineboxBearoff]]], OutlineBoxBearoffOp]; OutlineBoxHueOp: TJaM.CommandProc ~ { DoStyleOp[frame, outlineBoxHueParam] }; outlineBoxHueParam: Param _ Preregister[NEW[real ParamRec _ [realOps, $outlineBoxHue, real[outlineboxHue]]], OutlineBoxHueOp]; OutlineBoxSaturationOp: TJaM.CommandProc ~ { DoStyleOp[frame, outlineBoxSaturationParam] }; outlineBoxSaturationParam: Param _ Preregister[NEW[real ParamRec _ [realOps, $outlineBoxSaturation, real[outlineboxSaturation]]], OutlineBoxSaturationOp]; OutlineBoxBrightnessOp: TJaM.CommandProc ~ { DoStyleOp[frame, outlineBoxBrightnessParam] }; outlineBoxBrightnessParam: Param _ Preregister[NEW[real ParamRec _ [realOps, $outlineBoxBrightness, real[outlineboxBrightness]]], OutlineBoxBrightnessOp]; OutlineBoxColorOp: TJaM.CommandProc ~ { DoStyleOp[frame, outlineBoxColorParam] }; outlineBoxColorParam: Param _ Preregister[NEW[color ParamRec _ [colorOps, $outlineBoxColor, color[outlineboxHue, outlineboxSaturation, outlineboxBrightness]]], OutlineBoxColorOp]; BackgroundAscentOp: TJaM.CommandProc ~ { DoStyleOp[frame, backgroundAscentParam] }; backgroundAscentParam: Param _ Preregister[NEW[real ParamRec _ [realOps, $backgroundAscent, real[backgroundAscent]]], BackgroundAscentOp]; BackgroundDescentOp: TJaM.CommandProc ~ { DoStyleOp[frame, backgroundDescentParam] }; backgroundDescentParam: Param _ Preregister[NEW[real ParamRec _ [realOps, $backgroundDescent, real[backgroundDescent]]], BackgroundDescentOp]; BackgroundHueOp: TJaM.CommandProc ~ { DoStyleOp[frame, backgroundHueParam] }; backgroundHueParam: Param _ Preregister[NEW[real ParamRec _ [realOps, $backgroundHue, real[backgroundHue]]], BackgroundHueOp]; BackgroundSaturationOp: TJaM.CommandProc ~ { DoStyleOp[frame, backgroundSaturationParam] }; backgroundSaturationParam: Param _ Preregister[NEW[real ParamRec _ [realOps, $backgroundSaturation, real[backgroundSaturation]]], BackgroundSaturationOp]; BackgroundBrightnessOp: TJaM.CommandProc ~ { DoStyleOp[frame, backgroundBrightnessParam] }; backgroundBrightnessParam: Param _ Preregister[NEW[real ParamRec _ [realOps, $backgroundBrightness, real[backgroundBrightness]]], BackgroundBrightnessOp]; BackgroundColorOp: TJaM.CommandProc ~ { DoStyleOp[frame, backgroundColorParam] }; backgroundColorParam: Param _ Preregister[NEW[color ParamRec _ [colorOps, $backgroundColor, color[backgroundHue, backgroundSaturation, backgroundBrightness]]], BackgroundColorOp]; AreaHueOp: TJaM.CommandProc ~ { DoStyleOp[frame, areaHueParam] }; areaHueParam: Param _ Preregister[NEW[real ParamRec _ [realOps, $areaHue, real[areaHue]]], AreaHueOp]; AreaSaturationOp: TJaM.CommandProc ~ { DoStyleOp[frame, areaSaturationParam] }; areaSaturationParam: Param _ Preregister[NEW[real ParamRec _ [realOps, $areaSaturation, real[areaSaturation]]], AreaSaturationOp]; AreaBrightnessOp: TJaM.CommandProc ~ { DoStyleOp[frame, areaBrightnessParam] }; areaBrightnessParam: Param _ Preregister[NEW[real ParamRec _ [realOps, $areaBrightness, real[areaBrightness]]], AreaBrightnessOp]; AreaColorOp: TJaM.CommandProc ~ { DoStyleOp[frame, areaColorParam] }; areaColorParam: Param _ Preregister[NEW[color ParamRec _ [colorOps, $areaColor, color[areaHue, areaSaturation, areaBrightness]]], AreaColorOp]; OutlineHueOp: TJaM.CommandProc ~ { DoStyleOp[frame, outlineHueParam] }; outlineHueParam: Param _ Preregister[NEW[real ParamRec _ [realOps, $outlineHue, real[outlineHue]]], OutlineHueOp]; OutlineSaturationOp: TJaM.CommandProc ~ { DoStyleOp[frame, outlineSaturationParam] }; outlineSaturationParam: Param _ Preregister[NEW[real ParamRec _ [realOps, $outlineSaturation, real[outlineSaturation]]], OutlineSaturationOp]; OutlineBrightnessOp: TJaM.CommandProc ~ { DoStyleOp[frame, outlineBrightnessParam] }; outlineBrightnessParam: Param _ Preregister[NEW[real ParamRec _ [realOps, $outlineBrightness, real[outlineBrightness]]], OutlineBrightnessOp]; OutlineColorOp: TJaM.CommandProc ~ { DoStyleOp[frame, outlineColorParam] }; outlineColorParam: Param _ Preregister[NEW[color ParamRec _ [colorOps, $outlineColor, color[outlineHue, outlineSaturation, outlineBrightness]]], OutlineColorOp]; END. |NodeStyleWorks4Impl.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Rick Beach, June 3, 1985 5:44:34 pm PDT Michael Plass, March 27, 1986 4:53:16 pm PST Implements JaM commands for style rules and commands to load styles. Initialization This must be first to pick up the Preregister calls in the start code. New Style Parameters These are style parameters that have not been given a place NodeStyle.RealParam. They may be used in a style just like any other real-valued style parameter, and they may be accessed from a client program by means of NodeStyleOps.GetStyleParam. Number associated with first formatted page Folios smaller than this will not be printed. Use a large value to kill page numbers. Last folio to be placed at the bottom center of the page Page headers will first appear on the page with this folio. Extra fil is inserted if the vertical expansion ratio would exceed this. Spaces in justified lines are never stretched by more than this amount, possibly resulting in a somewhat ragged right margin. Applies at the node level. Should be 1 or 2 Asserts that a new column or page should be started if there is less than this amount of vertical space remaining when the first line of the node is formatted. Added to the bottomIndentStretch when a new column is started because of a keep. Minimum gap between columns Stretchability at the top of the column Stretchability at the bottom of the column Kind of hyphenation applied to this node (applies at node level) Character code for hyphen (applies at character level) Degrees of counterclockwise rotation for the whole page Degrees of counterclockwise rotation for verso pages (only used if 2 sided) Color of the page background Letter Spacing Glue Pagebreak Glue Underline Dimensions and Color Strikeout Dimensions and Color Outline Box Dimensions and Color Background Dimensions and Color Area Color Outline Color Κ1˜codešœ™Kšœ Οmœ1™˜MKšœ(žœS˜~K˜Kš œE˜[Kšœ/žœh˜šK˜Kš œD˜YKšœ.žœe˜–K˜Kš œB˜UKšœ,žœ†˜΅—™Kš  œ:˜EKšœ$žœG˜nK˜Kš œA˜SKšœ+žœ\˜ŠK˜Kš œ@˜QKšœ*žœY˜†K˜Kš œ>˜MKšœ(žœr˜—™Kš œC˜WKšœ-žœb˜’K˜Kš œA˜SKšœ+žœ\˜ŠK˜Kš œ=˜KKšœ'žœP˜zK˜Kš œD˜YKšœ.žœe˜–K˜Kš œD˜YKšœ.žœe˜–K˜Kš œ?˜OKšœ)žœ˜­—™Kš œC˜WKšœ-žœb˜’K˜Kš œ@˜QKšœ*žœY˜†K˜Kš œ=˜KKšœ'žœP˜zK˜Kš œD˜YKšœ.žœe˜–K˜Kš œD˜YKšœ.žœe˜–K˜Kš œ?˜OKšœ)žœ˜­—™ Kš œD˜YKšœ.žœe˜–K˜Kš œB˜UKšœ,žœ_˜ŽK˜Kš œ>˜MKšœ(žœS˜~K˜Kš œE˜[Kšœ/žœh˜šK˜Kš œE˜[Kšœ/žœh˜šK˜Kš œ@˜QKšœ*žœ†˜³—™Kš œA˜SKšœ+žœ\˜ŠK˜Kš œB˜UKšœ,žœ_˜ŽK˜Kš œ>˜MKšœ(žœS˜~K˜Kš œE˜[Kšœ/žœh˜šK˜Kš œE˜[Kšœ/žœh˜šK˜Kš œ@˜QKšœ*žœ†˜³—šœ ™ Kš  œ8˜AKšœ"žœA˜fK˜Kš œ?˜OKšœ)žœV˜‚K˜Kš œ?˜OKšœ)žœV˜‚K˜Kš  œ:˜EKšœ$žœh˜—šœ ™ Kš  œ;˜GKšœ%žœJ˜rK˜Kš œB˜UKšœ,žœ_˜ŽK˜Kš œB˜UKšœ,žœ_˜ŽK˜Kš œ=˜KKšœ'žœw˜‘—K˜Kšžœ˜—…—)d7