########################################################################### # # TkIspell v1.3 -- A Tk/Tcl interface to Ispell # by Paul Raines (raines@bohr.physics.upenn.edu) # # Note: this package is known to work only with Ispell Version 3.0.09 (beta) # If your version of ispell does not output an initial version # line when run as 'ispell -a', set the global variable # tkisp(have_new) in tkispell to 0. Making the wrong choice will make # tkispell lose track of which corrections go for which words. # Just run 'ispell -a' and see if a line is output. Type # ^D to quit it. # # # INSTALLATION: # Do the following in the first few lines of the tkispell script. # (1) edit the first line to reflect the location of wish. # (2) edit the variable tkisp(ispell_lib) to reflect the location # of the ispell hash files. # (3) copy the file utils.tk to the location of your choice and # then edit the tkisp(tkispell_lib) variable above to # reflect that location # (4) edit the varible tkisp(have_new) if needed for your # version of ispell. For version 3.0.09, it should be 1. # # The tkispell routines up to the "END OF ISPELL" message should # be imbeddable in almost any Tk app that uses a text widget. Just # include a command the runs "tkispell_text textpathname" in your app. # Below the "END OF ISPELL" message is a trivial "editor" app that # lets you load one file from the command line and spell check and # save it. After installing, just type 'tkispell file'. # # Running tkispell_text will bring up a toplevel window with buttons # to start, quit, etc. Help message will appear on bottom line # of the window. You can manually enter a correction in the # entry widget and press to replace it in the text widget. # A listbox will show Ispell's guesses. You can click once on # a word to put it in the entry widget or double click to replace. # # The Settings button will popup a menu for setting the behavior # of TkIspell. You can toggle between TeX and normal T/Nroff mode. # You can tell TkIspell whether to start at the top of the # file or at the cursor. You can set whether a corrected word is # corrected automatically throught the rest of the text or not. # The defaults are T/Nroff, top, and no automatic correction. It is # possible to pass default settings to the tkispell_text procedure. # How to do this should be evident to the programmer by looking # at the code below. TkIspell doesn't remember settings from call # to call. # # Until you press Start, you can still go back to the text widget # and edit text and change the cursor position. # # To quickly start spell checking from the current cursor # position without going through the settings dialog, press the # right mouse button on the Start button. # # Once you have started spell checking, you will not be able # to edit in the text widget or change TkIspell's settings. # The Start button becomes a Stop button in order to stop # checking before the end of file. When checking is stopped, # you will be asked whether you wish to make your changes # permanent. Press OK to accept them or Cancel to undo them. # You can also press Quit while spell checking to quickly # exit. # # TODO: # Have a mode to quickly check one word only # Do something about clicking in listbox below last item # Implement a special search/replace mode # Implement a user definables