texteditor(1X)

NAME
texteditor—edit text with multiple views and renditions.

SYNOPSIS
texteditor

DESCRIPTION
texteditor is a primitive text editor, based on Motif's XmCSText widget. In addition to standard text editing features, it supports multiple views of the same underlying text, modification of the rendition attributes of individual pieces of text, and the reading and writing of multiple file formats.

USAGE
This section describes how to use the menus and dialog boxes.

File Menu
This is a completely standard File menu. The only important note is that the Print... command only supports text-only printing.

Edit Menu
This is a completely standard Edit menu.

View Menu
The View menu controls the views of the text. It includes:

Split Pane
    to add a new independently scrollable view of the text

Remove Pane
    to remove a designated pane

One Pane
    to remove all panes except the designated pane

The designated pane is determined in the following way. Using an explicit focus policy, it is the last view which had focus. Using a pointer focus policy, it is the last view which the user interacted with.

Options Menu

Keep File Dialog Open
    If this option is selected, the file selection dialog will remain open after an operation is completed.

Revert Dialog to Open
    If this option is selected, the file selection dialog's operation will automatically be reset to Open after an operation is completed.

Renditions Menu
This menu provides commands to change the appearance of selected text.

Help Menu
This is a completely standard Help menu.

FileSelectionBox
The FileSelectionBox that is displayed when the Open..., Save, or Save As... commands are chosen is standard with the following additions. The Format menu allows text to be read or written in the following formats:

Text Only
    Reads in the file as straight ASCII text. Writes only the text portion of a file. All rendition information is lost.

Byte Stream
    Reads and writes files in Compound String Byte Stream format. This preserves all rendition information. See XmCvtXmStringToByteStream(3X) and XmCvtByteStreamToXmString(3X).

XmdHelp Markup
    Reads and writes files in using the XmdHelp Markup language. This is a simple quasi-SGML used by the Xmd Help widget. See the onHelp application in demos/lib/Xmd for more information.

The radio box immediately below the Format menu allows interactively switching the operation to be performed between Open, Save, Copy, and Move.

X Defaults
The class of the application is XmdTextEditor. The widget of primary interest is the XmCSText widget.

In particular, users familiar with emacs may want to add the following translations to their .Xdefaults files:
*XmCSText.translations: #override\n\
    Mod1<Btn3Down>:	scroll-cursor-vertically()\n\
  Mod1<Btn3Motion>:	scroll-cursor-vertically()\n\
	Ctrl<Key>a:	beginning-of-line()\n\
	Ctrl<Key>b:	backward-character()\n\
	Ctrl<Key>d:	delete-next-character()\n\
	Ctrl<Key>e:	end-of-line()\n\
	Ctrl<Key>f:	forward-character()\n\
	Ctrl<Key>g:	beep()\n\
	Ctrl<Key>h:	delete-previous-character()\n\
	Ctrl<Key>i:	cut-primary()\n\
	Ctrl<Key>j:	newline-and-indent()\n\
	Ctrl<Key>k:	set-anchor() end-of-line() key-select() cut-clipboard()\n\
	Ctrl<Key>l:	redraw-display()\n\
	Ctrl<Key>m:	newline()\n\
	Ctrl<Key>n:	next-line()\n\
	Ctrl<Key>o:	newline-and-backup()\n\
	Ctrl<Key>p:	previous-line()\n\
	Ctrl<Key>v:	next-page()\n\
	Ctrl<Key>w:	cut-clipboard()\n\
	Ctrl<Key>y:	paste-clipboard()\n\
	Ctrl<Key>z:	scroll-one-line-up()\n\
	Mod1<Key>b:	backward-word()\n\
	Mod1<Key>d:	delete-next-word()\n\
	Mod1<Key>f:	forward-word()\n\
	Mod1<Key>h:	delete-previous-word()\n\
	Mod1<Key>i:	copy-primary()\n\
	Mod1<Key>k:	delete-to-end-of-line()\n\
	Mod1<Key>v:	previous-page()\n\
	Mod1<Key>w:	copy-clipboard()\n\
	Mod1<Key>z:	scroll-one-line-down()\n\
	Mod1 Shift<Key>greater:	end-of-file()\n\
	Mod1<Key>less:	beginning-of-file()\n\
	Mod1<Key>]:	forward-paragraph()\n\
	Mod1<Key>[:	backward-paragraph()

FILES

./demo1.txt
    A Text Only format file.

./demo1.bts
    A Byte Stream format file. Contains the text in demo1.txt with additional renditions.

./demo1.help
    An XmdHelp Markup format file. Produces the same output as demo1.bts.

BUGS
Moving and removing files are not currently implemented. The following menu items are not implemented: Print, Print Setup..., Close, Undo, Repeat, Select All, Deselect All, and all the Help menu items. Changing the rendition of text contained within another rendition change can sometimes cause renditions to "bleed" into the following text. Changing the rendition of a line selected by a triple-click will cause all lines until the next rendition change to also get the selected rendition. WYSIWYG editing and saving of XmdHelp Markup format is not supported. The selection of renditions is limited.