## OVERVIEW

The escape key for the PC3 driver is the SHIFT-BREAK key. The PC3 driver is part of the windows version of SM32. It is called PC3 and is specified on the windows SM32 property page SM32 Devices as:

        Device: 0
        ID: T0 or whatever
        I/O Buffer: 4096
        Driver Info:uterm

Since this is the default a user only has to modify the ID. The PC3 Driver places characters on the window much the same as Notepad or a telnet client might.
The PC3 Driver supports the Data General style Screenedit via the: PRM= keyword,SETSCR command and the SCR function. The Screenedit keys can be changed but there is no property page to do it. See SETCONFIG
The fonts property page is associated with PC2 driver. By default there are 2 fonts specified:
SP - (standard print) and
CP - (compressed print)
A new user to windows should try the different fonts available. Note that the mnemonics ‘SP’ and ‘CP’ are equivalent to ‘MODE’("SP") and ‘MODE’("CP") respectively. You can change the SP and CP mode to what ever you want and you can add other modes. There are 3 choices for window/font resizing:
1.no auto sizing - with this choice neither the window size or the font size are not automatically changed.
2.auto size font base on window (this is the default) - with this choice if the user adjust his window size an attempt is made to adjust the font size to fill the window.
3.auto size window to font - with this choice an attempt to enlarge the window to accommodate the font is made.

### A font test:

Define a font mode called BIG
With font type Courier New
Auto Size font based on window
Height 3 and Width 10
Point size doesn’t matter because of Auto size font based on window.
Note you must exit(bye) and restart for the new font to be seen by SM32. Then run the following Program:

    10 BEGIN
    20 PRINT ‘CS’,’PUSH’
    25 PRINT ‘MODE’("BIG"),
    30 PRINT ‘BACKGR’,’RED’,’DEFAULT’,’CS’,’BLACK’,
    40 READ @(0,0),"Got Your",’lf’,"ATTENTION!".’lf’,"Hit Enter",*
    50 PRINT ‘SP’,’POP’

## Using Colors for Character Attributes

The following Mnemonics support the use of colors in stead of the traditional meaning:
'SB' - 'SF' background (low/high intensity)
'BU' - 'EU' underline
'BB' - 'EB' blink (blink is not supported - setting a color to blink works)
'BR' - 'ER' reverse video
To set a color supply parameters in the same way as 'RGBX'.
If multiple of the above modes are set with a color, the color is chosen in the following order:
1. The BB color
2. The BU color
3. The BR color
4. The SB color
Notice that this implies that you could have charcters of different colors that remain after a 'CF'. This same effect could be obtained with 'SB'(100),'SB','RGBX'(r,g,b),
For Example:
PRINT 'SB'(255,0,0),'BB'(0,255,0),
PRINT 'SF',"This will be Cleared",'SB',"Red",'BB',"Green",'CF'
Will leave RedGreen on the screen.

## Character Windows

The PC2 driver tries to be somewhat BBX compatiple as far as charcter windows go. There are 3 entites involve SCREENS, WINDOWS, and SCROLL AREAS.
A SCREEN is defined on the Font Property page as was done above. The default ('SP') was a 25 x 80 characters.
A WINDOW is created at some position realative to 0,0 of the SCREEN. It does not need be contained in whole or in part within the current screen.
A SCROLL AREA is a region that is wholly contained within a WINDOW. The cursor is not allowed to leave the SCROLL AREA
When the PC2 driver starts it creates WINDOW # 0 the same size as the 'SP' SCREEN and since the window has no Title the SCROLL AREA is the size of the WINDOW. So older programs that operated with a single WINDOW work fine within the 25x80 SCROLL AREA of WINDOW # 0.

### A Character Window test:

Bring up SM32 in the default window
PRINT 'WINDOW'(40,12,80,25,"off screen"),
This created a WINDOW the same size as the SCREEN but located it partly off the SCREEN. Since the WINDOW has a Title a BOX is drawn around the WINDOW the SCROLL AREA looses a row at the top and bottom and a column at the left and right so the lower right hand charcter is @(77,22). Note that creating the window placed you in the new window.
PRINT 'GOTO'(0),
PRINT 'GOTO'(1),
PRINT @(60,5),"x",'CH','CL',
PRINT 'MOVE'(0,0)
PRINT 'POP'
NOTE:
The PC3 driver also supports named WINDOWS as in 'GOTO'("BIGWINDOW") SEE 'WINDOW'

## PC2-REMOTE

The PC3 driver running on a windows system(PC3) can be used by SM32 on a Linux system via the linux PC2-REMOTE driver.SEE CONNECT, 'CON', RCALL, and LCALL
NOTE:
Any STBL functions setting strings with names starting with '!' are always sent to the Device 0 driver. The PC2 driver make use of !TERMS, !EDIT and !SCR. As a result of this, setting 1 of these 3 strings under linux will have the result of also setting that string on the windows PC. Also the SETSCR command sends a !SCR STBL.

## PC3 GUI Features/Web View

The PC3 driver uses the Microsoft Foundation Class (MFC) for its display. Within mfc it uses the Multiple Document Interface (MDI) and creates 2 documents. The Web Documnet (Web View) has a view based on the MFC class CHtmlView which is the core of Windows Internet Explorer. The SM32 Document (console view) has a view based on the MFC class CView. The driver also allows for creation on a modal dialog box based on the MFC class CDHtmlDialog.

### What Does this mean to the SM32 programmer ?

Basically this means there are 3 windows, dialog boxes, a status line and menus that the programmer has to deal with.

1. The Main Window
The main window contains the System Menu (Console View and Web View have no System Menu). So a 'SYSMENU' applies the the Main Window.
They Main Window also 'owns' the other 2 windows and uses the 'GWIN' mnemonic to control the 2 windows. The 'MOVEWINDOW' will position the MainWindow on the desktop.
The 'WT' will set the title of the currently active window while the 'MWT' set the Main Window title. The main window contains the status line.(ON/OFF 'GWIN' and display 'STATUS')
The Main Window also contains the Menu but when activated SM32 sets the menu to the child windows menu.

2. The Console View
When the Console View window is the active child window it responds to all the normal SM32 Input and Output. The Console View also loads its current menu into the main window menu when it becomes the active child window.

3. The Web View
The Web View responds to the READ GUI K![ALL] and the WRITE GUI K![ALL] statements. [Also see Run Time HTML Data] The Web View also loads its current menu into the main window menu when it becomes the active child window.

3. Dialog Boxes
A Modal Dialog Box can be created from the Console View, the Web View or from another Dialog Box. Once created a Dialog Box acts like the Web View responding to the READ GUI K![ALL] and the WRITE GUI K![ALL] statements.

5. The Status Line
The Status line receives data from: 'STATUS'. It also recives data when the user has the mouse over a menu item.

6. Menus
Menus are built with the 'MENU' mnemonic. There are 2 sample programs 'MAKEMENU' and 'MENUTEST'. MENUTEST has 4 small menus 2 for each view and clicking just changes the menu. MAKEMENU creates a larger menu but has only 3 active items, Test Modify under File, Uncheck above under File, Delete under Menu1 ,the rest just print out the menu Item ID Number. SM32 allows the programmer to create and save named menus. The name is up to 8 characters long. A menu belongs to either the Console View or the Web View. A menu item simply returns a number when it is clicked. The programmer is notified of an Item being clicked by taking the END= branch from the READ or READ RECORD from the console view or a READ GUI from the Web View. If the user attempts to select a Menu Item when the program is not at a statement that contains an END= the menu Item will be disabled. Note you could use the Properties (config/setconfig) to add a synonym of MENU= for END=. END= was used as it had no meaning on a FID(0) device. Example:
`100 READ (0,END=200)"Enter Something:",A$`
`110 .......`
`120 .......`
`200 READ 'EE',A,'BE',`
`210 ON A-34000 GOTO 1000,1100,1200,1300,1400`
or for the Web View 100 would be
`100 READ GUI(0,END=200)K![ALL]`