home *** CD-ROM | disk | FTP | other *** search
- '***********************************************************************
- ' FDT_BigH.RLZ
- '
- ' Copyright ⌐ 1991-1992 Computer Associates International, Inc.
- ' All rights reserved.
- '
- ' Code for the Overview screen and the big help screens.
- '
- '***********************************************************************
-
- PROC FDT_BigH_1 (J)
- LOCAL butTitle, s, sectPad, stepPad, nLines
-
- sectPad = 5 * fht \ 4
- stepPad = fht \ 2
- butTitle = fdt_userCaptions[J]
- s = SPRINT("Place a & button in the form.", butTitle)
- FormSetObject(4, _CaptionCenter, s, fdt_fB, fht, fht, hFullWid - 2 * fht, 1 * fht)
-
- FormSetObject(100, _CaptionLeft, "A. Place a button in the form", fdt_fB, hNumLf, QB(4) + sectPad)
- HColor(0)
- IF J = 1 THEN
- s = "Palette. Note that this is selected automatically when FormDev starts."
- nLines = 2
- ELSE
- s = "Palette. Note that this is already selected."
- nLines = 1
- END IF
- HBmpCap("Button", "Pal4", s, nLines)
-
- HColor(1)
- FormSetObject(201, _CaptionLeft, "2.", fdt_fP, hNumLf, QB(105) + stepPad)
- s = SPRINT("Place the button in the lower & area of the form.", {"left", "right"}[J])
- FormSetObject(202, _CaptionLeft, s, fdt_fP, hCapLf, QT(201), hCapWd, 2 * fht)
-
- FormSetColor(fdt_c.text; _Text)
- FormSetObject(300, _CaptionLeft, "B. Set the button's text", fdt_fB, hNumLf, QB(202) + sectPad)
- HColor(2)
- FormSetObject(301, _CaptionLeft, "1.", fdt_fP, hNumLf, QB(300) + stepPad)
- FormSetObject(302, _CaptionLeft, "Click on the Options... button.", fdt_fP, hCapLf, QT(301), hCapWd, 1 * fht)
- HColor(3)
- FormSetObject(311, _CaptionLeft, "2.", fdt_fP, hNumLf, QB(301) + stepPad)
- s = SPRINT("Type in the new name. Call it &.", butTitle)
- FormSetObject(312, _CaptionLeft, s, fdt_fP, hCapLf, QT(311), hCapWd, 1 * fht)
- HColor(4)
- FormSetObject(321, _CaptionLeft, "3.", fdt_fP, hNumLf, QB(311) + stepPad)
- 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])
- FormSetObject(322, _CaptionLeft, s, fdt_fP, hCapLf, QT(321), hCapWd, 3 * fht)
-
- FormSetColor(fdt_c.text; _Text)
- FormSetObject(400, _CaptionLeft, "C. Return to the form", fdt_fB, hNumLf, QB(322) + sectPad)
- HColor(5)
- FormSetObject(401, _CaptionLeft, "1.", fdt_fP, hNumLf, QB(400) + stepPad)
- FormSetObject(402, _CaptionLeft, "Click on the OK button.", fdt_fP, hCapLf, QT(401), hCapWd, 1 * fht)
- END PROC
-
- PROC FDT_BigH_3 ()
- LOCAL s, sectPad, stepPad
-
- sectPad = fht
- stepPad = fht \ 4
- s = "You are now placing a caption in the top center portion of the form, using the automatic positioning features."
- FormSetObject(4, _CaptionCenter, s, fdt_fB, fht, fht, hFullWid - 2 * fht, 3 * fht)
- FormSetObject(100, _CaptionLeft, "A. Place a caption in the form", fdt_fB, hNumLf, QB(4) + sectPad)
- HColor(1)
- HBmpCap("Caption", "Pal6", "Palette.", 1)
-
- HColor(2)
- FormSetObject(201, _CaptionLeft, "2.", fdt_fP, hNumLf, QB(105) + stepPad)
- s = "Place a caption in the form."
- FormSetObject(202, _CaptionLeft, s, fdt_fP, hCapLf, QT(201), hCapWd, 1 * fht)
-
- FormSetColor(fdt_c.text; _Text)
- FormSetObject(300, _CaptionLeft, "B. Set the caption's text", fdt_fB, hNumLf, QB(202) + sectPad)
- HColor(3)
- FormSetObject(301, _CaptionLeft, "1.", fdt_fP, hNumLf, QB(300) + stepPad)
- s = "Click on the Options... button."
- FormSetObject(302, _CaptionLeft, s, fdt_fP, hCapLf, QT(301), hCapWd, 1 * fht)
- HColor(4)
- FormSetObject(311, _CaptionLeft, "2.", fdt_fP, hNumLf, QB(302) + stepPad)
- s = SPRINT("Type in the new name. Call it &.", fdt_userCaptions[3])
- FormSetObject(312, _CaptionLeft, s, fdt_fP, hCapLf, QT(311), hCapWd, 2 * fht)
-
- FormSetColor(fdt_c.text; _Text)
- s = "C. Center the caption at the top of the screen"
- FormSetObject(400, _CaptionLeft, s, fdt_fB, hNumLf, QB(312) + sectPad)
- HColor(5)
- FormSetObject(401, _CaptionLeft, "1.", fdt_fP, hNumLf, QB(400) + stepPad)
- s = "Click on the Position... button."
- FormSetObject(402, _CaptionLeft, s, fdt_fP, hCapLf, QT(401), hCapWd, 1 * fht)
- HColor(6)
- FormSetObject(411, _CaptionLeft, "2.", fdt_fP, hNumLf, QB(402) + stepPad)
- s = "Click on the Centered option button in the Horizontal group box."
- FormSetObject(412, _CaptionLeft, s, fdt_fP, hCapLf, QT(411), hCapWd, 2 * fht)
- HColor(7)
- FormSetObject(421, _CaptionLeft, "3.", fdt_fP, hNumLf, QB(412) + stepPad)
- s = "Click on the Top justified option button in the Vertical group box."
- FormSetObject(422, _CaptionLeft, s, fdt_fP, hCapLf, QT(421), hCapWd, 2 * fht)
- HColor(8)
- FormSetObject(431, _CaptionLeft, "4.", fdt_fP, hNumLf, QB(422) + stepPad)
- s = "Click on the OK button."
- FormSetObject(432, _CaptionLeft, s, fdt_fP, hCapLf, QT(431), hCapWd, 1 * fht)
-
- FormSetColor(fdt_c.text; _Text)
- FormSetObject(500, _CaptionLeft, "D. Return to the form", fdt_fB, hNumLf, QB(432) + sectPad)
- HColor(9)
- FormSetObject(501, _CaptionLeft, "1.", fdt_fP, hNumLf, QB(500) + stepPad)
- FormSetObject(502, _CaptionLeft, "Click on the OK button.", fdt_fP, hCapLf, QT(501), hCapWd, 1 * fht)
- END PROC
-
- PROC FDT_BigH_4 ()
- LOCAL s, sectPad, stepPad
-
- sectPad = 3 * fht \ 2
- stepPad = fht \ 2
- s = "You are now placing a chart in the middle of the form."
- FormSetObject(4, _CaptionCenter, s, fdt_fB, fht, fht, hFullWid - 2 * fht, 2 * fht)
-
- FormSetObject(100, _CaptionLeft, "A. Place a chart in the form", fdt_fB, hNumLf, QB(4) + sectPad)
- HColor(1)
- HBmpCap("Chart", "Pal14", "Palette.", 1)
-
- HColor(2)
- FormSetObject(201, _CaptionLeft, "2.", fdt_fP, hNumLf, QB(105) + stepPad)
- FormSetObject(202, _CaptionLeft, "Place a chart in the form.", fdt_fP, hCapLf, QT(201), hCapWd, 1 * fht)
- HColor(3)
- FormSetObject(211, _CaptionLeft, "3.", fdt_fP, hNumLf, QB(202) + stepPad)
- 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."
- FormSetObject(212, _CaptionLeft, s, fdt_fP, hCapLf, QT(211), hCapWd, 3 * fht)
- END PROC
-
- PROC FDT_BigH_5 (J)
- LOCAL butTitle, s, sectPad, stepPad, nLines
-
- sectPad = 3 * fht \ 2
- stepPad = fht \ 2
- butTitle = fdt_userCaptions[J]
- s = "You are now adding action code for the " + butTitle + " button."
- s = s + " This code will be run when the user clicks on the " + butTitle + " button."
- FormSetObject(4, _CaptionCenter, s, fdt_fB, fht, fht, hFullWid - 2 * fht, 3 * fht)
-
- FormSetObject(100, _CaptionLeft, "A. Select the object for which to provide code", fdt_fB, hNumLf, QB(4) + sectPad)
- HColor(1)
- FormSetObject(101, _CaptionLeft, "1.", fdt_fP, hNumLf, QB(100) + stepPad)
- s = "Select Action item... from the Edit menu."
- FormSetObject(102, _CaptionLeft, s, fdt_fP, hCapLf, QT(101), hCapWd, 1 * fht)
- HColor(2)
- s = "Click on the " + butTitle + " button. Note that the Arrow "
- HBmpCap2(103, "2.", s, "Pal1", "", "Tool is highlighted to indicate that you must click on an item in the form.", 2)
-
- FormSetColor(fdt_c.text; _Text)
- s = "B. Type the code into the Action Code form."
- FormSetObject(199, _CaptionLeft, s, fdt_fB, hNumLf, QB(107) + sectPad)
- s = "The code will "
- IF J = 1 THEN
- s = s + "create a line chart of a series of 40 random numbers."
- nLines = 4
- ELSE
- s = s + "close the form that you created, effectively ending the application."
- nLines = 5
- END IF
- s = s + " You can find more information on programming in the User's Guide and Reference Guide."
- FormSetObject(200, _CaptionLeft, s, fdt_fB, hNumLf, QB(199), hFullWid - 2 * fht, nLines * fht)
- HColor(3)
- FormSetObject(201, _CaptionLeft, "1.", fdt_fP, hNumLf, QB(200) + stepPad)
- s = "Type in the code: " + fdt_actionCode[J]
- FormSetObject(202, _CaptionLeft, s, fdt_fP, hCapLf, QT(201), hCapWd, 1 * fht)
- HColor(4)
- FormSetObject(211, _CaptionLeft, "2.", fdt_fP, hNumLf, QB(202) + stepPad)
- s = "Click on the OK button."
- FormSetObject(212, _CaptionLeft, s, fdt_fP, hCapLf, QT(211), hCapWd, 2 * fht)
- END PROC
-
- PROC FDT_BigH_7 ()
- LOCAL s, sectPad, stepPad
-
- sectPad = 3 * fht \ 2
- stepPad = fht \ 2
- s = "You have created your user interface and typed in action code."
- s = s + " Now FormDev will generate the program for you."
- FormSetObject(4, _CaptionCenter, s, fdt_fB, fht, fht, hFullWid - 2 * fht, 3 * fht)
-
- FormSetObject(100, _CaptionLeft, "A. Generate the program", fdt_fB, hNumLf, QB(4) + sectPad)
- HColor(1)
- FormSetObject(101, _CaptionLeft, "1.", fdt_fP, hNumLf, QB(100) + stepPad)
- s = "Select Save... from the File menu."
- FormSetObject(102, _CaptionLeft, s, fdt_fP, hCapLf, QT(101), hCapWd, 1 * fht)
- HColor(2)
- FormSetObject(111, _CaptionLeft, "2.", fdt_fP, hNumLf, QB(102) + stepPad)
- s = "Type in the name of the program: AppTutor. This name can be up to 8 characters."
- FormSetObject(112, _CaptionLeft, s, fdt_fP, hCapLf, QT(111), hCapWd, 2 * fht)
- HColor(3)
- FormSetObject(121, _CaptionLeft, "3.", fdt_fP, hNumLf, QB(112) + stepPad)
- s = "Click on the Generate Code checkbox. This instructs FormDev to save the program"
- s = s + " in addition to FormDev's internal version of it."
- FormSetObject(122, _CaptionLeft, s, fdt_fP, hCapLf, QT(121), hCapWd, 3 * fht)
- HColor(4)
- FormSetObject(131, _CaptionLeft, "4.", fdt_fP, hNumLf, QB(122) + stepPad)
- s = "Click on the Full application option button. This instructs FormDev to generate code"
- s = s + " both for creating the form and processing actions in it."
- FormSetObject(132, _CaptionLeft, s, fdt_fP, hCapLf, QT(131), hCapWd, 3 * fht)
- HColor(5)
- FormSetObject(151, _CaptionLeft, "5.", fdt_fP, hNumLf, QB(132) + stepPad)
- s = "Click on the OK button."
- FormSetObject(152, _CaptionLeft, s, fdt_fP, hCapLf, QT(151), hCapWd, 1 * fht)
- END PROC
-
- PROC FDT_ShowBigHelp (hPosit, rsAttr)
- LOCAL tv, fht, wd, s, hFullWid, hFullHt, hNumLf, hCapLf, hCapWd
-
- SetHourglass
-
- PROC HColor (smallStep)
- FormSetColor(IF smallStep = fdt_smallStep THEN fdt_c.hiText ELSE fdt_c.text; _Text)
- END PROC
-
- PROC HBmpCap2 (J, sNum, sTLf, sBmp, sTRt, sNextLine, nLines)
- LOCAL tv
- FormSetObject(J+0, _CaptionLeft, sNum, fdt_fP, hNumLf, QB(J-1) + stepPad)
- FormSetObject(J+1, _CaptionLeft, sTLf, fdt_fP, hCapLf, QT(J))
- FormSetObject(J+2, _Bitmap, QSys(_ProgDir) + sBmp, 100pct, 100pct)
- tv = FormQObject(J+2)
- IF tv[_FQO_Height] > 2 * fht THEN
- tv = tv / 2
- END IF
- FormSetObject(J+2, _Bitmap, QSys(_ProgDir) + sBmp, QR(J+1), QT(J+0) - (tv[_FQO_Height] - fht)/2, tv[_FQO_Width], tv[_FQO_Height])
- FormModifyObject(J+2, _Gray)
- FormSetObject(J+3, _CaptionLeft, sTRt, fdt_fP, QR(J+2), QT(J+0))
- FormSetObject(J+4, _CaptionLeft, sNextLine, fdt_fP, hCapLf, MAX(QB(J+2), QB(J+3)), hCapWd, nLines * fht)
- END PROC
-
- PROC HBmpCap (sToolType, sBmp, sNextLine, nLines)
- HBmpCap2(101, "1.", SPRINT("Select the & ", sToolType), sBmp, " tool from the Tool", sNextLine, nLines)
- END PROC
-
- FormNew(fdt_bigHelpF; "Tutorial Help", _HotClick)
- FormSetColor(fdt_c.back)
- FormSetColor(fdt_c.back; _Field)
-
- s = "C. Center the caption at the top of the screen "
- FormSetObject(4, _CaptionLeft, s, fdt_fB, 0, 0)
- tv = FormQObject(4)
- fht = tv[_FQO_Height]
- wd = tv[_FQO_Width]
- hNumLf = fht
- hCapLf = hNumLf + (3*fht)\2
-
- s = "Type in the name of the program: AppTutor. "
- FormSetObject(4, _CaptionLeft, s, fdt_fP, 0, 0)
- wd = MAX(wd + hNumLf, FormQObject(4)[_FQO_Width] + hCapLf)
- hFullWid = wd + fht
- hFullHt = FormQ(_Size; fdt_guideF)[2]
-
- hCapWd = hFullWid - hCapLf - fht
- FormSetObject(7, _Button, "Instructions", fdt_fB, 0, 0)
- tv = FormQObject(7)
- wd = tv[_FQO_Width]
- hFullWid = MAX(hFullWid, 3 * wd + 2 * fht)
-
- FormControl(_Size; hPosit, 0pct, hFullWid + 2, hFullHt + 2)
- FDT_Frame()
-
- FormModifyObject(7, rsAttr, "Overview", fht, hFullHt - fht - tv[_FQO_Height])
- FormSetObject(8, _Button, "Instructions", fdt_fB, _Center, QT(7), wd, _Default)
- FormModifyObject(8, rsAttr)
- FormSetObject(9, _Button, "Continue", fdt_fB, hFullWid - wd - fht, QT(7), wd, _Default)
- FormModifyObject(9, rsAttr)
- FormSetProc(FDT_BigHelpP)
- FormSetColor(fdt_c.text; _Text)
-
- SELECT CASE fdt_bigStep
- CASE 1, 2
- FDT_BigH_1(fdt_bigStep)
- CASE 3
- FDT_BigH_3()
- CASE 4
- FDT_BigH_4()
- CASE 5, 6
- FDT_BigH_5(fdt_bigStep - 4)
- CASE 7
- FDT_BigH_7
- END SELECT
-
- FormControl(_Show)
- ResetHourglass
- END PROC
-