<< StyleToolDefs.mesa Written by Linda Gass on July 27, 1982 12:27 pm Last edit by Linda Gass on November 4, 1982 2:23 pm>> <> DIRECTORY Buttons USING [Button], ChoiceButtons, Containers USING [Container], Graphics USING [Box], Labels USING [Label], NodeStyle USING [Ref], Rope USING [ROPE], ViewerClasses USING [Viewer]; StyleToolDefs: CEDAR DEFINITIONS = BEGIN <> StyleToolHandle: TYPE = REF StyleToolHandleRec; <> StyleToolHandleRec: TYPE = RECORD [ outer: Containers.Container _ NIL, -- handle for the enclosing container height: CARDINAL _ 0, -- height measured from the top of the container styleNameData: ChoiceButtons.PromptDataRef _ NIL, -- relevent data for each section below formatNameData: ChoiceButtons.PromptDataRef _ NIL, looksData: ChoiceButtons.PromptDataRef _ NIL, ruleType: ChoiceButtons.EnumTypeRef, display: ViewerDisplayRec, swap: SwapRec, layoutGraphics: LayoutRec, changesMode: BOOLEAN _ FALSE, -- indicates only interested in changes to a format or look default: NodeStyle.Ref, nodeInfo: NodeStyle.Ref, looksInfo: NodeStyle.Ref, sample: SampleRec, userAware: BOOLEAN ]; ViewerDisplayRec: TYPE = RECORD [ -- font information fontFamilyChoice: ChoiceButtons.EnumTypeRef, fontFamilyOtherLabel: Labels.Label, fontFamilyOtherViewer: ViewerClasses.Viewer, fontFaceChoice: ChoiceButtons.EnumTypeRef, boldFontFace: ChoiceButtons.ThreeStateRef, italicFontFace: ChoiceButtons.ThreeStateRef, fontSizeInfo: ValueAndUnitsRef, fontAlphabetsChoice: ChoiceButtons.EnumTypeRef, fontUnderliningChoice: ChoiceButtons.EnumTypeRef, -- Indent information leftIndentInfo: ValueAndUnitsRef, rightIndentInfo: ValueAndUnitsRef, firstIndentInfo: ValueAndUnitsRef, restIndentInfo: ValueAndUnitsRef, topIndentInfo: ValueAndUnitsRef, bottomIndentInfo: ValueAndUnitsRef, -- leading information leadingContainer: Containers.Container, stretchShrinkContainer: Containers.Container, leadingInfo: LeadingRef, topLeadingInfo: LeadingRef, bottomLeadingInfo: LeadingRef, -- miscellaneous information vshiftInfo: ValueAndUnitsRef, minLineGapInfo: ValueAndUnitsRef, tabStopsViewer: ViewerClasses.Viewer, lineFormattingChoice: ChoiceButtons.EnumTypeRef, -- Tioga Artwork information pathTypeChoice: ChoiceButtons.EnumTypeRef, areaHueViewer: ViewerClasses.Viewer, areaSaturationViewer: ViewerClasses.Viewer, areaBrightnessViewer: ViewerClasses.Viewer, outlineHueViewer: ViewerClasses.Viewer, outlineSaturationViewer: ViewerClasses.Viewer, outlineBrightnessViewer: ViewerClasses.Viewer, textHueViewer: ViewerClasses.Viewer, textSaturationViewer: ViewerClasses.Viewer, textBrightnessViewer: ViewerClasses.Viewer, textRotationViewer: ViewerClasses.Viewer, lineWeightViewer: ViewerClasses.Viewer ]; ValueAndUnitsRef: TYPE = REF ValueAndUnitsRec; ValueAndUnitsRec: TYPE = RECORD [ valueData: ChoiceButtons.PromptDataRef, units: ChoiceButtons.EnumTypeRef, originalValue: REAL, originalUnits: Rope.ROPE ]; LeadingRef: TYPE = REF LeadingRec; LeadingRec: TYPE = RECORD [ leading: ValueAndUnitsRef, stretch: ChoiceButtons.PromptDataRef, shrink: ChoiceButtons.PromptDataRef, originalStretch, originalShrink: REAL ]; FontFamilyRec: TYPE = RECORD [ name: Rope.ROPE, -- the name which appears in one of the standard buttons text: Rope.ROPE -- used if the font family name is non-standard. Then name becomes ]; -- "other" and this contains the actual font family name SwapRec: TYPE = RECORD [ outer: Containers.Container _ NIL, -- container holding both print into and JamCodeInfo height: CARDINAL _ 0, -- so that the paint proc will only paint the areas nec. penalty: RECORD [ outer: Containers.Container _ NIL, -- container holding all the penalty info height: CARDINAL _ 0, -- height of this container pageBreakPenalty: ViewerClasses.Viewer _ NIL, afterFirstLinePenalty: ViewerClasses.Viewer _ NIL, beforeLastLinePenalty: ViewerClasses.Viewer _ NIL, beforeFirstLinePenalty: ViewerClasses.Viewer _ NIL, afterLastLinePenalty: ViewerClasses.Viewer _ NIL ], layoutHeader: RECORD [ outer: Containers.Container _ NIL, -- container holding page layout header height: CARDINAL _ 0 ], layout: RECORD [ outer: Containers.Container _ NIL, -- container holding all the page layout parameters height: CARDINAL _ 0, visible: BOOLEAN _ FALSE, parametersButton: Buttons.Button, pageWidth: ValueAndUnitsRef, pageLength: ValueAndUnitsRef, leftMargin: ValueAndUnitsRef, rightMargin: ValueAndUnitsRef, topMargin: ValueAndUnitsRef, bottomMargin: ValueAndUnitsRef, headerMargin: ValueAndUnitsRef, footerMargin: ValueAndUnitsRef, bindingMargin: ValueAndUnitsRef, lineLength: ValueAndUnitsRef, column: ViewerClasses.Viewer _ NIL -- number of columns ], jamCodeInfo: RECORD [ outer: Containers.Container _ NIL, -- container holding the whole thing text: ViewerClasses.Viewer _ NIL -- the actual place where text appears ] ]; SampleRec: TYPE = RECORD [ viewer: ViewerClasses.Viewer _ NIL ]; LayoutRec: TYPE = RECORD [ -- info used for graphical page layout exists: BOOLEAN _ FALSE, -- indicates if a graphics viewer has been created container: Containers.Container _ NIL, numbersContainer: Containers.Container, units: UnitsRecord, indent: INTEGER, interval: INTEGER, skip: INTEGER, increment: INTEGER, setButton: Buttons.Button, pageWidth: ChoiceButtons.PromptDataRef, pageLength: ChoiceButtons.PromptDataRef, leftMargin: ChoiceButtons.PromptDataRef, rightMargin: ChoiceButtons.PromptDataRef, topMargin: ChoiceButtons.PromptDataRef, bottomMargin: ChoiceButtons.PromptDataRef, bindingMargin: ChoiceButtons.PromptDataRef, viewer: ViewerClasses.Viewer, currentMargin: MarginType _ none, -- indicates which margin we are currently updating with the mouse screenLeftMargin, screenRightMargin, screenTopMargin, screenBottomMargin, screenBindingMargin: REAL, currentPage: PageBoundaryType, screenPage: Graphics.Box ]; UnitsRecord: TYPE = RECORD [ ref: ChoiceButtons.EnumTypeRef, prev: Rope.ROPE ]; MarginType: TYPE = {left, right, binding, top, bottom, none}; PageBoundaryType: TYPE = {side, top, none}; fontFamilyList: LIST OF Rope.ROPE; fontFaceList: LIST OF Rope.ROPE; fontAlphabetsList: LIST OF Rope.ROPE; fontUnderliningList: LIST OF Rope.ROPE; lineFormattingList: LIST OF Rope.ROPE; pathTypeList: LIST OF Rope.ROPE; ruleList: LIST OF Rope.ROPE; unitsList: LIST OF Rope.ROPE; realNumberFormat: Rope.ROPE; -- format used for writing out real numbers integerFormat: Rope.ROPE; -- format used for writing out integers END.