(FILECREATED "30-Nov-87 15:11:08" {QV}<NOTECARDS>1.3KNEXT>LIBRARY>NCIDEASKETCHCARD.;1 5923   

      changes to:  (FNS NCIDEASKETCH.MakeIdeaSketchCard NCIDEASKETCH.BringUpIdeaSketchCard)

      previous date: "14-Jul-87 21:13:31" {QV}<NOTECARDS>1.3K>LIBRARY>NCIDEASKETCHCARD.;6)


(* Copyright (c) 1986, 1987 by Xerox Corporation. All rights reserved.)

(PRETTYCOMPRINT NCIDEASKETCHCARDCOMS)

(RPAQQ NCIDEASKETCHCARDCOMS [(* * This package makes a card type IdeaSketch implementing Richard's 
				  idea sketch package.)
			       (* * kirk 11Aug86 converted to 1.3k)
			       [DECLARE: DONTEVAL@LOAD FIRST (P (NC.LoadFileFromDirectories
								  (QUOTE NCSKETCHCARD))
								(NC.LoadFileFromDirectories
								  (QUOTE IDEASKETCH)
								  (QUOTE LISPUSERSDIRECTORIES]
			       (FNS NCAddStub.IdeaSketchCard)
			       (FNS NCIDEASKETCH.CreateIdeaSketchCard NCIDEASKETCH.MakeIdeaSketchCard 
				    NCIDEASKETCH.BringUpIdeaSketchCard)
			       (DECLARE: DONTEVAL@LOAD (P (NCIDEASKETCH.CreateIdeaSketchCard])
(* * This package makes a card type IdeaSketch implementing Richard's idea sketch package.)

(* * kirk 11Aug86 converted to 1.3k)

(DECLARE: DONTEVAL@LOAD FIRST 
(NC.LoadFileFromDirectories (QUOTE NCSKETCHCARD))
(NC.LoadFileFromDirectories (QUOTE IDEASKETCH)
			    (QUOTE LISPUSERSDIRECTORIES))
)
(DEFINEQ

(NCAddStub.IdeaSketchCard
  (LAMBDA NIL                                                (* rht: " 8-Nov-86 19:19")

          (* * kirk 18Jun86 Add the IDEASKETCH card stub)


    (NC.AddCardTypeStub (QUOTE IdeaSketch)
			  (QUOTE Sketch)
			  (QUOTE NCIDEASKETCHCARD)
			  NIL
			  (QUOTE ((DisplayedInMenuFlg T)))
			  (QUOTE (LinkIconAttachedBitMap)))))
)
(DEFINEQ

(NCIDEASKETCH.CreateIdeaSketchCard
  (LAMBDA NIL                                                (* rht: " 7-Nov-86 15:56")

          (* * This mostly stolen from NC.AddSketchCard)


    (NC.AddCardType (QUOTE IdeaSketch)
		      (QUOTE Sketch)
		      (BQUOTE ((MakeFn , (FUNCTION NCIDEASKETCH.MakeIdeaSketchCard))
				 (EditFn , (FUNCTION NCIDEASKETCH.BringUpIdeaSketchCard))
				 (MiddleButtonMenuItems , (SK.WRITING.MENU))))
		      (BQUOTE ((DisplayedInMenuFlg T))))))

(NCIDEASKETCH.MakeIdeaSketchCard
  [LAMBDA (Card Title NoDisplayFlg)                          (* kirk: "10-Aug-86 17:17")

          (* * Create an idea sketch card. This is almost a copy of NC.MakeSketchCard.)



          (* * kirk 10Aug86 Converted to 1.3k)


    (if NoDisplayFlg
	then (NC.SetSubstance Card (SKETCH.ADD.ELEMENT NIL NIL))
	       Card
      else (LET (Window CardType)
	          (SETQ CardType (NC.RetrieveType Card))
	          [SETQ Window (WRITEW.CREATE NIL NIL (NC.DetermineDisplayRegion Card NIL)
						  (OR Title "Untitled")
						  NIL
						  (SKETCH.COMMANDMENU (NC.GetCardTypeField 
									    MiddleButtonMenuItems 
											 CardType]
	          (WINDOWPROP Window (QUOTE DONTQUERYCHANGES)
				T)
	          (WINDOWPROP Window (QUOTE COPYBUTTONEVENTFN)
				(FUNCTION NC.SK.COPY.BUTTONEVENTFN))
	          (WINDOWPROP Window (QUOTE SHRINKFN)
				(FUNCTION NC.SketchCardShrinkFn))
	          (NC.InstallTitleBarButtonEventFn Window (FUNCTION 
						       NC.SketchTitleBarButtonEventFn))
	          (NC.InstallTitleBarLeftMenu Window CardType)
	          (NC.SetSubstance Card (INSURE.SKETCH Window))
	      Window])

(NCIDEASKETCH.BringUpIdeaSketchCard
  [LAMBDA (Card Substance Region/Position)                   (* kirk: "11-Aug-86 16:17")
                                                             (* Bring up a sketch card containing substance in 
							     specified region)

          (* * rht 2/1/85: Added windowprop to prevent sketch asking about saving changes.)



          (* * rht 10/10/85: Now sets substance if was nil.)



          (* * fgh 11/14/85 Updated to handle Card object.)



          (* * rht 5/5/86: Replaced call to NC.SetupTitleBarMenu with calls to NC.InstallTitleBarButtonEventFn and 
	  NC.InstallTitleBarLeftMenu and NC.InstallSketchTitleBarMiddleMenu.)



          (* * fgh 6/30/86 Added NC.SK.COPY.BUTTONEVENTFN to sketch window. Made Substance to be INSURE.SKETCH of the sketch 
	  window.)


    (LET ([SketchName (AND (NULL Substance)
			     (MKATOM (fetch (Card UID) of Card]
	  Region Title SketchViewer CardType)
         [COND
	   [(SETQ SketchViewer (NC.FetchWindow Card))
	     (RPTQ 2 (FLASHW SketchViewer))
	     (TOTOPW SketchViewer)
	     (TTY.PROCESS (WINDOWPROP SketchViewer (QUOTE PROCESS]
	   (T (SETQ CardType (NC.RetrieveType Card))
	      [SETQ SketchViewer (WRITEW.CREATE (OR Substance SketchName)
						    (NC.FetchRegionViewed Card)
						    (NC.DetermineDisplayRegion Card Region/Position)
						    (NC.RetrieveTitle Card)
						    (NC.FetchScale Card)
						    (SKETCH.COMMANDMENU (NC.GetCardTypeField 
									    MiddleButtonMenuItems 
											 CardType]
	      (WINDOWPROP SketchViewer (QUOTE DONTQUERYCHANGES)
			    T)
	      (WINDOWPROP SketchViewer (QUOTE COPYBUTTONEVENTFN)
			    (FUNCTION NC.SK.COPY.BUTTONEVENTFN))
	      (WINDOWPROP SketchViewer (QUOTE SHRINKFN)
			    (FUNCTION NC.SketchCardShrinkFn))
	      (NC.InstallTitleBarButtonEventFn SketchViewer (FUNCTION 
						   NC.SketchTitleBarButtonEventFn))
	      (NC.InstallTitleBarLeftMenu SketchViewer CardType)
	      (OR Substance (NC.SetSubstance Card (INSURE.SKETCH SketchViewer]
     SketchViewer])
)
(DECLARE: DONTEVAL@LOAD 
(NCIDEASKETCH.CreateIdeaSketchCard)
)
(PUTPROPS NCIDEASKETCHCARD COPYRIGHT ("Xerox Corporation" 1986 1987))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (1334 1737 (NCAddStub.IdeaSketchCard 1344 . 1735)) (1738 5768 (
NCIDEASKETCH.CreateIdeaSketchCard 1748 . 2265) (NCIDEASKETCH.MakeIdeaSketchCard 2267 . 3536) (
NCIDEASKETCH.BringUpIdeaSketchCard 3538 . 5766)))))
STOP