Copyright: Copyright 1993 Vantex Publishing


Contents

Getting Started

   Editing Text

Entering Text

Deleting Text

Selecting Text

Cut, Copy, Paste, and Move

Macros

Trim All Trailing Spaces

Entering Non-Keyboard Characters

Automatic Indentation

Reformat Selected Lines

Undo and Redo

   Moving Around

Caret Movement

Find/Replace

Go To Line or Page

Switching between Documents

   Printing

Printing

   Settings

Screen Font

Screen Objects

File Management

Language Indents

Layout for Reformat

Tabs

Caret, Scrolling

Run Commands

   Miscellaneous

Function Keys

Toolbar

Complete Path and Filename

Offset and Character Value

Caps Lock, Num Lock

Run Tools


Entering Text

   Getting Started

Before any text can be entered, there must first be an open document. The Programs-WP title bar says "empty" when no documents are open. When "empty" appears on the title bar, Programs WP ignores any attempted text-change operation.

   Opening a Document

To open a document, select New from the File menu to open a new document; or select Open from the File menu to open an existing document which has a filename, or select the first button on the toolbar, or use drag-and-drop to drop onto the Programs-WP window or icon those files selected in the Windows File Manager (see your Windows documentation).

When using the Open dialog, one or more filename types can be entered on the File Name line. For example, typing *.c *.h on the line will list all files that end with either a .c extension or a .h extension.

The following procedure is recommended for drag-and-drop file opening. First, turn Programs WP into an icon by clicking the minimize button on the upper right of the window. The Programs-WP icon will remain visible on the screen. Then select files from the File Manager (or any other drag-and-drop file server) and drop them onto the Programs-WP icon. Programs WP will be restored to its previous window size and the dropped files will be opened.

   Text Entry

To insert text, just type the text wanted and the text will be inserted at the caret position. Type the Enter key to terminate the current line and begin a new line.

To type over existing text, type the Insert key so that OVR appears on the information line. Then type the wanted text. When done, type the Insert key so that OVR disappears.

See also Undo and Redo, Entering Non-Keyboard Characters, Macros, Selecting Text, and Cut, Copy, Paste, and Move.


Deleting Text

The following keys cause text deletion:

Delete 	— deletes selection, if any; otherwise deletes character

Backspace 	— deletes character on the left of the caret

Ctrl Delete 	— deletes one word of text

Alt Delete 	— deletes text between the caret and end of line

Shift Delete 	— deletes spaces (see note below)

Note. If the caret is at a space character, then that space and all adjoining spaces are replaced by a single blank. The recognized space characters are the tab and the blank.

See also Undo and Redo, and Selecting Text.


Selecting Text

To cut, copy, or move text (or indent or reformat selected lines), first select the text to be cut, copied, or moved (or indented or reformatted). One or more whole lines can be selected, or a part of a single line can be selected. When only a part of a single line is selected, the carriage return and line feed that ends that line are automatically excluded from the selection.

   Keyboard Selection

To select text using the keyboard, first move the caret to one end of the wanted selection. When selecting whole lines, the caret may be anywhere on the line. Hold down the Shift key and type the arrow key that points in the direction of the other end of the wanted selection. Use the up-arrow or down-arrow key to select whole lines, and use the right-arrow or left-arrow key to select a part of a line.

   Mouse Selection, Method 1

Move the cursor to one end of the wanted selection. Hold down the mouse button and move the cursor to the other end. When selecting part of a single line by this method, use the Escape key to clear the current text selection, if any.

   Mouse Selection, Method 2

Move the cursor to one end of the wanted selection and click the left mouse button twice. The time interval between the two mouse clicks is unimportant. Instead, it is only necessary for the cursor to be positioned so the second mouse click does not relocate the caret to a different text character. In fact, only one mouse click is needed if the caret is already located at one end of the wanted selection. Once one end of the wanted selection has been selected, move the caret by any means to the other end. Select the other end by using the mouse again as before.

   Status

On the information line, SEL indicates a selection awaits further action. When text is selected, the selected text is shown in reverse video.

   Canceling a Selection

Once made, a selection can be canceled by the Escape key (Esc), or by making a new selection, or by doing any text-change operation. Moving the caret away from the selection does not cancel the selection.


Cut, Copy, Paste, and Move
Cut, Copy, Paste, and Move (Edit menu)

