2. 6.1.Text Editors:
⚫ An Interactive text editor has become an important part
of almost any computing environment.
⚫ Text editor acts as a primary interface to the computer
for all type of “knowledge workers” as they compose,
organize, study, and manipulate computer based
information.
3. ⚫ A text editor allows you to edit a text file
(create, modify etc…).
⚫ For example, the Interactive text editors
on
◦ Windows OS – Notepad, WordPad, Microsoft
Word,
◦ UNIX OS - vi, emacs , jed, pico.
⚫ Normally, the common editing features
associated with text editors are,
◦ Moving the cursor, Deleting, Replacing,
Pasting, Searching, Searching and replacing,
Saving and loading, etc.
4. 6.1.1Overview of the editing process
⚫ An interactive editor is a computer
program that allows a user to create and
revise a target document.
⚫ Document includes objects such as
computer diagrams, text, equations tables,
diagrams, line art, and photographs.
⚫ In text editors, character strings are the
primary elements of the target text.
5. ⚫ Document-editing process in an
interactive user-computer dialogue has
four tasks: -
◦ Select the part of the target document to be
viewed and manipulated
◦ Determine how to format this view on-line and
how to display it
◦ Specify and execute operations that modify
the target document
◦ Update the view appropriately
6. ⚫ The above task involves traveling,
filtering and formatting.
Editing phase involves – insert, delete,
replace, move, copy, cut, paste, etc…
Traveling – locate the area of interest
Filtering - extracting the relevant subset
Formatting – visible representation on a
display screen
7. 6.1.2. User Interface:
⚫ Conceptual model of the editing system provides an
easily understood abstraction of the target document
and its elements.
For example,
⚫ Line editors – In this, you can only edit one line at a
time or an integral number of lines. You cannot have a
free-flowing sequence of characters. It will take care
of only one line.
⚫ Screen editors – In this type of editors, the user is able
to see the cursor on the screen and can make a copy,
cut, paste operation easily. It is very easy to use mouse
pointer.
8. ⚫ The user interface is concerned with, the
input devices, the output devices and, the
interaction language.
◦ The input devices are used to enter elements of
text being edited, to enter commands.
◦ The output devices, lets the user view the
elements being edited and the results of the
editing operations
◦ interaction language provides communication
with the editor
9. ⚫ Input Devices are divided into three
categories:
⚫ Text Devices are keyboard.
⚫ Button Devices are special function keys,
symbols on the screen.
⚫ Locator Devices are mouse, data tablet.
⚫ There are voice input devices which
translates spoken words to their textual
equivalents.
10. 1. 2. Output Devices are
◦ Teletypewriters(first output devices),
◦ Glass teletypes (Cathode ray tube (CRT) technology),
◦ Advanced CRT terminals,
◦ TFT Monitors and Printers (Hard-copy).
3. The interaction language could be, typing oriented or
text command oriented and menu-oriented user
interface.
⚫ Typing oriented or text command oriented interaction
was with oldest editors, in the form of use of
commands, use of function keys, control keys etc.
⚫ Menu-oriented user interface has menu with a multiple
choice set of text strings or icons.
◦ Display area for text is limited.
◦ Menus can be turned on or off.
11. 6.1.3 Editor Structure:
⚫ Most text editors have a structure similar to
that shown in the following figure.
⚫ That is most text editors have a structure
similar to shown in the figure regardless of
features and the computers
⚫ Command language Processor accepts
command, uses semantic routines – performs
functions such as editing and viewing.
⚫ The semantic routines involve traveling,
editing, viewing and display functions.
13. ⚫ Editing operations are specified explicitly by the user and
display operations are specified implicitly by the editor.
⚫ Traveling and viewing operations may be invoked either
explicitly by the user or implicitly by the editing operations.
⚫ In editing a document, the start of the area to be edited is
determined by the current editing pointer maintained by the
editing component.
⚫ Editing component is a collection of modules dealing with
editing tasks.
⚫ Current editing pointer can be set or reset due to next
paragraph, next screen, cut paragraph, paste paragraph etc..,.
⚫ When editing command is issued, editing component
invokes the editing filter – generates a new editing buffer –
contains part of the document to be edited from current
editing pointer.
⚫ Filtering and editing may be interleaved, with no explicit
editor buffer being created.
14. ⚫ In viewing a document, the start of the area to be
viewed is determined by the current viewing pointer
maintained by the viewing component.
⚫ Viewing component is a collection of modules
responsible for determining the next view.
⚫ Current viewing pointer can be set or reset as a result
of previous editing operation.
⚫ When display needs to be updated, viewing
component invokes the viewing filter – generates a
new viewing buffer – contains part of the document to
be viewed from current viewing pointer.
◦ In case of line editors – viewing buffer may contain the
current line, Screen editors - viewing buffer contains a
rectangular cutout of the quarter plane of the text.
⚫ Viewing buffer is then passed to the display
component of the editor, which produces a display by
mapping the buffer to a rectangular subset of the
screen – called a window.
15. ⚫ The editing and viewing buffers can also be partially
overlapped, or one may be completely contained in the
other.
⚫ Windows typically cover entire screen or a rectangular
portion of it.
⚫ May show different portions of the same file or portions
of different file.
⚫ Inter-file editing operations are possible.
⚫ The components of the editor deal with a user document
on two levels: In main memory and in the disk file
system.
⚫ Loading an entire document into main memory may be
infeasible – only part is loaded – demand paging is used
– uses editor paging routines.