------------------------------------------

          Text Editor for FLTK
               version 0.3
          October 13, 1999
          by Robert Kesterson

------------------------------------------

------------------------------------------
What is this?
------------------------------------------

If you haven't used the FLTK tool kit, you are really missing
out.  FLTK is a cross-platform user interface toolkit that
runs on X-Windows under Unix/Linux, as well as under
Microsoft Windows.  If you *have* used FLTK, you may
have wished for a bit beefier text editor.  While FLTK 1.0.x
comes with a variety of text input field types, an editor
widget with word wrap and large text support is not
provided.

This package contains some new widgets to help fill that
void.  The basics are Fl_Editor and Fl_MultiEditor.  The two
widgets appear identically to the user -- the difference is
that the Fl_Editor edits a text buffer, while Fl_MultiEditor
can edit several text buffers at the same time, switching
between them as desired.  These two provide basic editing.
They are subclassed with Fl_FancyEditor and 
Fl_FancyMultiEditor to provide additional functionality like
a status panel and interactive find and find/replace for
applications that need them.

In addition, there are two utility widgets -- Fl_StatusPanel
and Fl_ProgressBox -- that provide a status panel and a
progress bar, respectively.

------------------------------------------
What does it do?
------------------------------------------

The editor widgets allow you to enter text of any length,
limited by available memory.   A number of operations can
be performed on the text, including loading from and saving
to files, cutting and pasting from the clipboard, and
searching and replacing text.

The editor widgets support "CUA-style" keys.  That is, in
addition to the normal ASCII keys, the following keys are
recognized by the editor:

   Cursor Arrows - Move left, right, up, and down
   Page Up/Down - Move the text up or down one screen
   Ctrl-Home - Move to the first character of the text
   Ctrl-End - Move to the last character of the text
   Home - Move to the start of the current line
   End - Move to the end of the current line
   Ctrl-Left - Move to the start of the previous word
   Ctrl-Right - Move to the start of the next word
   Delete - Delete the character under the cursor.
   Insert - Toggle Insert / Overstrike mode
   Backspace - Delete character to the left of the cursor.
   Shift-Delete or Ctrl-X - Cut selection to clipboard
   Ctrl-Insert or Ctrl-C  - Copy selection to clipboard   
   Shift-Insert or Ctrl-V - Paste from clipboard
   Mouse - Click once for cursor placement, 
       double-click to select a word
       triple-click to select a line.
   Shift - hold the Shift key while moving the cursor to
         select text.	 
   
In addition to the editing keys noted above, the editor
widgets provide the following features:

   Automatic scrollbar
   Status panel showing:
         Cursor position (row, column)
         Insert / Overstrike mode status
         Caps lock status
         Num lock status
         Status panel can be displayed or hidden
   Compatible with Fluid
   Automatic text reformatting when widget is resized.

Also please note that this is NOT presently a "rich text"
editor -- that is, it doesn't support more than one font,
size, or color at a time.  These features are planned for
a future release, but not this one.

------------------------------------------
How does it work?
------------------------------------------

The editor is built in two pieces -- an invisible "engine" and
a user interface.  The engine does all the editing, so all the
user interface has to do is feed it keystrokes and editing
commands.  This is the reason the multi-buffer editor
widget was done -- all it needs to do is keep pointers to a
number of different engines and be able to switch between
them.

The widgets handles screen rendering by drawing text into
the area of the widget -- scrolling is handled internally.  
(In other words, the text that you see in the widget is all 
the text that has been drawn.  There is no "off-screen 
drawing area" waiting to be scrolled around.)

The widgets are descendants of Fl_Group and can
be used with Fluid.

------------------------------------------
How do I build it?
------------------------------------------

Starting with version 0.2, you should be able to just type
"make" in the top-level directory and have it build
everything.  The Makefile was created on a Linux system
running RedHat 6, but should be fairly portable.

When the make finishes, you will have both static and shared 
libraries, along with two sample programs ("single" and 
"multiple") to demonstrate the editor.

To install the headers and libraries to your system, become
root and run "make install".  If you do not have root access
on your system, modify the include and library locations
specified at the top of the Makefile to directories where you
have access, then run the "make install".

For Windows, there is a Visual C++ project file in the
"visualc" directory that will let you build the library
and test programs.  Build the "rcl*" projects first, then
the "single" and "multiple" (test program) projects.

The demo programs can be used as editors
if you like -- in fact, this text that you are reading was
edited using the "multiple" demo program.  :-)

------------------------------------------
Are there any known bugs?
------------------------------------------

No serious ones, anyway.  See the TODO.TXT for
any outstanding issues or upcoming changes.  If you
find a bug, tell me (or better yet, fix it and send me a 
patch.  :-)   While I've been coding for many years, this 
is my first foray into X-Windows programming (or more 
accurately, FLTK widget programming), so I have no doubt 
there are improvements that could be made.  If you spot 
one, let me know!  

------------------------------------------
What are the license terms?
------------------------------------------

This widget is designed to be used with FLTK, which is
presently licensed under the Gnu Library General Public
License (LGPL).  These widgets are offered under the
same license, and permission is specifically granted to
include it with future versions of FLTK if the FLTK authors
so choose.  All I ask is that any work which features the
widget give me a mention in the fine print someplace.  :-)

------------------------------------------
How can I get the latest version?
How can I contact the author?
------------------------------------------

Both can be done through my web site at
http://www.robertk.com  -- the editor widgets will be on a
subpage at http://source.robertk.com.

Contact info for me personally is on the web page, and my
email is robertk@robertk.com.

------------------------------------------

  