Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
175 changes: 149 additions & 26 deletions library/NCFILECARD
Original file line number Diff line number Diff line change
@@ -1,4 +1,50 @@
(DEFINE-FILE-INFO PACKAGE "IL" READTABLE "INTERLISP" BASE 10)(FILECREATED " 5-Nov-2020 19:31:00" {DSK}<users>arunwelch>skydrive>documents>unix>lisp>lde>notecards>system>NCFILECARD.;4 18667 previous date%: " 9-Jan-94 21:18:59" {DSK}<users>arunwelch>skydrive>documents>unix>lisp>lde>notecards>system>NCFILECARD.;2)(* ; "Copyright (c) 1985, 1986, 1987, 1988, 1989, 1993, 1994, 2020 by Xerox Corporation. All rights reserved.")(PRETTYCOMPRINT NCFILECARDCOMS)(RPAQQ NCFILECARDCOMS [(DECLARE%: DONTCOPY (PROPS (NCFILECARD MAKEFILE-ENVIRONMENT) (NCFILECARD FILETYPE))) (FNS NCAddStub.FileCard) (* ;;; "Globalvars from elsewhere") (GLOBALVARS NC.DefaultFont TEDIT.DEFAULT.MENU NC.FileCardIcon) (* ;;; "Substance functions") (FNS NC.MakeFileCard NC.EditFileSubstance NC.FileSubstanceDirtyP NC.GetFileSubstance NC.MarkFileSubstanceDirty NC.PutFileSubstance NC.QuitFileSubstance NC.FileCardPutFile) (* ;;; "Utilities") (FNS NC.FileCardFileVersionNumber NC.FileCardTitle NC.FetchTextStream NC.GetFileFromUser NC.MakeFileCardCore NC.SetTextStream NC.FileCardShrinkFn) (BITMAPS NC.FileCardIcon) (FNS NC.AddFileCardType) (DECLARE%: DONTEVAL@LOAD (* * Add file card type to CardTypes list) (P (NC.AddFileCardType)) (* * Hang an ExportSubstanceFn off the File litatom.) (P (PUTPROP 'File 'ExportSubstanceFn (FUNCTION OPENTEXTSTREAM])(DECLARE%: DONTCOPY (PUTPROPS NCFILECARD MAKEFILE-ENVIRONMENT (:PACKAGE "IL" :READTABLE "INTERLISP" :BASE 10))(PUTPROPS NCFILECARD FILETYPE :FAKE-COMPILE-FILE))(DEFINEQ(NCAddStub.FileCard
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)

(FILECREATED "25-Mar-2024 13:01:51" {DSK}<home>frank>il>notecards>system>NCFILECARD.;1 18395

:CHANGES-TO (FNS NC.QuitFileSubstance)

:PREVIOUS-DATE " 5-Nov-2020 19:31:00" {DSK}<home>frank>il>notecards>library>NCFILECARD.;1)


(PRETTYCOMPRINT NCFILECARDCOMS)

(RPAQQ NCFILECARDCOMS
[(DECLARE%: DONTCOPY (PROPS (NCFILECARD MAKEFILE-ENVIRONMENT)
(NCFILECARD FILETYPE)))
(FNS NCAddStub.FileCard)


(* ;;; "Globalvars from elsewhere")

(GLOBALVARS NC.DefaultFont TEDIT.DEFAULT.MENU NC.FileCardIcon)


(* ;;; "Substance functions")

(FNS NC.MakeFileCard NC.EditFileSubstance NC.FileSubstanceDirtyP NC.GetFileSubstance
NC.MarkFileSubstanceDirty NC.PutFileSubstance NC.QuitFileSubstance NC.FileCardPutFile)


(* ;;; "Utilities")

(FNS NC.FileCardFileVersionNumber NC.FileCardTitle NC.FetchTextStream NC.GetFileFromUser
NC.MakeFileCardCore NC.SetTextStream NC.FileCardShrinkFn)
(BITMAPS NC.FileCardIcon)
(FNS NC.AddFileCardType)
(DECLARE%: DONTEVAL@LOAD (* * Add file card type to CardTypes list)
(P (NC.AddFileCardType))
(* * Hang an ExportSubstanceFn off the File litatom.)
(P (PUTPROP 'File 'ExportSubstanceFn (FUNCTION OPENTEXTSTREAM])
(DECLARE%: DONTCOPY

(PUTPROPS NCFILECARD MAKEFILE-ENVIRONMENT (:PACKAGE "IL" :READTABLE "INTERLISP" :BASE 10))

(PUTPROPS NCFILECARD FILETYPE :FAKE-COMPILE-FILE)
)
(DEFINEQ

(NCAddStub.FileCard
(LAMBDA NIL (* ; "Edited 5-Dec-87 20:02 by rht:")

(* * kirk 18Jun86 Add the text card stub)
Expand All @@ -8,7 +54,25 @@
(DECLARE (GLOBALVARS NC.FileCardIcon))
(NC.AddCardTypeStub 'File 'NoteCard 'NCFILECARD NIL `((DisplayedInMenuFlg T)
(LinkIconAttachedBitMap ,NC.FileCardIcon)))
)))(* ;;; "Globalvars from elsewhere")(DECLARE%: DOEVAL@COMPILE DONTCOPY(GLOBALVARS NC.DefaultFont TEDIT.DEFAULT.MENU NC.FileCardIcon))(* ;;; "Substance functions")(DEFINEQ(NC.MakeFileCard
))
)



(* ;;; "Globalvars from elsewhere")

(DECLARE%: DOEVAL@COMPILE DONTCOPY

(GLOBALVARS NC.DefaultFont TEDIT.DEFAULT.MENU NC.FileCardIcon)
)



(* ;;; "Substance functions")

(DEFINEQ

(NC.MakeFileCard
[LAMBDA (Card Title NoDisplayFlg ParamList InterestedWindow RegionOrPosition)
(* ; "Edited 5-Aug-88 15:47 by Trigg")

Expand All @@ -23,7 +87,9 @@
ReturnValue))
(T (AND (OPENWP (NC.FetchWindow Card))
(CLOSEW (NC.FetchWindow Card)))
NIL])(NC.EditFileSubstance
NIL])

(NC.EditFileSubstance
(LAMBDA (Card FileDesignator RegionOrPosition) (* rht%: "29-Apr-87 16:32")

(* * Bring up a TEdit window for Card ID whose substance is specified by file
Expand Down Expand Up @@ -84,7 +150,9 @@
(NC.SetTextStream Card (SETQ TextStream (WINDOWPROP TEditWindow 'TEXTSTREAM)))
(STREAMPROP TextStream 'NoteCardObject Card)
(NC.PutProp Card 'FileVersion (NC.FileCardFileVersionNumber Card))
(RETURN TEditWindow))))(NC.FileSubstanceDirtyP
(RETURN TEditWindow))))

(NC.FileSubstanceDirtyP
(LAMBDA (Card) (* fgh%: "17-Dec-85 18:23")

(* * Return T is TextSubstance has been changed.)
Expand All @@ -93,7 +161,9 @@

(LET (TextStream)
(AND (SETQ TextStream (NC.FetchTextStream Card))
(TEDIT.STREAMCHANGEDP TextStream)))))(NC.GetFileSubstance
(TEDIT.STREAMCHANGEDP TextStream)))))

(NC.GetFileSubstance
(LAMBDA (Card Length Stream VersionNumber) (* fgh%: " 3-Jun-86 15:45")

(* * Read the File designator from DatabaseStream)
Expand All @@ -103,7 +173,9 @@
(* * fgh |6/3/86| Added Stream and VersionNumber args and made READ from
Stream.)

(READ Stream)))(NC.MarkFileSubstanceDirty
(READ Stream)))

(NC.MarkFileSubstanceDirty
(LAMBDA (Card ResetFlg) (* fgh%: "17-Dec-85 18:24")

(* * Mark or unmark TextStream of File being changed.)
Expand All @@ -114,7 +186,9 @@
(AND Window (SETQ TextObj (WINDOWPROP Window 'TEXTOBJ))
(replace (TEXTOBJ \DIRTY) of TextObj with (COND
(ResetFlg NIL)
(T T)))))))(NC.PutFileSubstance
(T T)))))))

(NC.PutFileSubstance
(LAMBDA (Card Stream) (* fgh%: " 3-Jun-86 15:45")

(* * Put a file designator onto DatabaseStream)
Expand All @@ -131,23 +205,27 @@

(PRINT (NC.FetchSubstance Card)
Stream)
0))(NC.QuitFileSubstance
(LAMBDA (WindowOrTextStreamOrCard) (* rht%: "16-Oct-86 16:59")

(* * fgh |12/17/85| Updated for 1.3)

(* * rht 10/16/86%: Removed call to NC.DeactivateCard.)
0))

(NC.QuitFileSubstance
[LAMBDA (WindowOrTextStreamOrCard) (* rht%: "16-Oct-86 16:59")

(* * fgh |12/17/85| Updated for 1.3)

(* * rht 10/16/86%: Removed call to NC.DeactivateCard.)

(LET (Window PromptWindow TextStream TextStreamChanged (Card (NC.CoerceToCard
WindowOrTextStreamOrCard)))
(SETQ TextStream (NC.FetchTextStream Card))
(SETQ Window (NC.FetchWindow Card))
(COND
[COND
(Window (WINDOWDELPROP Window 'CLOSEFN (FUNCTION NC.QuitCard))
(TEDIT.QUIT TextStream)
(AND (SETQ PromptWindow (fetch (TEXTOBJ PROMPTWINDOW) of (TEXTOBJ TextStream)))
(CLOSEW PromptWindow))))
(NC.SetTextStream Card NIL))))(NC.FileCardPutFile
(AND (SETQ PromptWindow (TEDIT.PROMPTWINDOW TextStream))
(CLOSEW PromptWindow]
(NC.SetTextStream Card NIL])

(NC.FileCardPutFile
[LAMBDA (WindowOrCard DatabaseStream QuittingFlg) (* ; "Edited 15-Sep-88 14:47 by Trigg")

(* ;;; "Do the work to save a file card. That is you must put the file if its changed as well as write thee notecard info to the NoteFile")
Expand All @@ -161,7 +239,16 @@
(SETQ TextStream (NC.FetchTextStream Card))
(if (AND TextStream (TEDIT.STREAMCHANGEDP TextStream))
then (TEDIT.PUT TextStream (NC.FetchSubstance Card))
(NC.PutProp Card 'FileVersion (NC.FileCardFileVersionNumber Card]))(* ;;; "Utilities")(DEFINEQ(NC.FileCardFileVersionNumber
(NC.PutProp Card 'FileVersion (NC.FileCardFileVersionNumber Card])
)



(* ;;; "Utilities")

(DEFINEQ

(NC.FileCardFileVersionNumber
(LAMBDA (Card) (* fgh%: "17-Dec-85 18:17")

(* * Return the current version number of the file reffered to by the file card
Expand All @@ -170,7 +257,9 @@
(* * fgh |12/17/85| Updated for 1.3)

(FILENAMEFIELD (FULLNAME (fetch (TEXTOBJ TXTFILE) of (TEXTOBJ (NC.FetchTextStream Card))))
'VERSION)))(NC.FileCardTitle
'VERSION)))

(NC.FileCardTitle
(LAMBDA (Card) (* rht%: "25-Mar-87 15:40")

(* * Determine the title for file card ID)
Expand All @@ -181,12 +270,16 @@
(CONCAT (FILENAMEFIELD FileName 'NAME)
"."
(OR (FILENAMEFIELD FileName 'EXTENSION)
"")))))(NC.FetchTextStream
"")))))

(NC.FetchTextStream
(LAMBDA (Card) (* fgh%: "17-Dec-85 19:32")

(* * fgh |12/17/85| Updated for 1.3)

(NC.FetchUserDataProp Card 'NoteCardTextStream)))(NC.GetFileFromUser
(NC.FetchUserDataProp Card 'NoteCardTextStream)))

(NC.GetFileFromUser
(LAMBDA (Window DontClearPromptFlg FirstTry) (* rht%: "29-Apr-87 15:00")

(* * Create a file designator)
Expand Down Expand Up @@ -217,7 +310,9 @@
Window NIL NIL T))
(NC.GetFileFromUser Window DontClearPromptFlg FirstTry))
(T NIL))
(NC.ClearMsg Window T)))))(NC.MakeFileCardCore
(NC.ClearMsg Window T)))))

(NC.MakeFileCardCore
[LAMBDA (Card Title NoDisplayFlg ParamList InterestedWindow RegionOrPosition)
(* ; "Edited 5-Aug-88 15:48 by Trigg")

Expand Down Expand Up @@ -262,13 +357,17 @@
else (SETQ FileName (NC.GetFileFromUser))
(NC.SetSubstance Card FileName)
(NC.SetTitle Card (NC.FileCardTitle Card))
Card])(NC.SetTextStream
Card])

(NC.SetTextStream
(LAMBDA (Card TextStream) (* fgh%: "17-Dec-85 19:30")

(* * fgh |12/17/85| Updated for 1.3)

(NC.SetUserDataProp Card 'NoteCardTextStream TextStream)
TextStream))(NC.FileCardShrinkFn
TextStream))

(NC.FileCardShrinkFn
[LAMBDA (W) (* ; "Edited 5-Feb-88 23:27 by Trigg")

(* ;;; "This is in order to get the right title on the TEdit icon. This is a kludgy finesse around TEdit's shrunken icon title facility.")
Expand All @@ -277,7 +376,14 @@
 "rht 2/5/88: Now just calls TextCard's shrink fn, slightly modifying the shrunken icon title.")

(NC.TextCardShrinkFn W (CONCAT "File Card" (CHARACTER 13)
"NC: "]))(RPAQQ NC.FileCardIcon #*(21 18)OOOOOH@@OOOOOH@@OOOOOH@@OOOOOH@@H@@@@H@@H@@@@H@@KMBANH@@JABA@H@@JABA@H@@JABA@H@@KIBALH@@JABA@H@@JABA@H@@JABA@H@@JACMNH@@H@@@@H@@H@@@@H@@OOOOOH@@)(DEFINEQ(NC.AddFileCardType
"NC: "])
)

(RPAQQ NC.FileCardIcon #*(21 18)OOOOOH@@OOOOOH@@OOOOOH@@OOOOOH@@H@@@@H@@H@@@@H@@KMBANH@@JABA@H@@JABA@H@@JABA@H@@KIBALH@@JABA@H@@JABA@H@@JABA@H@@JACMNH@@H@@@@H@@H@@@@H@@OOOOOH@@
)
(DEFINEQ

(NC.AddFileCardType
(LAMBDA NIL (* ; "Edited 5-Dec-87 20:02 by rht:")

(* * Add a file card type to the card types list)
Expand All @@ -303,4 +409,21 @@
"Close this note card after saving it in the NoteFile."
)
else Item)))
(LinkIconAttachedBitMap ,NC.FileCardIcon))))))(DECLARE%: DONTEVAL@LOAD (NC.AddFileCardType)(PUTPROP 'File 'ExportSubstanceFn (FUNCTION OPENTEXTSTREAM)))(PUTPROPS NCFILECARD COPYRIGHT ("Xerox Corporation" 1985 1986 1987 1988 1989 1993 1994 2020))(DECLARE%: DONTCOPY (FILEMAP (NIL (1750 2249 (NCAddStub.FileCard 1760 . 2247)) (2433 10425 (NC.MakeFileCard 2443 . 3262) (NC.EditFileSubstance 3264 . 6890) (NC.FileSubstanceDirtyP 6892 . 7274) (NC.GetFileSubstance 7276 . 7654) (NC.MarkFileSubstanceDirty 7656 . 8244) (NC.PutFileSubstance 8246 . 8790) (NC.QuitFileSubstance 8792 . 9660) (NC.FileCardPutFile 9662 . 10423)) (10454 16927 (NC.FileCardFileVersionNumber 10464 . 10891) (NC.FileCardTitle 10893 . 11354) (NC.FetchTextStream 11356 . 11581) (NC.GetFileFromUser 11583 . 13408) (NC.MakeFileCardCore 13410 . 16151) (NC.SetTextStream 16153 . 16400) (NC.FileCardShrinkFn 16402 . 16925)) (17112 18433 (NC.AddFileCardType 17122 . 18431)))))STOP
(LinkIconAttachedBitMap ,NC.FileCardIcon)))))
)
(DECLARE%: DONTEVAL@LOAD

(NC.AddFileCardType)


(PUTPROP 'File 'ExportSubstanceFn (FUNCTION OPENTEXTSTREAM))
)
(DECLARE%: DONTCOPY
(FILEMAP (NIL (1618 2117 (NCAddStub.FileCard 1628 . 2115)) (2301 10247 (NC.MakeFileCard 2311 . 3130) (
NC.EditFileSubstance 3132 . 6758) (NC.FileSubstanceDirtyP 6760 . 7142) (NC.GetFileSubstance 7144 .
7522) (NC.MarkFileSubstanceDirty 7524 . 8112) (NC.PutFileSubstance 8114 . 8658) (NC.QuitFileSubstance
8660 . 9482) (NC.FileCardPutFile 9484 . 10245)) (10276 16749 (NC.FileCardFileVersionNumber 10286 .
10713) (NC.FileCardTitle 10715 . 11176) (NC.FetchTextStream 11178 . 11403) (NC.GetFileFromUser 11405
. 13230) (NC.MakeFileCardCore 13232 . 15973) (NC.SetTextStream 15975 . 16222) (NC.FileCardShrinkFn
16224 . 16747)) (16934 18255 (NC.AddFileCardType 16944 . 18253)))))
STOP
Binary file modified library/NCFILECARD.LCOM
Binary file not shown.
36 changes: 18 additions & 18 deletions system/NCCARDS
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)

