home *** CD-ROM | disk | FTP | other *** search
/ TestDrive Super Store 2.3 / TESTDRIVE_2.ISO / realizer / formdev / fdt_bigh.rlz < prev    next >
Encoding:
Text File  |  1992-09-30  |  12.0 KB  |  287 lines

  1. '***********************************************************************
  2. '    FDT_BigH.RLZ
  3. '
  4. '    Copyright ⌐ 1991-1992 Computer Associates International, Inc.
  5. '    All rights reserved.
  6. '
  7. '    Code for the Overview screen and the big help screens.
  8. '
  9. '***********************************************************************
  10.  
  11. PROC FDT_BigH_1 (J)
  12.     LOCAL    butTitle, s, sectPad, stepPad, nLines
  13.  
  14.     sectPad = 5 * fht \ 4
  15.     stepPad = fht \ 2
  16.     butTitle = fdt_userCaptions[J]
  17.     s = SPRINT("Place a & button in the form.", butTitle)
  18.     FormSetObject(4, _CaptionCenter, s, fdt_fB, fht, fht, hFullWid - 2 * fht, 1 * fht)
  19.  
  20.     FormSetObject(100, _CaptionLeft, "A. Place a button in the form", fdt_fB, hNumLf, QB(4) + sectPad)
  21.     HColor(0)
  22.     IF J = 1 THEN
  23.         s = "Palette.  Note that this is selected automatically when FormDev starts."
  24.         nLines = 2
  25.     ELSE
  26.         s = "Palette.  Note that this is already selected."
  27.         nLines = 1
  28.     END IF
  29.     HBmpCap("Button", "Pal4", s, nLines)
  30.  
  31.     HColor(1)
  32.     FormSetObject(201, _CaptionLeft, "2.", fdt_fP, hNumLf, QB(105) + stepPad)
  33.     s = SPRINT("Place the button in the lower & area of the form.", {"left", "right"}[J])
  34.     FormSetObject(202, _CaptionLeft, s, fdt_fP, hCapLf, QT(201), hCapWd, 2 * fht)
  35.  
  36.     FormSetColor(fdt_c.text; _Text)
  37.     FormSetObject(300, _CaptionLeft, "B. Set the button's text", fdt_fB, hNumLf, QB(202) + sectPad)
  38.     HColor(2)
  39.     FormSetObject(301, _CaptionLeft, "1.", fdt_fP, hNumLf, QB(300) + stepPad)
  40.     FormSetObject(302, _CaptionLeft, "Click on the Options... button.", fdt_fP, hCapLf, QT(301), hCapWd, 1 * fht)
  41.     HColor(3)
  42.     FormSetObject(311, _CaptionLeft, "2.", fdt_fP, hNumLf, QB(301) + stepPad)
  43.     s = SPRINT("Type in the new name.  Call it &.", butTitle)
  44.     FormSetObject(312, _CaptionLeft, s, fdt_fP, hCapLf, QT(311), hCapWd, 1 * fht)
  45.     HColor(4)
  46.     FormSetObject(321, _CaptionLeft, "3.", fdt_fP, hNumLf, QB(311) + stepPad)
  47.     s = SPRINT("Change its number to P(0).  This makes the button respond to the & key as well as to clicks.", J, {"Enter", "Escape"}[J])
  48.     FormSetObject(322, _CaptionLeft, s, fdt_fP, hCapLf, QT(321), hCapWd, 3 * fht)
  49.  
  50.     FormSetColor(fdt_c.text; _Text)
  51.     FormSetObject(400, _CaptionLeft, "C. Return to the form", fdt_fB, hNumLf, QB(322) + sectPad)
  52.     HColor(5)
  53.     FormSetObject(401, _CaptionLeft, "1.", fdt_fP, hNumLf, QB(400) + stepPad)
  54.     FormSetObject(402, _CaptionLeft, "Click on the OK button.", fdt_fP, hCapLf, QT(401), hCapWd, 1 * fht)
  55. END PROC
  56.  
  57. PROC FDT_BigH_3 ()
  58.     LOCAL    s, sectPad, stepPad
  59.  
  60.     sectPad = fht
  61.     stepPad = fht \ 4
  62.     s = "You are now placing a caption in the top center portion of the form, using the automatic positioning features."
  63.     FormSetObject(4, _CaptionCenter, s, fdt_fB, fht, fht, hFullWid - 2 * fht, 3 * fht)
  64.     FormSetObject(100, _CaptionLeft, "A. Place a caption in the form", fdt_fB, hNumLf, QB(4) + sectPad)
  65.     HColor(1)
  66.     HBmpCap("Caption", "Pal6", "Palette.", 1)
  67.  
  68.     HColor(2)
  69.     FormSetObject(201, _CaptionLeft, "2.", fdt_fP, hNumLf, QB(105) + stepPad)
  70.     s = "Place a caption in the form."
  71.     FormSetObject(202, _CaptionLeft, s, fdt_fP, hCapLf, QT(201), hCapWd, 1 * fht)
  72.  
  73.     FormSetColor(fdt_c.text; _Text)
  74.     FormSetObject(300, _CaptionLeft, "B. Set the caption's text", fdt_fB, hNumLf, QB(202) + sectPad)
  75.     HColor(3)
  76.     FormSetObject(301, _CaptionLeft, "1.", fdt_fP, hNumLf, QB(300) + stepPad)
  77.     s = "Click on the Options... button."
  78.     FormSetObject(302, _CaptionLeft, s, fdt_fP, hCapLf, QT(301), hCapWd, 1 * fht)
  79.     HColor(4)
  80.     FormSetObject(311, _CaptionLeft, "2.", fdt_fP, hNumLf, QB(302) + stepPad)
  81.     s = SPRINT("Type in the new name.  Call it &.", fdt_userCaptions[3])
  82.     FormSetObject(312, _CaptionLeft, s, fdt_fP, hCapLf, QT(311), hCapWd, 2 * fht)
  83.  
  84.     FormSetColor(fdt_c.text; _Text)
  85.     s = "C. Center the caption at the top of the screen"
  86.     FormSetObject(400, _CaptionLeft, s, fdt_fB, hNumLf, QB(312) + sectPad)
  87.     HColor(5)
  88.     FormSetObject(401, _CaptionLeft, "1.", fdt_fP, hNumLf, QB(400) + stepPad)
  89.     s = "Click on the Position... button."
  90.     FormSetObject(402, _CaptionLeft, s, fdt_fP, hCapLf, QT(401), hCapWd, 1 * fht)
  91.     HColor(6)
  92.     FormSetObject(411, _CaptionLeft, "2.", fdt_fP, hNumLf, QB(402) + stepPad)
  93.     s = "Click on the Centered option button in the Horizontal group box."
  94.     FormSetObject(412, _CaptionLeft, s, fdt_fP, hCapLf, QT(411), hCapWd, 2 * fht)
  95.     HColor(7)
  96.     FormSetObject(421, _CaptionLeft, "3.", fdt_fP, hNumLf, QB(412) + stepPad)
  97.     s = "Click on the Top justified option button in the Vertical group box."
  98.     FormSetObject(422, _CaptionLeft, s, fdt_fP, hCapLf, QT(421), hCapWd, 2 * fht)
  99.     HColor(8)
  100.     FormSetObject(431, _CaptionLeft, "4.", fdt_fP, hNumLf, QB(422) + stepPad)
  101.     s = "Click on the OK button."
  102.     FormSetObject(432, _CaptionLeft, s, fdt_fP, hCapLf, QT(431), hCapWd, 1 * fht)
  103.  
  104.     FormSetColor(fdt_c.text; _Text)
  105.     FormSetObject(500, _CaptionLeft, "D. Return to the form", fdt_fB, hNumLf, QB(432) + sectPad)
  106.     HColor(9)
  107.     FormSetObject(501, _CaptionLeft, "1.", fdt_fP, hNumLf, QB(500) + stepPad)
  108.     FormSetObject(502, _CaptionLeft, "Click on the OK button.", fdt_fP, hCapLf, QT(501), hCapWd, 1 * fht)
  109. END PROC
  110.  
  111. PROC FDT_BigH_4 ()
  112.     LOCAL    s, sectPad, stepPad
  113.  
  114.     sectPad = 3 * fht \ 2
  115.     stepPad = fht \ 2
  116.     s = "You are now placing a chart in the middle of the form."
  117.     FormSetObject(4, _CaptionCenter, s, fdt_fB, fht, fht, hFullWid - 2 * fht, 2 * fht)
  118.  
  119.     FormSetObject(100, _CaptionLeft, "A. Place a chart in the form", fdt_fB, hNumLf, QB(4) + sectPad)
  120.     HColor(1)
  121.     HBmpCap("Chart", "Pal14", "Palette.", 1)
  122.  
  123.     HColor(2)
  124.     FormSetObject(201, _CaptionLeft, "2.", fdt_fP, hNumLf, QB(105) + stepPad)
  125.     FormSetObject(202, _CaptionLeft, "Place a chart in the form.", fdt_fP, hCapLf, QT(201), hCapWd, 1 * fht)
  126.     HColor(3)
  127.     FormSetObject(211, _CaptionLeft, "3.", fdt_fP, hNumLf, QB(202) + stepPad)
  128.     s = "Position and size the chart so that it does not overlap the caption or the buttons.  Do so by dragging on the chart's border."
  129.     FormSetObject(212, _CaptionLeft, s, fdt_fP, hCapLf, QT(211), hCapWd, 3 * fht)
  130. END PROC
  131.  
  132. PROC FDT_BigH_5 (J)
  133.     LOCAL    butTitle, s, sectPad, stepPad, nLines
  134.  
  135.     sectPad = 3 * fht \ 2
  136.     stepPad = fht \ 2
  137.     butTitle = fdt_userCaptions[J]
  138.     s = "You are now adding action code for the " + butTitle + " button."
  139.     s = s + "  This code will be run when the user clicks on the " + butTitle + " button."
  140.     FormSetObject(4, _CaptionCenter, s, fdt_fB, fht, fht, hFullWid - 2 * fht, 3 * fht)
  141.  
  142.     FormSetObject(100, _CaptionLeft, "A. Select the object for which to provide code", fdt_fB, hNumLf, QB(4) + sectPad)
  143.     HColor(1)
  144.     FormSetObject(101, _CaptionLeft, "1.", fdt_fP, hNumLf, QB(100) + stepPad)
  145.     s = "Select Action item... from the Edit menu."
  146.     FormSetObject(102, _CaptionLeft, s, fdt_fP, hCapLf, QT(101), hCapWd, 1 * fht)
  147.     HColor(2)
  148.     s = "Click on the " + butTitle + " button.  Note that the Arrow  "
  149.     HBmpCap2(103, "2.", s, "Pal1", "", "Tool is highlighted to indicate that you must click on an item in the form.", 2)
  150.  
  151.     FormSetColor(fdt_c.text; _Text)
  152.     s = "B. Type the code into the Action Code form."
  153.     FormSetObject(199, _CaptionLeft, s, fdt_fB, hNumLf, QB(107) + sectPad)
  154.     s = "The code will "
  155.     IF J = 1 THEN
  156.         s = s + "create a line chart of a series of 40 random numbers."
  157.         nLines = 4
  158.     ELSE
  159.         s = s + "close the form that you created, effectively ending the application."
  160.         nLines = 5
  161.     END IF
  162.     s = s + "  You can find more information on programming in the User's Guide and Reference Guide."
  163.     FormSetObject(200, _CaptionLeft, s, fdt_fB, hNumLf, QB(199), hFullWid - 2 * fht, nLines * fht)
  164.     HColor(3)
  165.     FormSetObject(201, _CaptionLeft, "1.", fdt_fP, hNumLf, QB(200) + stepPad)
  166.     s = "Type in the code: " + fdt_actionCode[J]
  167.     FormSetObject(202, _CaptionLeft, s, fdt_fP, hCapLf, QT(201), hCapWd, 1 * fht)
  168.     HColor(4)
  169.     FormSetObject(211, _CaptionLeft, "2.", fdt_fP, hNumLf, QB(202) + stepPad)
  170.     s = "Click on the OK button."
  171.     FormSetObject(212, _CaptionLeft, s, fdt_fP, hCapLf, QT(211), hCapWd, 2 * fht)
  172. END PROC
  173.  
  174. PROC FDT_BigH_7 ()
  175.     LOCAL    s, sectPad, stepPad
  176.  
  177.     sectPad = 3 * fht \ 2
  178.     stepPad = fht \ 2
  179.     s = "You have created your user interface and typed in action code."
  180.     s = s + "  Now FormDev will generate the program for you."
  181.     FormSetObject(4, _CaptionCenter, s, fdt_fB, fht, fht, hFullWid - 2 * fht, 3 * fht)
  182.  
  183.     FormSetObject(100, _CaptionLeft, "A. Generate the program", fdt_fB, hNumLf, QB(4) + sectPad)
  184.     HColor(1)
  185.     FormSetObject(101, _CaptionLeft, "1.", fdt_fP, hNumLf, QB(100) + stepPad)
  186.     s = "Select Save... from the File menu."
  187.     FormSetObject(102, _CaptionLeft, s, fdt_fP, hCapLf, QT(101), hCapWd, 1 * fht)
  188.     HColor(2)
  189.     FormSetObject(111, _CaptionLeft, "2.", fdt_fP, hNumLf, QB(102) + stepPad)
  190.     s = "Type in the name of the program:  AppTutor.  This name can be up to 8 characters."
  191.     FormSetObject(112, _CaptionLeft, s, fdt_fP, hCapLf, QT(111), hCapWd, 2 * fht)
  192.     HColor(3)
  193.     FormSetObject(121, _CaptionLeft, "3.", fdt_fP, hNumLf, QB(112) + stepPad)
  194.     s = "Click on the Generate Code checkbox.  This instructs FormDev to save the program"
  195.     s = s + " in addition to FormDev's internal version of it."
  196.     FormSetObject(122, _CaptionLeft, s, fdt_fP, hCapLf, QT(121), hCapWd, 3 * fht)
  197.     HColor(4)
  198.     FormSetObject(131, _CaptionLeft, "4.", fdt_fP, hNumLf, QB(122) + stepPad)
  199.     s = "Click on the Full application option button.  This instructs FormDev to generate code"
  200.     s = s + " both for creating the form and processing actions in it."
  201.     FormSetObject(132, _CaptionLeft, s, fdt_fP, hCapLf, QT(131), hCapWd, 3 * fht)
  202.     HColor(5)
  203.     FormSetObject(151, _CaptionLeft, "5.", fdt_fP, hNumLf, QB(132) + stepPad)
  204.     s = "Click on the OK button."
  205.     FormSetObject(152, _CaptionLeft, s, fdt_fP, hCapLf, QT(151), hCapWd, 1 * fht)
  206. END PROC
  207.  
  208. PROC FDT_ShowBigHelp (hPosit, rsAttr)
  209.     LOCAL    tv, fht, wd, s, hFullWid, hFullHt, hNumLf, hCapLf, hCapWd
  210.  
  211.     SetHourglass
  212.  
  213.     PROC HColor (smallStep)
  214.         FormSetColor(IF smallStep = fdt_smallStep THEN fdt_c.hiText ELSE fdt_c.text; _Text)
  215.     END PROC
  216.  
  217.     PROC HBmpCap2 (J, sNum, sTLf, sBmp, sTRt, sNextLine, nLines)
  218.         LOCAL    tv
  219.         FormSetObject(J+0, _CaptionLeft, sNum, fdt_fP, hNumLf, QB(J-1) + stepPad)
  220.         FormSetObject(J+1, _CaptionLeft, sTLf, fdt_fP, hCapLf, QT(J))
  221.         FormSetObject(J+2, _Bitmap, QSys(_ProgDir) + sBmp, 100pct, 100pct)
  222.         tv = FormQObject(J+2)
  223.         IF tv[_FQO_Height] > 2 * fht THEN
  224.             tv = tv / 2
  225.         END IF
  226.         FormSetObject(J+2, _Bitmap, QSys(_ProgDir) + sBmp, QR(J+1), QT(J+0) - (tv[_FQO_Height] - fht)/2, tv[_FQO_Width], tv[_FQO_Height])
  227.         FormModifyObject(J+2, _Gray)
  228.         FormSetObject(J+3, _CaptionLeft, sTRt, fdt_fP, QR(J+2), QT(J+0))
  229.         FormSetObject(J+4, _CaptionLeft, sNextLine, fdt_fP, hCapLf, MAX(QB(J+2), QB(J+3)), hCapWd, nLines * fht)
  230.     END PROC
  231.  
  232.     PROC HBmpCap (sToolType, sBmp, sNextLine, nLines)
  233.         HBmpCap2(101, "1.", SPRINT("Select the & ", sToolType), sBmp, " tool from the Tool", sNextLine, nLines)
  234.     END PROC
  235.  
  236.     FormNew(fdt_bigHelpF; "Tutorial Help", _HotClick)
  237.     FormSetColor(fdt_c.back)
  238.     FormSetColor(fdt_c.back; _Field)
  239.  
  240.     s = "C. Center the caption at the top of the screen  "
  241.     FormSetObject(4, _CaptionLeft, s, fdt_fB, 0, 0)
  242.     tv = FormQObject(4)
  243.     fht = tv[_FQO_Height]
  244.     wd = tv[_FQO_Width]
  245.     hNumLf = fht
  246.     hCapLf = hNumLf + (3*fht)\2
  247.  
  248.     s = "Type in the name of the program:  AppTutor.  "
  249.     FormSetObject(4, _CaptionLeft, s, fdt_fP, 0, 0)
  250.     wd = MAX(wd + hNumLf, FormQObject(4)[_FQO_Width] + hCapLf)
  251.     hFullWid = wd + fht
  252.     hFullHt = FormQ(_Size; fdt_guideF)[2]
  253.  
  254.     hCapWd = hFullWid - hCapLf - fht
  255.     FormSetObject(7, _Button, "Instructions", fdt_fB, 0, 0)
  256.     tv = FormQObject(7)
  257.     wd = tv[_FQO_Width]
  258.     hFullWid = MAX(hFullWid, 3 * wd + 2 * fht)
  259.  
  260.     FormControl(_Size; hPosit, 0pct, hFullWid + 2, hFullHt + 2)
  261.     FDT_Frame()
  262.  
  263.     FormModifyObject(7, rsAttr, "Overview", fht, hFullHt - fht - tv[_FQO_Height])
  264.     FormSetObject(8, _Button, "Instructions", fdt_fB, _Center, QT(7), wd, _Default)
  265.     FormModifyObject(8, rsAttr)
  266.     FormSetObject(9, _Button, "Continue", fdt_fB, hFullWid - wd - fht, QT(7), wd, _Default)
  267.     FormModifyObject(9, rsAttr)
  268.     FormSetProc(FDT_BigHelpP)
  269.     FormSetColor(fdt_c.text; _Text)
  270.  
  271.     SELECT CASE fdt_bigStep
  272.     CASE 1, 2
  273.         FDT_BigH_1(fdt_bigStep)
  274.     CASE 3
  275.         FDT_BigH_3()
  276.     CASE 4
  277.         FDT_BigH_4()
  278.     CASE 5, 6
  279.         FDT_BigH_5(fdt_bigStep - 4)
  280.     CASE 7
  281.         FDT_BigH_7
  282.     END SELECT
  283.  
  284.     FormControl(_Show)
  285.     ResetHourglass
  286. END PROC
  287.