home *** CD-ROM | disk | FTP | other *** search
/ BMW 3 Series Presentation / BMW_3Series_Presentation_CD.bin / Xtras / POMatic / Win / PMATIC.DIR / 00017_Script_17 < prev   
Text File  |  1997-01-30  |  2KB  |  63 lines

  1. on printDocumentation
  2.   global gMonoFont, gPropFont
  3.   
  4.   set doc = new (xtra "PrintOMatic")
  5.   
  6.   if not objectP(doc) then
  7.     Alert "There is no currently selected printer. Printing features are disabled."
  8.   else
  9.     cursor 4  -- because this much stuff takes a while to compile...
  10.     
  11.     setDocumentName doc, "PrintOMatic Xtra Documentation"
  12.     setMargins doc, rect(72,90,72,72)  -- COMMENTING THIS IN WILL CRASH AT THE POINT NOTED BELOW
  13.     
  14.     --    
  15.     put getPageWidth(doc) into w
  16.     put getPageHeight(doc) into h
  17.     
  18.     --    setPageNumSymbol doc, "▐"
  19.     --    
  20.     --    setTextFont doc, gPropFont
  21.     --    setTextSize doc, 10
  22.     --    setTextStyle doc, "normal,italic"
  23.     --    
  24.     --    -- page header left side
  25.     --    setTextJust doc, "left"
  26.     --    drawText doc, "PrintOMatic Xtra Documentation", Point(0,-15)
  27.     --    
  28.     --    -- page header right side
  29.     --    setTextJust doc, "right"
  30.     --    drawText doc, "printed"&&the date, point(w,-15)
  31.     --    
  32.     --    -- page header line underneath
  33.     --    drawLine doc, point(0,-12), point(w,-12)
  34.     --    
  35.     --    -- page footer right side
  36.     --    drawText doc, "page ▐", point(w,h+20)
  37.     --    
  38.     --    -- make the first page
  39.     newPage doc
  40.     
  41.     -- put a white box over the header on page 1
  42.     setGray doc, 0
  43.     drawRect doc, rect(0,-22,w+1,0), TRUE
  44.     setGray doc, 100
  45.     
  46.     -- declare the frame for the text
  47.     newFrame doc, Rect(0,0,w,h), FALSE
  48.     
  49.     -- append the document title
  50.     setTextJust doc, "left"
  51.     append doc, member "doctitle", member "macVersion", member "winversion", RETURN
  52.     
  53.     -- and a picture and the contents
  54.     append doc, member "illustration", RETURN, castlib "documentation" -- THIS CRASHES IF SETMARGINS ABOVE IS USED
  55.     
  56.     cursor -1
  57.     printPreview doc
  58.     
  59.     -- get rid of the document object
  60.     set doc = 0
  61.     
  62.   end if
  63. end printDocumentation