These four text operations are found on the Edit menu, and also on the toolbar. In addition, the following keys can be used:

Delete or Ctrl X 	— cut (i.e., delete) selected text

Ctrl C 	— copy selected text to Clipboard

Ctrl V 	— paste from Clipboard

Ctrl M 	— move selected text

The result of each operation is reported on the information line.

The cut, copy, and move operations cause the selected text to be placed on the Clipboard. The Clipboard is a Windows resource allowing the transfer of data between different applications. The paste operation always uses the text found on the Clipboard, regardless of which application placed that text on the Clipboard. Thus, text can be cut or copied by a different application and pasted by this application. Conversely, text can be cut, copied, or moved by this application and pasted by a different application.

Before the paste or move operation is invoked, the caret must first be placed at the wanted insertion point.

Windows requires that any text placed on the Clipboard by an application must be terminated with a null character (decimal 0). This Windows requirement means unwanted data truncation can occur if a text selection containing null characters is cut, copied, or moved. To help avoid this difficulty, Programs WP does not allow entry of the null character.

See also Undo and Redo.


Macros
Macros (Edit menu)

Programs WP provides text-only macros which place the text into a document. For complex macro needs, Windows provides a separate macro-recorder utility which can be used (see your Windows documentation).

The Macros dialog consists of a list of ten different macro names. Alongside the list of names is an edit window. The macros are named Ctrl 1 through Ctrl 0. Once the dialog is closed, a macro can be invoked by holding down the Ctrl key and typing the digit of its name. Whenever a macro is invoked in the text area, the text of the macro is inserted at the caret position, otherwise the macro is ignored.

To enter the text of a macro, first select one of the ten macro names. The old macro text, if any, appears in the edit window. Then move the caret into the edit window. This can be done either by using the Tab key, or by moving the cursor into the edit window and clicking the left mouse button. Now type the wanted macro text. Alternatively, paste text from the clipboard into the edit window. Each macro is limited to 1,000 characters of text.

The Enter key cannot be typed inside the edit window to start a new line in the macro text. Instead, to get more than a single line in the macro text, paste text from the clipboard.


Trim All Trailing Spaces
Trim All Trailing Spaces (Edit menu)

Each line in the document is examined, and any spaces or tabs at the end of each line are removed.


Entering Non-Keyboard Characters

To enter in the text area a valid ANSI character which cannot be typed with the keyboard, hold down both the Shift and Ctrl keys, and type the decimal value of the character wanted. For example, the dash has a decimal value of 151. Hold down both the Shift and Ctrl keys and type the three digits 1, 5, and 1. Then release the Shift and Ctrl keys. The dash will be placed in the text at the current caret position.

There are 256 ANSI values, from 0 to 255. The null (decimal 0), carriage return (decimal 13), and line feed (decimal 10), cannot be entered by this method.

See also Offset and Character Value.


Automatic Indentation
Automatic Indentation (Edit menu)

Programs WP provides automatic indentation for C/C++ text — in accordance with the indent data from the Language Indents dialog — whenever a new line is created by the Enter key. This assumes Programs WP recognizes the document filename as denoting program text (a .c or .cpp or .h or .inc filename extension), and there is a check mark alongside the Automatic Indentation item on the Edit menu.

   Indent Selected Lines

Assuming automatic indentation is active, any two or more lines of text can be selected and re-indented by choosing Indent Selected Lines from the Edit menu.

   F3 Key

A feature related to automatic indenting is the ability to find the matching symbols of a given programming language. For example, in C/C++ the matching symbols recognized by Programs WP are (, ), {, and }. Place the  caret at a matching symbol and type F3. The caret will move to the corresponding matching symbol. This feature is active as long as the document name is recognized by Programs WP as denoting program text.


Reformat Selected Lines
Reformat Selected Lines (Edit menu)

One or more selected lines of text are reformatted in accordance with the layout data from the Layout for Reformat dialog. When lines are reformatted, tabs are changed to blanks, and consecutive spaces are replaced with a single blank.


Run Tools
Run Tools (Run menu)

Run a command line for your compiler, make utility, debugger, or other tool in accordance with the command lines from the Run Commands dialog.


Undo and Redo
Undo and Redo (Edit menu)

