-- StyleToolToJaM2.mesa
-- Written by Linda Gass on August 24, 1982 5:38 pm
-- Last Edit by Linda Gass on August 24, 1982 5:38 pm

DIRECTORY
 NodeStyle USING [GetAreaHue, GetAreaSaturation, GetAreaBrightness, GetLineWeight,
  GetOutlineHue, GetOutlineSaturation, GetOutlineBrightness, GetTextHue,
 GetTextSaturation, GetTextBrightness, GetTextRotation],
StyleToolConvert USING [GetPathType];

AppendArtworkInfoRope: PROCEDURE [handle: StyleToolHandle, default: NodeStyle.Ref, displayRope: Rope.ROPE] RETURNS [Rope.ROPE] = BEGIN
 selectionOnRope, nodeInfoRope, defaultRope: Rope.ROPE;
 selectionReal, defaultReal, nodeInfoReal: REAL;

 selectionOnRope ← ChoiceButtons.GetSelectedButton[handle.display.pathTypeChoice];
 defaultRope ← StyleToolConvert.GetPathType[default.pathType];
 nodeInfoRope ← StyleToolConvert.GetPathType[handle.nodeInfo.pathType];
IF RopeDifferences[selectionOnRope, defaultRope, nodeInfoRope] THEN
  displayRope ← Rope.Cat[displayRope, selectionOnRope, " pathType\n"];

 selectionReal←StyleToolConvert.GetNumberFromViewer[
  handle.display.areaHueViewer ! StyleToolConvert.BadNumber => CONTINUE];
 defaultReal ← NodeStyle.GetAreaHue[default];
 nodeInfoReal ← NodeStyle.GetAreaHue[handle.nodeInfo];
IF RealDifferences[selectionReal, defaultReal, nodeInfoReal] THEN  
  displayRope ← Rope.Cat[displayRope,ViewerTools.GetContents[handle.display.areaHueViewer],
   " areaHue\n"];

 selectionReal←StyleToolConvert.GetNumberFromViewer[
  handle.display.areaSaturationViewer ! StyleToolConvert.BadNumber => CONTINUE];
 defaultReal ← NodeStyle.GetAreaSaturation[default];
 nodeInfoReal ← NodeStyle.GetAreaSaturation[handle.nodeInfo];
IF RealDifferences[selectionReal, defaultReal, nodeInfoReal] THEN
  displayRope ← Rope.Cat[displayRope,
   ViewerTools.GetContents[handle.display.areaSaturationViewer]," areaSaturation\n"];

 selectionReal←StyleToolConvert.GetNumberFromViewer[
  handle.display.areaBrightnessViewer ! StyleToolConvert.BadNumber => CONTINUE];
 defaultReal ← NodeStyle.GetAreaBrightness[default];
 nodeInfoReal ← NodeStyle.GetAreaBrightness[handle.nodeInfo];
IF RealDifferences[selectionReal, defaultReal, nodeInfoReal] THEN
  displayRope ← Rope.Cat[displayRope,
   ViewerTools.GetContents[handle.display.areaBrightnessViewer]," areaBrightness\n"];

 selectionReal←StyleToolConvert.GetNumberFromViewer[
  handle.display.outlineHueViewer ! StyleToolConvert.BadNumber => CONTINUE];
 defaultReal ← NodeStyle.GetOutlineHue[default];
 nodeInfoReal ← NodeStyle.GetOutlineHue[handle.nodeInfo];
IF RealDifferences[selectionReal, defaultReal, nodeInfoReal] THEN
  displayRope ← Rope.Cat[displayRope,
   ViewerTools.GetContents[handle.display.outlineHueViewer]," outlineHue\n"];

 selectionReal←StyleToolConvert.GetNumberFromViewer[
  handle.display.outlineSaturationViewer ! StyleToolConvert.BadNumber => CONTINUE];
 defaultReal ← NodeStyle.GetOutlineSaturation[default];
 nodeInfoReal ← NodeStyle.GetOutlineSaturation[handle.nodeInfo];
IF RealDifferences[selectionReal, defaultReal, nodeInfoReal] THEN
  displayRope ← Rope.Cat[displayRope,
   ViewerTools.GetContents[handle.display.outlineSaturationViewer]," outlineSaturation\n"];

 selectionReal←StyleToolConvert.GetNumberFromViewer[
  handle.display.outlineBrightnessViewer ! StyleToolConvert.BadNumber => CONTINUE];
 defaultReal ← NodeStyle.GetOutlineBrightness[default];
 nodeInfoReal ← NodeStyle.GetOutlineBrightness[handle.nodeInfo];
IF RealDifferences[selectionReal, defaultReal, nodeInfoReal] THEN
  displayRope ← Rope.Cat[displayRope,
   ViewerTools.GetContents[handle.display.outlineBrightnessViewer]," outlineBrightness\n"];

 selectionReal←StyleToolConvert.GetNumberFromViewer[
  handle.display.textHueViewer ! StyleToolConvert.BadNumber => CONTINUE];
 defaultReal ← NodeStyle.GetTextHue[default];
 nodeInfoReal ← NodeStyle.GetTextHue[handle.nodeInfo];
IF RealDifferences[selectionReal, defaultReal, nodeInfoReal] THEN
  displayRope ← Rope.Cat[displayRope, ViewerTools.GetContents[handle.display.textHueViewer],
   " textHue\n"];

 selectionReal←StyleToolConvert.GetNumberFromViewer[
  handle.display.textSaturationViewer ! StyleToolConvert.BadNumber => CONTINUE];
 defaultReal ← NodeStyle.GetTextSaturation[default];
 nodeInfoReal ← NodeStyle.GetTextSaturation[handle.nodeInfo];
IF RealDifferences[selectionReal, defaultReal, nodeInfoReal] THEN
  displayRope ← Rope.Cat[displayRope,
   ViewerTools.GetContents[handle.display.textSaturationViewer]," textSaturation\n"];

 selectionReal←StyleToolConvert.GetNumberFromViewer[
  handle.display.textBrightnessViewer ! StyleToolConvert.BadNumber => CONTINUE];
 defaultReal ← NodeStyle.GetTextBrightness[default];
 nodeInfoReal ← NodeStyle.GetTextBrightness[handle.nodeInfo];
IF RealDifferences[selectionReal, defaultReal, nodeInfoReal] THEN
  displayRope ← Rope.Cat[displayRope,
   ViewerTools.GetContents[handle.display.textBrightnessViewer]," textBrightness\n"];

 selectionReal←StyleToolConvert.GetNumberFromViewer[
  handle.display.textRotationViewer ! StyleToolConvert.BadNumber => CONTINUE];
 defaultReal ← NodeStyle.GetTextRotation[default];
 nodeInfoReal ← NodeStyle.GetTextRotation[handle.nodeInfo];
IF RealDifferences[selectionReal, defaultReal, nodeInfoReal] THEN
  displayRope ← Rope.Cat[displayRope,
   ViewerTools.GetContents[handle.display.textRotationViewer]," textRotation\n"];

 selectionReal←StyleToolConvert.GetNumberFromViewer[
  handle.display.lineWeightViewer ! StyleToolConvert.BadNumber => CONTINUE];
 defaultReal ← NodeStyle.GetLineWeight[default];
 nodeInfoReal ← NodeStyle.GetLineWeight[handle.nodeInfo];
IF RealDifferences[selectionReal, defaultReal, nodeInfoReal] THEN
  displayRope ← Rope.Cat[displayRope,
   ViewerTools.GetContents[handle.display.lineWeightViewer]," lineWeight\n"];
   
RETURN[displayRope];
END;