Help Contents
RT Edit is an editor with a dictionary based on your source code and built-in headers.This editor can help you in draft creation of new code or for adding segments of code to a module.  The way in which RT Edit assists you is via a module called Identifier Lookup. Identifier Lookup builds a dictionary of the identifier names you have already created or that exist in library headers you intend to use.  You may turn Identifier Lookup ON or OFF or suspend it, possibly an appropriate action when creating comments.  While the Identifier Lookup is ON, a display indicates, under certain conditions, your C++  names.  You can select a name to be substituted for the text you are typing.

RT Edit has some capabilities in common with the Windows Notepad editor as incorporated into Borland Owl.  Please see the specific help for these functions under Files,  Edit, Search, and Window. Other capabilities are provided through use of Borland's Owl.  One feature dependent on use of Borland's OWL is the toolbar, status line and hint available.   Control of these items is provided under the View menu.

Select a help section from the following:

RT Edit Overview.

Identifier Lookup.

Use Headers On.

Set File Name.

Expanded Search

Suspend Lookup

Source Directory

Set Header Directories.

Set Font

Restore Environment.

Save Environment.

Auto Indent On


RT Edit Overview
RT Edit is not a complex editor, based as it is on Windows MDI Edit Controls.  RT Edit has a complex feature that is particularly useful for initial drafts of code segments.  The Identifier Lookup feature creates a dictionary of the identifiers you have used in your C++ module,  adds to the dictionary automatically in real time as you create new names, and provides matching names as you type more than four characters. When there are matching identifiers displayed in the window provided, you have the ability to pick a substitute for what has been typed so far.  The additional window for display of identifier names is a special child MDI window that is not an edit control.  Identifier Lookup assists use of long identifier names often used for self documenting code purposes.  Identifiers shorter than four characters are not stored in the dictionary.  Because programmers are so familiar with reserved words these are also excluded from the lookup function.

RT Edit provides the capability to select files by name for Identifier Lookup processing.  This allows tailoring Identifier Lookup to work with a particular module.  For example, you may specify the ".CPP" file and it's associated header file to Identifier Lookup using the Set File Name menu item.  Moreover, you may select automatic use of header files identified in "#include" statements.  If header file use is enabled by selecting Use Headers On, you get an option to include library headers.  If you choose this option, then file names bracketed by <>  in "#include" statements will also be processed.  However, with this option, you will generally need to identify directories that contain the library header files through the "Header Directories" menu item.  When you choose to start Identifier Lookup, all named files and all include files, if selected, are searched for legal C++ names under 32 characters in length.   Reserved words, names less than four characters and words within comments are not loaded.  The files you use should thus correctly match begin and end comment symbols before starting Identifier Lookup.

Identifier Lookup ignores names less than a minimum length of four characters.  The reason for this is that short identifiers are not the target for Identifier Lookup support. For example, Identifier Lookup does not help using  short variable names such as "I", "j", or correcting "teh" to "the."  However, Identifier Lookup presents a list of longer names after typing four or more characters.  The list accounts for possible errors in the first few characters.  One error is omission of one letter, for example,  typing "nume" when the goal is to type "numberOfVowelsInSentence." Another error is transposition of letters, for example,  typing "nmue."  In order for Identifier Lookup to display candidate identifiers,  at least two of the typed characters must be also be contained in the candidate.

In some cases, Identifier Lookup may not show you the identifier you need so you should use Expanded Search  instead.   For example,  Identifier Lookup may show too many identifiers in the window and you won't want to scroll through them all to find the one you want.  On the other hand, Identifier Lookup may not display the identifier of interest.  Sometimes you may want to find an identifier not by the segment it starts with but by a segment contained in the middle or the end.  For example, suppose you know that the segment "factor" appears in your identifier somewhere but not at the beginning.    To use Expanded Search. go ahead and type the segment, in this example "factor", then choose the menu item Expanded Search or press the hot key combination,  alt-z.   A different list will be provided in the Expanded Search dialog and you can select your identifier from this list.  See Expanded Search for the details.

