home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 3 / PDCD_3.iso / pocketbk / developmen / charm1 / CHARM.TXT < prev   
Text File  |  1994-01-06  |  4KB  |  132 lines

  1.                              CHARM
  2.                           Version 1.2
  3.              Copyright (c) Tom Dolbilin 1993, 1994
  4.  
  5. Charm 1.2 is a nice little character map for Psion S3a.
  6.  
  7. Features include:
  8. =================
  9.  
  10. * Support for all built-in fonts
  11. * Displays character codes in decimal and hex
  12. * Optionally displays all sizes for Roman or Swiss characters
  13. * Ctrl- and Psion-arrow key combinations for quick getting around
  14. * Pseudo-multithreading (eg, you don't have to wait for the screen to redraw)
  15. * Programming interface with other OPL programs
  16.  
  17. Version history:
  18. ================
  19.  
  20. 1.0    Dec 21, 1993
  21.  
  22.  - The original public release
  23.  
  24.  
  25. 1.1    Dec 24, 1993
  26.  
  27.  - Added optional display of all 4 sizes for Roman and Swiss characters
  28.  - The code has been substantially optimized for speed
  29.  - Better pseudo-multithreading
  30.  - Newer icon (more consistent with the built-in apps)
  31.  - Bug removed: Charm can now be closed from a group list
  32.  - In the About dialog "1.0" is replaced with "1.1" <g>
  33.  
  34. 1.1a    Dec 25, 1993  Maintenance release
  35.  
  36.  - Bug, introduced in version 1.1, that sometimes caused the character box not to redraw, has been removed
  37.  - Caps Lock being ON used to disable hot-keys -- not anymore
  38.  - Other minor changes
  39.  
  40. 1.2    Jan 6, 1994
  41.  
  42.  - Added ability to use Charm from within other OPL programs
  43.  
  44. Disclaimer
  45. ==========
  46.  
  47. The author of this software is not responsible for any damage
  48. due to use of this program. This software is provided without
  49. warranty of any kind.
  50.  
  51.  
  52. CHARM1.ZIP includes three files: CHARM.OPA, CHARM.TXT
  53.  
  54. Please e-mail suggestions to my CompuServe address 72730,1176.
  55.  
  56. Thanks,
  57.  
  58. Tom Dolbilin
  59. Jan 6 1994
  60.  
  61. ===============================================================================
  62.  
  63. 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.
  64.  
  65. 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.
  66.  
  67. USAGE:
  68.     CHARM%:( code%, font%, x%, y% )
  69.  
  70. PARAMETERS:
  71.     code%    - ASCII code of the character to be initially selected
  72.     font%    - font to use:    1 = S3 normal
  73.                 2 = S3 digits
  74.                 3 = Mono
  75.                 4 = Roman
  76.                 5 = Swiss
  77.     x%    - X position of the main window (width = 450)
  78.     y%    - Y position of the main window (height = 114)
  79.  
  80. RETURN VALUE:
  81.     0-255    - ascii code for the selected character when Enter was pressed
  82.     <0    - error code
  83.     -114    - Esc was pressed
  84.     $404    - While the character map was active, your program has received an Exit message.
  85.  
  86.  
  87. NOTES:
  88. - When positioning the main window keep in mind that the character box may be out of its bounds by 5 pixels in all directions.
  89. - CHARM%:() creates 2 windows so make sure you have 6 or less windows/bitmaps before calling it.
  90. - You can use LOCK ON/OFF before and after calling CHARM%:() if you don't want the System to send an Exit message.
  91. - VER$: procedure returns current version of Charm, eg, "1.2"
  92. - CHARM%:() doesn't appear to contain any bugs, but no programmer can guarantee it.
  93.  
  94. EXAMPLE:
  95.  
  96. --------------------8<---------------------
  97. PROC test:
  98. local k%, oldk%, fname$(15)
  99. fname$ = "\app\charm.opa"
  100. oldk% = %A
  101. trap cache 2000, 2000
  102. print "Press Tab to select from character map"
  103. print "Press Psion-Esc to quit"
  104. loadm fname$
  105. print "Charm version "; ver$:
  106. unloadm fname$
  107. while 1
  108.     k% = get
  109.     if k% = 9
  110.         rem LOCK ON could go here
  111.         loadm fname$
  112.         k% = charm%:( oldk%, 5, 15, 30 )
  113.         unloadm fname$
  114.         rem LOCK OFF could go here
  115.         if k% = $404
  116.             rem ----- Exit message
  117.             print "Should save changes and exit here"
  118.         elseif k% < 0
  119.             rem ----- k% is error code *or* if k%=-114 Esc was pressed
  120.             print err$( k% )
  121.         else
  122.             rem ----- k% is ascii code
  123.             print chr$( k% );
  124.             oldk% = k%
  125.         endif
  126.     else
  127.         print chr$( k% );
  128.     endif
  129. endwh
  130. ENDP
  131. --------------------8<---------------------
  132.