CHARM Version 2.0 Copyright (c) Tom Dolbilin 1993, 1994 Charm 2.0 is a nice little character map for Psion S3a. Features include: ================= * Support for all built-in fonts * Displays character codes in decimal and hex * 'Bring' support * Optionally displays all sizes for Roman or Swiss characters * Ctrl- and Psion-arrow key combinations for quick getting around * Pseudo-multithreading (eg, you don't have to wait for the screen to redraw) * Programming interface with other OPL programs Version history: ================ 1.0 Dec 21, 1993 - The original public release 1.1 Dec 24, 1993 - Added optional display of all 4 sizes for Roman and Swiss characters - The code has been substantially optimized for speed - Better pseudo-multithreading - Newer icon (more consistent with the built-in apps) - Bug removed: Charm can now be closed from a group list - In the About dialog "1.0" is replaced with "1.1" 1.1a Dec 25, 1993 Maintenance release - Bug, introduced in version 1.1, that sometimes caused the character box not to redraw, has been removed - Caps Lock being ON used to disable hot-keys -- not anymore - Other minor changes 1.2 Jan 6, 1994 - Added ability to use Charm from within other OPL programs 2.0 Mar 24, 1994 - Added support for the 'Bring' feature in the built-in applications Disclaimer ========== The author of this software is not responsible for any damage due to use of this program. This software is provided without warranty of any kind. CHARM1.ZIP includes three files: CHARM.OPA, CHARM.TXT Please e-mail suggestions to my CompuServe address 72730,1176. Thanks, Tom Dolbilin Mar 24 1994 =============================================================================== The following describes how to bring Charm character map into your own OPL programs. You can use Charm in your own programs free of charge even if those programs are shareware or commercial (in which case they should be considerably bigger than Charm itself). I only ask for two things -- credit me in your README file and let me know. Thanks. The subroutine displays the character map the same way it appears in Charm. However, the Font and Code fields, 4 characters of different sizes, and all the menu options are missing. As before, user can use arrow keys to move around and select a desired character. When Enter is pressed, the code of the selected character is returned. USAGE: CHARM%:( code%, font%, x%, y% ) PARAMETERS: code% - ASCII code of the character to be initially selected font% - font to use: 1 = S3 normal 2 = S3 digits 3 = Mono 4 = Roman 5 = Swiss x% - X position of the main window (width = 450) y% - Y position of the main window (height = 114) RETURN VALUE: 0-255 - ascii code for the selected character when Enter was pressed <0 - error code -114 - Esc was pressed $404 - While the character map was active, your program has received an Exit message. NOTES: - When positioning the main window keep in mind that the character box may be out of its bounds by 5 pixels in all directions. - CHARM%:() creates 2 windows so make sure you have 6 or less windows/bitmaps before calling it. - You can use LOCK ON/OFF before and after calling CHARM%:() if you don't want the System to send an Exit message. - VER$: procedure returns current version of Charm, eg, "1.2" - CHARM%:() doesn't appear to contain any bugs, but no programmer can guarantee it. EXAMPLE: --------------------8<--------------------- PROC test: local k%, oldk%, fname$(15) fname$ = "\app\charm.opa" oldk% = %A trap cache 2000, 2000 print "Press Tab to select from character map" print "Press Psion-Esc to quit" loadm fname$ print "Charm version "; ver$: unloadm fname$ while 1 k% = get if k% = 9 rem LOCK ON could go here loadm fname$ k% = charm%:( oldk%, 5, 15, 30 ) unloadm fname$ rem LOCK OFF could go here if k% = $404 rem ----- Exit message print "Should save changes and exit here" elseif k% < 0 rem ----- k% is error code *or* if k%=-114 Esc was pressed print err$( k% ) else rem ----- k% is ascii code print chr$( k% ); oldk% = k% endif else print chr$( k% ); endif endwh ENDP --------------------8<---------------------