BuildBiScrollersLine: PROC [ggData: GGData] = {
noOpChoice: AtomButtons.PopUpChoice ← [LIST [$NoOp], "", "no-op" ];
disableDecoding: BOOLNOT GGState.GetQuickClickMode[];
nextX: INTEGER;
doc: Rope.ROPE ← "BiScrollersDoc.tioga";
ggDoc: Rope.ROPE ← Rope.Concat[GGUIUtility.GGHomeDirectory[], "GargoyleDoc.tioga"];
scaleHelp: PopUpButtons.Help←PopUpButtons.HelpFromDoc[doc, LIST["Scale:"]];
scaleMenu: AtomButtons.ButtonLineEntry ←
[popUpButton["Scale", PUChoiceList [
Choice[List [$ScalePop, $Magnify], "Magnify [T]", "Double magnification (or multiply by selection)"],
Choice[List [$ScalePop, $Reset], "Reset", "Reset magnification"],
Choice[List [$ScalePop, $Shrink], "Shrink [T]", "Halve magnification (or divide by selection)"]
],
-1, FALSE, popUpFont, scaleHelp, disableDecoding]];
rotateHelp: PopUpButtons.Help←PopUpButtons.HelpFromDoc[doc, LIST["Rotate:"]];
rotateMenu: AtomButtons.ButtonLineEntry ←
[popUpButton["Rotate", PUChoiceList [
Choice[List [$RotatePop, $Left], "Left [T]", "Rotate left by 90 or selection"],
Choice[List [$RotatePop, $Reset], "Reset", "Reset rotation"],
Choice[List [$RotatePop, $Right], "Right [T]", "Rotate right by 90 or selection"],
Choice[List [$RotatePop, $Left], "Left [T]", "Rotate left by 90 or selection"],
Choice[List [$RotatePop, $Half], "Half", "Rotate 180"],
Choice[List [$RotatePop, $Right], "Right [T]", "Rotate right by 90 or selection"]
],
-1, FALSE, popUpFont, rotateHelp, disableDecoding]];
fitHelp: PopUpButtons.Help←PopUpButtons.HelpFromDoc[doc, LIST["Fit:"]];
fitMenu: AtomButtons.ButtonLineEntry ←
[popUpButton["Fit", PUChoiceList [
Choice[List [$FitPop, $FitUniformly], "FitUniformly", "Translate and scale to fill viewer (X and Y scaled by same factor)"],
Choice[List [$FitPop, $FitXY], "FitXY", "x and y may be scaled by different factors"]
],
-1, FALSE, popUpFont, fitHelp, disableDecoding]];
resetHelp: PopUpButtons.Help←PopUpButtons.HelpFromDoc[doc, LIST["Reset:"]];
resetMenu: AtomButtons.ButtonLineEntry ←
[popUpButton["Reset", PUChoiceList [
Choice[List [$ResetPop, $Vanilla], "Vanilla", "Reset to some vanilla transform"],
Choice[List [$ResetPop, $VanillaAndCenter], "VanillaAndCenter", "Reset then Center"],
Choice[List [$ResetPop, $Center], "Center", "Put center of data in center of viewer"]
],
-1, FALSE, popUpFont, resetHelp, disableDecoding]];
edgeHelp: PopUpButtons.Help←PopUpButtons.HelpFromDoc[doc, LIST["Edge:"]];
edgeMenu: AtomButtons.ButtonLineEntry ←
[popUpButton["Edge", PUChoiceList [
Choice[List[$EdgePop,$Left], "Left", "Slide left edge of data to left edge of viewer"],
Choice[List[$EdgePop,$Top], "Top", "Slide top edge of data to top edge of viewer"],
Choice[List[$EdgePop,$Right], "Right", "Slide right edge of data to right edge of viewer"],
Choice[List[$EdgePop,$TopLeft], "TopLeft", "Align upper left corner of data and viewer"],
Choice[List[$EdgePop,$TopMiddle], "TopMiddle", "Align middle of top edge of data and viewer"],
Choice[List[$EdgePop,$TopRight], "TopRight", "Align upper right corner of data and viewer"],
Choice[List[$EdgePop,$MidLeft], "MidLeft", "Align middle of left edge of data and viewer"],
Choice[List[$EdgePop,$BotMiddle], "BotMiddle", "Align middle of bottom edge of data and viewer"],
Choice[List[$EdgePop,$MidRight], "MidRight", "Align middle of right edge of data and viewer"],
Choice[List[$EdgePop,$BotLeft], "BotLeft", "Align lower left corner of data and viewer"],
Choice[List[$EdgePop,$Bottom], "Bottom", "Slide bottom edge of data to bottom edge of viewer"],
Choice[List[$EdgePop,$BotRight], "BotRight", "Align lower right corner of data and viewer"],
],
-1, FALSE, popUpFont, edgeHelp, disableDecoding]];
prevHelp: PopUpButtons.Help←PopUpButtons.HelpFromDoc[doc, LIST["Prev:"]];
prevMenu: AtomButtons.ButtonLineEntry ←
[popUpButton["Prev", PUChoiceList [
Choice[List [$PrevTransform], "PrevTransform", "Restore previous client-to-viewer transform"]
],
-1, FALSE, popUpFont, prevHelp, disableDecoding]];
centerFitHelp: PopUpButtons.Help←PopUpButtons.HelpFromDoc[ggDoc, LIST["CenterFit Menu"]];
centerFitMenu: AtomButtons.ButtonLineEntry ←
[popUpButton["CenterFit", PUChoiceList [
Choice[List [$CenterSel], "CenterSel [G]", "Center the selected Gargoyle objects in the viewer"],
Choice[List [$CenterCaret], "CenterCaret", "Center the Gargoyle caret in the viewer"],
Choice[List [$FitSel], "FitSel [G]", "Center and evenly scale the selected Gargoyle objects to fill the viewer"]
],
-1, FALSE, popUpFont, NIL, disableDecoding]];
detailsHelp: PopUpButtons.Help←PopUpButtons.HelpFromDoc[ggDoc, LIST["Details Menu"]];
detailsMenu: AtomButtons.ButtonLineEntry ←
[popUpButton["Details", PUChoiceList [
Choice[List [$SetBiScrollersTransform], "SetBiScrollersTransform [T]", "Set BiScrollers transformation from Tioga selection (factored form)"],
Choice[List [$ShowBiScrollersTransform], "ShowBiScrollersTransform", "Show the current BiScrollers transformation in factored form"]
],
-1, FALSE, popUpFont, detailsHelp, disableDecoding]];
refreshHelp: PopUpButtons.Help←PopUpButtons.HelpFromDoc[ggDoc, LIST["Refresh Menu"]];
refreshMenu: AtomButtons.ButtonLineEntry ←
[popUpButton["Refresh", PUChoiceList [
Choice[List [$Refresh], "Refresh", "Redraw the screen from scratch"]
],
-1, FALSE, popUpFont, refreshHelp, disableDecoding]];
propsHelp: PopUpButtons.Help←PopUpButtons.HelpFromDoc[ggDoc, LIST["Props Menu"]];
propsMenu: AtomButtons.ButtonLineEntry ←
[popUpButton["Props", PUChoiceList [
Choice[List [$SetProp], "SetProp [GT]", "Add a property in the form (key value) to selected Gargoyle objects"],
Choice[List [$GetProp], "GetProp [GT]", "Show the value corresponding to the selected key"],
Choice[List [$RemoveProp], "RemoveProp [GT]", "Remove the selected key from the selected Gargoyle objects"],
Choice[List [$CopyProps], "CopyProps [G]", "Copys the properties from the last selected Gargoyle object to all other selected objects"],
Choice[List [$ListProps], "ListProps [G]", "List the keys that are associated with the selected Gargoyle objects"],
noOpChoice
],
-1, FALSE, popUpFont, refreshHelp, disableDecoding]];
nextX ← AtomButtons.BuildButtonLine[container: ggData.controls.panel, x: 0, y: ggData.height, clientData: ggData, handleProc: GGUserInput.EventNotify, entries: LIST[
scaleMenu,
rotateMenu,
fitMenu,
resetMenu,
edgeMenu,
prevMenu,
centerFitMenu,
detailsMenu,
refreshMenu,
[twoState["Active", LIST[$ToggleActive], FALSE, ActiveInGGData]],
propsMenu
],
horizontalSpace: entryHSpace, lineHeight: entryHeight];
ggData.height ← entryHeight;
};