(FILECREATED "10-Mar-2024 23:36:16" {DSK}<home>frank>il>notecards>system>NCCARDS.;14 210257
(FILECREATED "25-Mar-2024 12:53:03" {DSK}<home>frank>il>notecards>system>NCCARDS.;16 210260

:CHANGES-TO (FNS NC.EditPropList)

:PREVIOUS-DATE " 8-Mar-2024 15:44:15" {DSK}<home>frank>il>notecards>system>NCCARDS.;13)
:PREVIOUS-DATE "10-Mar-2024 23:36:16" {DSK}<home>frank>il>notecards>system>NCCARDS.;15)


(PRETTYCOMPRINT NCCARDSCOMS)
Expand Down Expand Up @@ -3190,7 +3190,7 @@
(WINDOWPROP editW 'PROPERTYLIST.PROPNAMES (for Item in propList collect (CAR Item)))
(* ;
 "Set the right margin to very-far-away. Prevents stuff from wrapping around")
(TEDIT.PARALOOKS textObj '(RIGHTMARGIN 1000 TABS (50 (80 . LEFT)))
(TEDIT.PARALOOKS menuStream '(RIGHTMARGIN 1000 TABS (50 (80 . LEFT)))
1
(GETFILEINFO menuStream 'LENGTH)) (* ;
 "Set the first tab so the fields will line up correctly")
Expand Down Expand Up @@ -4028,22 +4028,22 @@ NC.UnfileNoteCard 124110 . 127234) (NC.UpdateUpdateList 127236 . 128078) (NC.Col
. 129519) (NC.CardSaveFn 129521 . 138318) (NC.DetermineDisplayRegion 138320 . 144299) (NC.AbortCard
144301 . 144833) (NC.CardNeedsFilingP 144835 . 146303) (NC.TopLevelCardP 146305 . 146635) (
NC.MakeDummyRegion 146637 . 147128) (NC.ValidCardP 147130 . 147601) (NC.TitleBarButtonEventFn 147603
. 148656) (NC.InstallTitleBarMiddleMenu 148658 . 149707)) (149745 194931 (NC.AddPropToPropList 149755
. 148656) (NC.InstallTitleBarMiddleMenu 148658 . 149707)) (149745 194934 (NC.AddPropToPropList 149755
. 154020) (NC.CloseAllPropListEditors 154022 . 154886) (NC.ClosePropListEditor 154888 . 158690) (
NC.DelPropFromList 158692 . 160785) (NC.EditPropButtonFN 160787 . 161092) (NC.EditProperties 161094 .
163491) (NC.EditPropList 163493 . 171312) (NC.ExtractPropList 171314 . 176651) (NC.OpenPropListEditor
176653 . 182506) (NC.ProcessEditedPropList 182508 . 184252) (NC.PropListEditorOpenP 184254 . 185346) (
NC.SelectProperty 185348 . 186384) (NC.ShowLinks 186386 . 192504) (NC.StringIsListP 192506 . 193618) (
NC.PutProp 193620 . 194291) (NC.GetProp 194293 . 194648) (NC.RemProp 194650 . 194929)) (194968 197433
(NC.FetchBeingDeletedFlg 194978 . 195401) (NC.SetBeingDeletedFlg 195403 . 195837) (
NC.RemoveDELETEMEImageObjsFromCard 195839 . 196997) (NC.InsureIntegerDate 196999 . 197431)) (197478
200276 (NC.PlaceMarkerCopyFn 197488 . 197672) (NC.PlaceMarkerDisplayFn 197674 . 198269) (
NC.PlaceMarkerGetFn 198271 . 198435) (NC.PlaceMarkerImageBoxFn 198437 . 199333) (NC.PlaceMarkerPutFn
199335 . 199571) (NC.MakePlaceMarker 199573 . 200274)) (200325 208217 (NC.FetchTitleDate 200335 .
200933) (NC.FetchItemDate 200935 . 201530) (NC.FetchPropListDate 201532 . 202140) (NC.FetchLinksDate
202142 . 202740) (NC.FetchLinkIconAttachedBitMap 202742 . 207086) (NC.FetchLinkDisplayMode 207088 .
207388) (NC.FetchDefaultWidth 207390 . 207672) (NC.FetchDefaultHeight 207674 . 207955) (
NC.FetchLinkAnchorModesSupported 207957 . 208215)) (208218 210081 (NC.SetTitleDate 208228 . 208690) (
NC.SetItemDate 208692 . 209146) (NC.SetPropListDate 209148 . 209615) (NC.SetLinksDate 209617 . 210079)
163491) (NC.EditPropList 163493 . 171315) (NC.ExtractPropList 171317 . 176654) (NC.OpenPropListEditor
176656 . 182509) (NC.ProcessEditedPropList 182511 . 184255) (NC.PropListEditorOpenP 184257 . 185349) (
NC.SelectProperty 185351 . 186387) (NC.ShowLinks 186389 . 192507) (NC.StringIsListP 192509 . 193621) (
NC.PutProp 193623 . 194294) (NC.GetProp 194296 . 194651) (NC.RemProp 194653 . 194932)) (194971 197436
(NC.FetchBeingDeletedFlg 194981 . 195404) (NC.SetBeingDeletedFlg 195406 . 195840) (
NC.RemoveDELETEMEImageObjsFromCard 195842 . 197000) (NC.InsureIntegerDate 197002 . 197434)) (197481
200279 (NC.PlaceMarkerCopyFn 197491 . 197675) (NC.PlaceMarkerDisplayFn 197677 . 198272) (
NC.PlaceMarkerGetFn 198274 . 198438) (NC.PlaceMarkerImageBoxFn 198440 . 199336) (NC.PlaceMarkerPutFn
199338 . 199574) (NC.MakePlaceMarker 199576 . 200277)) (200328 208220 (NC.FetchTitleDate 200338 .
200936) (NC.FetchItemDate 200938 . 201533) (NC.FetchPropListDate 201535 . 202143) (NC.FetchLinksDate
202145 . 202743) (NC.FetchLinkIconAttachedBitMap 202745 . 207089) (NC.FetchLinkDisplayMode 207091 .
207391) (NC.FetchDefaultWidth 207393 . 207675) (NC.FetchDefaultHeight 207677 . 207958) (
NC.FetchLinkAnchorModesSupported 207960 . 208218)) (208221 210084 (NC.SetTitleDate 208231 . 208693) (
NC.SetItemDate 208695 . 209149) (NC.SetPropListDate 209151 . 209618) (NC.SetLinksDate 209620 . 210082)
))))
STOP
Binary file modified system/NCCARDS.LCOM
Binary file not shown.
Loading