Undo reverses the last text-change made to the document. Redo reverses the last undo, but only if the last undo was also the last text-change. In other words, if a text-change is undone and then a new text-change other than undo or redo is made, it is no longer possible to redo that undone text-change.

Both Undo and Redo are found on the Edit menu. Also, there are undo and redo buttons on the toolbar.

When a text-change is undone or redone, the caret moves to the beginning of the first part of that undone or redone text-change (the replace-all text-change is an example of a text-change that can have multiple parts). The status of each undo or redo request is shown on the information line.

Both undo and redo are unlimited in terms of the number of text changes that can be undone and redone. The ability to undo and redo is unaffected by file saves, window changes, and document switches. However, once a document is closed, all undo and redo information is lost for that document. Also, whenever Programs WP is exited, all undo and redo information is lost.

Undo and redo do not directly alter files. In other words, if previous text-changes were saved and then later undone, the document must be saved again to reflect the undone text-changes in the document's file.


Caret Movement

The caret can be moved within the text as follows:

   Keys

arrow keys alone 	— standard movements

Page Up, Page Down 	— see Caret, Scrolling

Home 	— moves to beginning of line

End 	— moves to end of line (see note below)

Ctrl Home 	— moves to beginning of document

Ctrl End 	— moves to end of document

Ctrl right-arrow 	— moves one word, right

Ctrl left-arrow 	— moves one word, left

Note. If the caret is already at the end of the line when the End key is typed, then the caret will move to the first non-space character, if any, of that line.

   Mouse

Move the cursor anywhere within the text area, and click the left mouse button. The caret will move to the text character nearest the cursor when the mouse button is clicked.


Find/Replace
Find/Replace (Edit menu)

   String Entry

When entering either the Find string or the Replace With string, the following character sequences have the following special interpretations.

^c 	— Clipboard contents

^p 	— paragraph mark (CR+LF)

^t 	— tab character

^0nnn 	— 3-digit decimal code for ANSI character

^^ 	— the ^ character

CR+LF stands for carriage return and line feed, which is the PC-standard two-character terminator for both lines and paragraphs. When using the ^0nnn sequence, the three digits following ^0 represent the wanted character. Use leading zeros as needed when the wanted character's decimal value is less than 100. The given decimal value must be a number between 1 and 255, and cannot be 13 (the CR character) or 10 (the LF character). The 0 following ^ in ^0nnn is a zero.

   Operations

The F7, F8, and F9 keys only work when the dialog box is closed. For example, type some find-text in the dialog and type Enter to select the Find Next button (or alternatively, select the Find Prev button). The dialog box closes, and the caret will move in the selected direction to the first occurrence, if any, of the find-text. Thereafter, the F7 key (search backward) and the F8 key (search forward) can be used at any time to search for the find-text.

If the replace-text is non-empty, then whenever the caret is at the find-text, F9 will cause text replacement.

   Highlighting Found Text

If Show in the dialog box is checked, the found text is highlighted (if the found text is more than a single line, only the visible text of the first line, if any, is highlighted). This highlighted text is not selected, and the highlighting does not cancel or otherwise interfere with any text selection made prior to the find operation. The Escape key (Esc) clears both highlights and the current text selection, if any, without otherwise changing the screen.

   Status

The status of each search attempt (including the initial search started from the dialog box) is reported on the information line. On the information line a C follows the quoted find-text if Match Case was selected in the dialog. Also, a W follows the quoted find-text if Match Whole Word Only was selected in the dialog. If the find-text is found, then the "down" number on the information line is the relative onscreen line position of the found text.


Go To Line or Page
Go To Line or Page (Edit menu)

Enter either the line number or page number wanted, and type the Enter key.


Switching between Documents

   Manual Switching

Programs WP can hold open fifty different documents at the same time. However, only one document can be edited at a time. To switch from one open document to a different open document, use either the Window menu, or  Alt left-arrow, or Alt right-arrow.

The Window menu lists the documents currently open. Select from the list the document to move to. Alternatively, Alt left-arrow moves backward through the list of open documents, and Alt right-arrow moves forward through the list of open documents, beginning with the currently displayed document.

   Automatic Switching

When a document is successfully opened, Programs WP automatically switches to the newly opened document. The document is added at the end of the list of currently open documents.

