Styled text editor
The JX Application Framework provides a text editor class that supports fully styled text (i.e. each character can have a separate style).
JXTEBase is the base class for all text editors. It provides the following major features:
- Drag-and-Drop
-
Searching (see below)
- Unlimited depth undo
- Plain text and regular expression searching
- Auto-indent
- Cleaning the right-hand margin (emacs paragraph reformatting)
- Load HTML as styled text
The JX clipboard follows the Macintosh® model where you have to explicitly use the Copy item on the Edit menu (or the shortcut) before the selected text is copied. This has the great advantage that it lets one paste so as to replace the current selection. (Of course, you can use the X Selection model instead, if you want to.)
The format used to copy and paste styled text is described here.
The default Search Text dialog is shown below. This dialog is extensible, so you can create a derived class to provide additional features. It also automatically supports sharing of the search parameters between programs via the Xsearch protocol.