RT Edit gives you the capability to save an environment you have setup during use of the Identifier Lookup features.  An environment you have previously saved may be restored.  A default file name may be used though you will more likely want to use different file names for each module you may be working on.  One thing to watch out for is that the full collection of file names, including those referenced in "#include" statements where Use Headers Onis enabled, can NOT be saved in your environment files unless you have already actuated Identifier Lookup.


Identifier Lookup
SetupRT | Identifier Lookup

Initiate Identifier Lookup operation anytime after at least one source file name is identified through the Set File Name  menu selection.   If the menu selection is not checkmarked, Identifier Lookup may be initiated.   Whenever it is checkmarked, Identifier Lookup is active and selection will terminate Identifier Lookup. You should not select Identifier Lookup on the "RT Edit" menu unless you have already named at least one file. If you do, you will see a complaining message and startup of the lookup function will not proceed.  Another menu selection,  Restore Environment, would also satisfy the need to have a file name established.   During Identifier Lookup initiation, a window named "Identifier Lookup" is created.  This window, if selected to be the active window, will ignore client window keyboard and mouse input.  You should not select the Identifier Lookup window unless you wish to change it's size and location.


Use Headers On
SetupRT | Use Headers On

Click on the menu item to toggle the state of Use Headers On.  When setting the state on, you will be asked if you wish to use library files.  If you say Yes to using library files, it may be appropriate to set directory names with Set Header Directories.


Set File Name
SetupRT | Set File Name

Use the menu choice "Set File Name" to identify your primary source file.  You may also want to use this setting to name one or more header files that are part of the module.


Suspend Lookup
SetupRT | Suspend Lookup

You may select this menu item at any time Identifier Lookup is active.  The state of Identifier Lookup will be toggled between suspended (checkmark displayed by the Suspend Lookup menu item) and not suspended (no checkmark).  You may want to suspend Identifier Lookup when you are editing within "/*" and "*/" begin/end comment marks.  The words within these comment marks were not saved by Identifier Lookup when starting up.  However, words typed within these comments while editing are treated as identifiers unless you use Suspend Lookup.


Source Directory
SetupRT | Source Directory

If your source files are not in the current directory, you may enter that directory via this menu item. Enter multiple paths on the input line provided by separating them with a semicolon (;).


Restore Environment
SetupRT | Restore Environment

Select the RT Edit menu item "Restore Environment" to restore the initialization of Identifier Lookup to a previously saved environment, that is, an environment saved with Save Environment.


Expanded Search
SetupRT | Expanded Search

Expanded Search looks up candidate identifiers by a different method than used in Identifier Lookup. Type a segment of an Identifier you want to find with Expanded Search, then choose the Expanded Search menu item or press the hot key combination, alt-x.  The letters you have typed so far will appear in a dialog and you have the option of changing or adding letters to the segment.  You then may select OK in the dialog to continue or CANCEL.  If you selected OK, another dialog will list all identifiers in groups sorted by the number of characters containing the same characters as the segment you created.  You may select an identifier and choose REPLACE or you may CANCEL.  Choosing REPLACE will replace the segment you typed so far even if you changed it in the search dialog.  The substitution will occur in the same manner as for Identifier Lookup except that only one character of the identifier must be typed.  An attempt to use Expanded Search with no characters typed will cause a warning message to be displayed.  Generally speaking, you should use several characters for the search to obtain a reasonable result.


Header Directories
SetupRT | Header Directories

Directories to be searched for include files, other than the current directory, should be set with this command.  Enter multiple paths on the input line provided by separating them with a semicolon (;).


Set Font
SetupRT | Set Font

You may change the font being used, but note that use of Identifier Lookup depends on using fixed fonts.  The fonts presented in the dialog box are limited to fixed fonts.


Save Environment
SetupRT | Save Environment

Save the current environment in a file for use during a subsequent session.  The following elements are saved:

File names that have been entered with Set File Name.

File names referenced in "#include" statements within the files named as above, if "Use Header Directories" was set during the Use Headers On dialog.

