(FILECREATED "18-Mar-85 18:38:56" {PHYLUM}<NOTECARDS>RELEASE1.2>NCSPREADSHEETCARD.;2 3851 changes to: (VARS NCSPREADSHEETCARDCOMS) previous date: "12-Feb-85 23:10:12" {PHYLUM}<NOTECARDS>RELEASE1.2>NCSPREADSHEETCARD.;1) (* Copyright (c) 1985 by Xerox Corporation. All rights reserved.) (PRETTYCOMPRINT NCSPREADSHEETCARDCOMS) (RPAQQ NCSPREADSHEETCARDCOMS ((E (SETQ NC.SystemDate (DATE)) (UNMARKASCHANGED (QUOTE NC.SystemDate) (QUOTE VARS))) (VARS NC.SystemDate) (P (UNMARKASCHANGED (QUOTE NC.SystemDate) (QUOTE VARS))) (* * spreadsheet stuff) (GLOBALVARS INTERCALC.WindowList) (FNS NC.AddSpreadsheetToCard NC.AskSpreadsheetTitle NC.GetSpreadsheets NC.IntercalcActiveP))) (RPAQQ NC.SystemDate "18-Mar-85 18:38:57") (UNMARKASCHANGED (QUOTE NC.SystemDate) (QUOTE VARS)) (* * spreadsheet stuff) (DECLARE: DOEVAL@COMPILE DONTCOPY (GLOBALVARS INTERCALC.WindowList) ) (DEFINEQ (NC.AddSpreadsheetToCard (LAMBDA (TextStream) (* rht: "20-Sep-84 11:54") (* * Called from a TEXT TEdit window to add a new spreadsheet to the text.) (PROG (Title (Window (WINDOW.FROM.TEDIT.THING TextStream))) (COND ((NC.IntercalcActiveP) (SETQ Title (NC.AskSpreadsheetTitle Window)) (AND Title (RETURN (Intercalc.InsertImageObj Window Title)))) (T (NC.PrintMsg NIL T "Sorry, Intercalc has not been loaded.")))))) (NC.AskSpreadsheetTitle (LAMBDA (MainWindow) (* rht: "26-Sep-84 12:33") (* * Asks the user to choose a spreadsheet from the existing ones or choose a title for a new one.) (PROG (Menu Choice SpreadsheetTitles) (SETQ SpreadsheetTitles (for Win in (NC.GetSpreadsheets) collect (WINDOWPROP Win (QUOTE SHEETNAME)))) (GETPROMPTWINDOW MainWindow 3 (FONTCREATE (QUOTE HELVETICA) 10)) (NC.PrintMsg MainWindow T "Please choose spreadsheet." (CHARACTER 13)) (SETQ Menu (create MENU TITLE ← "Spreadsheet Title?" ITEMS ←(APPEND SpreadsheetTitles (LIST (QUOTE --New% Spreadsheet--) (QUOTE **CANCEL**))) MENUPOSITION ←(AND (WINDOWP MainWindow) (create POSITION XCOORD ←(fetch (REGION LEFT) of (WINDOWPROP MainWindow (QUOTE REGION))) YCOORD ←(fetch (REGION TOP) of (WINDOWREGION MainWindow)))))) (SETQ Choice (MENU Menu)) (COND ((EQ Choice (QUOTE **CANCEL**)) (SETQ Choice NIL))) (COND ((EQ Choice (QUOTE --New% Spreadsheet--)) (SETQ Choice (NC.AskUser "Enter new spreadsheet title" " -- " NIL NIL MainWindow T)) (CreateSheet Choice))) (NC.ClearMsg MainWindow T) (RETURN Choice)))) (NC.GetSpreadsheets (LAMBDA NIL (* rht: "20-Sep-84 11:49") (* * Return the list of all currently active intercalc spreadsheets.) (* rht: "20-Sep-84 11:47") INTERCALC.WindowList)) (NC.IntercalcActiveP (LAMBDA NIL (* rht: "20-Sep-84 11:58") (* * Is intercalc loaded and active in the current environment?) (* rht: "20-Sep-84 11:47") (BOUNDP (QUOTE INTERCALC.WindowList)))) ) (PUTPROPS NCSPREADSHEETCARD COPYRIGHT ("Xerox Corporation" 1985)) (DECLARE: DONTCOPY (FILEMAP (NIL (980 3763 (NC.AddSpreadsheetToCard 990 . 1541) (NC.AskSpreadsheetTitle 1543 . 3096) ( NC.GetSpreadsheets 3098 . 3418) (NC.IntercalcActiveP 3420 . 3761))))) STOP