DEFINITION FontSelect; (* SJ *) (* FontSelect controls the selection of a text font via dialog box. The programmer must create a dialogbox containing 6 elements for this module : 1. A box object to write the font name with the selected font. It should not be quite big for selecting big fonts. The object type is changed to user defined. 2. A text object with two characters length to write the font size in. 3. A touchexit defined button for selecting the previous font. 4. Same for next font. 5. Same for smaller size. 6. Same for bigger size. The object numbers are told Init, the font is then selected when showing the dialog box. *) IMPORT Dialogs; VAR FontNo*,Font*,Height* : INTEGER; (* These variables contain the selected font. Font is the font identification number specific for every font. It must be used to set the font in vdi. FontNo contains a number starting with 1 and counting the fonts. Height is the font height selected. The font selected with the variables FontNo and Height is shown when starting the dialog. Font must not be set. FontNo is initialized to 1 (system font) and Height is initialized to 10 (8*16). *) PROCEDURE Init*(dialog : Dialogs.Dialog; FontName,PrevFont,NextFont,Size, Smaller,Larger : INTEGER); (* needs to be called once before showing the dialog box. The procedures to select the font are assigned to the objects using module dialog. Object FontName is changed to user defined, the user defined draw procedure draws the name of the selected font with the selected font. *) END FontSelect.