A flag indicating whether "Use Header Directories" were included or not.


Auto Indent On
SetupRT | Auto Indent On

You  may choose to have auto indent on or off.  When Auto Indent is on, the menu item is checked.  With Auto Indent,  the cursor position is adjusted after a carriage return is entered. An adjustment is made also if a backspace is entered and there is nothing on the line except whitespace prior to the current line position.  A scan of lines before the current cursor position is performed for either a carriage return or a backspace.  The scan of a line finds the position of the first non-whitespace character on the line.  If a non-whitespace character is not found, the position is set to the end of the line.  Only one previous line is scanned if a carriage return is entered.  The cursor position on the new line is set to the same position found in the scan, filling the line to that point with an appropriate number of tabs and spaces.

The first previous line is scanned if a backspace is entered as well.   If the position found in the scan is at the beginning of the line anyway, no further processing is done and the whitespace at the beginning of the line will be removed, positioning non-whitespace text, if there is any, at the beginning of the line.   The current position on the line is adjusted to the same position found on the scan of the previous line if that position is farther to the left.  Whitespace is also removed as needed.  If the scan of the previous line is not to the left of the current position, scanning is continued on previous lines from closest to the first line, until a position to the left of the current position is found.  The default, if  such a position is not found, is to backspace one character position.


View
View | Status Bar

Toggle the Status Bar checkmark to enable or disable display of a status line at the bottom of the RT Edit desktop.  If the Status Bar is enabled, you may view Flyover Hints as described in below.  The status of three keys is shown in the three cells at the right hand side of the Status Bar.  The keys shown are Caps Lock, Num Lock and Insert/Overwrite.  Note that setting OVR on does not cause overwrite of characters to occur.

 View | Toolbar

Toggle the Toolbar checkmark to prevent or enable the Toolbar display in the RT Edit desktop.

  In addition, the position of the Toolbar may be cycled from horizontal topto vertical left to vertical right to vertical right and back to horizontal top by clicking the Toolbarbutton.

View | Flyover Hints

If you have the Status Bar and Toolbar enabled, you can control the manner in which Hint assistance can be displayed. Toggle the Flyover Hints checkmark (or click the Toolbar button shown) to enable or disable display of status line help hints when you move the mouse pointer over a button. When Flyover Hints is off, you may press the left mouse button on the Toolbar button to view a hint. To get a help hint without having the Toolbar action take place, press the left mouse button and move the pointer away from the Toolbar button before releasing it.

If the Status Bar is enabled but the Toolbar is not, the help hints displayed are limited to those shown as you move selection over menu items.


Files

Files | New

Opens a new editor window called Untitled.

Files | Open

Opens a new window with the contents of an existing text file.  You may type in the name of the file (and the path if the file is not in the current directory) desired in the standard Windows open file dialog presented or you may control the selection with the other dialog options provided.

One standard dialog option is to select a file extension to control the displayed files in the dialog's file list.  The selection you need in order to do this is found in the box labeled "List Files of Type:".  In RT Edit, the types provided are Source Files (*.cpp), Text Files (*.txt), Header Files (*.h), and Header Files (*.hpp).  If you select one of these types with a mouse click on a selection or by moving highlight via arrow key followed by a RETURN keypress, the list of file names in the list box under "File Names:" will change to those with the selected extension.  If you want some other extension, you may type the wildcard in the "File Names:"  box with the desired extension and press RETURN.  This list of file names will then change.

Another standard dialog option is the selection provided under "Drives:".  You may choose a different drive to be used.

A standard dialog option to select the path under "Directories:" allows your completion of the full drive and path definition.

Select the appropriate drive and directory, select a file to open and choose the OK button. Once a file is opened, the full path and filename is displayed in the caption bar of the edit window.

File Size Note:  A text file selected to be opened may be as large as 60K bytes or so.  You may not be able to do editing you want to do, however, if the file is larger than 32K.  This behavior is due to the use of a standard windows control except that a larger buffer is supplied allowing files larger than 32K to be loaded and viewed. At this point in time, there is no intent to increase the size of files edited or displayed.  It does not seem likely that creation of very large source files in C++ will ever become a "good thing" given various current code guidelines.

