| Mnemonics |
|
| PxPlus
mnemonics deliver special control sequences to a display
device or printer. Discussions on the creation, format,
and use of mnemonics begin on the following page. For
groupings see Mnemonic Categories. Using Mnemonics
|
|
| *Note* | Mnemonics are specific to the channel on which they are defined and are only valid while the channel remains open. When the channel is closed, the mnemonics are cleared. |
| Creating and Redefining Mnemonics | Use the MNEMONIC directive to define/redefine
2-character mnemonics for any file or device. For
example, to assign settings for the PxPlus mnemonics 'CP'
and 'SP': MNEMONIC(0)'CP'="Courier New,-8":120,40 MNEMONIC(0)'SP'="*":80,25 When a defined mnemonic is encountered in a PRINT or INPUT statement, the system converts it to the character string specified. Some 2-character mnemonics are predefined. For example, 'CR', 'LF', and 'FF are predefined as $00$, $0A$, and $0C$ respectively. All 2-character mnemonics listed in this reference that are used for character display can also be used for character printing. This is provided that the mnemonic is defined for the printer output channel using the correct escape sequence for the device specified. Many motion/editing operations will be emulated when they are not actually supported by the device specified. However, it is still better to define mnemonics using the correct motion/editing sequences that are available for the specific device. Emulation of some sequences may result in slower performance. For further details on mnemonic definitions, refer to the MNEMONIC Directive, and the [WDX] Tag. |
| X,Y Coordinates | When using
GUI mnemonics, the values for x, y, and radius are
considered logical screen coordinates not line/column
coordinates. In PxPlus, these are known as graphical
units (similar to pixels). Use @X(
) / @Y( )
functions, to convert line/column values to graphical
units ; e.g., 0110 LET RADIUS=(100) 0120 LET X=@X(45)! X=graphical units for column value 45 0130 LET Y=@Y(20)! Y=graphical units for line value 20 0140 PRINT @(45,15),'CIRCLE'(X,Y,RADIUS,1) |
| Mnemonic Settings, Window / Region | When you send output to the screen, PxPlus remembers all graphic mnemonics until a 'CS' Clear Screen, is performed or the window is destroyed. This enables Windows to repaint the window properly when required. |
| Windows API Frame Styles | PxPlus has
three Windows API frame styles available to it. The
mnemonic 'WINDOW'
or 'WA' Mnemonics uses WS_BORDER frame
style, which is not popular with everyone. However, it
has advantages: it maintains a global menu and buttons
and is always relative to the main window. The mnemonic 'DIALOGUE'
Mnemonic,
on the other hand, uses WS_DLGFRAME,
which is more popular, but requires absolute screen
position and doesn't allow global menus and buttons.
To change the look of the window frame without losing 'WINDOW' functionality, you can use the WS_THICKFRAME style. To do this, add OPT="Z" to the 'WINDOW' mnemonic: PRINT 'WINDOW'(10,10,40,10,"Title",OPT="Z") |