home *** CD-ROM | disk | FTP | other *** search
/ Studylink Australia 1999…ovember (Revised Edition) / STUDYLINK.ISO / mac / Proj / p5Print-preview.cst / 00003_PrintCourseDetails.ls < prev    next >
Encoding:
Text File  |  1999-11-17  |  4.6 KB  |  231 lines

  1. on mouseUp
  2.   PrintInstDetails
  3. end
  4.  
  5.  
  6. on PrintInstDetails
  7.   
  8.   set doc  = createXtraInstance()  -- Create instance of PrintOmatic Lite xtra  
  9.   
  10.   
  11.   SetDocumentAttributes doc
  12.   -- Append text
  13.   
  14.   
  15.   AppendHeader doc
  16.   AppendFactFile doc
  17.   AppendDescription doc
  18.   AppendPrerequisite doc
  19.   AppendFooter doc
  20.   
  21.   PrintDocument doc  
  22.   
  23.   deleteXtraInstance doc
  24.   
  25.   -- delete the xtra instance
  26.   set doc = 0
  27.   
  28. end
  29.  
  30.  
  31. on AppendHeader doc
  32.   append doc, member "Course Details Print Heading"  
  33.   --
  34.   -- INSTITUTE & Course Name
  35.   setTextFont doc, "Arial" 
  36.   setTextSize doc, 14 
  37.   setTextStyle doc, "bold"
  38.   append doc, the text of member "name" 
  39.   append doc, RETURN 
  40.   append doc, RETURN 
  41. end
  42.  
  43. on AppendFooter doc
  44.   append doc, member "visit website graphic"  
  45.   append doc, RETURN  
  46.   setTextFont doc, "Arial"
  47.   setTextSize doc, 10
  48.   setTextStyle doc, "Bold"
  49.   append doc, "For further information please contact an IDP office:"
  50.   append doc, RETURN 
  51.   
  52.   setTextFont doc, "Times New Roman"
  53.   setTextSize doc, 10
  54.   setTextStyle doc, "normal"
  55.   global IDPoffice
  56.   append doc, IDPoffice
  57.   
  58. end
  59.  
  60. on AppendFactFile doc 
  61.   --
  62.   -- FactFile
  63.   setTextFont doc, "Arial"
  64.   setTextSize doc, 12 
  65.   setTextStyle doc, "bold"
  66.   append doc, "FactFile"
  67.   append doc, RETURN 
  68.   
  69.   setTextFont doc, "Times New Roman"
  70.   setTextSize doc, 10 
  71.   setTextStyle doc, "normal"
  72.   append doc, the text of member "FactFile" 
  73.   append doc, RETURN 
  74.   append doc, RETURN 
  75. end
  76.  
  77.  
  78.  
  79. on AppendDescription doc
  80.   --
  81.   -- Academic
  82.   setTextFont doc, "Arial"
  83.   setTextSize doc, 12
  84.   setTextStyle doc, "bold"
  85.   append doc, "Course Description"
  86.   append doc, RETURN 
  87.   
  88.   setTextFont doc, "Times New Roman"
  89.   setTextSize doc, 10 
  90.   setTextStyle doc, "normal"
  91.   append doc, the text of member "Description" 
  92.   append doc, RETURN 
  93.   append doc, RETURN
  94. end
  95.  
  96. on AppendPrerequisite doc
  97.   --
  98.   -- Student Services
  99.   setTextFont doc, "Arial"
  100.   setTextSize doc, 12
  101.   setTextStyle doc, "bold"
  102.   append doc, "Pre-requisite Subjects "
  103.   append doc, RETURN 
  104.   
  105.   setTextFont doc, "Times New Roman"
  106.   setTextSize doc, 10 
  107.   setTextStyle doc, "normal"
  108.   
  109.   append doc, the text of member "Pre-requisite" 
  110.   append doc, RETURN 
  111.   append doc, RETURN  
  112. end
  113.  
  114. on AppendAccommodation doc
  115.   --
  116.   -- Accommodation
  117.   setTextFont doc, "Arial"
  118.   setTextSize doc, 12
  119.   setTextStyle doc, "bold"
  120.   append doc, "Accommodation"
  121.   append doc, RETURN 
  122.   
  123.   setTextFont doc, "Times New Roman"
  124.   setTextSize doc, 10 
  125.   setTextStyle doc, "normal"
  126.   append doc, the text of member "accommodation" 
  127.   append doc, RETURN 
  128.   append doc, RETURN
  129.   
  130. end
  131.  
  132. on AppendFurtherInfo doc
  133.   --
  134.   -- Further Information
  135.   setTextFont doc, "Arial"
  136.   setTextSize doc, 12
  137.   setTextStyle doc, "bold"
  138.   append doc, "Further Information"
  139.   append doc, RETURN 
  140.   
  141.   setTextFont doc, "Times New Roman"
  142.   setTextSize doc, 10 
  143.   setTextStyle doc, "bold"
  144.   append doc, "Enquiry and Application points: "
  145.   setTextStyle doc, "normal"
  146.   append doc, the text of member "enquiry" 
  147.   append doc, RETURN 
  148.   setTextStyle doc, "bold"
  149.   append doc, "Orientation Days: "
  150.   setTextStyle doc, "normal"
  151.   append doc, the text of member "orientation" 
  152.   append doc, RETURN 
  153.   append doc, RETURN  
  154. end
  155.  
  156. on AppendFinance doc
  157.   --
  158.   -- Finance
  159.   setTextFont doc, "Arial"
  160.   setTextSize doc, 12
  161.   setTextStyle doc, "bold"
  162.   append doc, "Finance"
  163.   append doc, RETURN 
  164.   
  165.   setTextFont doc, "Times New Roman"
  166.   setTextSize doc, 10 
  167.   setTextStyle doc, "bold"
  168.   append doc, "Scholarships Available: "
  169.   setTextStyle doc, "normal"
  170.   append doc, the text of member "Scholarships" 
  171.   append doc, RETURN 
  172.   append doc, RETURN 
  173. end
  174.  
  175. on AppendCampus doc
  176.   --
  177.   -- Campuses
  178.   setTextFont doc, "Arial"
  179.   setTextSize doc, 12
  180.   setTextStyle doc, "bold"
  181.   append doc, "Campuses"
  182.   append doc, RETURN 
  183.   
  184.   setTextFont doc, "Times New Roman"
  185.   setTextSize doc, 10 
  186.   
  187.   global Campuslist
  188.   set tempCount = count(Campuslist)
  189.   repeat with i= 1 to tempCount
  190.     set temptext to getPropAt(Campuslist, i)
  191.     setTextStyle doc, "bold"
  192.     append doc, item 1 of temptext 
  193.     append doc, " - "
  194.     setTextStyle doc, "normal"
  195.     append doc, RETURN
  196.     append doc, item 2 of temptext
  197.     append doc, RETURN 
  198.   end repeat
  199.   append doc, RETURN
  200. end
  201.  
  202.  
  203.  
  204. -- Add items to Document 
  205. on AppendStudyAbroad doc  
  206.   --
  207.   -- Study Abroad
  208.   setTextFont doc, "Arial"
  209.   setTextSize doc, 12
  210.   setTextStyle doc, "bold"
  211.   append doc, "Study Abroad"
  212.   append doc, RETURN 
  213.   
  214.   setTextFont doc, "Times New Roman"
  215.   setTextSize doc, 10 
  216.   setTextStyle doc, "normal"
  217.   append doc, the text of member "StudyAbroad" 
  218.   append doc, RETURN 
  219.   
  220. end
  221.  
  222. -- Change document attributes
  223. on SetDocumentAttributes doc
  224.   
  225.   setDocumentName doc, "Course Details"
  226.   setLandscapeMode doc, FALSE
  227.   setMargins doc, Rect(70,55,70,70)
  228. end
  229.  
  230.  
  231.