Files | Save

Saves the contents of the current window to disk.  If the edit window title is "Untitled", you will be prompted for an edit file name via the "Save File As" dialog.  In the "Save File As" dialog, provide a File Name with the extension desired.  If you do not provide an extension, the file will not be given an extension.  The file and the edit window remains open after it is saved to disk.

Files | SaveAs

Choose the Save As option to save the contents of the active window to a new or different filename.  With the Save As command you can save FILE1.TXT as FILE2.TXT, leaving FILE1.TXT on disk as previously saved with the latest changes written to FILE2.TXT.

Files | Exit

Closes all open windows, including the Identifier Lookup window if in use and exits the RT Edit program.  As RT Edit closes the edit windows, you are prompted to save each file that had changes before exiting.  You may elect to save the file with the changes (select Yes) or to close and lose the changes (select No).  You may also select Cancel and RT Edit will remain open.


Edit

Edit | Undo

If "Undo" does not appear dimmed/grayed, your last editing or formatting action can be undone.   Insertons or deletions, including cut and paste actions, can be undone.  If the last action was an Undo, another selection of Undo will reverse that undo action.  Undo appears dimmed on the Edit menu If an action cannot be undone.

Edit | Cut

The cut operation may selected by clicking on the toolbar symbol if you have the toolbar enabled or you may select the "Cut" menu item.  Cut removes selected text.  The text removed is on the Clipboard. This command is available only when you select text.

Edit | Copy

The copy operation may be selected by clicking on the toolbar symbol if you have the toolbar enabled or you may select the menu item.  Copy places the current selection on the Windows clipboard without deletion. This command is available only when you select text.

Edit | Paste

The copy operation may be selected by clicking on the toolbar symbol if you have the toolbar enabled or you may select the menu item. Paste inserts the text from the Windows clipboard into the document at the current insertion point.  This command is available when text has been placed on the clipboard via previous cut or copy operations.

Edit | Delete

Delete is selected by menu item or shortcut key.  There is no toolbar button for Delete.  Delete removes a selection but does not change the clipboard.  If there is no selection,  the character to the right of the insertion point is deleted.

Edit | Clear All

Clear All removes all text from the edit window but does not change the clipboard.

Edit | Select All

Select All selects the entire contents of the edit window.


Search

Search | Find

Searches for text in an RT Edit window. The standard dialog let's you choose to match case and/or  whole words in the search.   You may also elect to search forward or backward from the insertion point.

Search | Replace

Searches for and changes text. You can match case and whole words in the search.

Search | Next

Repeats the last search without opening the Find dialog box.


Window

Window | Cascade

Choose Cascade to arrange all of the open windows in a stack.  When this is done the title bar for each window is visible so that the window can be made active by clicking on the title bar.  If Identifier Lookup window is open it is notadjusted the same as the edit windows.  The Identifier Lookup window willbe adjusted to fit the area below the lowest edit window.

If there are more than three edit windows open and Identifier Lookup is active,a dialog will appear with two choices.  You can abandon the Cascade commandor abandon Identifier Lookup.   An Identifier Lookup window squashed into thearea below four cascaded edit windows is too small to be useful.

Window | Tile

You may select Tile from the Windows menu to size all of the open windows and position them so that a portion of each can be seen.  When the Identifier Lookup window is active, it willbe tiled in the same manner as the edit windows.

Window | Arrange Icons

Edit windows that have been minimized appear at the bottom of the screen as an icon.  If Icons have been placed on the screen, selecting the Arrange Icons command will arrange them along the bottom of the window in rows left to right.

Open Window Name List

The menu section at the bottom of the Window menushows a list of each open edit window.   The Identifier Lookup window is listed,but it should not be selected (see Identifier Lookup). The window associated with the cursor is shown with a checkmark. . Choose a window name by double click (or select and carriage return) and the active window will change so that the selected window will become the active edit window.