BEGIN
SetupButtons:
PROC [name: Rope.
ROPE, which: SelectionData, scroll:
BOOL ←
FALSE, height:
CARDINAL ← entryHeight, edit:
BOOL ←
FALSE] =
BEGIN
which.button ← Buttons.Create
[info:
[name: name,
wx: firstColumnIndent, -- keep the buttons aligned
wy: fingerHandle.height,
ww: firstColumnWidth,
wh: entryHeight, -- specify rather than defaulting so line is uniform
parent: fingerHandle.outer,
border: FALSE ],
proc: SelectionButtonClicked,
clientData: which]; -- this will be passed to our button proc
which.parentHandle ← fingerHandle;
which.selectable ← edit;
Buttons.SetDisplayStyle[which.button, $WhiteOnBlack];
which.result ← ViewerOps.CreateViewer
[flavor: $Text,
info:
[wx: firstColumnIndent + firstColumnWidth + horizSpace, -- keep the buttons aligned
wy: fingerHandle.height,
ww: secondColumnWidth,
wh: height,
scrollable: scroll,
parent: fingerHandle.outer,
border: FALSE]];
IF NOT edit THEN ViewerTools.InhibitUserEdits[which.result];
fingerHandle.height ← fingerHandle.height + height; -- maintain total height
END;
fingerHandle.height ← fingerHandle.height + entryVSpace; -- space down from the top of the viewer
fingerHandle.performFingerButton ← Buttons.Create
-- button for performing finger
[info:
[name: "perform finger",
wx: 0,
wy: fingerHandle.height,
wh: entryHeight, -- specify rather than defaulting so line is uniform
parent: fingerHandle.outer,
border: TRUE],
clientData: fingerHandle, -- this will be passed to our button proc
proc: PerformFingerAtTool];
fingerHandle.storeChangesButton ← Buttons.Create
-- button for making changes to finger data
[info:
[name: "store changes",
wx: fingerHandle.performFingerButton.wx + fingerHandle.performFingerButton.ww + horizSpace,
wy: fingerHandle.height,
wh: entryHeight, -- specify rather than defaulting so line is uniform
parent: fingerHandle.outer,
border: TRUE],
clientData: fingerHandle, -- this will be passed to our button proc
proc: StoreChanges];
-- Can't use talker yet, because it hasn't been carried over
fingerHandle.talkButton ← Buttons.Create -- button to connect to talk program
[info:
[name: "talk to",
wx: fingerHandle.storeChangesButton.wx + fingerHandle.storeChangesButton.ww + horizSpace,
wy: fingerHandle.height,
wh: entryHeight, -- specify rather than defaulting so line is uniform
parent: fingerHandle.outer,
border: TRUE],
clientData: fingerHandle, -- this will be passed to our button proc
proc: TalkTo];
fingerHandle.height ← fingerHandle.height + entryHeight + entryVSpace; -- space down from the action buttons
SetupButtons[name: "User Name:", which: fingerHandle.name, edit: TRUE];
fingerHandle.name.registration ← ViewerEvents.RegisterEventProc[SetNew, edit, fingerHandle.name.result];
SetupButtons[name: "Nick Name:", which: fingerHandle.nickName, edit: TRUE];
fingerHandle.nickName.registration ← ViewerEvents.RegisterEventProc[SetNew, edit, fingerHandle.nickName.result];
SetupButtons[name: "Actions:", which: fingerHandle.actions, scroll: TRUE, height: 3*entryHeight, edit: FALSE];
SetupButtons[name: "Mail Read:", which: fingerHandle.mailRead, scroll: FALSE, height: entryHeight, edit: FALSE];
SetupButtons[name: "Picture Filename:", which: fingerHandle.pictureFileName, edit: TRUE];
fingerHandle.pictureFileName.registration ← ViewerEvents.RegisterEventProc[SetNew, edit, fingerHandle.pictureFileName.result];
SetupButtons[name: "Plan:", which: fingerHandle.plan, scroll: TRUE, height: 3*entryHeight, edit: TRUE];
fingerHandle.plan.registration ← ViewerEvents.RegisterEventProc[SetNew, edit, fingerHandle.plan.result];
fingerHandle.pictureViewer ← ViewerOps.CreateViewer[flavor: $FingerPicture,
info: [wx: firstColumnIndent + firstColumnWidth + horizSpace + secondColumnWidth + horizSpace, wy: fingerHandle.name.result.wy, ww: pictureColumnWidth, wh: pictureHeight, parent: fingerHandle.outer, border: FALSE, scrollable: FALSE],
paint: TRUE];
host part of the screen
fingerHandle.height ← fingerHandle.height + entryVSpace; -- space down a line
fingerHandle.performHostButton ← Buttons.Create
[info:
[name: "Get Host Information",
wx: 0,
wy: fingerHandle.height,
wh: entryHeight, -- specify rather than defaulting so line is uniform
parent: fingerHandle.outer,
border: TRUE],
clientData: fingerHandle, -- this will be passed to our button proc
proc: PerformHost];
fingerHandle.storeHostButton ← Buttons.Create
-- button for making changes to finger data
[info:
[name: "Store Host Data",
wx: fingerHandle.performFingerButton.wx + fingerHandle.performHostButton.ww + horizSpace,
wy: fingerHandle.height,
wh: entryHeight, -- specify rather than defaulting so line is uniform
parent: fingerHandle.outer,
border: TRUE],
clientData: fingerHandle, -- this will be passed to our button proc
proc: StoreHost];
fingerHandle.height ← fingerHandle.height + entryHeight + entryVSpace; -- space down from the action buttons
SetupButtons[name: "Host:", which: fingerHandle.host, edit: TRUE];
fingerHandle.host.registration ← ViewerEvents.RegisterEventProc[SetNew, edit, fingerHandle.host.result];
SetupButtons[name: "Owner:", which: fingerHandle.owner, edit: TRUE];
fingerHandle.owner.registration ← ViewerEvents.RegisterEventProc[SetNew, edit, fingerHandle.owner.result];
SetupButtons[name: "Location:", which: fingerHandle.location, edit: TRUE];
fingerHandle.location.registration ← ViewerEvents.RegisterEventProc[SetNew, edit, fingerHandle.location.result];
SetupButtons[name: "Gateway:", which: fingerHandle.gateway, edit: TRUE];
fingerHandle.gateway.registration ← ViewerEvents.RegisterEventProc[SetNew, edit, fingerHandle.gateway.result];
SetupButtons[name: "Network:", which: fingerHandle.network, edit: TRUE];
fingerHandle.network.registration ← ViewerEvents.RegisterEventProc[SetNew, edit, fingerHandle.network.result];
SetupButtons[name: "Last User:", which: fingerHandle.lastchange, scroll: TRUE, height: entryHeight, edit: FALSE];
fingerHandle.height ← fingerHandle.height + entryVSpace; -- space at bottom of finger viewer