home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 3 / CD ACTUAL 3.iso / linux / incoming / jstools-.6v3 / jstools- / jstools-tk3.6v3.0 / lib / jdoc / jslibraries.jdoc < prev    next >
Encoding:
Text File  |  1995-03-14  |  13.4 KB  |  137 lines

  1. {The jstools Libraries
  2.  
  3. Introduction
  4. The jstools libraries are a collection of Tk/Tcl libraries used by the jstools applications, and distributed with the jstools package.  They provide a variety of higher¡level facilities for constructing Tk¡ and Tcl¡based applications, and provide consistency of appearance and behaviour across applications.
  5.  
  6. This document describes version 3.6/3.0 of the jstools libraries.
  7.  
  8. Compatibility
  9. Version 3.6/3.0 of the libraries is compatible with Tk 3.6p1 and Tcl 7.3; it may work properly with other versions, but then again, it might not.
  10.  
  11. There's a bug in unpatched Tk 3.6 that causes wish(1) to die with a core dump under certain circumstances; you should apply the official patch to Tk, which is available with the Tk sources on the official Tk distribution sites.
  12.  
  13. There were focus¡related bugs in Tk 4.0b2 (the second beta release) which caused the jstools applications (and some others) to crash frequently; iflater versions of Tk probably will not suffer from this problem.  I think j:dialogue in particular tends to trigger this.
  14.  
  15. Libraries
  16. The libraries in the jstools package can be divided up by function as follows:
  17.  
  18. Utility Libraries
  19. These libraries don't provide significant functionality that the end¡user can see, but they are used by the other libraries, or provide convenience proedures to save a few lines of code in applications.
  20.  
  21. jdebug.tcl - debugging support
  22. jfileio.tcl - convenience procedures for reading from and writing to files
  23. jinit.tcl - the common jstools initialisation sequence
  24. jlistlib.tcl - undocumented, not¡ready¡for¡prime¡time tools for working with lists
  25. jparseargs.tcl - procedures for parsing procedure and application arguments
  26. jprefixmatch.tcl - filename expansion and abbreviation matching procedures
  27. jprefs.tcl - general routines for loading, saving, and using preferences
  28.     (see also jprefpanel.tcl)
  29. jtkutils.tcl - convenience procedures and user¡interface layout support
  30. jtkversion.tcl - procedures for writing code compatible with both Tk 3 and Tk 4
  31.  
  32. Compound Widgets and Widget Wrappers
  33. These libraries enhance the functionality of an existing Tk widget by providing a wrapper around it, or provide new widget¡like entities with new functionality.
  34.  
  35. jmetawidgets.tcl - compound widgets including a colour chooser
  36. joptionbutton.tcl - a button that lets the user choose one of several options
  37. jtext.tcl - wrappers around the text widget's widget command
  38.  
  39. Popup Panels
  40. These libraries provide popup panels or dialogue boxes of various kinds.  Except for the find panel provided by jfindpanel.tcl and the text display panel provided by jmore.tcl, these panels are modal.
  41.  
  42. jabout.tcl - richtext about panels
  43.     (see also jrichtext.tcl)
  44. jalert.tcl - popup notification panels
  45. jconfirm.tcl - a panel asking the user to confirm actions
  46. jfindpanel.tcl - a search¡and¡replace panel for the text widget
  47. jfs.tcl - a file¡selector panel
  48. jmore.tcl - a text¡display panel
  49. jprefpanel.tcl - a preference panel for setting shared jstools preferences
  50. jprompts.tcl - procedures to ask the user for various kinds of information
  51.  
  52. Procedures for Using Tagged Text
  53. These procedures let you and your users use, type, load, and save tagged text, which may display multiple fonts or colours or include hypertext.  The jtagconvert.tcl library provides a way of converting multifont text in a text widget into other rich¡text formats.
  54.  
  55. jrichtext.tcl - procedures to embed rich text in Tk applications
  56. jtagconvert.tcl - procedures for saving multifont text in various formats
  57. jtexttags.tcl - extensive support for working with tagged text
  58.     (see also jtext.tcl)
  59.  
  60. Bindings Libraries
  61. These libraries manage keyboard (and mouse) bindings for text and entry widgets.  Together with the preferences libraries, they let the user choose among `basic' bindings (more complete than the standard Tk 3.6 bindings), Emacs bindings, and vi bindings.  They depend on jtext.tcl, and support jtexttags.tcl if you're using it.
  62.  
  63. Currently, only jbindentry.tcl, jbindtext.tcl, jcompose.tcl, and jlatin1.tcl are documented at all, and they aren't documented very thoroughly.
  64.  
  65. jbindentry.tcl - several user¡selected styles of entry bindings
  66. jbindtext.tcl - several user¡selected styles of text bindings
  67.     (see also jtext.tcl)
  68. jcompose.tcl - support for the Compose key
  69. jentryemacs.tcl - support for Emacs¡style entry bindings
  70. jentrykeys.tcl - support for entry keyboard bindings
  71. jentrymouse.tcl - support for entry mouse bindings
  72. jentryvi.tcl - support for vi¡style entry bindings
  73. jlatin1.tcl - additional support for the Compose key
  74. jtextemacs.tcl - support for Emacs¡style text bindings
  75. jtextkeys.tcl - support for text keyboard bindings
  76. jtextmouse.tcl - support for text mouse bindings
  77. jtextvi.tcl - support for vi¡style text bindings
  78.  
  79. Usage
  80. If the jstools libraries have been installed normally at your site, you should be able to use them by making sure they're in your auto_path Tcl variable.  The jstools applications also all support the convention of letting you override the default location of the jstools libraries by setting the environment variable JSTOOLS_LIB, and also let you override individual jstools libraries by copying them to your ~/.tk directory and modifying them.  To accomplish all this, you should put the following code at or near the top of your wish(1) scripts:
  81.  
  82.   ## begin boiler_header
  83.   
  84.   global VERSION
  85.   set VERSION {3.6/2.0+}
  86.   
  87.   if {[info exists env(JSTOOLS_LIB)]} {
  88.     set jstools_library $env(JSTOOLS_LIB)
  89.   } else {
  90.     set jstools_library /usr/local/lib/jstools
  91.   }
  92.   
  93.   # add the jstools library to the library search path:
  94.   
  95.   set auto_path [concat [list $jstools_library] $auto_path]
  96.   
  97.   # check for ~/.tk and prepend it to the auto_path
  98.   # if it exists.  that way the user can override 
  99.   # and customise the jstools libraries.
  100.   
  101.   if {[file isdirectory ~/.tk]} then {
  102.     set auto_path [concat [list [glob ~/.tk]] $auto_path]
  103.   }
  104.   
  105.   ## end boiler_header
  106.  
  107. You should also call j:jstools_init early in your code; this reads in global (cross¡application) preferences, which are used by some of the other libraries, and automatically sets up bindings for entry and text widgets based on the user's preferences.
  108.  
  109. Credits and Copyright
  110. Author
  111. Jay Sekora 
  112. js@bu.edu
  113. http://shore.net/~js/
  114.  
  115. Copyright
  116. The jstools distribution (applications, libraries, and support files) is copyright ⌐ 1992-1995 by Jay Sekora, but may be freely copied and modified for non¡commercial purposes.  (Please contact me if you want to use it for a commercial purpose, this may be OK under some circumstances.)
  117.  
  118. Thanks
  119. Most importantly, I'd like to thank John Ousterhout <ouster@tcl.eng.sun.com>, the author of Tk and Tcl, for providing such a wonderful, robust, simple language for writing X Windows applications, and the Tcl community which has helped extend Tk and Tcl without forcing them to succumb to feature bloat.
  120.  
  121. In many places in the libraries, I've borrowed code from other people (with permission); they're mentioned in the documentation files for the individual libraries and in comments in the code itself.
  122.  
  123. Evolution
  124. Feel free to report bugs (and feature requests) to me, <js@bu.edu>, and I will try to deal with them.  Also, feel free to fix bugs or add features on your own and let me know how you did it.
  125.  
  126. Changes
  127. The jstools libraries have changed extensively since version 3.6/2.0.  The biggest change (aside from the addition of new libraries) is that the procedures have been broken down into much smaller libraries, according to function; in version 3.6/2.0 there were only four libraries, but one of them (jlibrary.tcl) was huge and monolithic.  They are also now all autoloaded, rather than being explicitly sourced.  
  128.  
  129. Future Directions
  130. * I'd like to write a library for working with the contents of canvases (e.g. archiving and restoring them).
  131.  
  132. * I hope to overhaul the Preferences mechanism, which will probably involve new preferences libraries.  See the jstools documentation for more about this.
  133.  
  134. * I'd like to add libraries for popup menus and/or gesture commands.  (Actually, popup menu support is provided with Tk 4.0, but gesture commands would still be nice, and they could be combined - drag¡right could pop up a menu, and drag¡up could delete text, for instance.)
  135.  
  136. * I'd like to write a library for inter¡application communication, to help tie the various applications more closely together.  See the jstools documentation for more about this.
  137. } {{{jdoc:xref:link {4.67 4.91 13.221 13.231 21.0 21.10 22.0 22.11 23.0 23.9 25.0 25.14 26.0 26.16 27.0 27.10 28.11 28.25 29.0 29.12 30.0 30.14 35.0 35.16 36.0 36.17 37.0 37.9 40.112 40.126 40.166 40.175 42.0 42.10 43.11 43.24 44.0 44.10 45.0 45.12 46.0 46.14 47.0 47.7 48.0 48.9 49.0 49.14 50.0 50.12 55.0 55.13 56.0 56.15 57.0 57.13 58.11 58.20 61.271 61.280 61.294 61.307 63.16 63.30 63.32 63.45 63.47 63.59 63.65 63.76 65.0 65.14 66.0 66.13 67.11 67.20 68.0 68.12 73.0 73.11 107.21 107.35 132.108 132.133 132.138 132.153 136.132 136.157 136.162 136.177}} {jdoc:xref:manpage {11.46 11.50 80.125 80.152 80.532 80.536}} {jdoc:anchor:anchorname {3.0 4.0 15.0 16.0 79.0 80.0 109.0 110.0 123.0 124.0}} {richtext:font:roman {2.0 3.0 4.0 4.4 4.11 4.71 4.78 4.118 4.125 6.47 6.54 8.0 9.0 9.77 9.80 11.46 11.50 13.85 13.92 13.221 13.231 15.0 16.0 16.21 16.28 17.0 18.17 21.0 21.10 22.0 22.11 23.0 23.9 23.23 23.30 24.0 24.12 25.0 25.14 26.0 26.16 27.0 27.10 27.72 28.0 28.11 28.25 29.0 29.12 30.0 30.14 32.0 32.36 35.0 35.16 36.0 36.17 37.0 37.9 39.0 39.12 40.112 40.126 40.166 40.175 42.0 42.10 43.11 43.24 44.0 44.10 45.0 45.12 46.0 46.14 47.0 47.7 48.0 48.9 49.0 49.14 49.55 49.62 50.0 50.12 52.0 52.32 53.150 53.165 55.0 55.13 56.0 56.15 57.0 57.13 58.11 58.20 60.0 60.18 61.242 61.244 61.271 61.280 61.294 61.307 63.16 63.30 63.32 63.45 63.47 63.59 63.65 63.76 65.0 65.14 66.0 66.13 67.11 67.20 68.0 68.12 68.31 68.38 69.0 69.15 70.0 70.14 71.0 71.15 72.0 72.12 73.0 73.11 73.41 73.48 74.0 74.14 75.0 75.13 76.0 76.14 77.0 77.11 79.0 80.0 80.7 80.14 80.130 80.139 80.159 80.166 80.264 80.271 80.318 80.329 80.368 80.375 80.410 80.415 80.532 80.536 82.0 106.0 107.21 107.35 109.0 110.6 112.0 112.9 113.0 113.21 115.0 115.9 116.4 116.11 118.0 118.6 119.52 119.76 123.0 124.0 124.55 124.66 126.0 126.7 127.4 127.11 127.298 127.310 129.0 129.17 132.112 132.119 136.136 136.143 137.0}} {richtext:font:italic {9.77 9.80}} {richtext:font:bold {4.4 4.11 4.71 4.78 4.118 4.125 6.47 6.54 13.85 13.92 16.21 16.28 17.0 18.0 21.0 21.10 22.0 22.11 23.0 23.9 23.23 23.30 24.0 24.12 25.0 25.14 26.0 26.16 27.0 27.10 27.72 28.0 28.11 28.25 29.0 29.12 30.0 30.14 35.0 35.16 36.0 36.17 37.0 37.9 40.112 40.126 40.166 40.175 42.0 42.10 43.11 43.24 44.0 44.10 45.0 45.12 46.0 46.14 47.0 47.7 48.0 48.9 49.0 49.14 49.55 49.62 50.0 50.12 53.150 53.165 55.0 55.13 56.0 56.15 57.0 57.13 58.11 58.20 61.271 61.280 61.294 61.307 63.16 63.30 63.32 63.45 63.47 63.59 63.65 63.76 65.0 65.14 66.0 66.13 67.11 67.20 68.0 68.12 68.31 68.38 69.0 69.15 70.0 70.14 71.0 71.15 72.0 72.12 73.0 73.11 73.41 73.48 74.0 74.14 75.0 75.13 76.0 76.14 77.0 77.11 80.7 80.14 80.159 80.166 80.264 80.271 80.368 80.375 80.410 80.415 116.4 116.11 127.4 127.11 127.298 127.310 132.112 132.119 136.136 136.143}} {richtext:font:typewriter {11.46 11.50 13.221 13.231 61.242 61.244 80.130 80.139 80.318 80.329 80.532 80.536 82.0 106.0 107.21 107.35 112.0 112.9 113.0 113.21 119.52 119.76 124.55 124.66}} {richtext:font:heading0 {1.0 2.0}} {richtext:font:heading1 {3.0 4.0 15.0 16.0 79.0 80.0 109.0 110.0 123.0 124.0}} {richtext:font:heading2 {8.0 9.0 18.0 18.17 32.0 32.36 39.0 39.12 52.0 52.32 60.0 60.18 110.0 110.6 115.0 115.9 118.0 118.6 126.0 126.7 129.0 129.17}} {jdoc:anchorname:Usage {79.0 80.0}} {jdoc:manpage:wish {11.46 11.50 80.532 80.536}} {jdoc:link:jstools.jdoc {4.67 4.91 132.108 132.133 136.132 136.157}} {jdoc:link:jabout.tcl.jdoc {42.0 42.10}} {jdoc:link:jalert.tcl.jdoc {44.0 44.10}} {jdoc:link:jbindentry.tcl.jdoc {63.16 63.30 65.0 65.14}} {jdoc:link:jbindtext.tcl.jdoc {63.32 63.45 66.0 66.13}} {jdoc:link:jconfirm.tcl.jdoc {45.0 45.12}} {jdoc:link:jdebug.tcl.jdoc {21.0 21.10}} {jdoc:link:jfileio.tcl.jdoc {22.0 22.11}} {jdoc:link:jfindpanel.tcl.jdoc {40.112 40.126 46.0 46.14}} {jdoc:link:jfs.tcl.jdoc {47.0 47.7}} {jdoc:link:jinit.tcl.jdoc {23.0 23.9}} {jdoc:link:jmetawidgets.tcl.jdoc {35.0 35.16}} {jdoc:link:jmore.tcl.jdoc {40.166 40.175 48.0 48.9}} {jdoc:link:joptionbutton.tcl.jdoc {36.0 36.17}} {jdoc:link:jparseargs.tcl.jdoc {25.0 25.14}} {jdoc:link:jprefixmatch.tcl.jdoc {26.0 26.16}} {jdoc:link:jprefpanel.tcl.jdoc {28.11 28.25 49.0 49.14}} {jdoc:link:jprefs.tcl.jdoc {27.0 27.10}} {jdoc:link:jprompts.tcl.jdoc {50.0 50.12}} {jdoc:link:jrichtext.tcl.jdoc {43.11 43.24 55.0 55.13}} {jdoc:link:jtagconvert.tcl.jdoc {56.0 56.15}} {jdoc:link:jtext.tcl.jdoc {37.0 37.9 58.11 58.20 61.271 61.280 67.11 67.20}} {jdoc:link:jtexttags.tcl.jdoc {57.0 57.13 61.294 61.307}} {jdoc:link:jtkutils.tcl.jdoc {29.0 29.12}} {jdoc:manpage:library {80.125 80.152}} {jdoc:link:jinit.jdoc {107.21 107.35}} {jdoc:link:jstools.jdoc#Preferences_futures {132.138 132.153}} {jdoc:link:jstools.jdoc#interapplication_communication {136.162 136.177}} {jdoc:anchorname:Evolution {123.0 124.0}} {jdoc:anchorname:Credits_and_Copyright {109.0 110.0}} {jdoc:anchorname:Libraries {15.0 16.0}} {jdoc:anchorname:Introduction {3.0 4.0}} {jdoc:link:jtkversion.tcl.jdoc {30.0 30.14}} {jdoc:link:jcompose.tcl.jdoc {63.47 63.59 68.0 68.12}} {jdoc:link:jlatin1.tcl.jdoc {63.65 63.76 73.0 73.11}} {jdoc:link:jtkutils.tcl.jdoc#j:dialogue {13.221 13.231}}} {{matchend 17.0} {abbrevstart 13.263} {richptr 14.0} {abbrevend 13.268} {insert 1.0} {emacs_mark 17.0} {matchstart 17.0} {anchor 6.39} {current 1.21}}}