When a document is closed by selecting Close from the File menu, Programs WP automatically switches to the open document, if any, that adjoined that closed document on the previous list of currently open documents. After a document is closed, the list of currently open documents is renumbered.


Printing
Printing (File menu)

   Printer

The Printer line shows the name of the currently selected printer. To see all the printer-name choices, move the cursor onto the small button at the end of the Printer line and click the left mouse button. From the drop-down list of printer names which appears, select the printer wanted.

   Print Range

Choose All to print the entire document. Choose Selection to print the selected text. Choose Pages to print a specific range of pages, and then enter the From and To page numbers. Document text is divided into pages by the following simple formula: number of text lines per page = Lines Per Page - (Blank Lines at Top + Blank Lines at Bottom).

   Font

If using a dot-matrix printer, choosing Printer Default Font may allow the printer to work faster.

Given the paper length, set Lines Per Page to suit one's needs. For example, if one wants 6 lines per inch on standard 11-inch paper, then enter 66 (i.e., 6 * 11 = 66). If using a dot-matrix printer and standard 11-inch fanfold paper, 66 is recommended. If using a laser printer, enter whatever value produces the most satisfying result. When Current Screen Font is selected, the size of the printer font is automatically scaled to fit the Lines Per Page number.

   Page Margins

If using fanfold paper and a dot-matrix printer, zero margins are recommended.

   Page Numbering

In general, printing page numbers is a good idea when the printed pages are separate from each other. Laser printers typically print separate pages, and dot-matrix printers typically print continuous fanfold paper.

Choose None if printed page numbers are not wanted. The choices Top Right and Bottom Center refer to the location of the printed page number. When Top Right or Bottom Center is chosen, the Pad Lines number is the number of blank lines inserted between the page-number line and the printed document text.


Screen Font
Screen Font (Settings menu)

The dialog that appears is the Windows dialog for font selection.

Fixed-pitch fonts are recommended, such as Courier New.


Screen Objects
Screen Objects (Settings menu)

This dialog determines the visibility of the toolbar, information line, scroll bar, and whether or not dialog boxes are centered on screen. Also, the dialog determines the position message, if any, displayed on the information line.


Tabs
Tabs (Settings menu)

In the Tabs dialog, the Number of Spaces Per Tab is the number of spaces replacing each tab character whenever document text is printed. If the Expand Tabs For Display is checked, then the Number of Spaces Per Tab is also the number of spaces replacing each tab character whenever document text is displayed.

The Tabs dialog only affects the appearance of tabs. The tabs themselves remain in the document text and are unaffected by the settings of this dialog.

Tabs are entered by the Tab key.


Caret, Scrolling
Caret, Scrolling (Settings menu)

Regarding the caret, Windows sets the caret blink rate. The Windows documentation explains how to speed or slow the caret blink rate.

   Caret Thickness

This thickness setting does not affect other applications. Caret thickness is measured in screen pixels. For VGA resolution (640 x 480), a value of 1 or 2 should be satisfying. For higher resolutions, increase the thickness.

   Lines Scrolled by Caret Up and Down

Specifically, Caret Up refers to when the caret is already on the first displayed text line, and the up-arrow key moves the caret up. Caret Down refers to when the caret is already on the last displayed text line, and the down-arrow key moves the caret down. The number entered is the number of lines scrolled when Caret Up or Caret Down occurs.

   Lines Retained when Page Up and Down

This is the number of lines from the currently displayed text that are retained onscreen when the Page Up and Page Down keys are used. A number half the number of display lines is recommended.

   Lines Displayed when Moving to End of Document

Specifically, this is the number of text lines from the end of the document that are displayed when the key combination Ctrl End is used to move to the end of the document.


File Management
File Management (Settings menu)

   Entries on File Menu

This is the number of previously opened files that will be listed at the bottom of the File menu.

   Always Create Backup

If this is checked, then whenever a document is saved, the file for that document is first copied to a similar filename which has a .BAK extension. After the backup copy is made, the document text is then saved to its regular filename.

   Automatic Save

If this is checked, then documents are saved automatically when the allotted time — between a text change to a document and the next saving of that document — expires. The allotted time is the number entered for Elapsed Minutes till Automatic Save. If Always Create Backup is checked, then the automatic save first makes a backup copy and then does the save.


Language Indents
Language Indents (Settings menu)

