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:
- Spell checking via
- Plain text and regular expression searching
- Unlimited depth undo
- Cleaning the right-hand margin (emacs paragraph reformatting)
- Option for tab to insert spaces or tab character
- Cleaning whitespace (tabs → spaces or spaces → tabs)
- Load HTML as styled text
- Support for plug-in key handlers, e.g., for emulation of other editor command sets
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.