Working with Views

As explained in the previous chapter, a view is an instance of the Scriptum object editor. At a given time, many views can be active, each of them using different menus, toolbars and shortcuts.

InterSoft provides some pre-defined configuration files with Scriptum. Even when each file type has a different menu or toolbar configuration, most of them will probably have some items in common. Those are: The File menu, The Edit menu, some components of the Search menu, the Options menu and the Help menu. Now we'll look at the characteristics of the View window, and then at each standard menu option at the end of the chapter. Of course, all these menus (and toolbars, key bindings, and so on) can be changed by the user to fit his/her preferences).

Text View Window

The Text View window has some common features across all views. These features can be seen in the following picture:

A Standard Text View Window

The window sections are the following:

The Menu and Toolbar areas work like in any other GUI program. The Toolbar includes Tooltips, short descriptions of the tool function that appear when the mouse is left over the corresponding icon for about a second.

The Text Area is also standard: the vertical and horizontal scrollbar change their lengths depending on the total length of the file in the corresponding direction.

The Information Area contains information about the file's lock state, modification state and position of the cursor on the file, as seen in the following picture:

The Information Area of a View

Each component of the View Information Area has the following meaning:

File State flag

Indicates the modification state of the file. If this flag doesn't appear, the file has not been modified since the last save or since it was opened. If the flag appears in red color, the file has been modified and has not been saved since then. Finally, if the flag appears in brown, it means that the file has been modified and preserved, i.e., Scriptum has made a backup copy of the file (with format filename%.extension) in the case of system failure. The original file has not been updated with the new changes, an operation that requires the Save command.

Selected Text flag

This flag appears when text is selected somewhere in the view (which isn't necessarily visible) and is colored with the same color defined for the selection.

Ins/Ovr Status

Shows the current write mode: Insert (Ins) or Overwrite (Ovr). In Overwrite mode, the text is replaced as you write. In Insert mode, the text is inserted at the cursor position, moving the existent text to the right.

Line:Column position

Shows the current position of the cursor in line:column format.

Lock State flag

This flag shows the lock state of the file. Scriptum uses a propietary lock mechanism to know when a file is being used in another view or by another user or instance of Scriptum that can be anywhere in the Internet. This flag may take several values:

If the file has been modified in this state and the lock dissapears (Scriptum check every n seconds if the lock still exists) the Lock State flag will change to Yellow. Then, if the user who previously owned the lock didn't make any changes, the flag will change to green. But if the user who had the lock did modify the file, a Dialog Box will appear on the first modification (after the flag turned yellow). This Dialog Box will be as follows:

The File Modified Dialog Box

Each option of this Dialog Box has the following meaning:

Lock owner

The format of this portion of the Information Area is user@host, where user is the owner of the Scriptum process that has a lock on the file, and host is the host is the host where it was launched. For more information, see also ``Lock State flag'' on page 18.

Current section

Shows the title of the current section. The section boundaries are defined by three regular expressions found in the view resources file. (E.g., sections are classes and methods in C++, or rules in Yacc).

Standard Text View Menus

File menu

The default File menu for a view that is not the main view has some added items, shown in the following picture:

The standard File menu

New, Open, Open As and Exit

These options work exactly like the ones found in the main view, as explained in the previous chapter.

Save

This option will save the file with the current name.

Save as

It presents a dialog box similar to the Open option, as seen in the following picture:

The Save as Dialog Box

Revert to saved

This option will reload the current file, discarding all the changes since the last Save or Save as.

Close View

This option will close the current view, prompting the user for confirmation if the last changes have not been saved.

Edit Menu

The standard Edit menu has the options that appear in the following picture:

The standard Edit menu

Undo

Undoes the last action up to a predefined limit. An action is considered everything that changes the window's contents in some way. (E.g., setting the attribute of a piece of text as Bold is an action, saving a file is not).

Redo

Redoes the last undone action up to a predefined limit.

Undo/Redo Browser

Presents a window allowing to move along a list of the actions that can be undone/redone. The list has a separator mark that shows what is the current position in the list. If the user moves the pointer upwards, it will undo actions, and it will redo them if it moves the pointer downwards.

Cut

Copies the highlighted text into the Scriptum clipboard and deletes it. The cut/copy clipboard is shared accross all views, so it is possible to cut contents from one view and paste them into another.

Copy

Copies the highlighted text into the shared clipboard, without modifying it.

Paste

Copies the text from the clipboard to the insertion point.

Clear

Deletes the selected text, without copying it into the clipboard. However, it is still possible to Undo a clear action (as well as a cut, copy or paste action), using the previously mentioned Undo command.

Set Attribute/Delete Attribute

Sets/deletes a given attribute to the selected text. This may help to highlight certain parts of the text. Those are special character sequences and will appear as that when the file is edited with another editor.

Indent/Outdent

This operations insert/delete a tab stop at the begining of the selected text. This is useful to change the indentation of portions of code like the ones found in C/C++ inside braces.

OS filter selection

Executes the command selected in the submenu with the selected text as parameter. The results of the operation will be displayed in a new View. For an explanation on how to create custom commands, see ``Configuring Scriptum'' on page 35.

Search Menu

The following is a picture of the standard Search menu:

The standard Search menu

Each option has the following meaning:

Find

This option presents the following dialog box:

The Find dialog box

Each part of the dialog box has the following meaning:

Find next

Find next will repeat the last search performed, continuing in the same direction that was established in the Find dialog box.

Find previous

Works exactly like Find next, but inverting the search order.

Replace

This option will present the following dialog box:

The Replace dialog box

Each option of the dialog box has the following meaning:

Replace again

Repeats the last Replace command (only for the next ocurrence of the text that is being searched) without presenting the dialog box.

Go to line

Shows a dialog box to enter a target line in the file. When the user presses the button Ok, the cursor will move to the target line.

Opening Scope/Closing Scope

Moves between scopes.

Section Browser

Presents a list box that shows all the sections in the current file.

Pattern Browser

Presents a list box that shows all the text strings that match the defined expression.

Options Menu

The option menu appears as follows:

The Options Menu

And each command has the following meaning:

Set interline space

Defines the space between lines through a dialog box.

Reveal Codes

Shows with special drawings the normal non-printable characters (like ENTER or TAB).

Toolbar selection

Presents a dialog box with checkboxes on every toolbar available for the view. Those that are checked will appear, one above the other.

Help Menu

The help menu has the following options:

The standard Help menu

Help on help

Launches the help window with explanations on how to use the help system.

Help index

Launches the actual help window.

Info

Shows a window with information on the system.

About

Shows a window with information on Scriptum.

3


Last Modified: 01:15am , January 20, 1996