The settings for this dialog are used for automatic indentation. For Programs WP to apply C/C++ indenting, the document must have a .c or .cpp or .h or .inc filename extension.

   C/C++ Indent within Struct or Class

This is the number of spaces indented within structure and class definitions.

   C/C++ Indent after {

This is the number of spaces indented relative to the block-begin symbol.

For the following two styles, a value of 0 is recommended.

if(...)

    {

     a = 1;

     b = 2;

    }

if(...) {

     a = 1;

     b = 2;}

For the following style, a value of 1 is recommended.

if(...)

    {a = 1;

     b = 2;}

   C/C++ Indent after Statements

This is the number of spaces indented relative to statement symbols. The statement symbols to which this indent applies are if, else, for, switch, do, and while.


Layout for Reformat
Layout for Reformat (Settings menu)

The settings for this dialog are used by the Reformat Selected Lines command.

   Line Width in Characters

This is the maximum number of characters allowed per line when the selected lines are reformatted. If a single "word" is longer than this limit, then that "word" is placed on a single line.

   Indent First

This is the number of spaces indented from the left margin for the "first" selected line. Each selected line that follows a selected blank line is treated as a "first" line.

   Indent Other

This is the number of spaces indented from the left margin for any selected line that is not a "first" line. See Indent First above.


Run Commands
Run Commands (Settings menu)

The settings for this dialog are used by the corresponding Run Tools command on the Run menu. There are four tools named Compiler, Make Utility, Debugger, and Other. For each tool enter a command line, if any, for that tool. The specified executable can be either an .EXE file or a .BAT file (note that Windows 3.1 using Win32s may be unable to run .BAT files). A .BAT file can include the use of file redirection to capture the error messages from the tool being executed; a .BAT file can also have many different execution steps (see your DOS or Windows documentation for information about .BAT files and file redirection). For example, assume the following two lines are included in a .BAT file named cpile.bat, and cpile.bat is the Compiler setting on the Run Commands dialog:

del err1

cl386 ...options... pgm.cpp > err1

In the above example, the first line deletes the err1 file, if any. Then a compiler named cl386 executes and has its error messages redirected into the file err1. Once the compiler has completed execution, the file err1 can be viewed by Programs WP.


Function Keys

The following are the function-key assignments:

 F1 	— Help

 F2 	— see Complete Path and Filename

 F3 	— see Automatic Indentation

 F4 	— see Offset and Character Value

 F5 	— see Go To Line or Page

 F6 	— displays an ad for "The Computer Inside You"

 F7 	— find previous, see Find/Replace

 F8 	— find next

 F9 	— replace


Toolbar

The toolbar is displayed beneath the menu line. The visibility of the toolbar is determined by the Screen Objects dialog found on the Settings menu.

The toolbar has eight graphic buttons for commonly used functions. Moving from left to right, the eight buttons are:

1) open a file

2) save the document

3) cut

4) copy

5) paste

6) move

7) undo

8) redo

To use the toolbar, move the cursor onto one of the toolbar buttons and click the left mouse button. The operation the button represents is thereby invoked.


Complete Path and Filename

Assuming the information line is visible, F2 will show the complete path and filename of the current document.


Offset and Character Value

Assuming the information line is visible, F4 will toggle on and off a message displaying both the offset from the beginning of the document to the character at the caret, and the value of that character. Two values are given for the offset, and two values are given for the character. The first value of each pair is decimal, and the second value is the equivalent hexadecimal.

For example, if the message reads "off 11 b ch 32 20," the character at the caret is the 12th byte in the document (the offset is relative to zero), and that character has decimal value 32.


Caps Lock, Num Lock

CAPS appears on the information line when the keyboard capitals lock is on.

NUM appears on the information line when the keyboard numeric lock is on.


The caret is the vertical blinking bar marking the current text-insertion point.


The text area is that part of the window in which document text can be entered. When the cursor is in the text area, the cursor has an I-beam shape.


The cursor is the small graphic whose movements onscreen match the movements of the mouse.


Ctrl abbreviates the word control. Hold the Ctrl key down while typing the other key.


Alt abbreviates the word alternative. Hold the Alt key down while typing the other key.


Hold the Shift key down while typing the other key.


The information line is displayed beneath the text area. The visibility of the information line is determined by the Screen Objects dialog found on the Settings menu.