next up previous contents index
Next: Selections and Clipboards Up: Text Entry Windows Previous: Single-Line Text Entry   Contents   Index


The Text Editor

The graphical interface provides a general-purpose text editor window. It is used for editing text files or blocks, and may be invoked in read-only mode for use as a file viewer. In that mode, commands which modify the text are not available.

This is not the world's greatest text editor, but it works fine for quick changes and as a file viewer. For industrial-strength editing, a favorite stand-alone text editor is probably a better choice.

The following commands are found in the File menu of the editor. Not all of these commands may be available, for example the Open button is absent when editing text blocks.

Open
Bring up the File Selection panel. This may be used to select a file to load into the editor. This is the same file manager available from the File Select button in the Xic File Menu.

Load
Bring up a dialog which solicits the name of a file to edit. If the current document is modified and not saved, a warning will be issued, and the file will not be loaded. Pressing Load a second time will load the new file, discarding the current document.

Read
Bring up a dialog which solicits the name of a file whose text is to be inserted into the document at the cursor position.

Save
Save the document to disk, or back to the application if editing a text block under the control of some command.

Save As
Pop up a dialog which solicits a new file name to save the current document under. If there is selected text, the selected text will be saved, not the entire document.

Print
Bring up a pop-up which enables the document to be printed to a printer, or saved to a file.

Write CRLF
This menu item appears only in the Windows version. It controls the line termination format used in files written by the text editor. The default is to use the archaic Windows two-byte (DOS) termination. If this button is unset, the more modern and efficient Unix-style termination is used. Older Windows programs such as Notepad require two-byte termination. Most newer objects and programs can use either format, as can the XicTools programs.

Quit
Exit the editor. If the document is modified and not saved, a warning is issued, and the editor is not exited. Pressing Quit again will exit the editor without saving.

The editor can also be dismissed with the window manager ``dismiss window'' function, which may be an `X' button in the title bar. This has the same effect as the Quit button.

The editor is sensitive as a drop receiver. If a file is dragged into the editor and dropped, and neither of the Load or Read dialogs is visible, the Load dialog will appear with the name of the dropped file preloaded into the dialog text area. If the drop occurs with the Load dialog visible, the dropped file name will be entered into the Load dialog. Otherwise, if the Read dialog is visible, the text will be inserted into that dialog.

If the Ctrl key is held during the drop, and the text is not read-only, the text will instead be inserted into the document at the insertion point.

The following commands are found in the Edit menu of the text editor.

Undo This will undo the last modification, progressively. The number of operations that can be undone is unlimited.

Redo This will redo previously undone operations, progressively.

The remaining entries allow copying of selected text to and from other windows. These work with the clipboard provided by the operating system, which is a means of transferring a data item between windows on the desktop (see 3.13.3).

Cut to Clipboard
Delete selected text to the clipboard. The accelerator Ctrl-x also performs this operation. This function is not available if the text is read-only.

Copy to Clipboard
Copy selected text to the clipboard. The accelerator Ctrl-c also performs this operation. This function is available whether or not the text is read-only.

Paste from Clipboard
Paste the contents of the clipboard into the document at the cursor location. The accelerator Ctrl-v also performs this operation. This function is not available if the text is read-only.

Paste Primary (Unix/Linux only)
Paste the contents of the primary selection register into the document at the cursor location. The accelerator Alt-p also performs this operation. This function is not available if the text is read-only.

The following commands are found in the Options menu of the editor.

Search
Pop up a dialog which solicits a regular expression to search for in the document. The up and down arrow buttons will perform the search, in the direction of the arrows. If the No Case button is active, case will be ignored in the search. The next matching text in the document will be highlighted. If there is no match, ``not found'' will be displayed in the message area of the pop-up.

The search starts at the current text insertion point (the location of the I-beam cursor). This may not be visible if the text is read-only, but the location can be set by clicking with button 1. The search does not wrap.

Font
This brings up a tool for selecting the font to use in the text window. Selecting a font will change the present font, and will set the default font for new text editor class windows. This includes the file browser and mail client pop-ups.

The GTK interface provides a number of default key bindings (see 3.13.4) which also apply to single-line text entry windows. These are actually programmable, and the advanced user may wish to augment the default set locally.


next up previous contents index
Next: Selections and Clipboards Up: Text Entry Windows Previous: Single-Line Text Entry   Contents   Index
Stephen R. Whiteley 2024-09-29