(FILECREATED " 5-Dec-85 08:41:08" {ERIS}<LISPUSERS>KOTO>PULLDOWNMENUS.;4 5623 changes to: (FNS ADDPULLDOWNMENU PD.GET.CURSOR.POSITION PULLDOWNMENU.CENTERTITLE PULLDOWNMENU.REPAINT) previous date: "29-Jan-85 14:29:46" {ERIS}<LISPUSERS>KOTO>PULLDOWNMENUS.;1) (PRETTYCOMPRINT PULLDOWNMENUSCOMS) (RPAQQ PULLDOWNMENUSCOMS ((FNS * PULLDOWNMENUSFNS) (RECORDS PULLDOWNMENU))) (RPAQQ PULLDOWNMENUSFNS (ADDPULLDOWNMENU CHANGE.PULLDOWNMENU PD.GET.CURSOR.POSITION PULLDOWNMENU.BUTTONEVENT PULLDOWNMENU.CENTERTITLE PULLDOWNMENU.REPAINT)) (DEFINEQ (ADDPULLDOWNMENU [LAMBDA (PullDownMenu Position) (* mhr: "29-Jan-85 12:56") (PROG (Bitmap?) (with PULLDOWNMENU PullDownMenu (COND ((NOT (NUMBERP PDBORDER)) (SETQ PDBORDER 1))) [COND ((NOT (FONTP PDFONT)) (SETQ PDFONT (FONTP (FONTCREATE PDFONT] (SETQ Bitmap? (BITMAPP PDBITMAP)) [COND ((NOT (NUMBERP PDWIDTH)) (SETQ PDWIDTH (WIDTHIFWINDOW [IPLUS 2 (COND (Bitmap? (BITMAPWIDTH PDBITMAP)) (T (STRINGWIDTH PDLABEL PDFONT] PDBORDER] [COND ((NOT (NUMBERP PDHEIGHT)) (SETQ PDHEIGHT (HEIGHTIFWINDOW [IPLUS (COND (Bitmap? (BITMAPHEIGHT PDBITMAP)) (T (IPLUS (FONTPROP PDFONT (QUOTE HEIGHT)) (FONTPROP PDFONT (QUOTE DESCENT] NIL PDBORDER] (COND (Position (SETQ PDPOSITION Position))) (SETQ PDWINDOW (CREATEW (with POSITION (OR (POSITIONP PDPOSITION) (PD.GET.CURSOR.POSITION)) (CREATEREGION XCOORD YCOORD PDWIDTH PDHEIGHT)) NIL PDBORDER)) (WINDOWPROP PDWINDOW (QUOTE PULLDOWNMENU) PullDownMenu) (WINDOWPROP PDWINDOW (QUOTE BUTTONEVENTFN) (FUNCTION PULLDOWNMENU.BUTTONEVENT)) (WINDOWPROP PDWINDOW (QUOTE REPAINTFN) (FUNCTION PULLDOWNMENU.REPAINT)) (WINDOWPROP PDWINDOW (QUOTE RESHAPEFN) (FUNCTION PULLDOWNMENU.REPAINT)) (WINDOWPROP PDWINDOW (QUOTE CURSORINFN) (FUNCTION PULLDOWNMENU.BUTTONEVENT)) (DSPFONT PDFONT PDWINDOW) (PULLDOWNMENU.REPAINT PDWINDOW) (RETURN PDWINDOW]) (CHANGE.PULLDOWNMENU [LAMBDA (PDMENURECORD NEWMENU) (* mhr: "10-Jan-85 10:19") (replace PDMENU of PDMENURECORD with NEWMENU]) (PD.GET.CURSOR.POSITION [LAMBDA NIL (* cdl "25-Jan-85 15:15") (PROG (POSITION (WINDOW (WHICHW))) (with REGION (WINDOWPROP WINDOW (QUOTE REGION)) (with POSITION (SETQ POSITION (CURSORPOSITION NIL WINDOW)) (add XCOORD LEFT) (add YCOORD BOTTOM))) (RETURN POSITION]) (PULLDOWNMENU.BUTTONEVENT [LAMBDA (Window) (* mhr: "29-Jan-85 14:26") (RESETLST (COND ((MOUSESTATE (OR LEFT MIDDLE)) (with PULLDOWNMENU (WINDOWPROP Window (QUOTE PULLDOWNMENU)) (COND ((type? MENU PDMENU) (INVERTW Window) (RESETSAVE NIL (LIST (QUOTE INVERTW) Window)) (with REGION (WINDOWPROP Window (QUOTE REGION)) (MENU PDMENU (with MENU PDMENU (create POSITION XCOORD ← LEFT YCOORD ←(IDIFFERENCE BOTTOM IMAGEHEIGHT]) (PULLDOWNMENU.CENTERTITLE [LAMBDA (PULLDOWNMENU WINDOW) (* mhr: "29-Jan-85 09:49") (PROG (SPACES (FONT (DSPFONT NIL WindowTitleDisplayStream))) (with PULLDOWNMENU PULLDOWNMENU (SETQ SPACES (IQUOTIENT (QUOTIENT (IDIFFERENCE PDWIDTH (STRINGWIDTH PDLABEL FONT)) 2) (STRINGWIDTH " " FONT))) (WINDOWPROP WINDOW (QUOTE TITLE) (COND ((LEQ SPACES 0) PDLABEL) (T (CONCAT (OR (SUBSTRING (CONSTANT (for I to 125 bind (STRING ← null) do (SETQ STRING (CONCAT " " STRING)) finally (RETURN STRING))) 1 SPACES) "" (* OR is used just in case SPACES>125) ) PDLABEL]) (PULLDOWNMENU.REPAINT [LAMBDA (Window) (* cdl "25-Jan-85 16:52") (PROG [(PullDownMenu (WINDOWPROP Window (QUOTE PULLDOWNMENU] (with PULLDOWNMENU PullDownMenu (DSPFILL NIL NIL NIL Window) (DSPRESET Window) (with REGION (DSPCLIPPINGREGION NIL Window) (SETQ PDWIDTH WIDTH) (COND [(BITMAPP PDBITMAP) (BITBLT PDBITMAP 0 0 Window (IQUOTIENT (IDIFFERENCE WIDTH (BITMAPWIDTH PDBITMAP)) 2) (IQUOTIENT (IDIFFERENCE HEIGHT (BITMAPHEIGHT PDBITMAP) ) 2)) (COND (PDLABEL (PULLDOWNMENU.CENTERTITLE PullDownMenu Window] (T (CENTERPRINTINREGION PDLABEL NIL Window]) ) [DECLARE: EVAL@COMPILE (RECORD PULLDOWNMENU (PDBITMAP PDLABEL PDMENU PDPOSITION PDFONT PDHEIGHT PDWIDTH PDBORDER PDWINDOW)) ] (PUTPROPS PULLDOWNMENUS COPYRIGHT (NONE)) (DECLARE: DONTCOPY (FILEMAP (NIL (590 5427 (ADDPULLDOWNMENU 600 . 2435) (CHANGE.PULLDOWNMENU 2437 . 2616) ( PD.GET.CURSOR.POSITION 2618 . 3019) (PULLDOWNMENU.BUTTONEVENT 3021 . 3668) (PULLDOWNMENU.CENTERTITLE 3670 . 4598) (PULLDOWNMENU.REPAINT 4600 . 5425))))) STOP