home *** CD-ROM | disk | FTP | other *** search
- '***********************************************************************
- ' FDT_Init.RLZ
- '
- ' Copyright ⌐ 1991-1992 Computer Associates International, Inc.
- ' All rights reserved.
- '
- ' FDT_Init, FDT_Reset, FDT_Exit, FDT_Congrat
- '
- '***********************************************************************
-
- PROC FDT_Init ()
- LOCAL tv
-
- FormSelect(toolForm)
- ToolOn(4)
- FormSetProc(FDT_FormP) ' was ToolProc
- FormSelect(fdMain)
- fdt_mainSize = FormQ(_Size)
- FormSetObject(101, _CaptionLeft, "", 0, 0, 100pct, 100pct)
- fdt_clientSize = FormQObject(101)[+_FQO_Left - 1][1:4]
- FormModifyObject(101, _Close)
- FormSetProc(FDT_FormP) ' was MainProc
-
- MenuSelect(fdFileMenu)
- MenuSetProc(FDT_MenuP)
- MenuSelect(fdEditMenu)
- MenuSetProc(FDT_MenuP)
- MenuSelect(fdFormMenu)
- MenuSetProc(FDT_MenuP)
- MenuSelect(fdAlignMenu)
- MenuSetProc(FDT_MenuP)
- MenuSelect(%%browserMenu)
- MenuSetProc(FDT_MenuP)
- MenuSelect(_WindowMenu)
- MenuControl(_Hide)
- MenuSelect(_HelpMenu)
- MenuControl(_Hide)
-
- FormSelect(fdt_guideF)
- FormSetProc(FDT_HelpP)
- HelpSetProc(FDT_HelpP)
-
- EXTERNAL "user" PROC MoveWindow (word, word, word, word, word, word) ALIAS 56
-
- fdt_clickF = FormQUnique
- FormNew(fdt_clickF; "Click Guide", _HotClick)
- FormSetObject(12, _Bitmap, QSys(_ProgDir) + "FDT_CLIK", 0, 0)
- tv = FormQObject(12)
- IF scaleSplash > 1 THEN
- tv[_FQO_Width:_FQO_Height] = tv[_FQO_Width:_FQO_Height] * scaleSplash
- FormSetObject(12, _Bitmap, QSys(_ProgDir) + "FDT_CLIK", 0, 0, tv[_FQO_Width], tv[_FQO_Height])
- END IF
- MoveWindow(tv[_Hwnd], -1, -1, tv[_FQO_Width], tv[_FQO_Height], 0)
- ResizeForm(0, 0, tv[_FQO_Width] - 2, tv[_FQO_Height] - 2)
- fdt_clickFHt = tv[_FQO_Height]
- FormSetProc(FDT_ClickP)
-
- fdt_infoF = FormQUnique
-
- fdt_bigHelpF = FormQUnique
-
- fdt_userCaptions = {"Plot", "Quit", "Charting Demonstration"}
- fdt_actionCode = {"ChartLine(Rnd(40))", "FormControl(_Close)"}
-
- fdt_steps = {"Place a button in the lower left area of the form."}
- fdt_steps = {fdt_steps, "Click on the Options... button in the Tool Palette."}
- fdt_steps = {fdt_steps, "Place a button in the lower right portion of the form."}
- fdt_steps = {fdt_steps, "Click on the Options... button in the Tool Palette."}
- fdt_steps = {fdt_steps, "Select the Caption tool from the Tool Palette."}
- fdt_steps = {fdt_steps, "Place a caption toward the top of the form."}
- fdt_steps = {fdt_steps, "Click on the Options... button in the Tool Palette."}
- fdt_steps = {fdt_steps, "Select the Chart tool from the Tool Palette."}
- fdt_steps = {fdt_steps, "Place a chart in the middle of the screen."}
- fdt_steps = {fdt_steps, "Position and size the chart so that the buttons and caption are not obscured."}
- fdt_steps = {fdt_steps, "Select Action item... from the Edit menu."}
- fdt_steps = {fdt_steps, "Click on the " + fdt_userCaptions[1] + " button."}
- fdt_steps = {fdt_steps, "Select Action item... from the Edit menu."}
- fdt_steps = {fdt_steps, "Click on the " + fdt_userCaptions[2] + " button."}
- fdt_steps = {fdt_steps, "Select Save... from the File menu."}
-
- fdt_state = 1
- fdt_bigStep = 0
- fdt_smallStep = 0
- END PROC
-
-
- PROC FDT_Reset (completed)
- LOCAL schedCmd, progName
-
- SetAppName("")
- FormSelect(fdt_guideF)
- FormControl(_Close)
- FormSelect(fdt_clickF)
- FormControl(_Close)
- IF FormQ(_Exists; fdt_infoF) THEN
- FormSelect(fdt_infoF)
- FormControl(_Close)
- END IF
- IF FormQ(_Exists; fdt_bigHelpF) THEN
- FormSelect(fdt_bigHelpF)
- FormControl(_Close)
- END IF
- MenuSelect(_WindowMenu)
- MenuControl(_Show)
- MenuSelect(_HelpMenu)
- MenuControl(_Show)
- RESET _Sched
-
- IF completed THEN
- progName = LCase$(fdOpenPath) + "apptutor.rlz"
- FDT_Congrat()
- RESET _Form + _Menu
- FDT_Notes(progName)
- IF SchedSet(SPRINT("RUN ""&""", progname), QDate()) THEN
- END IF
- RESET _ALL - _Form - _Sched
- ELSE
- ' Eliminate the rest of the Tutorial stuff, leaving FormDev intact.
- FormSelect(fdMain)
- FormSetProc(MainProc)
- FormSelect(toolForm)
- FormSetProc(ToolProc)
-
- MenuSelect(fdFileMenu)
- MenuSetProc(menuprocFile)
- MenuSelect(fdEditMenu)
- MenuSetProc(menuprocEdit)
- MenuSelect(fdFormMenu)
- MenuSetProc(menuprocForm)
- MenuSelect(fdAlignMenu)
- MenuSetProc(menuprocAlign)
- MenuSelect(%%browserMenu)
- MenuSetProc(%%BrowMenuProc)
-
- InitVisualForms() ' rebuild original fdVisoption
-
- IF fdt_fB THEN
- FontSelect(fdt_fB)
- FontControl(_Close)
- FontSelect(fdt_fP)
- FontControl(_Close)
- FontSelect(fdt_mB)
- FontControl(_Close)
- FontSelect(fdt_mP)
- FontControl(_Close)
- END IF
-
- CLEAR fdt_actionCode, fdt_bigHelpF, fdt_bigStep, fdt_c, fdt_clickF, fdt_clickFHt, fdt_clientSize
- CLEAR fdt_fB, fdt_fht, fdt_fP, fdt_frameV, fdt_guideF, fdt_infoF, fdt_mainSize, fdt_maxChartBot
- CLEAR fdt_mB, fdt_mP, fdt_smallStep, fdt_state, fdt_steps, fdt_toolSize, fdt_userCaptions
-
- CLEAR FDT_Action, FDT_AISizeValues, FDT_BigHelpP, FDT_BigHilight
- CLEAR FDT_BigH_1, FDT_BigH_3, FDT_BigH_4, FDT_BigH_5, FDT_BigH_7
- CLEAR FDT_ClickShow, FDT_ClickMsg, FDT_ClickP, FDT_Congrat
- CLEAR FDT_DlgFW, FDT_DlgPoint, FDT_EnabButtons, FDT_Exit
- CLEAR FDT_FormP, FDT_Frame, FDT_Frame2, FDT_GuideMsg, FDT_HelpP, FDT_HideClicks
- CLEAR FDT_InitVisualForms, FDT_Lims, FDT_ModalDone, FDT_ModalStart
- CLEAR FDT_MenuP, FDT_NextCap, FDT_Notes, FDT_Overview, FDT_Preview
- CLEAR FDT_Reset, FDT_Save, FDT_ShowBigHelp, FDT_TypeIn
-
- ' Restore the original VisAIModal.
- IF SchedSet("RUN ""MenuEdit""", QDate()) THEN
- END IF
- END IF
- IF SchedSet("SchedControl(_Stop)", QDate()) THEN
- END IF
- SchedControl(_Start)
- EXIT PROGRAM
- END PROC
-
-
- PROC FDT_Exit ()
- LOCAL s, tv, fht, fullWid, lf, sectPad, linePad
- LOCAL oldP, oldB
- oldP = fdt_fP
- oldB = fdt_fB
- fdt_fP = fdt_mP
- fdt_fB = fdt_mB
-
- FormNew(FormQUnique; "Exit", 0)
- FormSetColor(fdt_c.back)
- FormSetColor(fdt_c.back; _Field)
- FormSetColor(fdt_c.text; _Text)
- s = "You have chosen to Exit the FormDev tutorial "
- FormSetObject(101, _CaptionLeft, s, fdt_fB, 0, 0)
- tv = FormQObject(101)
- fht = tv[_FQO_Height]
- fullWid = tv[_FQO_Width] + 10
- ResizeForm(0, 0, fullWid + 2 * fht, _Default)
- sectPad = fht
- linePad = fht\2
-
- s = s + "before you finished it. Do you want to:"
-
- FormSetObject(101, _CaptionLeft, s, fdt_fB, fht, fht, fullWid, 2 * fht)
-
- s = "Leave the tutorial and explore FormDev"
- FormSetObject(11, _OptionButton, s, fdt_fB, _Center, QB(101) + sectPad)
- lf = FormQObject(11)[_FQO_Left]
- FormSetObject(11, _OptionButton, "Return to the tutorial", fdt_fB, lf, QB(101) + sectPad; 1)
- FormSetObject(12, _OptionButton, s, fdt_fB, lf, QB(11) + linePad)
- FormSetObject(13, _OptionButton, "Leave the tutorial and FormDev", fdt_fB, lf, QB(12) + linePad)
- FormSetObject(14, _OptionButton, "Close Realizer", fdt_fB, lf, QB(13) + linePad)
-
- FormSetObject(1, _DefButton, "OK", fdt_fB, _Center, QB(14) + sectPad)
- ResizeForm(_Center, _Center, _Default, QB(1) + fht)
- FDT_Frame()
- fdt_fP = oldP
- fdt_fB = oldB
- IF FormWait() = 1 THEN
- IF FormQNum(12) THEN
- FormControl(_Close)
- FDT_Reset(0) ' does not come back
- ELSEIF FormQNum(13) THEN
- SetAppName("")
- RESET
- EXIT PROGRAM
- ELSEIF FormQNum(14) THEN
- SetAppName("")
- RESET
- EXIT SYSTEM
- END IF
- END IF
- FormControl(_Close)
- END PROC
-
-
- PROC FDT_Congrat ()
- LOCAL s, tv, fht, fullWid, lfTx, wdTx, rsID
- LOCAL oldB, oldP
-
- oldB = fdt_fB
- fdt_fB = fdt_mB
- oldP = fdt_fP
- fdt_fP = fdt_mP
- FormNew(FormQUnique; "Congratulations", 0)
- FormSetColor(fdt_c.back)
- FormSetColor(fdt_c.back; _Field)
- FormSetColor(fdt_c.text; _Text)
-
- s = "You have finished creating the simple Realizer application. "
- FormSetObject(101, _CaptionLeft, s, fdt_fP, 0, 0)
- tv = FormQObject(101)
- fht = tv[_FQO_Height]
- fullWid = tv[_FQO_Width] + 2 * fht
- ResizeForm(0, 0, fullWid, _Default)
- lfTx = fht
- wdTx = fullWid - 2 * fht
-
- FormSetObject(100, _CaptionCenter, "Congratulations!", fdt_fB, lfTx, fht, wdTx, _Default)
-
- rsID = 100
- s = s + "When you click on OK, the tutorial will leave FormDev and run your application."
- FDT_NextCap(-1, 3, s)
-
- s = "We hope that you have found this tutorial informative."
- s = s + " You can find more information on using Realizer in the manuals"
- s = s + " and readme files that come with the system."
- FDT_NextCap(-1, 3, s)
-
- FormSetObject(1, _DefButton, "OK", fdt_fB, _Center, QB(rsID) + fht)
- ResizeForm(_Center, _Center, _Default, QB(1) + fht)
- FDT_Frame()
- fdt_fB = oldB
- fdt_fP = oldP
- IF FormWait() THEN
- END IF
- FormControl(_Close)
- END PROC
-
-
- PROC FDT_Notes (progName)
- LOCAL s, tv, fht, fullWid, lfTx, wdTx, rsID
-
- FormNew(FormQUnique(); "Notes from the Tutorial", _Title + _Minimize + _Close)
- FormSetColor(fdt_c.back)
- FormSetColor(fdt_c.back; _Field)
- FormSetColor(fdt_c.text; _Text)
-
- s = "You can open the program from Realizer's File menu "
- FormSetObject(101, _CaptionLeft, s, fdt_fP, 0, 0)
- tv = FormQObject(101)
- fht = tv[_FQO_Height]
- fullWid = tv[_FQO_Width] + 2 * fht + 2
- ResizeForm(0, 0, fullWid, _Default)
- lfTx = fht
- wdTx = fullWid - 2 * fht
-
- rsID = 100
- s = "The program you created is in the file """ + progName + """."
- FDT_NextCap(-1, 2, s)
-
- s = "You can open the program from Realizer's File menu or from FormDev's File menu."
- FDT_NextCap(-1, 2, s)
-
- s = "To run FormDev, select Execute from Realizer's File menu and run """
- s = s + fdRlzDir + "formdev.rlz""."
- FDT_NextCap(-1, 2, s)
-
- ResizeForm(_Right, _Top, _Default, QB(rsID) + fht)
- FDT_Frame()
- FormControl(_Show)
- END PROC
-