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 / jabout.tcl.jdoc < prev    next >
Encoding:
Text File  |  1995-03-14  |  9.5 KB  |  128 lines

  1. {jabout.tcl
  2.  
  3. Introduction
  4. The jabout.tcl library is distributed as part of the jstools package.  It consists of one main procedure and a number of subsidiary procedures used by the jstools applications.  It contains procedures to manage an `about' panel, with information about your application.  (Actually, it can be used as a general¡purpose richtext display mechanism.)
  5.  
  6. This document describes jabout.tcl version 3.6/3.0.
  7.  
  8. Usage
  9. Accessing the Library
  10. In order to use the jabout.tcl library, it (and any other libraries it depends on) must be in your Tcl auto_path, described in tclvars(n).  Information about how to arrange that, and other conventions common to the jstools libraries, is in the Usage section of The jstools Libraries.
  11.  
  12. Specifying Text
  13. The Tcl¡syntax format for specifying richtext is defined by the jrichtext.tcl library, which jabout.tcl uses.
  14.  
  15. Credits and Copyright
  16. Author
  17. Jay Sekora 
  18. js@bu.edu
  19. http://shore.net/~js/
  20.  
  21. Copyright
  22. The library is copyright ⌐ 1992-1994 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.)
  23.  
  24. Overview
  25. Procedures
  26. j:about - create an about box
  27. j:about:button - add a button to an about box
  28. j:about_jay - return rich¡text describing me
  29. j:about_tktcl - return rich¡text describing Tk and Tcl
  30.  
  31. j:about
  32. Usage
  33.     j:about name [options] richtext
  34. Options
  35.     -title title  (default About)
  36. Arguments
  37.     name is the name of the about¡box window
  38.     richtext is the rich¡text content of the about box
  39.     title is the window¡manager title for the about box
  40. Example
  41.     j:about .telephones -title "About Telephones" {
  42.       j:rt:hl "Telephones"
  43.       j:rt:cr
  44.       j:rt:rm "Telephones are extremely useful, "
  45.       j:rt:rm "but also sometimes extremely "
  46.       j:rt:it "annoying"
  47.       j:rt:rm " devices for communicating "
  48.       j:rt:rm "over long distances."
  49.     }
  50.  
  51. Description
  52. This procedure creates and displays a new about panel containing richtext.  The about panel's toplevel widget will be named name.  (It's window¡manager title will be title, if specified.)  The about box will have a button labelled `OK' in the lower right which will destroy the panel.  (The OK button is the default button, so the user can invoke it by pressing Return.)
  53.  
  54. j:about:button
  55. Usage
  56.     j:about:button aboutbox label richtext
  57. Arguments
  58.     aboutbox is the name of the about panel to add the button to
  59.     label is the text to display on the button
  60.     richtext is the richtext the button should display in the about box
  61. Example
  62.     j:about:button .about "Copyright" {
  63.       j:rt:rm "Copyright \251 1776 by George Washington"
  64.       j:rt:cr
  65.       j:rt:rm "All Rights Reserved."
  66.     }
  67.  
  68. Description
  69. This procedure is used to add buttons to an existing about panel, so your users can choose among several topics for the about panel.  If you only want your about panel to display one piece of text, you don't need to call this procedure, but if you have several topics - for instance, general information about your program, a copyright notice, and a list of contributing authors - you can add buttons to the about panel for each topic.
  70.  
  71. The button will be packed to the left of the `OK' button (or any previously¡added buttons), and will be labelled with label.  When invoked, it will display richtext in the about panel, replacing any text that was displayed before.  (For this reason, if you add buttons to an about panel, one of the buttons should typically redisplay the initial contents of the panel.
  72.  
  73. j:about_jay
  74. Usage
  75.     j:about_jay
  76.  
  77. Description
  78. This procedure returns richtext (as defined by the jrichtext.tcl library) describing me.  It's in the library as a convenience, so I can call it from all the jstools applications.
  79.  
  80. j:about_tktcl
  81. Usage
  82.     j:about_tktcl
  83. Example
  84.     j:about:button .about "Tk and Tcl" [j:about_tktcl]
  85.  
  86. Description
  87. This procedure returns richtext describing Tk and Tcl.  The text is currently:
  88.  
  89.     Tk and Tcl
  90.     
  91.     This application is written in wish, a scripting shell for X Windows
  92.     applications based on the Tk toolkit, which in turn is based on
  93.     the Tcl language and scripting library, all amazingly useful tools
  94.     by John Ousterhout of Sun Microsystems.
  95.     
  96.     The Internet newsgroup comp.lang.tcl is devoted to Tcl and related
  97.     tools, and a Tk/Tcl FAQ (`Frequently Asked Questions') is periodically
  98.     posted.  The latest distributions are available on the FTP site
  99.     ftp.cs.berkeley.edu, and ftp.aud.alcatel.com has the FAQ 
  100.     and user¡contributed scripts.
  101.  
  102. A longer example
  103. This is a simplified version of the code that generates the about panel for the jedit application:
  104.  
  105.     set about_editor {
  106.       j:rt:hl "jedit"
  107.       j:rt:cr
  108.       j:rt:rm "by Jay Sekora, "
  109.       j:rt:tt "js@bu.edu"
  110.       j:rt:par
  111.       j:rt:rm "A customisable text editor for X Windows."
  112.       j:rt:cr
  113.       j:rt:rm "Version 3.2."
  114.     }
  115.     j:about .about $about_editor
  116.     j:about:button .about {About jedit} $about_editor
  117.     j:about:button .about {About The Author} [j:about_jay]
  118.     j:about:button .about {About Tk and Tcl} [j:about_tktcl]
  119.  
  120. Evolution
  121. 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.
  122.  
  123. Bugs and Limitations
  124. * Having to add a button for each topic is clumsy.  It would be better if the argument to j:about were a list of topics and corresponding richtext, and there were a one¡of¡many selector of some kind to view different topics.
  125.  
  126. Future Directions
  127. * The fonts used in a j:about panel should be configurable by the user.  Perhaps the same is true of the size of the panel.
  128. } {{{display:foreground:Red {10.283 11.0}} {jdoc:xref:link {4.53 4.60 4.155 4.162 10.211 10.232 10.240 10.257 10.261 10.282 13.64 13.77 26.0 26.7 27.0 27.14 28.0 28.11 29.0 29.13 78.51 78.64 78.158 78.165}} {jdoc:xref:manpage {10.127 10.134}} {jdoc:anchor:anchorname {3.0 4.0 8.0 9.0 15.0 16.0 24.0 25.0 31.0 32.0 54.0 55.0 73.0 74.0 80.0 81.0 102.0 103.0 120.0 121.0}} {richtext:font:roman {2.0 3.0 4.0 4.4 4.14 4.53 4.60 4.155 4.162 6.24 6.34 8.0 9.21 10.20 10.30 10.103 10.112 10.127 10.134 10.215 10.222 10.244 10.249 10.261 10.282 10.283 11.0 12.0 12.15 13.64 13.77 13.93 13.103 15.0 17.0 18.0 18.9 19.0 19.21 21.0 22.0 24.0 26.7 27.0 27.14 28.0 28.11 29.0 29.13 31.0 33.14 33.15 33.22 33.23 33.32 34.0 35.15 35.24 35.29 36.0 37.5 38.0 38.9 39.0 39.6 40.0 52.0 52.65 52.73 52.124 52.128 52.166 52.171 52.362 52.368 54.0 56.39 57.0 58.0 58.1 58.9 59.1 59.6 60.1 60.9 61.0 68.11 71.118 71.123 71.156 71.164 73.0 75.12 76.0 78.0 78.51 78.64 78.158 78.165 80.0 82.14 83.0 85.0 86.0 87.0 89.0 89.14 90.0 90.4 91.0 91.4 91.35 91.39 92.0 92.4 93.0 93.4 94.0 94.4 95.0 95.4 96.0 96.4 96.27 96.40 97.0 97.4 98.0 98.4 99.0 99.23 99.29 99.48 100.0 100.4 102.0 103.0 103.80 103.85 105.0 119.0 120.0 121.0 121.55 121.66 123.0 123.20 124.90 124.97 126.0 126.17 127.22 127.29 128.0}} {richtext:font:italic {33.9 33.13 33.15 33.22 33.24 33.32 35.8 35.13 37.1 37.5 38.1 38.9 39.1 39.6 52.65 52.73 52.124 52.128 52.166 52.171 56.16 56.24 56.25 56.30 56.31 56.39 58.1 58.9 59.1 59.6 60.1 60.9 71.118 71.123 71.156 71.164 76.0 77.0}} {richtext:font:bold {4.4 4.14 4.53 4.60 4.155 4.162 6.24 6.34 10.20 10.30 10.215 10.222 13.64 13.77 13.93 13.103 50.0 51.0 52.362 52.368 78.51 78.64 78.158 78.165}} {richtext:font:bolditalic {10.244 10.249 10.261 10.282 89.4 89.14}} {richtext:font:typewriter {10.103 10.112 10.127 10.134 18.0 18.9 19.0 19.21 26.0 26.7 27.0 27.14 28.0 28.11 29.0 29.13 33.0 33.9 33.13 33.14 33.23 33.24 35.0 35.8 35.13 35.15 35.24 35.29 37.0 37.1 38.0 38.1 39.0 39.1 41.0 50.0 56.0 56.16 56.24 56.25 56.30 56.31 62.0 67.0 75.0 75.12 82.0 82.14 84.0 85.0 89.0 89.4 90.0 90.4 91.0 91.4 91.35 91.39 92.0 92.4 93.0 93.4 94.0 94.4 95.0 95.4 96.0 96.4 96.27 96.40 97.0 97.4 98.0 98.4 99.0 99.23 99.29 99.48 100.0 100.4 103.80 103.85 105.0 119.0 121.55 121.66 124.90 124.97 127.22 127.29}} {richtext:font:heading0 {1.0 2.0}} {richtext:font:heading1 {3.0 4.0 8.0 9.0 15.0 16.0 24.0 25.0 31.0 32.0 54.0 55.0 73.0 74.0 80.0 81.0 102.0 103.0 120.0 121.0}} {richtext:font:heading2 {9.0 9.21 10.283 11.0 12.0 12.15 16.0 17.0 21.0 22.0 25.0 26.0 32.0 33.0 34.0 35.0 36.0 37.0 40.0 41.0 51.0 52.0 55.0 56.0 57.0 58.0 61.0 62.0 67.0 68.11 74.0 75.0 77.0 78.0 81.0 82.0 83.0 84.0 86.0 87.0 123.0 123.20 126.0 126.17}} {{} {10.244 10.257 14.0 100.4 100.8 100.12 100.13 109.15 109.17 119.0}} {jdoc:link:jstools.jdoc {4.53 4.60 4.155 4.162 78.158 78.165}} {jdoc:manpage:tclvars {10.127 10.134}} {jdoc:link:jslibraries.jdoc#Usage {10.240 10.257}} {jdoc:link:jslibraries.jdoc {10.261 10.282}} {jdoc:anchorname:Evolution {120.0 121.0}} {jdoc:anchorname:Credits_and_Copyright {15.0 16.0}} {jdoc:anchorname:Introduction {3.0 4.0}} {jdoc:anchorname:Usage {8.0 9.0}} {jdoc:link:jrichtext.tcl.jdoc {13.64 13.77 78.51 78.64}} {jdoc:topic:jstools {4.53 4.60 4.155 4.162 78.158 78.165}} {jdoc:topic:jrichtext.tcl {78.51 78.64}} {jdoc:section:j:about {26.0 26.7}} {jdoc:section:j:about:button {27.0 27.14}} {jdoc:section:j:about_jay {28.0 28.11}} {jdoc:section:j:about_tktcl {29.0 29.13}} {jdoc:anchorname:j:about {31.0 32.0}} {jdoc:anchorname:j:about:button {54.0 55.0}} {jdoc:anchorname:j:about_jay {73.0 74.0}} {jdoc:anchorname:j:about_tktcl {80.0 81.0}} {jdoc:link:#j:about {26.0 26.7}} {jdoc:link:#j:about:button {27.0 27.14}} {jdoc:link:#j:about_jay {28.0 28.11}} {jdoc:link:#j:about_tktcl {29.0 29.13}} {jdoc:link:jslibraries.tcl {10.211 10.232}} {jdoc:anchorname:Overview {24.0 25.0}} {jdoc:anchorname:A_longer_example {102.0 103.0}}} {{richptr 127.0} {del_from 128.0} {matchend 128.0} {abbrevstart 127.2} {abbrevend 127.2} {insert 6.50} {del_to 4.344} {matchstart 128.0} {anchor 6.50} {emacs_mark 128.0} {current 1.0}}}