Table of Contents

Start Here	CUA Keys

Frequently Asked Questions	SlickEdit Keys

Invoking Visual SlickEdit	Brief Keys

The Screen Layout	Epsilon Keys

Getting Help on Visual SlickEdit 	VI Keys

Using the Mouse 	GNU Emacs Keys

Features for Programmers 	Visual C++ Keys

Search and Replace 	ISPF Keys

Windowing 	Recording Macros

Selecting Text and Operating on Selected Text 	Converting SlickEdit 2.3/2.4 Macros and Configuration

Hex Editing 	Slick-C Language

Editing Record Files 	Macro Functions by Category

Word Processing Features 	Differences Between Slick-C and C++

Printing

Command Line and Text Box Features

ALIAS Facility

Bookmarks

Multiple Clipboard Support

Comparing Files

Configuring Visual SlickEdit

Calculating Mathematical Expressions

Sorting

The Visual SlickEdit File Manager

Setting Environment Variables

Invocation Options

How Visual SlickEdit Finds External Files


Start Here

This section covers important features and configuration items that will quickly get you productively using Visual SlickEdit.  We recommend you read through this entire chapter.  Other features are easier to find or are less frequently used.

Network Installations

File Type Association

Selecting An Emulation

Search Options

Tab Key and Indent Options

Selecting a Different Font

Redefining Enter and Other Common Keys

Installing Support for Additional Languages

Syntax Expansion Options

Setting up a Project

Building a Tag File for Run-Time Libraries

Auto Restore Options

Word/Variable Completion

Directory Aliases

Word Help

Network Backup Options


Network Installations

non-UNIX platforms:  If multiple users are accessing Visual SlickEdit on a network, each user needs to define a VSLICKCONFIG environment variable which refers to a local directory.   This allows each user to have their own local configuration.  If you have a license code (see "Help", "Program Information..." ) in addition to a serial#, you are using our license manager.  Our license manager handles system crashes better if each user sets a VSUSER environment variable to a unique name.  See section "Setting Environment Variables.

UNIX:  By default, each user's local configuration is stored in their "$HOME/.vslick" directory.  You can change the configuration directory by defining a VSLICKCONFIG environment variable.

Saving Local User Disk Space

By default, local user configuration files require about 3 megabytes of disk space.  If local user disk space is extremely limited (a college or university account perhaps), you can reduce this size to around 40k.  If you do this, the editor will take a bit longer to start up.  Perform these steps to reduce configuration disk space requirements:

•	Use the Set Variable dialog box ("Macro", "Set Macro Variable...") to set the macro variable "def_localsta" to 0.

•	From the Visual SlickEdit command line, type "write_state <path>vslick.sta" (UNIX: "write_state <path>vslick.stu") and press ENTER.  Replace <path> with the directory of the global state file (default is "c:\vslick\" or on UNIX: "/usr/lib/vslick/").

File Type Association

Windows:  To setup file types which run Visual SlickEdit when you open them in Windows Explorer and File manager, use the Associate File Types dialog box ("Tools", "Associate File Types...").  If you associate workspace files (".vpw" extension) to Visual SlickEdit, Visual SlickEdit will restore your edit session and project when you open the ".vpw" file.

Selecting an Emulation

We recommend that you use the key assignments you are most comfortable with.  Start with the emulation that most closely resembles what you are used to.  Many programmers simply cannot change the key assignments they are used to overnight.  We will continue to support many different styles of editing.

To select the initial key assignments, bring up the Emulation dialog box ("Tools", "Configuration", "Emulation...") and select the desired emulation.  Visual SlickEdit supports Brief, Epsilon, SlickEdit, VI, GNU Emacs, ISPF, and Visual C++ emulations.  If you don't have a preference, we recommend you choose our default CUA emulation.

Search Options

Use the Search tab ("Tools", "Configuration", "General...", select Search tab) to set your default search options.  There are many more options here than just the typical options for search case sensitivity and whether regular expression searching is turned on by default.  For example, you may want the Find dialog box "Search For:" combo box to be initialized with the selected text or the word at the cursor.  For more information, bring up the Search tab and press F1 to see detailed help.

Tab Key and Indent Options

Inserting Real Tab Characters

If you want the Tab key to insert a tab character, turn on the "Indent With Tabs" check box ("Tools", "Configuration", "File Extension Setup...", pick the extension you want to change).

Inserting Spaces Instead of a Real Tab

If you want the Tab key to indent your text with spaces, turn off the "Indent With Tabs" check box  ("Tools", "Configuration", "File Extension Setup...", pick the extension you want to change).  If you are in SlickEdit emulation (this is not the default emulation), you need to change your Tab and Shift+Tab key bindings to "Move Text Tab" and "Move Text Backtab" respectively.  To do this, bring up the Redefine Common Keys dialog box ("Tools", "Configuration", "Redefine Common Keys..."), select the Tab key, select the command "Move Text Tab", select the Backtab key, select the command "Move Text Backtab", and press ENTER.

Changing the Tab Stops and Indent

By default, the Tab key indents your text by 4 characters for source code files.   Typically you will want the tab stops to match the Tab key indent.  However, to work properly with SUN's Java API source code, the tab stops need to be in increments of 8, but the Tab key indent ("Syntax Indent") should be set to 4.  The "Syntax Indent" affects not only the Tab key, but also how much to indent for each code block level.

Follow these steps to change the amount the Tab key indents ("Syntax Indent"):

•	Bring up the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...", pick the extension you want to change).

•	Change the "Syntax Indent:" text box to the amount you want the tab key to indent.

•	(Recommended for all languages except COBOL)  Change the "Tabs" text box to "+value" where value is the same value you used for the "Syntax Indent" text box.  The "Tabs" text box ONLY affects how tab characters are expanded on the screen.  This does not affect the indent when you press the Tab key, or the amount of indent for statements inside a code block.

•	Press the OK button.

Note:  For COBOL programmers, the "Tabs" text box also affects the Tab key.  Syntax indent still affects the indent for each code block level.

Modal Tab Key

A modal tab key is one which operates differently when text is selected.  When text is selected, all the selected lines are indented instead of just the line the cursor is on.  The Modal Tab option is accessible from the Redefine Common Keys dialog box ("Tools", "Configuration", "Redefine Common Keys...").

Selecting a Different Font

You may want to use a smaller or larger font than Visual SlickEdit's default font.  To do this, bring up the Font Configuration dialog box ("Tools", "Configuration", "Font"), select "Window Text" in the combo box at the top of the dialog box, and then choose your font.

Windows:  Choose the "Terminal" font for the largest selection of nice looking fixed fonts.  These are the fonts used for a command prompt.

UNIX:  Choose Adobe Courier, B&H Lucida Typewriter, or Width x Height family fonts for a nice selection of fixed fonts.

Redefining Enter and Other Common Keys

Many users feel strongly about the function of the keys ENTER, BACKSPACE, DEL, HOME, TAB, BACKTAB, LEFT, RIGHT, UP, and DOWN.  For this reason, we provide a Redefine Common Keys dialog box specifically designed for changing the function of these keys ("Tools", "Configuration", "Redefine Common Keys...").  For detailed information on this dialog box, see section "Redefine Common Keys dialog box.  For help on changing the function of other keys, see section "Changing Key Bindings.

Installing Support for Additional Languages

Support for C++, C, Delphi, Java, HTML, JCL, OS/390 Assembler, Pascal, Intel Assembler, IDL, PHP, and Slick-C (our macro language) is already installed. For AWK, Perl, COBOL, PL/I, FORTRAN, Tcl, PV-WAVE, PL/SQL or Transact SQL, Ada, InstallScript, Modula-2, or dBASE,  open a file with one of the extensions "awk", "pl", "cob" or "cbl", "pl1", "for", "tcl", "pro", "sql", "ada", "rul", "mod", "prg",  and the appropriate macro will be loaded.  REXX support is automatically loaded when you edit a file with a ".cmd" extension that has a /* comment on the first line.  For Transact SQL, you need to bring up the Extension Options dialog box, select "sql", click on the "Refer to..." button, select "sqlserver" from the list and press the OK button.  This configures "sql" files to use our Transact SQL support instead of our PL/SQL support.

Syntax Expansion Options

When you type a keyword such as "if" and press SPACE BAR in a source code file that Visual SlickEdit recognizes, a template like the one below is inserted:

if () {

}

The above template is inserted for C, C++, Java, AWK, Perl, and Slick-C source files.  Various syntax expansion options, such as the brace style are accessed by pressing the "Options..." button on the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").  If our syntax expansion options don't provide what you want, or you want to add syntax expansion for a new keyword, define an extension specific alias ("Tools", "Configuration", "File Extension Setup...", pick the extension you want to change, press the "Alias..." button).  See section "Extension Specific Aliases for more information.

To turn off syntax expansion, uncheck the "Syntax Expansion" check box  ("Tools", "Configuration", "File Extension Setup...", pick the extension you want to change).

Setting up a Project

Projects facilitate Context Tagging™ (see "Context Tagging(TM)), class/tag browsing (See "Class Browser), dynamic tagging, restoring edit sessions, compiling within the editor, loading files, version control, automatic tag database generation, and more.  We recommend you create a project now if you want to use some of these features.  For more information on projects and workspaces see section "Projects).

If you are using Visual C++ >=5.0 or Tornado >=2.0, we recommend you create your projects and workspaces in these products and then use the "Open Workspace" menu item ("Project", "Open Workspace...") to open a workspace created from one of these products.  If you don't plan on creating projects in Visual SlickEdit, open a workspace from one of these products and skip to the "Compiling" section below.  See "Using Visual SlickEdit With Visual C++ for more information on using Visual SlickEdit with Visual C++.

Creating a Project File

To create a project invoke the "New..." menu item on the Project menu.  Select the appropriate package, enter the project name, choose a directory location, enter the executable name (optional), and press the OK button.  If the directory you choose does not exist, you will be prompted to create it.

Adding Files to Projects

Use the project Files tab ("Project", "Project Properties...", select Files tab) to add files to your project.   The top portion of the project Files tab operates very similarly to the standard Open dialog box.  Use Ctrl+Click to select more than one file in the file list box, and then press the Add button to add the selected files into the "Project files" list box.

Compiling

The Build menu items "Compile" and "Build" execute the compile and build commands respectively for the current project.  If you picked a compiler package, you can try these commands now.  To change these commands and a few other project options, use the Project Properties dialog box ("Project", "Project Properties...", Select the Tools tab).  The "Next Error" and "Previous Error" menu items on the Build menu allow quick navigation of compiler errors.

For Visual C++, the default compile, build, and rebuild commands use the "nmake" program which requires a makefile (".mak" extension).  Visual C++ >=5.x does not automatically create a makefile for you.  Use the "Export Makefile.." menu item ("Project", "Export Makefile...") in Visual C++ to create or update your makefile.

Version Control

To configure a SCC version control system(Windows only), bring up the Version Control Setup dialog box ("Tools", "Version Control", "Setup..."), and select the desired system.  Click on "Initialize Provider", and "Open Project".  Fill in the open project dialog appropriately.  This dialog will vary from system to system.  When you click OK, a project name should appear under the list of SCC Version Control Systems.  Click OK.  This version control system and project are now bound to the active Visual SlickEdit project.  For more, see "Version Control

To configure a command lineversion control system(all non-Windows version control systems are command line), bring up the Version Control Setup dialog box ("Tools", "Version Control", "Setup..."), pick a command line version control interface, and press the "OK " button.  If you chose a command line version control interface, make sure the executables included with your version control system can be found in the PATH environment variable.  Depending on the system you are using, you may need to fill in the "VCS Project" text box.  For more,see "Version Control.  If you are using a command line system that is not in the "Command line systems" list, see "Version Control

Building a Tag File for Run-Time Libraries

We strongly recommend that you create extension specific tag files for include files of compiler packages and/or utility libraries.  This will allow our tagging features to work for all symbols, and not just those symbols in your project.  Context Tagging™ (see "Context Tagging(TM)), which features Auto List Members and Auto Function Help needs all symbol information in order to work properly.

Visual SlickEdit automatically builds a tag file for the run-time libraries of Perl, JavaScript, Tornado, InstallShield, PV-WAVE, and Slick-C.  So it should be unnecessary to build tag files for the run-times of these languages.  If you have already built a tag file for your run-times during installation, you can skip this section.

Windows:  If you are using Visual C++, C++ Builder, any Java package, or COBOL, use our Automatic Tagging dialog box ("Search", "Tag Files...", "Auto Tag...") to build a tag file for these run-time libraries.  This is the same dialog used by our install program.

UNIX:  If you are using C, C++ or Java, use our Automatic Tagging dialog box ("Search", "Tag Files...", "Auto Tag...") to build a tag file for these run-time libraries.  This is the same dialog used by our install program.

If our Automatic Tagging dialog box does not help you, perform the following steps to set up an extension specific tag file for your run-times which can be accessed by all projects which have files of the same language:

Building an Extension Specific Tag File

•	Display the Tag Files dialog box ("Search", "Tag Files...").

•	Click on the "Add Tag File..." button.  When the Add Tag File dialog box appears, click on the "Extension Specific Tag File" radio button.  Then select the language from the combo box and press the OK button.  For example, select "C" to add an extension specific tag file for C and C++.  When the Add Tags Database dialog appears, set the directory to the root directory of the include files or source tree.  For Visual C++, this might be "c:\Program Files\DevStudio\VC\" or "c:\msdev\".  UNIX include source is almost always under "/usr/include".  Press ENTER to select "tags.vtg" (UNIX: "utags.vtg") as the output file.

•	If the Add Tree dialog box is not already displayed, press the "Add Tree..." button.  Enter one or more wildcard file specifications in the Files text box (i.e.  *.c *.h *.cpp *.hpp).

•	Press the OK button to recursively add these files to the selected tag file.

Auto Restore Options

By default, Visual SlickEdit restores the files, current directory, and more from your previous edit session.   Various Auto Restore options are located on the General Configuration dialog box ("Tools", "Configuration", "General...", select General tab).  Here you can turn off restoring the current directory, turn off restoring project files, and more.

Word/Variable Completion

Here's a feature that will save you a lot of typing.  How often do you type the same variable name?  The answer is probably many times.  Here's an example which takes advantage of this feature:

if (pWindowView->pBuffer->LineNum>100) {

    pW<Cursor is Here>

}

Now type <Ctrl+Shift+Comma><Ctrl+Shift+Space><Ctrl+Shift+Space> to get the following result:

if (pWindowView->pBuffer->LineNum >100) {

    pWindowView->pBuffer->LineNum <Cursor is Here>

}

Note that in this example, the first prefix match of "pW" that was found was the one we wanted.  When it is not, press Ctrl+Shift+Comma again to retrieve a previous one.  This feature takes advantage of the fact that most variables are local variables which have a declaration and at least one usage.  Here is a summary of word completion keys:

Ctrl+Shift+Comma	Complete previous occurrence

Ctrl+Shift+Period	Complete next occurrence

Ctrl+Shift+Space	Complete More

Directory Aliases

Directory aliases is a feature unique to Visual SlickEdit.  Touch typists will love this feature.  Directory aliases are typically used when opening a file, so that you do not have to type in long directories or click the mouse to death in the directory list box.  You can also specify aliases in the Change Directory dialog box.  Directory aliases take advantage of the fact that most users are constantly opening files from a small number of directories throughout the day.  Try out this unique feature and you'll immediately see how much it improves the way you work.  The programmers at MicroEdge Inc. can't work without it.

Directory aliases are typically 4 characters or fewer and consist of a short abbreviation of the last name in a long directory list.  For example, if you had a directory called "c:\version20\src\project2\", a good alias name might be "p2".  For your compiler include files, define an alias called "inc" (or "vinc" (MS VC++), "binc" (C++ Builder), "dinc" (Delphi) if you have multiple compilers).  Take the time now to identify the directories you access most frequently and define aliases for them.

Defining Aliases

To define directory aliases, invoke the Alias Editor ("Tools", "Configuration", "Aliases...") to edit global (non-extension specific) aliases stored in the "alias.slk" file.  Click on the New button to add a new alias and type in  its value.  Press the OK button when you are done.

Using a Directory Alias

Now that you have defined some directory aliases,  here's how to try them out.  Display the Open dialog box ("File", "Open..."), type in your alias in the "File Name" text box, and press Ctrl+Shift+O to expand the alias.  Now you can either press ENTER to view the files in this directory or enter the rest of the file name to open the file.  Ctrl+Shift+O works in every text box in Visual SlickEdit, in the concurrent process buffer, and in any buffer.

Embedding Environment Variables

If you keep your source code in a "version" directory tree, you may want to set an environment variable and embed the environment variable in the alias value.  For example, if you have a directory called "c:\version20\src\project2\", define a "p2" alias and give a value like "%VERSION%\src\project2\"..  Type "set VERSION=c:\version20" on the Visual SlickEdit command line to set or create the VERSION environment variable.   Alternately, you can have environment variables automatically set when you open a project.  See "Open Command" tab on the Project Properties dialog box.

Windows Word Help

If you are using our default CUA emulation, you can get help for the word at the cursor by pressing Ctrl+F1 (which executes the wh command).  For C++ compiler packages, this includes help on the Windows API, Standard C library, and Microsoft C Foundation Classes (if you have MS VC++).   In any emulation, you can click on the question mark button on the button bar to get help on the word at the cursor.

Before you can get word help, you need to set up a help index file ("vslick.idx") which is an index for multiple .HLP and .MVB help files.  The install program usually builds the "vslick.idx" help index file for you.  However, you should follow these steps to ensure you have help on the compiler packages you are using.

Building the Help Index File "vslick.idx"

•	Bring up the Configure Index File dialog box ("Help", "Configure Index File...").

•	Press the "Scan" button to automatically add help files (".hlp") on your PATH.  This should also find MS VC++, C++ Builder, and Delphi help files.

•	If the "Scan" button did not pick up some help files you want, add your other help directories to the "Help File Path" text box.  Press the "Scan" button again.

•	Press the "OK" button to build the "vslick.idx" file.

Multiple Help File Access

Usually, you only need one help index file for all your compiler packages.  However, you may prefer separating your help files into groups which you can access on different keys.

To change the default word help filename(s) for Ctrl+F1 and Ctrl+F2 (wh and wh2 commands), set the "Word Help Filename(s):" on the General Configuration dialog box ("Tools", "Configuration", "General...", select General tab).  Specify the help files for the wh command (Ctrl+F1) first, each separated with a plus sign. Then use a semicolon to indicate the start of the help files for the wh2 command (Ctrl+F2) and specify its help files separated with a plus sign.  You may use another semicolon to indicate the start of the help files for the wh3 command; however, this command is not bound to a key.  Help files have the extension .MVB, .HLP, or .IDX.    Do not use a plus sign to specify more than one .IDX file or .MVB.  Note that environment variables may be embedded in the word help filename(s) string by the notation %(envvar-name).

Example

vslick.idx;win31wh.hlp+mscxx.hlp+errors.hlp+vslick.hlp

CtrlF1.idx;CtrlF2.idx

vslick.idx;c:\msdev\help\vcbks40.mvb

Network Backup Options

non-UNIX platforms:  Sometimes our default backup style does not work correctly when a network file is saved.  By default, backups are placed in the "\vslick\backup" directory.  For this backup style to work, make sure Visual SlickEdit has access rights to this directory and that this directory exists.  If you set the backup directory ("Tools", "Configuration", "File Options...", select Backup tab, "Backup Dir") to "c:\vslick\backup", this will force all backups to be written to drive C:. You may prefer a different backup style.  See section "Save tab for more information.

UNIX:  Our default backup style will work fine under UNIX because backup files are placed in "$HOME/.vslick" directory, which should always have read/write permissions.

Visual SlickEdit only makes a backup of a file the first time you save your file in a given edit session.  Therefore, your backup file may not represent your last save.  For more up-to-date backups, use our AutoSave feature.  See section "AutoSave tab for more information.


Invoking Visual SlickEdit

non-UNIX platforms:  Double click on the Visual SlickEdit icon created by the install program.

The command line syntax for invoking Visual SlickEdit can come in handy.  For example, you might want to set up multiple icons which open different Visual SlickEdit projects.  Or maybe you would like to start the editor from a shell prompt.

The syntax for invoking Visual SlickEdit is:

vs {options} file1 {options} file2 ...

The most common options are (there are MANY more):

-#command	Execute command on active buffer.  For example, "vs test.c -#bottom-of-buffer" places the cursor at the end of test.c.

+t	Creates a new file and bypasses auto-restore of files.  See section "Auto Restore Options for more information.

+ or -new	Indicates whether a new instance of the editor should be created, or if the existing instance should process the command line parameters (default is -new).  +new creates a new instance.

Note that if you specify a workspace filename with extension (".vpw"), Visual SlickEdit will Auto Restore the project.

For a complete list of invocation options, see section "Invocation Options.

Visual SlickEdit has full support for NTFSand HPFS.  For NTFS and HPFS file systems, we support filenames up to 200 characters long.  If you need to edit a file whose name contains embedded spaces, place double quotes around the name.

Example

vs project1.vpw	Auto Restore from workspace file.

vs project1.dsw	Auto Restore from a VC++ workspace file.

vs autoexec.bat config.sys	Edit two files.

vs "this is.c"	Edit a file with a space character.

vs test.c -#1000	Edit test.c and go to line 1000.

vs orders -#bottom_of_buffer -#/invoice/-

Edit orders file, go to bottom of buffer, and search backward for "invoice".

vs "*.c"	Edit all C source files in the current directory.

When you specify a file to edit, Visual SlickEdit automatically recognizes whether its format is DOS, UNIX, or MACINTOSHand adjusts accordingly.  Visual SlickEdit will not append an EOF character to UNIX or MACINTOSH format ASCII files when saved, regardless of the save options.  When text in one text file format is copied to a buffer with another text file format, Visual SlickEdit translates the line separation characters to the destination buffer's format.

When Visual SlickEdit cannot find a file you wish to edit, an empty buffer is created with that name.  If you specify more than one file, use the Ctrl+Tab and Ctrl+Shift+Tab keys to switch to the next and previous windows respectively.

When Visual SlickEdit is invoked, it concatenates the value of the environment variable VSLICK before the command line you specify.  We recommend you define the VSLICK environment variable in "vslick.ini" (see "Setting Environment Variables for more information) with any command line options that you always use.


The Screen Layout

Visual SlickEdit uses an MDI Interface (Multiple Document Interface) which is common to Windows applications which support editing multiple documents.  You can skip this section if you already know how to use an MDI application.

You may find that your initial screen that appears when you invoke Visual SlickEdit is somewhat different from what we are displaying here.  This is because we have already opened a file and maximized the window.  We will explain more later.

NOTE:  UNIX has a different minimize button, maximize button, restore button, system menu icon, and MDI system menu icon.

The outer window is called the MDI (Multiple Document Interface) frame or window.  If you want a non-clipped MDI child window you will need to start a new instance of Visual SlickEdit.

The MDI system menu displays various commands that operate on the MDI window.  Single click on the MDI system menu to display a menu of commands.  The most commonly used item here is "Close" which is used to exit Visual SlickEdit.  The "Maximize" menu item expands the MDI window to fill the entire screen.  This can also be accomplished by single clicking on the MDI window maximize button.  Once maximized, you can restore the MDI window to its original size by selecting the "Restore" command from the MDI system menu or by single clicking on the MDI window restore button (the MDI window maximize button is changed into a restore button when the MDI window is maximized).   The restore button to the right of the menu bar operates on the edit window and not the MDI window.   The system menu to the left of the menu bar also operates on the edit window and not the MDI window.  An example will best illustrate this point.  Perform the following steps:

•	Invoke Visual SlickEdit if you have not already done so.

•	From the "File" menu select the "Open" menu item.  This can be accomplished by pressing Alt+F followed the letter 'O' (menu items with underscores are known as selection characters).  A dialog box with the title "Open" should appear.

•	Type "junk" into the "File name" text box.

•	Press ENTER or single click on the "OK" button.  If the "junk" file does not exist, a new file will be created and given the name "junk".

At this point the editor should be displaying a smaller window inside the MDI window which has the title "junk" (actual title will include path information).  We call the smaller window the edit window or MDI child window.  The edit window has three buttons at the top just like the MDI window.  Click on the edit window maximize button.  Notice that the edit window now looks like our screen layout picture.  These additions to the menu bar operate on the edit window and NOT the MDI window.

The MDI minimize button is used to iconize the editor.   non-UNIX platforms:  Once iconized, you can either double click on the icon which appears at the bottom of your screen.  UNIX:  How you restore an iconized application depends on the window manager you are using.  Under the Motif and Open Look window managers you double click on the icon to restore the application window.

Message Line and Command Line

The message line displays one line information messages.  In addition, when you click on the message line or invoke an editor command which requires the command line, the message line disappears and the command line appears.  The message line and the command line share the same screen space.

Line and Column Indicators

To the right of the command line are the line and column indicators which tell you the current cursor position.  You can click on these indicators to move the cursor to a new position.

Read Only Toggle

The "RW" letters indicate that the current buffer is read/write.  When these letters change to "RO", it means that the buffer is read only.  You can click on the Read Only Toggle to toggle between read/write and read only mode.

Recording Indicator

Indicates whether or not you are recording a macro.  See section "Recording Macros for more information.

Insert/Replace Toggle

The "Ins" letters to the right of the mode name indicate that you are in insert mode.  In insert mode, typing a character pushes characters at and after the cursor to the right.  You will see the letters "Rep" to the right of the mode name when you are in replace mode.  In replace mode, typing a character replaces the character under the cursor.

Scroll Bars

The scroll bars on the right and bottom sides of the edit window are not required.  If you do not want scroll bars, use the General Configuration dialog box ("Tools", "Configuration", "General...", select General tab) to remove them.

Edit Window Text Area

The edit window text area displays the contents of files you edit.  When the edit window is maximized, the buffer name is displayed at the top of the MDI window.   Otherwise, the buffer name appears at the top of the edit window.  A '*' character displayed to the right of the buffer name indicates a modified buffer.

Toolbars

In the default configuration, Visual SlickEdit displays the Standard toolbar (the button bar), Project toolbar, and the Output toolbar.  These toolbars contain the most commonly used editing features.  You can completely customize existing toolbars and even create your own personal toolbars.  Use the Toolbar Customization dialog box ("View", "Toolbars") to customize the toolbars.  Several other toolbars exist and can be accessed from the Toolbar Customization dialog box ("View", "Toolbars...").


Getting Help on Visual SlickEdit

If you have read the Start Here section, you are probably already productively using Visual SlickEdit.  There are many more features than just those covered in the Start Here section.  You can find and learn most of them by exploring Visual SlickEdit and getting on-line help.  This section will show you how to learn Visual SlickEdit while you are running the editor.

The easiest way to learn Visual SlickEdit is by browsing menu items in the menu bar.  Menu items display keyboard short cuts you can later memorize.  As you cursor through menu items, a help message for the current menu item is displayed in the message line.  If this help is not enough, press F1 to get even more help.  We suggest you browse through the drop-down menus of the menu bar and press F1 on menu items that you would like help on.   You can get help on dialog boxes by pressing F1 while the dialog box is displayed.

Let's say you want to know more about the "Find..." menu item on the "Edit" drop-down menu.  Press F10 to activate the menu bar.  Then press 'S' to select the search drop-down and move the menu item selection cursor down to the "Find..." menu item.  Now, press F1.

Hypertext Help

Notice that help for the "Find..." menu item has some words highlighted, such as "Regular Expressions".  This means you can get help on regular expressions by single clicking on the highlighted text.  Under Windows or UNIX, you can click on the "Back" button, which appears below the menu bar of the help program, to return to the previous help item.  The TAB and Shift+TAB keys will move your cursor to the next and previous hypertext items.   Click the mouse on the "Contents" button to view the table of contents (which is almost identical to the table of contents of this manual).  Click on the "Index" (Windows 3.1: "Search") button to see an index of help items.  This entire manual, including the sections on the Slick-C language, are included in the hypertext help.  The Help menu drop-down has menu items for getting help on summary of keys and Slick-C macro functions by category.  If you remember the help item you are looking for, you may use the menu item ("Help", "Search") or the help command from the command line to display help on the item.

Tool Tips

If you don't know the function of a button on the button bar, move the mouse over the button and hold it there for a moment.  Visual SlickEdit will display a description of what the button does.


Using the Mouse

You have probably already figured out how to place the cursor and select text with the mouse.  Other mouse features are not so obvious.  This section covers these features.  The mouse is configured the same for all emulations.

Line Selections

If you are editing source code files, you will select complete lines quite often.  A quick way to do this with the mouse is to click in the space between the left edge of the buffer and the edit window border.  Click and drag the mouse in this area to select multiple lines.  Triple click on the text in a line to select the current line.

Column Selections

Click and drag with the right mouse button to create a column selection.

Dockable Toolbars

Click in a toolbar (not on a control) and drag to dock or undock a toolbar.  Double clicking in a toolbar will also dock and undock the toolbar.

Copy and Move

You can copy or move selected text to the mouse pointer by using Ctrl+Shift+RButton to copy the selected text and Ctrl+RButton to move the selected text.  You might like this method better than drag drop because you can use the scroll bars to copy or move the text a long distance.  In addition, you can copy the selected text into an entirely different buffer/window.

Example

•	Select some text in a buffer.

•	Use the scroll bars to go to the bottom of the buffer.

•	Press Ctrl+Shift+RButton to copy the selected text to the cursor.

Status Line

You can click on the Line, Col, RW/RO, and Ins/Rep indicators near the bottom of Visual SlickEdit's MDI window to change their value.

Context Sensitive Menus

Clicking with the right mouse button often brings up a menu with items specific to the window where you clicked.  For example, right clicking inside the edit window brings up a list of commonly used editing functions.  Context sensitive menus are supported in edit windows, all toolbars, Diff dialog box, muti-file Diff Ouput dialog box, and in the Tag Files dialog box.

Snap Cursor to End of Line

Most of our emulations will let you place the cursor past the end of a line if you click the mouse there.  If you don't like the cursor going past the end of a line, set the macro variable def_click_past_end to 0 ("Macro...", "Set Macro Variable").


Features for Programmers

Tag Files

Context Tagging(TM)

Class Browser

Dynamic Tagging

SmartPaste(TM)

3 Way Merge Editing

DIFFzilla(TM)

HTML Beautifier

C/C++/Java Beautifier

FTP Support

Color Coding

Using Visual SlickEdit With Visual C++

Projects

Compiling From Within the Editor

Syntax Expansion and Indenting

Begin/end Structure Matching

Version Control

Adding Support for Other Languages

This section covers features which will make you more productive with the programming languages you use.  In order for Visual SlickEdit's programming features to work for one of the languages COBOL, FORTRAN, AWK, InstallScript, PV-WAVE, dBASE, REXX, Modula-2, Perl, Tcl, or Ada you need to install the appropriate macro.  See section "Installing Support for Additional Languages.


Tag Files

Many of Visual SlickEdit's source code analysis features such as Context Tagging™ (see "Context Tagging(TM)), class/tag browsing (See "Class Browser), and dynamic tagging, require a tag file.  Visual SlickEdit automatically creates and maintains a tag file for files in your project.  However, you will want to create extension specific tag files for compiler includes or other libraries of code that you have.  Once a tag file is created, it is updated in the background when you make edits.  If you modify some source files using another tool, you may want to rebuild the tag file.

Use the Tag Files dialog box ("Search", "Tag Files...") to create or update a tag file.  A picture of the Tag Files dialog box is displayed below:

Tag file names have the extension ".vtg".   By separating tag files for different languages into extension specific tag file sections, our Context Tagging(TM) features can correctly look up symbol information for the current file you are editing.  However, the Class Browser and the Go To Definition dialog box are not context sensitive and access all tag files.

Tagging Run-Time Libraries

We strongly recommend that you create tag files for include files of compiler packages and/or utility libraries.  This will allow our tagging features to work for all symbols and not just those symbols in your project.  Context Tagging™ which features Auto List Members and Auto Function Help needs all symbol information in order to work properly.

The editor automatically builds a tag file for the run-times of Perl, JavaScript, Tornado, InstallShield, PV-WAVE, Tcl, and Slick-C.  So it should be unnecessary to build tag files for the run-times of these languages.  If you have already built a tag file for your run-times during installation, you can skip this section.

Windows:  If you are using Visual C++, C++ Builder, any Java package, or COBOL, use our Automatic Tagging dialog box ("Search", "Tag Files...", "Auto Tag...") to build a tag file for these run-time libraries.  This is the same dialog used by our install program.

UNIX:  If you are using C, C++ or Java, use our Automatic Tagging dialog box ("Search", "Tag Files...", "Auto Tag...") to build a tag file for these run-time libraries.  This is the same dialog used by our installation program.

If our Automatic Tagging dialog box does not help you, perform the following steps to set up an extension specific tag file for your run-times which can be accessed by all projects which have files of the same language:

Building an Extension Specific Tag File

•	Display the Tag Files dialog box ("Search", "Tag Files...").

•	Click on the "Add Tag Files..." button.  When the Add Tag File dialog box appears, click on the "Extension Specific Tag File" radio button.  Then select the language from the combo box and press the OK button.  For example, select "C" to add an extension specific tag file for C and C++.  When the Add Tags Database dialog appears, set the directory to the root directory of the include files or source tree.  For Visual C++, this might be "c:\Program Files\DevStudio\VC\" or "c:\msdev\".  UNIX include source is almost always under "/usr/include".  Press ENTER to select "tags.vtg" (UNIX: utags.vtg) as the output file.

•	If the Add Tree dialog box is not already displayed., press the "Add Tree..." button.  Enter one or more wildcard file specifications in the Files text box (i.e.  *.c *.h *.cpp *.hpp).

•	Press the OK button to recursively add these files to the selected tag file.


Context Tagging(TM)

Context Tagging Overview

What is the Context Tagging Feature Set?

Auto List Members

Context Tag Completion

Auto Function Help

Context Tag Navigation

Context Tag Preview

Context Tagging Overview

This feature requires tag files.  See section "Tag Files.

The Context Tagging feature set performs expression type, scope, and inheritance analysis. Built on Visual SlickEdit's powerful tagging facility, Context Tagging features work with your source code, not just standard APIs.  Visual SlickEdit currently supports Context Tagging for C++, C, Java, JavaScript, COBOL, HTML, Ada, Perl, InstallScript, Delphi, PV-WAVE, PHP, and Slick-C.  See "Context Tagging(TM) Limitations" in the on-line help for a list of limitations for various languages.  Expect to see Context Tagging for more languages in the future.

What is the Context Tagging Feature Set?

Auto List Members

Visual SlickEdit automatically lists members when you type a member access operator ('.', '->', and '::' for C++, '.' for Java, "IN" and "OF" for COBOL).  You can also access this feature on demand by pressing Alt+Dot.  This can help you with identifiers when there is no member operator (list locals, global variables, current class members, etc.).  For example, for C "str<Alt+Dot>" will help you find a string function.  If you prefer to only list members on demand by pressing Alt+Dot, turn Auto List Members off ("Tools", "Configuration", "General", uncheck "Auto list members").

The example below shows what would appear after typing a '.' when entering Java source.  Notice that the Javadoc comments are displayed in a mini HTML browser.  You must install Java API source if you want to view comments for the Java API runtime libraries.  If you click on a URL, the default HTML browser is started.  Clicking on other hypertext links will navigate within the comment window.  The "equals" method has two occurrences, one in the String class and one in the Object class.   Press Ctrl+PgDN or Ctrl+PgUp to select the next or previous occurrence.

The example below shows what would appear after typing a '.' when entering C++ source.  The stack class is one of the C++ standard template library classes.

This example shows what would appear after typing "OF " when entering COBOL source.

Context Tag Completion

Use the Ctrl+Space key to complete (type the rest of) the current symbol you are entering.  If a unique match is not found, a list is displayed allowing you to select the exact match.

Auto Function Help

Visual SlickEdit automatically displays the prototype for a function when a function operator ( '(' for most languages) is typed, and highlights the current argument within the displayed prototype.  For C++, function help is also automaticaly displayed when you type a template argument operator ('<').  For COBOL, statement syntax help is displayed when the cursor is inside a statement for which help is provided.  To access Auto Function Help or Auto Syntax Help on demand, press Alt+Comma.  If you prefer to only get function help or syntax help on demand by pressing Alt+Comma, turn Auto Function Help and/or Auto Syntax Help off ("Tools", "Configuration", "General", uncheck "Auto function help" and/or "Auto syntax help").

The example below illustrates pressing Alt+Comma inside the argument list of the Java API String method startsWith.  Notice that the Javadoc comments are displayed in a mini-HTML browser. You must install Java API source if you want to view comments for the Java API runtime libraries.  If you click on a URL, the default HTML browser is started.  Clicking on other hypertext links will navigate within the comment window.  The startsWith method has two overloads which accept different arguments.  Press Ctrl+PgDN or Ctrl+PgUp to select the next or previous occurrence.

The example below illustrates pressing Alt+Comma inside the argument list of the WIN32 API function CreateWindowEx.

This example shows what would appear after typing "USING " when entering COBOL source.

This example shows what would appear after typing Alt+Comma followed by Alt+Dot when entering COBOL source.

Context Tag Navigation

Source code context is automatically analyzed so you can quickly navigate to the definition of an identifier, including local and global variables, class members, and functions.  Press Ctrl+Dot to go to the definition of a tag under the cursor.  To "pop" back to where you were, simply press Ctrl+Comma (or use the "Search", "Pop Bookmark..." menu item).

Context Tag Preview

The Symbols tab of the Output toolbar (docked on the bottom by default) displays the symbols matching the word under the cursor and utilizes context information. If only one tag is found, the source file containing the tag is displayed.  Otherwise, multiple symbol matches are listed.  When a source file is displayed in the Symbols tab, you can double click on it to edit the file.  When mutiple matches are listed, double click on the line to go to that symbol.  Alternately, you can enter a symbol to view in the "Symbol:" combo box of the Symbols tab.  Right click in the editor control of the Symbols tab to show an option menu of tag types to show/hide.


Class Browser

Searching for Members or Classes

Viewing Base Classes

Viewing Symbol References

Viewing Symbol Uses

Viewing Accessible Members

Other Filtering Options

(Project toolbar, select Classes tab)

This feature requires tag files.  See section "Tag Files.

The class browser is located on the Classes tab of the Project toolbar which is docked on the left side of the editor by default.  If you don't have the Project toolbar open,  use the Toolbar Customization dialog box ("View", "Toolbars...") to make it visible.  If you move the mouse over the bitmap displayed to the left of the tree item (such as the "+" bitmap), a tooltip is displayed indicating what the bitmap means.

Searching for Members or Classes

The "Class Filter" and "Member Filter" combo boxes allow you to specify a regular expression string to limit the display to only classes that match the class filter and members which match the member filter.  Separate multiple regular expression search strings with a space.  For example, the member filter "Begin End" will find members that contain Begin or End anywhere in the name.  The member filter "^Begin" will find members that start with Begin.  In addition, you can use the Find Tag dialog box (right click in the class browser window and select "Find Tag...") to help you search for a specific symbol in the Class Browser.

The Class Browser has options for turning off display of the class and member filter combo boxes to save space (right click in the class browser window, "Filters", "Class Filter" or "Member Filter").  No class or member filters are applied if they are not visible.

Viewing Accessible Members

By default, the class browser does not show you inherited members that this class can access.  To view inherited members that your classes can access, set the "Inherited" option on the Class Browser Filter Options dialog box (right click in the class browser window and select "Filters", "Filtering Options...") to don't care (gray).

Filtering options and class and member filters can be temporarily disabled by turning on the "Show all tags" check box.

Other Filtering Options

The Class Browser Filter Options dialog box (right click in the class browser window, "Filters", "Filtering Options...") has options for filtering of members based on member attributes.   Bring up the Class Browser Filter Options dialog box and press F1 for detailed information.

Viewing Symbol Properties

To see various attributes, return type, and arguments for a particular symbol, right click on the symbol in the class browser and select the "Properties..." menu item.

Viewing Base Classes

To see what classes are inherited by a particular class, right click on the class and select the "Base Classes" menu item.

Viewing Symbol References

While most of our tag navigation features deal with a symbol definition, you can use our Symbol References feature to see all places where a particular symbol was referenced.  Visual SlickEdit currently supports Symbol References for C++, Java, COBOL, Slick-C, InstallScript, and Delphi.  You can either view symbol references with the class browser or for the symbol at the cursor.

To view symbol references in the class browser:

•	Create a project (See "Projects) or open an existing project.

•	Click on the Classes tab of the Project toolbar.

•	Right click on the function or method which you want to see references for, and select "References" from the class browser context menu.

To view symbol references for the symbol at the cursor:

•	Create a project (See "Projects) or open an existing project.

•	Open a source file,  press Ctrl+/ on the symbol at the cursor (or right click on the symbol, and choose "Go To Reference").  If you upgraded from a previous version of Visual SlickEdit, Ctrl+/ is likely bound to another command.   Make sure Ctrl+/ is bound to the push_ref command ("Tools", "Configuration", "Key Bindings...").

•	Press Ctrl+G or Ctrl+Shift+G to go to the next or previous occurrence respectively.  Alternate, you can select occurrences out of the references list box.

Note:  Typically you only want to view references that occur in your project files, and not run-time libraries, which can be very large.  For this reason, we don't automatically generate references for run-time library tag files.  If you want to view references that occur in a run-time libary tag file, you need to generate references for the tag file.  To do this, display the Tag Files dialog box ("Search", "Tag Files..."), choose the tag file , right click to display the context menu, and select "Generate References".

Viewing Symbol Uses

Our Symbol Uses feature allows you to see what symbols (variables, functions, methods, classes, etc.) are used by a specific function or method.  Visual SlickEdit currently supports Symbol Uses for C++, Java, COBOL, Slick-C, InstallScript, and Delphi.

Perform the following steps to view the symbols that a particular function or method uses:

•	Create a project (See "Projects) or open an existing project.

•	Click on the Classes tab of the Project toolbar.

•	Right click on the function or method which you want to see uses for and select "Calls or Uses" from the class browser context menu.


Dynamic Tagging

Most dynamic tagging features require tag files.  See section "Tag Files.

We say that Visual SlickEdit's tagging is dynamic because it tags your source files in the background even for those you are currently editing.  Visual SlickEdit tracks the current function, tags in the current file, and tag symbols for the word at the cursor.

Tags for the Current File

The Procs tab on the Project toolbar (docked on the left by default) displays the function tags for the current source file.  In addition, it indicates the current function.  This feature does NOT require a tag file.  By default, functions in the current file are sorted by name.  If you want the functions sorted by line number, right click in the Procs window and select the "Sort by Line Number" menu item.  The Procs tab is also useful for switching buffers.  All the buffers you are editing are listed.  Double click on the buffer to switch to that buffer.  Double clicking on a function name moves the cursor to the beginning of that function in the edit window.

Symbols Tab

The Symbols tab of the Output toolbar (docked on the bottom by default) displays the tags for the word under the cursor.  If only one tag is found, the source file containing the tag is displayed.  Otherwise, the tag symbols are listed.  When a source file is displayed in the Symbols tab, you can double click on it to edit the file.  When tag symbols are listed, double click on the tag symbol to go to that tag.  Alternately, you can enter a symbol to view in the "Symbol:" combo box of the Symbols tab.  Right click inside the Symbols tab to show an option menu of tag types to show/hide.

Jumping to a Tag

You don't have to use the Symbols tab to search for a tag.  If there is a tag symbol at the cursor (maybe a function name), place your cursor on the tag name and invoke the push_tag (or f) command (Ctrl+Dot or "Search", "Go To Definition...").  You can also use the Go To Definition dialog box to go to a specific tag.  It will list all tags which match the prefix you have typed so far.  For those of you who are command line pros, use the f command from the command line and use the completion keys, SPACE BAR and '?', to assist you when entering a tag name.  For example, if you are tagging the C run-time library, typing "f str?" on the Visual SlickEdit command line will list tag names starting with "str" (like strcpy, strcmp, etc.).

The push_tag command sets a bookmark in the file you are currently editing so that you may return to your edit position.  To go back to the previous edit position, press Ctrl+Comma.  For those of you working in case sensitive languages, you may (we like it the way it is) want to make tag name searching case sensitive.  Use the Set Variable dialog box ("Macro", "Set Macro Variable...") to set def_ignore_tcase to 0 to force all tag name searching to be case sensitive.

The find_proc (or fp) command ("Macro", "Find Slick-C Proc...") is used to navigate to a Slick-C tag symbol.  If you are editing a Visual SlickEdit macro, you can invoke the push_tag command (Ctrl+Dot) to find the symbol at the cursor.  The push_tag command actually calls the find_proc command with the symbol name at the cursor to perform the task.


SmartPaste(TM)

What is SmartPaste?  When lines of text are pasted into a source file, the added lines are reindented according to the surrounding code.  For example, if you edit a C or C++ file,  select some lines with a line selection (Ctrl+L), copy them to the clipboard (Ctrl+C), then paste them inside a for loop block (Ctrl+V).  The added lines are correctly indented according to the for loop's indent level.  SmartPaste will work for character/stream selections.  However, the last line of the selection must include the end-of-line character.  You can use the mouse to copy and move lines and still take advantage of SmartPaste.  Our current implementation does not attempt to reindent source code if the clipboard text is not indented at all, or if it starts with preprocessing.  There are a few other cases where SmartPaste will give up.  We will continue to make SmartPaste smarter.  If you have some good ideas for making SmartPaste smarter, please let us know about them.  Visual SlickEdit supports SmartPaste™ for C, C++, Java, Delphi, AWK, Perl, JavaScript, PL/I, PL/SQL, PV-WAVE, Pascal, Tcl, PHP, and our Slick-C macro language.  This feature is one of our favorites.


3 Way Merge Editing

Our 3 Way Merge is typically used after two people make a local copy of the same source file and make some modifications to their local copy.   The 3 Way Merge very cleverly takes both sets of changes and creates a new source file.   If there are any conflicts (because they edited the same area of code), a dialog box is displayed which lets you select which change you want in the output file.  The output can be viewed side by side or interleaved.  The side by side output is more powerful because you can pick the change you want by clicking on a button.  To start a 3 Way Merge, use the ("Tools", "File Merge...") menu item.


DIFFzilla(TM)

DIFFzilla™ provides the following file differencing features:

View differences between 2 files

View differences between source trees

Dynamic Difference Editing™ -intra-line differences color coded even as you type

Generate file lists

Automatic directory mapping

Save/restore multi-file results

Dialog box history (wildcards, paths, file specifications)

Visual SlickEdit's file differencing is used to help you merge changes from one version of a file to another or help you determine what changes have been made to a file.  Using the DIFFzilla™ dialog box, you can difference two files or source trees.

Diffing two Files

Diffing Source Trees

Generating File Lists

Automatic Directory Mapping

Diffing two Files

When you diff two files, the differences can be viewed side by side or interleaved.  In either case, the output is color coded to make it easier for you to see the changes.  The side by side output is much more powerful because you can transfer changes from one file to the other just by clicking on a button.    You can even edit the files without exiting the Diff dialog box.  Undo, copy/paste, syntax expansion/indenting, SmartPaste™, Auto List Members, Auto Function Help and much of your emulation key mappings work when editing in the Diff dialog box.  Unlike other less powerful differencing tools, DIFFzilla has Dynamic Difference Editing™.  When you type or make any edit, lines are rediffed so you see the new intra-line differences.

To diff two source files, invoke the DIFFzilla™ dialog box (Ctrl+= or "Tools", "File Difference...").  Enter the first file in the "File 1" text box and the second file in the "File 2" text box.  If the filenames only differ by path, you only need to specify the path for "File 2".  Click on the "Interleaved Output" check box if you want interleaved output instead of side by side difference editing.

Below is a picture of our side by side difference editor:

Diffing Source Trees

To diff two source trees, invoke the DIFFzilla™ dialog box  (Ctrl+= or "Tools", "File Difference...").  Enter the two directories in the "File 1" and "File 2" text boxes.  In addition, you need to fill in the "Filespecs" text box with the files you want processed.  Turn on the "Recursive" check box to compare subdirectories.

The above dialog box shows differencing two source trees.   All .c, .h, and .rc files are processed excluding files which match the "Exclude filespecs".

The results from differencing with these parameters are shown below:

If a file exists in one tree but not the other, a "+" bitmap is displayed in the one tree and a "-" in the other.  You can customize what files you want to view with the context menu.  To bring up the context menu, click with the right mouse button in the left or right tree.  If you move the mouse over the bitmap displayed to the left of the tree item (such as the "+" bitmap), a tooltip is displayed indicating what the bitmap means.

The buttons do the following:

Copy File

(When displayed) Copies the selected files from left to right or right to left.  Use Ctrl+Click to select mutiple files.  This button is shown when the selected files differ or when the selected file only exists in the current source tree ("+" bitmap shown).  The copy button is also displayed when the selected item is a directory which only exists in the current source tree.  In this case, the copy button asks you if you want to copy the directory source tree recursively.

Diff...

(When displayed) Shows current files in the difference editor.  This button is shown when the selected files differ.

View...

(When displayed) Shows current files in the difference editor.  This button is shown when the selected files match (not shown in above picture).

Del File

(When displayed) Deletes the selected files on the other side. Use Ctrl+Click to select mutiple files.  This button is shown when the selected file only exists in the other source tree ("-" bitmap shown.  Not shown in above picture).

Next

Jumps to next mismatch in both source trees.

Prev

Jumps to previous mismatch in both source trees.

Save...

Lets you save a diff state file (.dif) which you can load later with the "Load..." button on the DIFFzilla(TM) dialog box.  This is especially useful when you have not completed merging files and you want to continue at a later time.  In addition, you can generate a file list.  See section "Generating File Lists" below.

Refresh

Rediffs modified files or all files.

Options...

Displays Diff Options dialog box.  Options include ignoring spaces, skipping leading comments, and expanding tabs.

Report...

Displays a report of the operations you performed in this dialog including file copies, file deletes, and diffs where changes were saved.  In addition, you may optionally save the report.

Generating File Lists

One of the more useful features of the "Save..." button of the Multi-File Diff Output dialog is to write a list of files which optionally include different files, matching files, and files which don't exist in the other tree.  For example, suppose you wanted to email someone updated source code and/or binaries, but you didn't want to send all of it because it might be 10 megabytes of compressed data.  If you knew what files were changed you could just compress and send those files.  This is a job for DIFFzilla™.

•	Use the DIFFzilla™ dialog box to difference the new source tree with the original source tree.

•	Press the "Save..." button.

•	When the Multi-File Diff Output dialog box appears, turn on "Save Path 1 Filelist, "Include different files", and "Include files not in Path2".  All other check boxes should be off.

•	Click on the OK button and select an output file for your list.  Don't enter an extension on your output file.  ".lst" will be appended to your output filename.

•	Now you can use a program like PKZIP25 to zip up your files (ex. pkzip25 -path -add file.zip @file.lst).

Automatic Directory Mapping

By default, the DIFFzilla™ dialog box automatically updates the "File 2" text box with a directory based on previous responses to the dialog.  For example, if you previously entered "f:\vslick40\bitmaps\" into the "File 1" text box and "\\server\dan\vslick40\bitmaps\" into the "File 2" text box, then "f:\vslick40\" is mapped to "\\server\dan\vslick40\".  The next time you enter "f:\vslick40\macros\" into the "File 1" text box, "\\server\dan\vslick40\macros\" is automatically entered into the "File 2" text box.  To turn this option off, click on the "Options..." button on the DIFFzilla™ dialog box and uncheck "Automatic directory mapping".


HTML Beautifier

Use the HTML Beautify dialog box ("Tools", "Beautify Source...") to make your HTML look the way you want.  Our HTML toolbar has a beautify button to beautify the current source file or selection using your current settings.

Call or email us about enhancements or changes you would like to see in our beautifier.  We want to hear your comments.


C/C++/Java Beautifier

Use the C/C++/Java Beautify dialog box ("Tools", "Beautify Source...") to make your code look the way you want.  Our beautifier will change your brace style, correct indenting, correct spacing in conditional expressions, and more.

Thank you for your beautifier comments.  We have implemented several of them. Call or email us about enhancements or changes you would like to see in our beautifier.  We want to hear your comments.


FTP Support

Our FTP support includes a complete FTP client and the ability to easily open and edit FTP files.

Starting a Connection

Before you can access your FTP files, you need to start a connection.   Use the FTP Profile Manager dialog ("File", "FTP", "Profile Manager...") to create a profile or start a connection.

FTP Client

After you have started a connection, invoke the menu item ("View", "Toolbars..."), select the FTP Client toolbar, and turn on the "Visible" check box.  This will display the FTP client toolbar which is used for file management.  That is, transferring files between your local machine and an FTP host.  Right click on the local or remote file listing to display a menu of operations you may choose from.

Opening FTP Files

Before you can open an FTP file you need to start a connection.  See Starting a Connection above for more information.   After you have started a connection, click on the "FTP Open" tab on the Project toolbar (docked on the left by default).  You will see a listing of FTP files. Double click to open a file for editing or change directory.  Right click on the file listing to display a menu of operations you may choose from.


Color Coding

Visual SlickEdit allows you to combine current line coloring, modified line coloring, and language specific coloring.  By default, Fundamental mode colors the current line.  Languages with specific support already defined (i.e. keywords, comments, etc.) use language specific coloring.  When modified line coloring is on, the left edge (the space between the left edge of the window and the text) displays a different color depending on whether the line was inserted or modified.  To change the colors, use the Color Settings dialog box ("Tools", "Configuration", "Colors...").

When current line color coding is on, you don't see language specific color coding for the current line.  If you are a looking for a way to better see the current line without losing language specific color coding, try our "Draw box around current line" feature ("Tools", "Configuration", "General...").

If you sometimes want to know what lines have been modified, bind the command color_modified_toggle to a key.  It will toggle display of modified lines in a different color on/off.  You may want to bind the color_toggle command to a key as well.  This command toggles between current line, modified line, and language specific coloring individually.  For help on changing your key bindings, see section "Changing Key Bindings.

Resetting Modified Lines on Save

You can have Visual SlickEdit clear the modified and inserted line color when you save a file.  Turn on the "Reset line modify" check box on the File Options dialog box ("Tools", "Configuration", "Files Options...", select Save tab).

Adding Keywords

Use the Color Coding Setup dialog box ("Tools", "Configuration", "Color Coding...") to add color coded keywords to an already supported language.

Here are the steps:

•	Display the Color Coding Setup dialog box ("Tools", "Configuration", "Color Coding...).

•	Choose the language you want to modify from the "Lexer Name" combo box list.

•	Press the "New..." button near the left/middle of the dialog box.

•	Enter the new keywords separated with a space character

•	Press the OK button.

•	Press the OK button on the Color Coding Setup dialog box.

Creating Language Specific Color Coding For a New Language

If Visual SlickEdit does not already have color coding support for your language, you can easily create it with our Color Coding Setup dialog box ("Tools", "Configuration", "Color Coding...).

Here are the steps:

•	Display the Color Coding Setup dialog box ("Tools", "Configuration", "Color Coding...).

•	Press the "New..." button on the right of the dialog box.

•	Enter the new lexer name.  Usually this is a language name like C or Java.

•	Correct the "ID Start Characters".  These are valid characters which can be the start of an identifier.

•	Correct the "ID Follow Characters".  These are additional characters which are valid after the start id character.  For example, digits are usually allowed in identifiers, but not as the first character of an identifier.

•	Add your keywords using the "New..." button on the left/middle of the dialog box inside the "Colored Words" frame.

•	Press the "Comments..." button.  This lists the comments currently defined and allows you to define new multi-line and line comments.  Click on the "New..." button to define a new comment.

•	Press the "Styles..." button.  This displays the Styles dialog box which allows you to define string literals, numeric constants, and other options.  See on-line help for more information on this dialog box.

•	Press the OK button on the Color Coding Setup dialog box.

•	In order to see your color coding, you need to fill in the "Lexer name" text box on the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...") for the extension you want to use with this lexer.  If your extension is not listed, click on the "New..." button of the Extension Options dialog box to create a new extension.


Using Visual SlickEdit With Visual C++

Opening Visual C++ Workspaces Files

If you are using Visual C++ >=5.0, we recommend you create your projects and workspaces in Visual C++ and then use the Open Workspace menu item ("Project", "Open Workspace...") to open your Visual C++ workspace.  Once you have done this, Visual SlickEdit will build a workspace tag file, set up build/compile commands, and configure your browser databases if any exist.  When you open a Visual C++ workspace, you have to use Visual C++ to add files to your project or add projects to your workspace.  After making a change to your project or workspace file in Visual C++, you need to invoke the "Save Workspace" menu item in Visual C++ or exit Visual C++ so that Visual SlickEdit will see the changes.

You can also associate a Visual C++ makefile (".mak" extension) or project (".dsp" extension) to a Visual SlickEdit project.  However, this is more typically done if you have Visual C++ 4.x.  See section "Associating Files From a Visual C++ Project" below.

Compiling Your Project in Visual SlickEdit

The default compile, build, and rebuild commands use the "nmake" program which requires a makefile (".mak" extension).  Visual C++ >=5.x does not automatically create a makefile for you.  Use the "Export Makefile.." menu item ("Project", "Export Makefile...") in Visual C++ to create or update your makefile.

You can customize the compile, build, and rebuild commands from the "Tools" tab of the Project Properties dialog box ("Project...", "Properties").

If you get an error when you run "nmake", you need to run the VCVARS32.BAT file (shipped with Visual C++) in a DOS box that you start the editor from. This will set the environment so that the editor can run these compiles.

Help For The Word at The Cursor

Press F1 to get help for the word at the cursor.  This is handy for getting help on run-time functions or methods.  If you are unable to get help for the word at the cursor, make sure "vckwds.hlp" has been indexed.  To check this, display the Configure Help Index File dialog ("Help", "Configure Index File...").  If vckwds.hlp is not displayed, click on the "Add..." button and add the "vckwds.hlp" file located in the root directory of your Visual SlickEdit installation (c:\vslick by default).

Associating Files From a Visual C++ Project

If you are using Visual C++ 4.x , we recommend you create your projects in Visual C++ and then associate the makefile (".mak" extension) to a Visual SlickEdit project.

Perform the following steps to associate a Visual C++ makefile to a Visual SlickEdit project.

•	Create your project in Visual C++

•	Create a Visual SlickEdit project and workspace in the same directory.  To do this, invoke the New dialog box ("Project", "New..."), select the "Project" tab, select "Microsoft Visual C++ for 32 bit Windows", enter the project name, enter the directory location, and press the OK button.

•	Click on the "Makefile..." button of the Files tab of the "Project Properties dialog" ("Project", "Project Properties...").

•	Click on the "Associate..." button and enter the makefile (".mak" extension) or project filename (".dsp" extension).

•	Click the OK button on the Project Properties dialog box.

Once you have associated a Visual SlickEdit project to a Visual C++ makefile or project file, you should use Visual C++ to add or remove files from your project.  After making a change to your makefile or project file in Visual C++, you need to invoke the "Save Workspace" menu item in Visual C++ ("Save All" menu item in Visual C++ 4.x) or exit Visual C++ so that Visual SlickEdit will see the changes.


Projects

Creating a Workspace and Project

Adding Files to a Project

Setting Directories

Setting Compile Commands

If you are using Visual C++, be sure to read section "Using Visual SlickEdit With Visual C++.

What is a Project?

A project is a great way of organizing your work into a nice neat little package.  This package includes a working directory, Compile/Build command lines (where you tell us what to execute for your Compile/Build), which source files you want as part of the project, and a few other things.  Once you supply the editor with this information, you can do compiles/builds from within Visual SlickEdit and have your error messages automatically processed.  A tag file for all of the project's source files is automatically created and maintained so that you may navigate your source code (see section "Class Browser and section Dynamic Tagging) and use our Context Tagging™ features (see "Context Tagging(TM)).  A few other dialogs take advantage of your project source files such as the Load Files (Project menu), Find, Replace, and Print dialog boxes.

The Build menu allows you to execute the various project commands.  In addition, the button bar contains buttons to execute the Build and Compile project commands.  If you are using one of the version control systems we support (see "Version Control), you can easily keep your version control project in sync with Visual SlickEdit projects.  The data for each project is stored in a text file which has the extension ".vpj".

If you don't want to create a project and you are building something that only contains one source file,  you can define an extension based project.  Extension based projects are based on the extension (file type) of the current file.  However, the working directory is ignored for extension based projects.   All extension based projects are stored in the file "project.slk" (UNIX: "uproject.slk"). To define an extension based project, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...") select the extension and press the Project button.

When you create a project, you must either create a workspace or add the new project to the current workspace.

What is a Workspace?

The purpose of a workspace is to allow you to share projects in multiple workspaces and allow you to define dependencies between projects.  For example, building project A might depend on building project B first which is a utility libary linked with project A.  You may find that you only need one project for each of your workspaces.  In this scenario, workspaces don't help you.  One non-obvious feature you get with workspaces is compatibility with other vendor's workspaces.  Visual SlickEdit supports opening Visual C++ and Tornado workspaces.  This allows more seamless integration with these products.  The data for each workspace is stored in a text file which has the extension ".vpw".

Creating a Workspace and Project

If you are using Visual C++ or Tornado, you can create your workspaces and projects in these products and then open their workspace ("Project", "Open Workspace...") in Visual SlickEdit.  If you do this, you must use these products to add files to the project or add new projects to the workspace.

To create a workspace and project, invoke the "New..." menu item from the Project menu.  The New dialog box will appear:

Note that some packages such as Java ignore the executable name.

UNIX:  The UNIX and OS/390 versions list different compilers.

Select the appropriate package (or choose "None"), enter the project name, choose a directory, enter the executable name, and press the OK button.  You may see a different list of packages than the ones displayed.  Use the "Customize" button to modify or create project package configurations.  System defined packages are stored in "prjpacks.slk" (UNIX: "uprjpack.slk").  User modified or additional packages are stored in "usrpacks.slk".

Adding Files to a Project

Use the Project Properties dialog box ("Project", "Project Properties...") and select the Files tab to add source files to a project.  The top portion of the Files tab operates very similarly to the Standard Open dialog box.  Use Ctrl+Click to select more than one file in the files list box and then press the Add button to add the selected files into the Project Files list box.

Once you have added source files, a project tag file has already been built for you.  Your tag files are automatically updated when you make edits.  Now you can place your cursor on a call to a function (or another tag type depending on your language) and press Ctrl+Dot (or use "Search", "Go To Definition..." menu item) to go to a tag definition.    To "pop" back to where you were, simply press Ctrl+Comma (or use "Search", "Pop Bookmark..." menu item).

Setting Directories

To set the working directory, tag files, and include file search directories for the current project, use the project Directories tab on the Project Properties dialog box ("Project", "Project Properties...").

Working directory

When a project set active, the current directory is set to this directory if one has been specified.

Windows:  In addition, when you start a compile, the current directory is changed to the Working Directory.  To turn this feature off, use the Compile Options tab on the Project Properties dialog box ("Project", "Properties..", select the Compile Options tab) and uncheck the "Change to project directory" check box.

We are unable to support this feature under Windows 3.1.

Include directories

Specifies the directories the cursor_error (Alt+1) and next_error (Ctrl+Shift+Down) commands will search when trying to open a file.  Separate each directory with a semicolon (UNIX: colon).  You may want to add some of your own include directories here before your compiler's include directories.  Although it's not obvious from looking at the Project dialog box, you can specify environment variables with the syntax %(EnvVarName).

References file

You only need to fill in this text box if you are using Microsoft Visual C++ and you prefer to use a Visual C++ ".bsc" database file instead of our tag database when viewing references.  If you open a Visual C++ >=5.0 workspace and you have configured Visual C++ to generate a ".bsc" database file,  Visual SlickEdit will automatically configure this field.  See section "Viewing Symbol References for more information.

Setting Compile Commands

The Compile, Build, Rebuild, Debug, Execute, and user defined commands for the current project may be set on the Tools tab of the Project Properties dialog box ("Project", "Project Properties...").

You should see settings similar to those above if you selected the "Microsoft Visual C++ for 32 bit Windows" package.  If you are used to having your Compile command based on the current extension you are using, leave the Compile tool command line blank and set the extension specific project Compile command ("Tools", "Configuration", "File Extension Setup...", select the extension, "Project...").  When the current project does not have a Compile command defined, the extension specific Compile command is used.  Parts of the current buffer's name and a few other items (displayed using the menu to the right of each command) may be inserted into the various command lines.

Tool Name

Use the "Tool Name" combo box to select the tool for which you want to define the command line.  Click on the "New..." button to create a new tool to appear on the project menu.

For your convienced, we have defined the following tool aliases for performing some Java operations:

javamake	Uses the compile tool to compile all Java files in the project that need to be recompiled.  If your compile command specifies the "-d OutputDir" option, javamake will use this directory when looking for class files.

javarebuild	Uses the compile tool to compile all Java files in the project.

javamakedoc	Uses the javadoc tool to update HTML documentation for all Java files in the project.

javamakejar <CmdLine>

Uses <CmdLine> command to update the project Jar file.  All Java files in the project are compiled if necessary.  <CmdLine> must use a tool that is compatible with Suns JAR program.

Ex. "-javamakejar jar cvf myfile.jar -C morestuff  %{*.java;*.gif}"

javaviewdoc	Displays the HTML documentation for the current Java source file. The javadoc tool is used to update the HTML documentation if necessary.

vsbuild

vsbuild is a utility program which is used to compile files in a Visual SlickEdit project and process dependencies between projects.  It has a built-in "make" facility for checking dependencies for Java files.  For example, if "file1.java"references "file2.java" which references "file3.java" and "file3.java" is modified, then when you invoke the Build command "file1.java", "file2.java", "file3.java" will be recompiled.

The command line options for vsbuild are as follows:

vsbuild [-b <BufferName> -d -i <IncludeInfo> -v -r] [WorkspaceName] [ProjectName] [ToolName]

WorkspaceName	Name of workspace. Not required if there are no dependencies and ProjectName is specified.

ProjectName	Project file that is part of the workspace.  Defaults to the current project.

ToolName	Project tool to run for specified project and dependencies.

-b <BufferName>	Buffer name is the name of the current buffer in the editor

-d	Do not build, list dependencies.

-r	Use compile command to do rebuild.  Ex. "-r *.java" runs the compile command once where "%n%e" or "%f" is replaced with all files with extension java.

-v	Verbose mode.

-nodep	Do not process project dependencies.

-javamake	Use compile tool to compile all Java files in the project that need to be recompiled.

-javarebuild	Use compile tool to compile all Java files in the project.

-javamakedoc	Use javadoc tool to update HTML documentation for all Java files in the project.

-javamakejar <CmdLine>

This option must be last.  Use <CmdLine> command to update the project Jar file.  All Java files in the project are compiled if necessary.  <CmdLine> must use a tool that is compatible with Suns JAR program.

Ex. "-javamakejar jar cvf myfile.jar -C morestuff  %{*.java;*.gif}"

New...

Allows you to add a new tool to the Project Menu.    You can have different tools for each project.

Delete

Deletes the current tool.

Command line

This text box defines the command line which gets executed for the tool specified in the "Tool name" combo box.  Click on the button to the right of this text box to get a list of escape sequences (like "%f" which inserts the current buffer name) you can use to build your command line.

OS/390: The following are some sample command line compiles:

c89 -o %n.o -c %n.c	<-- Compile C source HFS file or data set.

c89 -o %n.o %n.s	<-- Compile Assembler source HFS file or data set.

c++ -+ -o %n.o %n%e	<-- Compile C++ source HFS file or data set.

Note that %n.<ext> and %f.<ext> have very special processing when applied to data sets.  In general, given "//ds.name.sourcext/member", %n.<ext> is translated to "//'ds.name.<ext>(member)'".  However, for convenience ".o" and ".s" are converted to ".obj" and ".asm" respectively which is the standard convention for c89 and c++.

Limitations:  c89 requires that the data set containing C source have a ".c" extension.  c89 requires that a data set containing assembler source have a ".asm" extension.  If this is too restrictive for you, use the vscomp.rexx script instead to run the C compiler.  The exact syntax for running this REXX script was not available at the time this document was written.  Create a new project and select the appropriate C compiler for sample command line strings.

UNIX:  If you are running text mode utilities, you may want to prefix the program name with "xterm -e " or "dos -w " (this waits for a key press) so you can see your program's output.  Don't do this when either "Output to process buffer" or "Capture output" is checked because your program's output can't be captured.  OS/390 does not yet provide an xterm program.

Menu caption

This text box defines the menu item text which appears on the Project menu.  Prefix the selection character with an ampersand ('&') character to choose the selection character.  If you have run out of selection letters, try using numbers.  For example, "&1 MyTool" picks 1 as the selection character.

Output to process buffer

This check box specifies that the command be run in Visual SlickEdit's concurrent process buffer.  The Build tab of the Output toolbar displays the process buffer.

Capture output

This check box specifies that the output of the command will be captured and processed with Visual SlickEdit's built-in error message processing facility.  The next_error (Ctrl+Shift+Down) and prev_error (Ctrl+Shift+Up) commands are used to go to the next and previous compilation error positions respectively.

UNIX:  We can't capture the output of text mode programs that are executed using xterm.

Clear process buffer

When checked, the process buffer output is cleared before the command is executed. The Build tab of the Output toolbar displays the process buffer.

Save current file

When on, the current file is saved before the command is executed.

Save all files

When on, all modified files are saved before the command is executed.

List modified files

When on, display a selection list of modified files and lets you choose files to save before the command is executed.

Save none

When on, no files are saved before the command is executed.

Change to project directory

When on, the current directory in the concurrent process buffer, and for Visual SlickEdit, is set to the project working directory before the command is executed.  This feature is not supported under Windows 3.1.

Hide if no command line

When this is checked, and the command line is blank, the menu item will not be displayed.  This feature is intended to save space on the project menu for blank command lines.

Stop after dependency or build error

When this is checked, and the current project depends on other projects, the vsbuild utility is used to build your projects and check for error codes.  When the vsbuild program detects an error, it does not continue building other dependencies.  Note that under Windows 95 or later, vsbuild can not detect error codes returned from a batch program.

Configurations

The Configurations tab allows you to specify the specific target you want to build. The most common use of configurations is to allow you to build a debug or release version without having to define a new project.  Changing the configuration will have no effect unless you use the "%b" (current configuration) escape sequence in your build command.  You can set the active configuration with the Set Active Configuration menu item ("Build", "Set Active Configuration").

If you open a Visual C++ version >=5.0 workspace, your configurations are automatically retrieved from your Visual C++ project.  Some typical configurations for Visual C++ version >=5.0 are "CFG=MyApp - Win32 Debug" and "CFG=MyApp - Win32 Release".  Use Visual C++ to change your configurations.

If you are using a make program, define a macro like CFG which is the configuration you want to build.  Then add code to your makefile to check for this macro and perform some different statements like choosing different compile options, and a different directory for object files.  The makefiles exported from Visual C++ already define a CFG macro.  For a standard make program you will need to use the "name=value" syntax when passing a macro to the make program.

Open Command

The Open Command tab allows you to enter Visual SlickEdit commands that are executed when you activate a project.  Each line contains a Visual SlickEdit command just as you would type it on the Visual SlickEdit command line.  Typically, the set command is used to set environment variables (see "Setting Environment Variablesfor more information).  Under Windows NT or Windows 95 and later, you can set environment variables in the concurrent process buffer by using set command  For example, the command "set xxx=yyy" inserts the command "set xxx=yyy" into the concurrent process buffer.  Unfortunately, our concurrent process buffer for Windows 3.1 does not support this.  Under UNIX, you can set environment variables in the concurrent process buffer.  However, the command syntax for setting environment variables depends on the shell you are using.  Use concur_command to send a command string to the concurrent process buffer (ex.  "concur_command export name=value").  This button is disabled for extension based projects.


Compiling From Within the Editor

The Project menu contains all the commands related to compiling from within the editor.

Visual SlickEdit provides the commands project_compileand project_buildfor compiling.  The project_compile command (Shift+F10 or "Build", "Compile") compiles the current buffer based on a Compile command you specify.  Alternately, the project_build command (Ctrl+M or "Build", "Build") executes a Build command you specify.  Both of these commands may be specified per-project or per-file extension.  Before you can execute the Build or Compile commands you must set the current project or define an extension-based project.  To define an extension-based project command, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...") to select the extension, and then press the Project button.  You will probably want your Build command to be based on the current project and not the current extension.  Use the workspace_new command ("Project", "New...") to create a workspace or project.  See "Projects for more information.  If the current project has a Compile command defined, the extension specific project Compile command will be ignored.

By default, the Compile or Build command is executed in Visual SlickEdit's concurrent process buffer (named ".process") which is displayed in the Build tab of the Output toolbar.  This allows you to continue editing while your compiler runs.  You can process the error messages as they appear in the concurrent process buffer instead of waiting until the compile(s) finish.  The stop_process command("Project", "Break Process") may be used to send a control break signal to stop your compiler running in the concurrent process buffer.

Execute the next_error command (Ctrl+Shift+Down,  or "Build", "Next Error") to place your cursor on the line of the file containing the next error.  Click on the Build tab of the Output toolbar (docked on the bottom by default) to view all your compilers error messages.   You may use the cursor_error command (Alt+1, Double-click or "Build", "Go to Error/Include") to set the next error starting search position and go to a specific error.

The cursor_error and next_error commands may also be used to process messages from the grep (UNIX: sgrep) program we provide.  For example, activate the concurrent process buffer ("Project", "Activate Process") and type "grep main *.c" (UNIX: "sgrep main *.c") and press ENTER.  You may now press Ctrl+Shift+Down to cursor through the located occurrences.   Press the PGUP key to move the cursor off the concurrent process buffer command prompt so you may use the cursor_error command (Alt+1 or Double-click) on a specific occurrence.

Adding Support for Other Error Messages Formats

We support many error message formats.  If we don't already support the error message format that is output from your compiler, you can add it if the compiler outputs at least the filename, line number, and the message on the same line.

Let's say your compiler error message format is as follows:

linenum, filename: message

Here are the steps to add support for the above error message format:

1.	Define a MicroEdge regular expression (see section "MicroEdge Regular Expressions) which matches the above. The first character of the regular expression must be the '^' character, which matches the beginning of a line.

The regular expression "^:i, :p\:?*$" will match this message.

2.	Place curly braces around the filename, line number, column number, and message parts of the regular expression to signify the tagged expressions.  In our case, there is no column number so we don't have to do anything for that part.

The resulting regular expression is:  "^{:i}, {:p}\:{?*}$"

3.	Number the tagged expressions so that the filename is tagged expression 0, line number is tagged expression 1, column number is tagged expression 2, and the message is tagged expression 3.

The resulting regular expression is:  "^{#1:i}, {#0:p}\:{#3?*}$"

4.	Use the gui_set_var command ("Macro", "Set Macro Variable") to set the macro variable "def-error-re2" to the value of this regular expression.  You may replace the current contents.

5.	Load the "error.e" macro module ("Macro", "Load Module...") so the error searching macro can reinitialize.


Syntax Expansion and Indenting

Visual SlickEdit provides syntax expansion for the languages C, C++, Java, Delphi, Pascal, AWK, REXX, Perl, JavaScript, PV-WAVE, COBOL, dBASE, FORTRAN, Ada, Modula-2, PHP, Tcl, and Slick-C.  When you type a keyword such as for and press SPACE BAR, a template is inserted.  This is called syntax expansion.  For the C language, you would see the  following text expansion:

       for() {

       }

Loop, if and switch/case structures are expanded as well.    You DO NOT have to type the entire keyword for syntax expansion to occur.  If there is more than one keyword that matches what you have typed, a list of possible keyword matches is displayed.  To get the C template above you could just type "f" followed by SPACE BAR.  To define a new keyword and expansion value, use the Alias Editor dialog box ("Tools", "Configuration", "File Extension Setup...", pick the extension you want to change, press the "Alias..." button).  SPACE BAR will only expand an alias if is the first word on a line.

Options

Various syntax expansion options such as the brace style, and Minimum Expandable Keyword Length are accessed by pressing the "Options..." button on the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").  If our syntax expansion options don't provide what you want or you want to add syntax expansion for a new keyword, define an extension specific alias  ("Tools", "Configuration", "File Extension Setup...", pick the extension you want to change, press the "Alias..." button).  See section "Extension Specific Aliases for more information.

To turn off syntax expansion, uncheck the "Syntax Expansion" check box  ("Tools", "Configuration", "File Extension Setup...", pick the extension you want to change)

Syntax Indenting

When the ENTER key is pressed while editing a source file, Visual SlickEdit will indent to the next level if the cursor is moved inside a structure block.  This is called syntax indenting.  For example, if you edit a C file and the cursor is on a line containing "for (;;){" and you press ENTER, a new line will be inserted and the cursor will be indented four spaces in from the 'f' character in for.  The syntax indent amount may be changed in the Extension Options dialog box ("Tools", "Configuration", "File extension setup..", pick a file extension, "Syntax Indent").


Begin/end Structure Matching

Visual SlickEdit supports begin/end structure matching for the C++, C, Java, Perl, JavaScript, PL/SQL, PL/I, AWK Delphi,, REXX, Assembler, Modula-2, dBASE, Pascal, InstallScript, Tcl, PHP, and Slick-C languages.  When the cursor is placed on a begin or end keyword pair for one of these languages and you invoke the find_matching_paren command (Ctrl+] by default or "Tools", "Match Paren"), the cursor is placed on the opposite end of the structure.  The find_matching_paren command also supports matching parenthesis pairs {},[] and ().  See section "Paren match style for information on additional parenthesis matching features.  Use the Extension Options dialog box to view the begin/end pairs for any language ("Tools", "Configuration", "File Extension Setup...", select the extension).  You may add begin/end structure matching support for other languages by specifying a pseudo regular expression.  See section "Extension Options dialog box for more information.


Embedded Languge Support

Visual SlickEdit recognizes languages embedded in HTML, COBOL, Perl scripts, and UNIX shell scripts.  When editing embedded languages, all language sensitive features are supported, including Context Tagging™, SmartPaste™, syntax expansion, syntax indenting, and color coding.   In fact, our tagging features pick up embedded tags.  For example, the Procs tab on the Project toolbar will display function names if any exist.  Embedded language colors are user-definable.

Embedded Languages in HTML

Visual SlickEdit supports any embedded language in HTML, except HTML.  However, Web browsers typically only support VBScript, JavaScript, and/or Java, while web servers typically support VBScript, Java, or PHP.

The following example illustrates VBScript, JavaScript, and Java embedded in HTML:

Embedded Languages in Perl or UNIX shell scripts

To allow Visual SlickEdit to recognize embedded source in a UNIX shell/Perl script, just prefix your Here Document terminator with our color coding lexer name.

Perl Example

The above example illustrates HTML embedded in a Perl script.  Cool, huh?! Unknown languages are color coded in string color.


Version Control

Visual SlickEdit has support for the following version control systems: PVCS, SourceSafe, ClearCase, TLIB, RCS, ComponentSoftware RCS, MKS Source Integrity, Perforce, StarTeam, CCC/Harvest, and SCCS.

SCC Version Control Systems (Windows only): Visual SlickEdit supports interfacing with version control systems that have support for an SCC interface.  If you are using PVCS, we recommend you install the SCC interface support.  PVCS does not install SCC support by default.  SourceSafe automatically installs SCC support.  The following version control systems have SCC interfaces, but, if they do not show up in the SCC Providers list(or the SCC Providers list does not appear), you may have to install the support separately: ComponentSoftware RCS, ClearCase, MKS Source Integrity, StarTeam, and CCC/Harvest.

What is SCC?

SCC is the Source Code Control interface specification, originally designed by Microsoft.  This interface allows for direct communication between a version control system, and another application(in this case, Visual SlickEdit).  If you are using a system that supports SCC, we suggest you use the SCC support, as it provides tighter integration.  If your system does not have an SCC interface installed, we suggest you contact the manufacturer to be sure that an SCC interface is not available.  If your version control system has an SCC interface, but does not seem to behave properly, please contact our techincal support.  Because many providers implemented their SCC support differently, we occasionally run into a system that does not work.  We will do our best to support all version control systems.

Note: We are currently removing SourceOffsite from our SCC Provider list, with Sourcegear's permission.  This is because they are currently focusing their efforts on supporting Visual Studio products, and the support that is there could potentially crash Visual SlickEdit.

Opening an SCC Version Control System Project

To open an SCC version control project, go to the Version Control Setup dialog ("Tools", "Version Control", "Setup..").  Be sure that "SCC providers" is checked.  If only the"Command line systems" frame appears, no SCC systems are installed.  Select the desired system, and click "Initialize Provider".  Next, click "Open Project".  This will show an Open Project dialog that will vary from system to system.  Here are some pointers for the systems where the desired items are not obvious:

•	Source Integrity: For "SI Project Filename", give the whole path to the "project.pj" file, for "Sandbox Path", give the path where the files are located on the local machine.

•	Perforce: For "Client Name", give the name of the Perforce depot(for example, "//depot").  For "Local Path", give the path where the files are located on the local machine.

•	StarTeam: For "StarTeam Project Name", type the name of the StarTeam project. For "Local Path", give the path where the files are located on the local machine.  You will then be prompted for more information by StarTeam.

Once you have opened an SCC version control project, it will be bound to the currently active Visual SlickEdit project.  When you restart Visual SlickEdit, or switch to this project from another project, this  version control project will automatically be activated.

Command Line Version Control Systems

If you are on a non-Windows platform, or are using a version control system that does not support SCC, the version control system must have a command line interface. To open setup a command line version control system, go to the Version Control Setup dialog ("Tools", "Version Control", "Setup..").  Be sure that "Command line systems" is checked. Select the desired system.  If you are using a version control system that is not supported, see "Adding Support for New Version Control Systems" below.  You should click on "Setup", and look at each command to see that it matches the options you want.  If you are not sure what any of the %<character> macros expand to, click on the arrow to the right of the textbox to view a list.  You will need to be sure that the executable for each VC Command is in your PATH.

Please let us know what additional features you would like in our version control support, and what other version control systems you would like supported.

PVCS Command Line Interface Notes

If you are using PVCS, there is typically no need to switch version control projects since the source files are placed in the same directory as the archive files.  In some PVCS configurations, you will want to set some environment variables when you switch Visual SlickEdit projects.  To do this, use the "Project Properties..." menu item on the Project menu, select the Open Command tab, and enter one or more set statements to set the environment variables.  You will need to close and reopen the project for the project macro to get executed.

Version Control commands are accessed from the Version Control Menu "Version Control

Version Control Operations:

The History, Difference, Lock, and Properties commands operate on the current buffer.  For SCC version control systems, Visual SlickEdit simply calls the SCC provider's function for these.  For command line version control systems, Visual SlickEdit runs the specified command, captures the output, and displays it.

The Check In, Get, Check Out, Unlock, Add, and Remove commands show a dialog box, and operate on all files selected.  This dialog will allow you to easily choose from files currently open, the files in the current project, or files in the current workspace.  Also, for SCC version control systems, you can select from files that are valid for that command.  For instance, when using the Check In command, you can click on "Available" to view all files that can currently be checked in.

The Manager command is used to bring up the version control system's user interface.  For many command line systems there will not be a program to call for this.

Menu items that appear grayed out for a command line version control system are blank.  For SCC version control systems, "Lock" is always grayed because the SCC interface does not make allowances for a lock command.  It is possible to get an "Opereation not supported" message when running some commands if an SCC version control system does not implement an interface to that operation.


Adding Support for Other Languages

Use our Color Coding Setup dialog box ("Tools", "Configuration", "Color Coding...") to set up language specific color coding for a new language (see section "Color Coding for more information).  Begin/end structure matching may often be added using the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").  Other language support such as tagging, syntax expansion, and syntax indenting will require writing Slick-C or DLL source code.  You can define extension specific aliases (see section "Alias Facility for more information) to provide syntax expansion.

To add simple tagging for another language, read the comment at the beginning of the macro module "tags.e" and look at the "prg_proc_search" function in "prg.e" (only 20 lines of code!).  To add Context Tagging for another language, contact our technical support and they will send you some sample code.  Note that implementing Context Tagging for a new language can take anywhere from 1 week to 3 months depending upon the language.

To add syntax expansion and indenting, follow these steps:

1.	Use the "prg.e" macro as a template.  Make a copy of it and give it another name.

2.	Change the #define constants EXTENSION and MODE_NAME near the top of the file to reflect the new extension and mode name respectively.  DON'T USE ANY SPACE CHARACTERS IN THESE CONSTANTS.

3.	Change the name of the first 5 characters of the _command functions "dbase_mode", "dbase_enter", and "dbase_space" to use the value you gave the MODE_NAME constant in step 2.

4.	Modify the prg_expand_enter function to provide the ENTER key support you want.

5.	Modify the prg_expand_space function to provide the SPACE BAR key support you want.  If you can rely on extension specific aliases, follow the comment in this function.

6.	Use the load command ("Macro", "Load Module...") to load the new macro module you have written.

The hardest of these steps are 4 and 5 since they may require you to have a good understanding of the Slick-C language and what this specific macro is doing. See section "Slick-C Language for more information. Call or email our technical support if you need help learning Slick-C.  Please send useful language support you have added to us so we may distribute it to other users.


Search and Replace

To get on-line help on searching keys, press Alt+H, 'K', and select "Searching".

Visual SlickEdit provides a very rich set of searching capabilities, many of which are available on the Search menu ("Search").  Besides the commands found on the Search menu ("Search"), there is an incremental search command (i_search) which will search for a string as you type it.  Both our Find and Replace dialog boxes support searching multiple files and/or buffers.  In addition, you may use the file manager to perform a search and replace on multiple files.  Last but not least, you can use our grep (UNIX: sgrep) utility program to search through multiple files.

Incremental Searching

Find Dialog Box

/ command

Searching for the Next Occurrence

Replace Dialog Box

Search and Replacing Variables

c command

Multiple File Search and Replace

Regular Expressions


Incremental Searching

The fastest way to search for a string in Visual SlickEdit is to use incremental searching.  During an incremental search, Visual SlickEdit will search for a string as you type it.  You rarely need to type the entire string to get to the first occurrence.  The i_search command(Ctrl+I) starts a forward incremental search.  The reverse_i_search command(Ctrl+Shift+I) starts a reverse incremental search. The following keys take on a different definition during an incremental search:

Ctrl+R	Searches in reverse for the next occurrence of the search string.

Ctrl+S	Searches forward for the next occurrence of the search string.

Ctrl+T	Toggles regular expression pattern matching on/off.  See section "Regular Expressions for information on regular expressions.

Ctrl+W 	Toggles word searching on/off.  The default word characters are "A-Za-z0-9_$" and may be changed with the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").  See section "Search and Replacing Variables for information on changing the names of variables.

Ctrl+C	Toggles case sensitivity.  The key bound to the BRIEF emulation command case_toggle will also toggle the case sensitivity.

Ctrl+M	Toggles searching within selection.

Ctrl+O	Toggles incremental search mode.

Ctrl+Q	Quotes the next character typed.

Incremental searching stops when a key that does not insert a character is pressed.  The ESC may be used to terminate an incremental search (only during prompting).  Press and hold Ctrl+Alt+Shift to terminate a long search.  Your previous search string may be retrieved by invoking the i_search or reverse_i_search command and pressing Ctrl+S or Ctrl+R before entering a search string.


Find Dialog Box

 (Ctrl+F or "Search", "Find..." or gui_find command)

See Regular Expressions or MicroEdge Regular Expressions for information on regular expressions.

The Find dialog box (Ctrl+F or "Search", "Find...") searches for the string you specify.  Press and hold Ctrl+Alt+Shift to terminate a long search.  The picture below is how the Find dialog box appears after pressing the "File/Buffers" button:

When the Find dialog box first appears, the options you used for your last search are displayed.  This provides you a way to repeat your last search.  In addition, you can press F7 and F8 to retrieve previous and next responses respectively to this dialog box.

Search For

Enter the string you want to search for here.  Previous search strings may be retrieved from this combo box list.  Note that ISPF search expressions can not be used here.

Direction

Set the appropriate radio button Forward or Backward to perform a search towards the bottom of the buffer or the top of the buffer respectively.

Match case

When checked, a case sensitive search is performed.

Match whole word

When checked, a word search is performed.  Before a search is considered successful, the characters to the left and right of the occurrence of the search string found are checked to be non-word characters.    The default word characters are [A-Za-z0-9_$] and may be changed by the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").

Regular expression

When checked, a regular expression search is performed.  See section "Regular Expressions for more information.

Wrap at beginning/end

When checked, the search will always be performed on the entire buffer starting from the cursor.

Restrict to selection

Limits the search to the selected text.  This check box is disabled if no text in the current buffer is selected.

Place cursor at end

When checked, the cursor is placed at the end of the occurrence found.

List all occurrences

When checked, a list of all occurrences of the search string found in the current buffer is displayed.  You may choose to go to a specific occurrence.

No Color Coding

Clears color coding search options.

Color Coding

Displays Color Coding Search Options dialog box.  This feature is only supported for languages for which Visual SlickEdit has color coding elements defined.  One of the more obvious uses for this dialog is to search for something that does not start in a comment or string.  For example, if you use printf or some other function to help debug your programs, turn off "Comment" and "String" to search for function not in a comment or string.  Note that only the color coding for the first character is checked.  You need to combine word searching with "Keyword" color coding to search for the keyword "if".

Files/Buffers

This button expands or unexpands the dialog box.  When the dialog box is expanded, and the Files text box and/or the Buffers list box have something specified, a multiple file and/or buffer search is performed.

Subdirectories

Indicates whether searching for file specified in the Files text box traverses subdirectories.

Files

Specifies files on disk to be searched.  If the file has already been opened (i.e. is a buffer), the buffer is searched.  You can specify wildcards ("*.c *.h") in this text box.

Buffers

Specifies one or more buffers to search through.  Press Ctrl+Click to select multiple buffers.

Search all project files

When checked, all files in the current project are searched in addition to other files/buffers specified.  BEWARE, you may end up searching a file twice if you specify other files/buffers in addition to your project files.

List filenames only

When checked, only filenames and not occurrences are listed in the multi-file search output.

Append to List

When checked, multi-file search information is appended to the existing multi-file search results.

Output to MDI Child

When checked, output is send to an MDI child edit window instead of the Search tab of the Output toolbar.

Prompted

When checked, you are prompted whether to continue searching when an occurrence is found.

Single

When checked, your cursor is placed on the first occurrence found, but the remaining files are not searched.

Global

When checked, all files are searched for occurrences without prompting.

Invert

Click on the Invert button to select all buffers in the Buffers list box that are currently not selected and deselect all files which are selected.

Clear

Deselects all buffers in the buffer list.


/ command

If you prefer using the command line to perform a search, you can use the  / or find command which provide you with the same functionality as the Find dialog box.    Press the ESC key to toggle the cursor to the command line.

The syntax of the / command is:

      /string[/OptionLetters]

The syntax of the find command is:

     find  /string[/OptionLetters]

OptionLetters is one or more of the following option letters:

E	Exact case.

I	Ignore case.

-	Reverse search.

M	Limit search to selection.

<	If found, place cursor at beginning of word.

>	If found, place cursor at end of word.

R	Interpret search string as a MicroEdge regular expression.  See section "MicroEdge Regular Expressions for syntax of regular expression.

U	Interpret search string as UNIX regular expression.  See section "UNIX Regular Expressions for syntax of UNIX regular expressions.

B	Interpret string as a Brief regular expression.   See section "Brief Regular Expressions for syntax of Brief regular expressions.

N	Do not interpret search string as a regular expression.

P	Wrap to beginning/end when string not found.

W	Limits search to words.  Used to search for variables.  See section "Search and Replacing Variables for information on changing the names of variables.

W=MicroEdge-regular-expression

Specifies the valid characters in a word.  The default value is [A-Za-z0-9_$].  To change the word characters for a specific extension, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").

W:P	Limits search to word prefix.  For example, searching for "pre" matches "pre" and "prefix" but not "supreme" or "supre".

W:PS	Limits search to strict word prefix.  For example, searching for "pre" matches "prefix" but not "pre", "supreme" or "supre".

W:S	Limits search to word suffix.  For example, searching for "fix" matches "fix" and "sufix" but not "fixit".

W:SS	Limits search to strict word suffix.  For example, searching for "fix" matches "sufix" but not "fix" or "fixit".

H	Allow finding search string in hidden lines.

Y	Binary search.  This allows start positions in the middle of a DBCS character (only affects operating systems configured for DBCS operation).  This option is useful when editing binary files which may contain characters which look like DBCS but are not.  For example, if you search for the character 'a', it will not be found as the second character of a DBCS sequence unless this option is specified.

,	(comma) Delimeter to separate ambiguous options.

XCCLetters

Requires the first character of search string NOT be one of the color coding elements specified. For example, "XCS" requires that the first character not be in a comment or string. CCLetters is a string of one or more of the following color coding element letters:

O	Other

K	Keyword

N	Number

S	String

C	Comment

P	Preprocessing

L	Line number

1	Symbol 1

2	Symbol 2

3	Symbol 3

4	Symbol 4

F	Function color

V	No save line

A	Attribute

CCCLetters

Requires the first character of search string to be one of the color coding elements specified. See CCLetters above.

Default search options may be set by the Search tab ("Tools", "Configuration", "General...", select Search tab).

If you use the find command, the first non blank character is used as the delimiter.  See previous section for information on option letters.

Example

/if/xcs,w	Search for word delimited string "if" where the first character is not in a comment or string. For most languages this will find the if keyword.

/if/ck,w	Search for word delimited string "if" where the first character is a keyword.  For most languages this will find the if keyword.

/xyz/-  	Search for string "xyz" using default search case in reverse.

find /xyz/-  	Search for string "xyz" using default search case in reverse.  Note that prefixing the string "/xyz/-" with find has no effect on this command because the first non-blank is a delimeter.

find $xyz$-  	Search for string "xyz" using default search case in reverse.  The find command can change the string delimiter which in this case is not necessary.

find $/$             	Search forward for the character slash.  The find command has been used so that the string delimiter could be changed to $ which allows searching for the / character.

find $/$-           	Search backward for the character slash.

/i/wxcs              	Search for the variable i not in comment and not in a string.

/xyz/e	Search for "xyz" in exact case.

When no parameters are specified, you are prompted for the string parameter.  While you enter the string parameter, the following keys take on a new meaning:

Ctrl+R	Searches in reverse for the next occurrence of the search string

Ctrl+S	Searches forward for the next occurrence of the search string.

Ctrl+T	Toggles regular expression pattern matching on/off.  See section "Regular Expressions for information on regular expressions.  The key bound to the BRIEF emulation command re_toggle will also toggle regular expression pattern matching.

Ctrl+W 	Toggles word searching on/off.  The default word characters are "A-Za-z0-9_$".  To change the word characters for a specific extension, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").  See section "Search and Replacing Variables for information on changing the names of variables.

Ctrl+C	Toggles case sensitivity.  The key bound to the BRIEF emulation command case_toggle will also toggle the case sensitivity.

Ctrl+M	Toggles searching within selection.

Ctrl+O	Toggles incremental search mode.

Ctrl+Q	Quotes the next character typed.


Searching for the Next Occurrence

After using any of the search commands, you can search for the next and previous occurrences by pressing Ctrl+G ("Search", "Next occurrence") and Ctrl+Shift+G ("Search", "Previous occurrence") respectively.


Replace Dialog Box

 (Ctrl+R or "Search", "Replace..." or gui_replace command)

See Regular Expressions, UNIX Regular Expressions, or MicroEdge Regular Expressions for information on regular expressions.

See Search and Replace With Regular Expressions for information on specifying tagged expressions and ASCII codes in the replace string.

The Replace dialog box (Ctrl+R or "Search", "Replace...") performs a search and replace.  This command searches for the string specified in the "Search For:" text box and replaces it with the string specified in the "Replace With:" text box.    Press and hold Ctrl+Alt+Shift to terminate a long search.  This dialog box is identical to the Find dialog box except for the Replace All button and the Preserve case check box.  See section "Find Dialog Box for information on other options of this dialog box.

Press the Replace All button instead of the OK button if you do not want to be prompted when replacing.  When an occurrence of the search string is found after pressing the OK button, a dialog box with Yes, No, Last, Go, and Quit buttons is displayed.  Type the letter 'Y' to do the replace, 'N' to skip this occurrence and search for the next occurrence, 'L' to do the replace and cancel the search, 'G' to replace all occurrences without prompting any more, or 'Q' to cancel the search.

Preserve case

When preserve case is checked, each occurrence found is checked for all lower case, all upper case, first letter capitalized or mixed case.  The replace string is converted to the same case as the occurrence found except when the occurrence found is mixed case (possibly multiple capitalized words).  In this case, the replace string is used without modification.

When the Replace dialog box first appears, the options you used for your last search are displayed.  This provides you a way to repeat your last replace.  In addition, you can press F7 and F8 to retrieve previous and next responses respectively to this dialog box.


Search and Replacing Variables

The Replace dialog box may be used to replace occurrences of variables.  For example, to replace occurrences of the variable "i" to "something_more_meaningful", Press Ctrl+R, type "i" in the Search For text box, type "something_more_meaningful", check the Match Whole Word check box, and press ENTER.


c command

If you prefer using the command line to perform a search and replace, you can use the c command which provides you with the same functionality as the Replace dialog box.  Press and hold Ctrl+Alt+Shift to terminate a long search.  Press the ESC key to toggle the cursor to the command line.

The syntax of the c command is:

c /string1/string2[/OptionLetters]

OptionLetters may specify one or more of the following letters:

E	Exact case.

I	Ignore case.

-	Reverse search.

M	Limit search to selection.

V	Preserve case. When specified, each occurrence found is checked for all lower case, all upper case, first word capitalized or mixed case.  The replace string is converted to the same case as the occurrence found excepted when the occurrence found is mixed case (possibly multiple capitalized words).  In this case, the replace string is used without modification.

<	If found, cursor is positioned at beginning of word.

>	If found, cursor is positioned at end of word.

R	Regular expression search and replace.  See section "MicroEdge Regular Expressions for syntax of regular expression.

U	UNIX regular expression search and replace.  See section "UNIX Regular Expressions for syntax of UNIX regular expressions.

B	Interpret string as a Brief regular expression.   See section "Brief Regular Expressions for syntax of Brief regular expressions.

W	Limits search to words.  Used for search and replacing variables.

W=MicroEdge-regular-expression

Specifies the valid characters in a word.  The default value is [A-Za-z0-9_$].To change the word characters for a specific extension, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").

W:P	Limits search to word prefix.  For example, searching for "pre" matches "pre" and "prefix" but not "supreme" or "supre".

W:PS	Limits search to strict word prefix.  For example, searching for "pre" matches "prefix" but not "pre", "supreme" or "supre".

W:S	Limits search to word suffix.  For example, searching for "fix" matches "fix" and "sufix" but not "fixit".

W:SS	Limits search to strict word suffix.  For example, searching for "fix" matches "sufix" but not "fix" or "fixit".

*	Change all occurrences without prompting.

H	Allow finding search string in hidden lines.

Y	Binary search.  This allows start positions in the middle of a DBCS character (only affects operating systems configured for DBCS operation).  This option is useful when editing binary files which may contain characters which look like DBCS but are not.  For example, if you search for the character 'a', it will not be found as the second character of a DBCS sequence unless this option is specified.

,	(comma) Delimeter to separate ambiguous options.

XCCLetters

Requires the first character of search string NOT be one of the color coding elements specified. For example, "XCS" requires that the first character not be in a comment or string. CCLetters is a string of one or more of the following color coding element letters:

O	Other

K	Keyword

N	Number

S	String

C	Comment

P	Preprocessing

L	Line number

1	Symbol 1

2	Symbol 2

3	Symbol 3

4	Symbol 4

F	Function color

V	No save line

A	Attribute

CCCLetters

Requires the first character of search string to be one of the color coding elements specified. See CCLetters above.

Default search options may be set by the Search tab ("Tools", "Configuration", "General...", select Search tab).

If the '*' option is not specified, you will be prompted with the message "Yes/No/Last/Go/Quit/Suspend?" for each occurrence of the "Search for:" string.   Press one of the following keys to take an action:

'Y' or SPACE

Make change and continue searching.

'N' or BACKSPACE

No change and continue searching.

'L' or .	Make change and stop searching.

'G' or !	Make change and change the rest without prompting.

'Q' or ESC	Exits command.  By default, the cursor is NOT restored to its original position.  If you want the cursor restored to its original position, turn on the "Restore cursor after replace" check box on the Search tab ("Tools", "Configuration", "General...", select Search tab).

'S'	Suspend change and replace.  Invoke the resume command to restart the search and replace from the new cursor position.  Only one level of suspension is allowed.  Therefore you must issue the resume command before you can use the suspend option in a new search and replace command.  This is an advanced option which allows you to edit the area where the string was found any way you like and then resume the command.

Ctrl+G	Exits command and restores cursor to its original position.

Ctrl+R	Searches in reverse for next occurrence of search string.

Ctrl+S	Searches forward for next occurrence of search string.

Ctrl+T	Toggles regular expression pattern matching on/off.  The key bound to the BRIEF emulation command re_toggle will also toggle regular expression pattern matching.  See section "Regular Expressions for more information.

Ctrl+W	Toggles word searching on/off.  To change the word characters for a specific extension, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").

Ctrl+C	Toggles case sensitivity.  The key bound to the BRIEF emulation command case_toggle will also toggle the case sensitivity.

Ctrl+M	Toggles searching within selection.

F1 or '?'	Displays help on Replace dialog box.

No space character is needed between the 'C' and the '/' delimiter UNLESS you use a delimiter other than '/'.  You may use any character except space as the delimiter.  For example, "c $/$\$" replaces occurrences of forward slashes with back slashes.

Examples

c/x/y/m	Replace occurrences of x in the selected area with y using default search case sensitivity.

c $x$y$m	Replace occurrences of x in the selected area with y using default search case sensitivity.  The string delimiter $ has been used requiring a space character after the C.

c/x/y/e*	Replace lower case occurrences of x with y without prompting.

c/i/something_more_meaningful/w

Replace occurrences of the variable i with something_more_meaningful

c/i/j/w=[A-Za-z]	Replace occurrences of the word i with j and specify valid characters in a word to be alphabetic characters.


Multiple File Search and Replace

The Find dialog box and the Replace dialog box both allow you to perform searches across multiple files and/or buffers.  Click on the "File/Buffers >>" button to view these additional options of the Find and Replace dialog boxes.  Alternately, you may perform a search and replace while in the Visual SlickEdit file manager.  This allows you to be more selective about which files to operate on.  Use the fileman command ("File", "File Manager") to start the file manager.  Select the files with SPACE BAR or the file manager select menu ("File", "File Manager", "Select"), and then invoke the fileman_replace command (Ctrl+Shift+G or "File", "File Manager", "Global Replace...").

You may like using our grep (UNIX: sgrep) utility in the concurrent process buffer to perform a search (without replace) through multiple files instead of using the Find dialog box.  Use the start_process command (Ctrl+Shift+M or "Build", "Activate Process") to start the concurrent process buffer.  Then run our grep (UNIX: sgrep) program to search the files (run the program with no arguments for help on arguments).  For example, the command "grep -w buffer_list *.c" will perform a word search for the variable buffer_list in all files with extension ".c".  Since our grep program outputs the filename, line number, and column position, you can use the next_error (Ctrl+Shift+Down or "Build", "Next Error"), or cursor_error command (Alt+1, Double-click, or "Build", "Go to Error/Include") to place your cursor in the file(s) containing the occurrences.

Another way to perform a search through multiple files, is to run our grep (UNIX: sgrep) program from the Visual SlickEdit command line and prefix the command with "dos -e ".  For example, the command "dos -e grep -w buffer_list *.c" will perform a word search for the variable buffer_list in all files with extension ".c".  If any occurrences are found, your cursor will be placed in the file containing the first occurrence found after the grep (UNIX: sgrep) program finishes searching.


Regular Expressions

UNIX Regular Expressions

MicroEdge Regular Expressions

Brief Regular Expressions

Search and Replace With Regular Expressions

Tagged Search Expressions

Minimal Versus Maximal Matching

Sometimes searching for a string literal is too limiting.  For instance, you can't search for a quoted string, a blank line, a word starting at the beginning of a line, or two words separated by any number of spaces.  A regular expression can describe these search strings and many more.

All search commands support regular expressions.  The Find and Replace dialog boxes have a Regular Expression check box for turning on regular expression searching.  The key Ctrl+T toggles regular expression searching  on/off while an incremental search is in progress (see section "Incremental searching).  The search commands / and find take 'R' and 'U' options to interpret the search string as a regular expression (see section "/ command).  The search and replace command c also takes 'R', 'U', and 'B' options to specify a regular expression (see section "c command).

Visual SlickEdit supports three syntax of regular expressions:  UNIX regular expressions, MicroEdge regular expressions (see "MicroEdge Regular Expressions), and Brief regular expressions (see "Brief Regular Expressions).  All syntax have the same features.  In order to accomplish this, we made several enhancements to the UNIX and Brief syntax.  Select the regular expression syntax from the Search tab on the General Configuration dialog box (Other, "Configuration", "General...").


UNIX Regular Expressions

UNIX regular expressions are defined as follows:

^	Matches beginning of line.

$	Matches end of line.

.	Matches any character except newline.

X+	Maximal match of one or more occurrences of X.  See section "Minimal Versus Maximal Matching for more information on minimal and maximal matching.

X*	Maximal match of zero or more occurrences of X.

X?	Maximal match of zero or one occurrences of X.

X{n1}	Match exactly n1 occurrences of X.

X{n1,}	Maximal match of at least n1 occurrences of X.

X{,n2}	Maximal match of at least 0 occurrences but not more than n2 occurrences of X.

X{n1,n2}	Maximal match of  at least n1 occurrences but not more than n2 occurrences of X.

X+?	Minimal match of one or more occurrences of X.

X*?	Minimal match of zero or more occurrences of X.

X??	Minimal match of zero or one occurrences of X.

X{n1}?	Match exactly n1 occurrences of X.

X{n1,}?	Minimal match of at least n1 occurrences of X.

X{,n2}?	Minimal match of at least 0 occurrences but not more than n2 occurrences of X.

X{n1,n2}?	Minimal match of  at least n1 occurrences but not more than n2 occurrences of X.

(?!X)	Search fails if expression X is matched.  The expression ^(?!if) matches the beginning of all lines that do not start with if.

(X)	Matches sub-expression X and specifies a new tagged expression.  See section "Tagged Search Expressions for more information.  No more tagged expressions are defined once an explicit tagged expression number is specified as shown below.

(?dX)	Matches sub-expression X and specifies to use tagged expression number d where 0<=d<=9.  No more tagged expressions are defined by the sub-expression syntax "(X)" once this sub-expression syntax is used.  This is the best way to make sure you have enough tagged expressions.

(?:X)	Matches sub-expression X but does not define a tagged expression.

X|Y	Matches X or Y.

[char-set]	Matches any one of the characters specified by char-set.  A '-' character may be used to specify ranges.  The expression [A-Z] matches any upper case letter.  '\' may be used inside the square brackets to define literal characters or define ASCII characters.  For example "\-" specifies a literal dash character.  The expression [\d0-\d27] matches ASCII character codes 0..27.  The expression []] matches a right bracket.  In MicroEdge regular expressions, [] matches no characters.  In both syntax, the expression [\]] matches a right bracket.  The expression [^] matches a '^' character but this does not work for MicroEdge regular expressions.  In both syntax, [\^] matches a '^' character.

[^char-set]	Matches any character not specified by char-set.  A '-' character may be used to specify ranges.  The expression [^A-Z] matches all characters except upper case letters.

\d	Defines a back reference to tagged expression number d where 0<=d<=9.  For example, "{abc}def\1" matches the string "abcdefabc".  If the tagged expression has not been set, the search path fails.

\c	Specifies cursor position if match is found. If the expression xyz\c is found the cursor is placed after the z.

\n	Matches newline character sequence.  Useful for matching multi-line search strings.  What this matches depends on whether the buffer is a DOS (ASCII 13,10 or just ASCII 10), UNIX (ASCII 10), Macintosh (ASCII 13), or user defined ASCII file.  Use "\d10" if you want to match a 10 character.

\r	Matches carriage return (ASCII 13).

\t	Matches tab character.

\f	Matches form feed character.

\om	Turns on multi-line matching.  This enhances the match character set, or match any character primitives to support matching end of line characters.  For example, "\om.+" matches the rest of the buffer.  Warning: Test your regular expression on a very small file before using your regular expression on a large file.  This may cause the editor to use A LOT OF MEMORY.

\ol	Turns off multi-line matching (default).  You can still use "\n" to create regular expressions which match one or more lines.  However, expressions like ".+" will not match multiple lines.  This is much safer and usually faster than using the "\om" option.

\xhh	Matches hex character hh.

\dddd	Matches decimal character ddd.

\char	Declares character after slash to be literal.  For example, '\*' represents the star character.

\:char	Matches predefined expression corresponding to char.

The predefined expressions are:

\:a   [A-Za-z0-9]                      	Matches alphanumeric characters

\:b    ([ \t]+)                       	Matches blanks

\:c    [A-Za-z]                        	Matches an alphabetic

\:d    [0-9]                           	Matches digit

\:f    ([^\[\]\:\\/<>|=+;, \t"']+) 	non-UNIX platforms:  Matches filename part

\:f    ([^/ \t"']+) 	UNIX:  Matches filename part.

\:h    ([0-9A-Fa-f]+)                  	Matches hex number

\:i    ([0-9]+)                        	Matches integer

\:n    (([0-9]+(\.[0-9]+|)|\.[0-9]+)([Ee](\+|-|)[0-9]+|))

                                              	Matches floating number

\:p    (([A-Za-z]:|)(\\|/|)(\:f(\\|/))*\:f)	non-UNIX platforms:  Matches path

\:p    ((/|)(:f(/))*\:f)	UNIX:  Matches path

\:q    (\"[^\"]*\"|'[^']*')      	Matches quoted string

\:v    ([A-Za-z_$][A-Za-z0-9_$]*)	Matches C variable

\:w    ([A-Za-z]+)                     	Matches a word

NOTE:  The \:f and \:p predefined expressions are not intended to support all operating system filenames.  Instead they are intended to be useful in practical cases.  For non-UNIX platforms \:f  is designed for FAT (DOS) file systems.  The space character is not in :f because it is more typically a filename separator.

Precedence of operators from highest to lowest.

+,*,?, {},+?,*?,??, {}?       	These operators have the same precedence

concatenation

|

Sample Regular Expressions:

^defproc	Matches lines that begin with the word defproc.

^definit$	Matches lines that only contain the word definit.

^\*name	Matches lines that begin with the string "*name".  Notice that the backslash must prefix the special character '*'.

[\t ]	Matches tab and space characters.

[\d9\d32]	Matches tab and space characters.

[\x9\x20]	Matches tab and space characters.

p.t	Matches any three letter string starting with the letter 'p' and ending with the letter 't'.  Possible matches are "pot" and "pat".

s.*?t	Matches the letter 's' followed by any number of characters followed by the nearest letter 't'.  Two possible matches are "seat" and "st".

for|while	Matches the strings "for" or "while".

^\:p	Matches lines beginning with a file name.

xy+z	Matches x followed by one or more occurrences of y followed by z.


MicroEdge Regular Expressions

MicroEdge regular expressions are defined as follows:

^	Matches beginning of line.

$	Matches end of line.

?	Matches any character except newline.

X+	Minimal match of one or more occurrences of X.  See section "Minimal Versus Maximal Matching for more information on minimal and maximal matching.

X#	Maximal match of one or more occurrences of X.

X*	Minimal match of zero or more occurrences of X.

X@	Maximal match of zero or more occurrences of X.

X:n1	Match exactly n1 occurrences of X.  Use () to avoid ambiguous expressions.  For example "a:9()1" searches for 9 a's followed by a 1.

X:n1,	Maximal match of at least n1 occurrences of X.

X:n1,n2	Maximal match of  at least n1 occurrences but not more than n2 occurrences of X.

X:*n1,	Minimal match of  at least n1 occurrences of X.

X:*n1,n2	Minimal match of  at least n1 occurrences but not more than n2 occurrences of X.

~X	Search fails if expression X is matched.  The expression ^~(if) matches the beginning of all lines that do not start with if.

(X)	Matches sub-expression X.

{X}	Matches sub-expression X and specifies a new tagged expression.  See section "Tagged Search Expressions for more information.

{#dX}	Matches sub-expression X and specifies to use tagged expression number d where 0<=d<=9.

X|Y	Matches X or Y.

[char-set]	Matches any one of the characters specified by char-set.  A '-' character may be used to specify ranges.  The expression [A-Z] matches any upper case letter.  '\' may be used inside the square brackets to define literal characters or define ASCII characters.  For example "\-" specifies a literal dash character.  The expression [\0-\27] matches ASCII character codes 0..27.  The expression [] matches no characters.  In UNIX regular expressions []] matches a right bracket.  In both syntax, the expression [\]] matches a right bracket.  The expression [\^] matches a '^' character in both syntax.

[~char-set]	Matches any character not specified by char-set.  A '-' character may be used to specify ranges.  The expression [~A-Z] matches all characters except upper case letters.

[^char-set]	Same as [~char-set] above.

\gd	Defines a back reference to tagged expression number d.  For example, "{abc}def\g0" matches the string "abcdefabc".  If the tagged expression has not been set, the search fails.

\c	Specifies cursor position if match is found. If the expression xyz\c is found the cursor is placed after the z.

\n	Matches newline character sequence.  Useful for matching multi-line search strings.  What this matches depends on whether the buffer is a DOS (ASCII 13,10 or just ASCII 10), UNIX (ASCII 10), Macintosh (ASCII 13), or user defined ASCII file.  Use "\d10" if you want to match a 10 character.

\r	Matches carriage return.

\t	Matches tab character.

\b	Matches backspace character.

\f	Matches form feed character.

\om	Turns on multi-line matching.  This enhances the match character set, or match any character primitives to support matching end of line characters.  For example, "\om?#" matches the rest of the buffer.  Warning: Test your regular expression on a very small file before using your regular expression on a large file.  This may cause the editor to use A LOT OF MEMORY.

\ol	Turns off multi-line matching (default).  You can still use "\n" to create regular expressions which match one or more lines.  However, expressions like "?#" will not match multiple lines.  This is much safer and usually faster than using the "\om" option.

\xhh	Matches hex character hh.

\ddd	Matches decimal character ddd.

\char	Declares character after slash to be literal.  For example, '\:' represents the colon character.

:char	Matches predefined expression corresponding to char.

The predefined expressions are:

:a   [A-Za-z0-9]                      	Matches alphanumeric characters

:b    ([ \t]#)                       	Matches blanks

:c    [A-Za-z]                        	Matches an alphabetic

:d    [0-9]                           	Matches digit

:f    ([~\[\]\:\\/<>|=+;, \t"']#) 	non-UNIX platforms:  Matches filename part

:f    ([~/ \t"']#) 	UNIX:  Matches filename part.

:h    ([0-9A-Fa-f]#)                  	Matches hex number

:i    ([0-9]#)                        	Matches integer

:n    (([0-9]#(.[0-9]#|)|.[0-9]#)([Ee](\+|-|)[0-9]#|))

                                              	Matches floating number

:p    (([A-Za-z]\:|)(\\|/|)(:f(\\|/))@:f)	non-UNIX platforms:  Matches path

:p    ((/|)(:f(/))@:f)	UNIX:  Matches path

:q    (\"[~\"]@\"|'[~']@')      	Matches quoted string

:v    ([A-Za-z_$][A-Za-z0-9_$]@)	Matches C variable

:w    ([A-Za-z]#)                     	Matches a word

NOTE:  The :f and :p predefined expressions are not intended to support all operating system filenames.  Instead they are intended to be useful in practical cases.  For non-UNIX platforms :f  is designed for FAT (DOS) file systems.  The space character is not in :f because it is more typically a filename separator.

Precedence of operators from highest to lowest.

+,#,*,@, :, :*       	These operators have the same precedence

concatenation

|

Sample Regular Expressions:

^defproc	Matches lines that begin with the word defproc.

^definit$	Matches lines that only contain the word definit.

^\:name	Matches lines that begin with the string ":name".  Notice that the backslash must prefix the special character ':'.

[\t ]	Matches tab and space characters.

[\9\32]	Matches tab and space characters.

[\x9\x20]	Matches tab and space characters.

p?t	Matches any three letter string starting with the letter 'p' and ending with the letter 't'.  Possible matches are "pot" and "pat".

s?*t	Matches the letter 's' followed by any number of characters followed by the nearest letter 't'.  Two possible matches are "seat" and "st".

for|while	Matches the strings for or while.

^:p	Matches lines beginning with a file name.

xy+z	Matches x followed by one or more occurrences of y followed by z.


Brief Regular Expressions

Brief regular expressions are defined as follows:

%	Matches beginning of line.

<	Matches beginning of line.

$	Matches end of line.

>	Matches end of line.

?	Matches any character except newline.

*	Minimal match of zero or more of any character except newline.  This is the same as "?@".

X+	Minimal match of one or more occurrences of X.  See section "Minimal Versus Maximal Matching for more information on minimal and maximal matching.

X\:*	Maximal match of zero or more of any character except newline.  This is the same as "?\:@".

X\:@	Maximal match of zero or more occurrences of X.

X\:+	Maximal match of one or more occurrences of X.

X\:n1	Match exactly n1 occurrences of X.  Use {} to avoid ambiguous expressions.  For example "a:9{}1" searches for 9 a's followed by a 1.

X\:n1,	Maximal match of at least n1 occurrences of X.

X\:,n2	Maximal match of at least 0 occurrences but not more than n2 occurrences of X.

X\:n1,n2	Maximal match of  at least n1 occurrences but not more than n2 occurrences of X.

X\:n1?	Match exactly n1 occurrences of X.

X\:n1,?	Minimal match of  at least n1 occurrences of X.

X\:,n2?	Minimal match of at least 0 occurrences but not more than n2 occurrences of X.

X\:n1,n2?	Minimal match of  at least n1 occurrences but not more than n2 occurrences of X.

\(X\)	Matches sub-expression X but does not define a tagged expression.

{X}	Matches sub-expression X and specifies a new tagged expression.  See section "Tagged Search Expressions for more information.

{@dX}	Matches sub-expression X and specifies to use tagged expression number d where 0<=d<=9. No more tagged expressions are defined by the sub-expression syntax "{X}" once this sub-expression syntax is used.  This is the best way to make sure you have enough tagged expressions.

X|Y	Matches X or Y.

[char-set]	Matches any one of the characters specified by char-set.  A '-' character may be used to specify ranges.  The expression [A-Z] matches any upper case letter.  '\' may be used inside the square brackets to define literal characters or define ASCII characters.  For example "\-" specifies a literal dash character.  The expression [\0-\27] matches ASCII character codes 0..27. The expression []] matches a right bracket.  In MicroEdge regular expressions [] matches no characters.  In both syntax, the expression [\]] matches a right bracket.

[~char-set]	Matches any character not specified by char-set.  A '-' character may be used to specify ranges.  The expression [~A-Z] matches all characters except upper case letters. The expression [~] matches any character except newline.

\d	Defines a back reference to tagged expression number d.  For example, "{abc}def\0" matches the string "abcdefabc".  If the tagged expression has not been set, the search fails.

\c	Specifies cursor position if match is found. If the expression xyz\c is found the cursor is placed after the z.

\n	Matches newline character sequence.  Useful for matching multi-line search strings.  What this matches depends on whether the buffer is a DOS (ASCII 13,10 or just ASCII 10), UNIX (ASCII 10), Macintosh (ASCII 13), or user defined ASCII file.  Use "\d10" if you want to match a 10 character.

\r	Matches carriage return.

\t	Matches tab character.

\b	Matches backspace character.

\f	Matches form feed character.

\om	Turns on multi-line matching.  This enhances the match character set, or match any character primitives to support matching end of line characters.  For example, "\om?\@" matches the rest of the buffer.  Warning: Test your regular expression on a very small file before using your regular expression on a large file.  This may cause the editor to use A LOT OF MEMORY.

\ol	Turns off multi-line matching (default).  You can still use "\n" to create regular expressions which match one or more lines.  However, expressions like "?\@" will not match multiple lines.  This is much safer and usually faster than using the "\om" option.

\xhh	Matches hex character hh.

\dddd	Matches decimal character ddd.

\char	Declares character after slash to be literal.  For example, '\*' represents the star character.

\:char	Matches predefined expression corresponding to char.

The predefined expressions are:

\:a   [A-Za-z0-9]                      	Matches alphanumeric characters

\:b    ([ \t]#)                       	Matches blanks

\:c    [A-Za-z]                        	Matches an alphabetic

\:d    [0-9]                           	Matches digit

\:f    ([~\[\]\:\\/<>|=+;, \t"']#) 	non-UNIX platforms:  Matches filename part

\:f    ([~/ \t"']#) 	UNIX:  Matches filename part.

\:h    ([0-9A-Fa-f]#)                  	Matches hex number

\:i    ([0-9]#)                        	Matches integer

\:n    (([0-9]#(.[0-9]#|)|.[0-9]#)([Ee](\+|-|)[0-9]#|))

                                              	Matches floating number

\:p    (([A-Za-z]\:|)(\\|/|)(:f(\\|/))@:f)	non-UNIX platforms:  Matches path

\:p    ((/|)(:f(/))@:f)	UNIX:  Matches path

\:q    (\"[~\"]@\"|'[~']@')      	Matches quoted string

\:v    ([A-Za-z_$][A-Za-z0-9_$]@)	Matches C variable

\:w    ([A-Za-z]#)                     	Matches a word

NOTE:  The \:f and \:p predefined expressions are not intended to support all operating system filenames.  Instead they are intended to be useful in practical cases.  For non-UNIX platforms :f  is designed for FAT (DOS) file systems.  The space character is not in \:f because it is more typically a filename separator.

Sample Regular Expressions:

<defproc	Matches lines that begin with the word defproc.

<definit>	Matches lines that only contain the word definit.

<\*name	Matches lines that begin with the string "*name".  Notice that the backslash must prefix the special character ':'.

[\t ]	Matches tab and space characters.

[\d9\d32]	Matches tab and space characters.

[\x9\x20]	Matches tab and space characters.

p?t	Matches any three letter string starting with the letter 'p' and ending with the letter 't'.  Possible matches are "pot" and "pat".

s*t	Matches the letter 's' followed by any number of characters followed by the nearest letter 't'.  Two possible matches are "seat" and "st".

for|while	Matches the strings "forhile" or "fowhile".

^\:p	Matches lines beginning with a file name.

xy+z	Matches x followed by one or more occurrences of y followed by z.


Search and Replace With Regular Expressions

UNIX regular expressions:  When regular expressions are turned on for a search and replace command, the backslash character ('\') has special meaning in the replace string.  A '\' in the replace string has the same meaning as in the search string except that "\c" and "\:char" are not supported.  See section "UNIX Regular Expressions for a list of '\' options.  See section "Tagged Search Expressions" below for information on specifying tagged expressions in the replace string.

MicroEdge regular expressions:  When regular expressions are turned on for a search and replace command, the characters '#' and '\' have special meaning in the replace string.  A '\' in the replace string has the same meaning as in the search string except that "\c", ":char", and "\gd" are not supported.  See section "Regular Expressions for a list of '\' options.  See section "Tagged Search Expressions" below for information on specifying tagged expressions in the replace string using the '#' character.

Brief regular expressions:  When regular expressions are turned on for a search and replace command, the backslash character ('\') has special meaning in the replace string  A '\' in the replace string has the same meaning as in the search string except that "\c" and "\:char" are not supported.  See section "Brief Regular Expressions for a list of '\' options.  See section "Tagged Search Expressions" below for information on specifying tagged expressions in the replace string.

Replace dialog box Regular Expression Examples:

Search For: hat$

Replace With: cat

Search for occurrences of the string "hat" which occur at the end of a line and replace it with "cat".

UNIX/MicroEdge Regular Expression

Search For: ^\n

Replace With:

Brief Regular Expression

Search For: <\n

Replace With:

Delete blank lines.

UNIX/MicroEdge Regular Expression

Search For: ^\n\n

Replace With: \n

Brief Regular Expression

Search For: <\n\n

Replace With: \n

Replace occurrences of two consecutive blank lines with one.

UNIX Regular Expression

Search for: ^a+$

Replace with: \d12

MicroEdge Regular Expression

Search for: ^a+$

Replace with: \12

Brief Regular Expression

Search for: <a+$

Replace with: \d12

Search for lines containing only one or more a's and replace them with a form feed character.


Tagged search expressions

When you use regular expressions to search for a string, you will often want the replace string to depend on what was found.  You can use tagged search expressions to insert parts of what is found into the replace string.

UNIX Regular Expressions:  Use parentheses "()" to denote a tagged expression in the search string.  The replace string specifies tagged expressions with a '\' followed by a tag group number 0-9.  Count the left parenthesis '(' in the search string to determine a tagged expression number.  The first tagged expression is "\1" and the last is "\0".

MicroEdge Regular Expressions:  Use curly braces "{}" to denote a tagged expression in the search string.  The replace string specifies tagged expressions with a '#' followed by a tagged expression number 0-9.  Count the left braces '{' in the search string to determine a tagged expression number.  The first tagged expression is "#0".

Brief Regular Expressions:  Use parentheses "()" to denote a tagged expression in the search string.  The replace string specifies tagged expressions with a '\' followed by a tagged expression number 0-9.  Count the left parenthesis '(' in the search string to determine a tagged expression number.  The first tagged expression is "\0".

Regular Expression Examples

UNIX Regular Expression

Search for: (if|while)

Replace with: x\1y\2

MicroEdge Regular Expression

Search for: {if|while}

Replace with: x#0y#1

Brief Regular Expression

Search for: {if|while}

Replace with: x\0y\1

Replace occurrences of "if" and "while" with "xify" and "xwhiley".   Unmatched groups are null.  Note the \2 (MicroEdge syntax #1,Brief syntax \1) is replaced with null.

UNIX Regular Expression

Search for: ^(.*?),(.*)$

Replace with: \2,\1

MicroEdge Regular Expression

Search for: ^{?*},{?*}$

Replace with: #1,#0

Brief Regular Expression

Search for: ^(*),(*)$

Replace with: \1,\0

Reverse text on lines containing a comma.   Lines with "abc,def" will be changed to "def,abc".  Notice that the UNIX Regular Expression search string uses a minimal matching operator "*?" so that the comma actually matches the first comma in the line and not the last.


Minimal Versus Maximal Matching

You do not need to know the difference between the minimal and maximal operators unless you are using tagged expressions or you are using regular expressions to perform a search and replace.  If you are, then you really need to understand the difference.  Let's say you have a line of text which contains the following DOS filename:

       \path1\path2\path3\name.ext

The regular expression "^\\.*?\\" (MicroEdge syntax "^\\?*\\", Brief syntax "<\\*\\") will match the string "\path1\".  The regular expression "^\\.*\\" (MicroEdge syntax "^\\?@\\", Brief syntax "<\\\:*\\"), which uses the maximal operator, matches the string "\path\path2\path3\".  As a rule of thumb, you will usually want to use the minimal matching operators "*?" (MicroEdge syntax '*', Brief syntax '@') and "+?" (MicroEdge/Brief syntax '+') after a less specific regular expression such as '.' (MicroEdge/Brief syntax '?').

You will usually want to use the maximal matching operators after a regular expression which matches something more specific.  For example, to search for a string of digits and prefix each string of digits with a '$' you would specify the following in the Replace dialog box:

Regular Expression Example:

UNIX Regular Expression

Search for: ([0-9]+)

Replace with: $\1

MicroEdge Regular Expression

Search for: {[0-9]#}

Replace with: $#0

Brief Regular Expression

Search for: {[0-9]\:+}

Replace with: $\0

If the minimal matching "+?" (MicroEdge/Brief syntax '+') operator was used in the search for string instead of the maximal matching "+" (MicroEdge syntax '#', Brief syntax "\:@"), the above search and replace would prefix each digit in the file with a '$' character which is probably not what you want.


Windowing

One typical use for windowing is to view two parts of the same buffer at once.  This allows you to scroll up and down the current windows buffer position while the buffer position in the other window remains the same.  The buffer name of the current window is highlighted so that you know that it is active.  Below is a picture of the screen after the hsplit_window command  (Ctrl+H or "Window", "HSplit") has been executed.

After a window is split vertically or horizontally, you may use the mouse to move the adjoining edge to size both windows at once.  To close the current window, double click on the edit window system menu, or press Ctrl+F4 to execute the close_window command.  If the windows are still tiled, the close_window command will have the effect of unsplitting a window.  The space once taken by the current window will be used by an adjoining tile.

The link_window command ("Window", "Link Window") is used to select a different buffer to view in the current window.  This is an easy way to view two specific buffers without the windows overlapping.  Split a window and then use the link_window command to view a different buffer.

The number of windows that may be created is only limited by memory.  However, if you split a window too many times, the window will become too small to split again..

The following commands create new windows:

create_tile	(Alt+F3) Allows you to create a new window by pointing to the edge for the new window with cursor keys.  The current window is split into two equally sized windows.

hsplit_window	(Ctrl+H or "Window", "Hsplit") Splits the current window horizontally into two equally sized windows.

vsplit_window	("Window", "Vsplit") Splits the current window vertically into two equally sized windows.

The following commands switch between windows:

next_window	(Ctrl+Tab "Window", "Next") Switches to the next window.

prev_window	(Ctrl+Shift+Tab "Window", "Previous") Switches to the previous window.

change_window	Allows you to point to an adjoining tile with the cursor keys to the window you wish to change to.

window_above	Switches to window tile above the current window if one exists.

window_below	Switches to window tile below the current window if one exists.

window_left	Switches to window tile to the left of the current window if one exists.

window_right	Switches to window tile to the right of the current window if one exists.

The move_edge command(Alt+F2) may be used to move the adjoining edge of a tiled window.  Point to the window edge to move with the cursor keys, move the cursor to the new edge position, and press the ENTER key.

The delete_tile commandmay be used to delete an adjacent tiled window.  Point to the edge of the window you wish to delete.

The zoom_window command("Window", "Zoom Toggle") may be used to zoom or unzoom the current window.

The one_window command("Window", "One Window") may be used to delete all windows except the current window.  The current window is expanded to the largest possible size.

The duplicate_window command ("Window", "Duplicate Window") may be used to create another window view of the current buffer.

The tile_windows command ("Window", "Tile") may be used to resize and move all windows so that they do not overlap.

The cascade_windows command ("Window", "Cascade") resizes and moves all windows so that more window titles may be seen.


Selecting Text and Operating on Selected Text

There are three types of selections: line, block, and character.  Line selections are used for processing complete lines of text.  We recommend you use line selections when editing source code because they work best with our SmartPaste(TM) feature (see "SmartPaste(TM)).  Block selections are used for processing columns of text.  Character selections are used for processing sentences of text which do not start or end on line boundaries.

Selecting the Text

Steps to select the text:

1.	Select the beginning of the text with one of the commands select_line (Ctrl+L or "Edit", "Select...", "Line"), select_block (Ctrl+B or "Edit", "Select...", "Block") or select_char (F8 or "Edit", "Select...", "Char")  which correspond to line select, block(column) select , and character select respectively.

2.	Move the cursor to the end of the text you wish to operate on.  The text between the start of the selection and your current cursor position should be selected.

Text may also be selected by clicking the left button and dragging.  While the left button is still down, clicking the right button switches the selection type from CHAR to BLOCK to LINE to CHAR.  Holding down the shift key and clicking the left button extends a selection to the cursor.  A double click of the left button selects a word.  A triple click of the left button selects a line.  Click and drag using the right mouse button to create a BLOCK type selection.

The following keys select text:

Ctrl+U	Deselects text

Ctrl+L	Starts line selection

Ctrl+B	Starts block or column selection

Shift+Right	Starts or extends character selection to right.

Shift+Left	Starts or extends character selection to left.

Shift+Up	Starts or extends character selection up one line.

Shift+Down	Starts or extends character selection down one line.

Shift+PgUp	Starts or extends character selection up one page.

Shift+PgDn	Starts or extends character selection down one page.

Ctrl+Shift+Home	Starts or extends character selection to top of buffer.

Ctrl+Shift+End	Starts or extends character selection to bottom of buffer.

See section "Using the Mouse for information selecting and operating on selected text with the mouse.

Visual SlickEdit provides different selection styles found in non-CUA compliant editors such as SlickEdit, Brief, and PE.  Use the General Configuration dialog box ("Tools", "Configuration...", "General...", select the Select Styles tab) to choose a different selection style.

Operating on the Selected Text

Now that the text has been selected, you may invoke a key or command that operates on the selected text. The following is a list of commands that operate on selected text.  Where two commands are displayed, the first command is the command line version of the command, and the second is the graphical version of the command.

cut	(Ctrl+X or "Edit", "Cut")

Deletes the selected text and copies it to the clipboard.

paste	(Ctrl+V or "Edit", "Paste")

Insert clipboard at cursor.

mou_paste	(Middle Mouse Button)

Insert clipboard at cursor.

mou_click_copy	(Ctrl+Left Mouse Button)

Drags and copies the selected text.  You must click within the selected text, and keep the left button down while moving the mouse to a new location.  Line selections are inserted after the current line by default.  If you want line selections inserted before the current line change the line insert style.  The line insert style may be accessed by ("Tools", "Configuration", "More Options...", "Line Insert Style").

mou_move_to_cursor	(Ctrl+Right Mouse Button)

Moves the selected text to the cursor.

mou_copy_to_cursor	(Ctrl+Shift+Right Mouse Button)

Copies the selected text to the cursor.

mou_click	(Left Mouse Button)

Drags and moves the selected text.  You must click within the selected text, and keep the left button down while moving the mouse to a new location.

list_clipboards	(Ctrl+Shift+V or "Edit", "List Clipboards")

Allows you to select a clipboard from a list of your most recently used (15 is the default maximum) clipboards to insert at the cursor.

copy_to_clipboard	(Ctrl+C or "Edit", "Copy")

Copies selected text to the clipboard.

append_to_clipboard	(Ctrl+Shift+C or "Edit", "Append to Clipboard")

Appends selected text to the clipboard.

append_cut	(Ctrl+Shift+X or "Edit", "Append Cut")

Deletes the selected text and appends it to the clipboard.

copy_to_cursor

Copies selected text to the cursor.  Line selections are inserted after the current line by default.  If you want line selections inserted before the current line change the line insert style.  The line insert style may be accessed by ("Tools", "Configuration", click on the More tab, "Line insert style").

move_to_cursor	("Edit", "Move")

Moves selected text to the cursor.

fill_selection, gui_fill_selection	("Edit", "Fill...")

Fills the selected text with a character you are prompted for.

indent_selection	(Tab or "Edit", "Indent")

Indents the selected text by the "indent for each level" or by one tab stop.  Indenting will be with tab or space characters depending upon whether the "Indent With Tabs" check box is on.  See section "Extension Options dialog box for more information.

unindent_selection	(Shift+Tab or "Edit", "Unindent")

Unindents each line of selected text by the "indent for each level" or by one tab stop.  Not all editing modes have an "indent for each level".  See section "Extension Options dialog box for more information.

lowcase_selection	("Edit", "Other", "Lowcase")

Converts the selected text to lower case.

upcase_selection	("Edit", "Other", "Upcase")

Converts the selected text to upper case.

shift_selection_left	(Shift+F7 or "Edit", "Other", "Shift Left")

Shifts the text within the selection left.  Supports line and block  selections.  If a character selection is used, it is converted to a line selection.

shift_selection_right	(Shift+F8 or "Edit", "Other", "Shift Right")

Shifts the text within the selection right.  Supports line and block selections.  If a character selection is used, it is converted to a line selection.

overlay_block	("Edit", "Other", "Overlay Block")

        Overlays selected text at the cursor.  Supports block selection only.

adjust_block	("Edit", "Other", "Adjust block")

Overlays selected text at cursor and fills the source selected text with blanks.  Supports block selection only.

reflow_selection	("Document", "Format Selection")

Word wraps the text within the selected area.  Line selections are word wrapped with current margin settings.  Block selections are word wrapped within the columns of the block. Character selection is not supported.

execute_selection	(Alt+=)

Executes each line or sub-line of the selected text as if entered on the command line.

put filename, gui_write_selection	("File", "Write Selection...")

Writes the selected text to filename.  Use the ("File", "Insert a file...") to insert a file.

append filename, gui_append_selection

Appends the selected text to the file filename.

sort_within_selection	("Tools", "Sort...", "Sort Within Selection...")

Sort lines within a selected area.

sort_on_selection	("Tools", "Sort...", "Sort on Selection...")

Sort lines of text based on text within columns specified.

add	("Tools", "Add Selected Expr")

Adds selected text and inserts result below the last line of the selection.  Addition is performed for each adjacent line.  If no operator exists between two adjacent numbers, addition is assumed.  See section "Calculating Mathematical Expressions for information on expression syntax.


Recording Macros

Visual SlickEdit allows you to create your own Slick-C macros without understanding the Slick-C language.  All you do is turn macro recording on, use the editors various features, and turn macro recording off.  After the macro is created, you can save it, bind it to a key, and even edit it.   Even your responses to dialog boxes are recorded as Slick-C source.

Below is a summary of the Macro menu items related to macro recording:

Record Macro	(Ctrl+F11) Starts or ends macro recording.

Execute last-macro	(Ctrl+F12) Executes the last recorded macro.

Save last-macro	Saves the last recorded macro under a name you specify.

List Macros...	List recorded macros.  Edit, run, or bind a macro to a key.

Once macro recording is turned on, the Recording Macro menu item on the Macro menu changes to Stop Recording Macro and the REC status indicator turns red.  Press Ctrl+F11 ("Macro", "Stop Recording Macro") to terminate macro recording.   Alternately, you may terminate macro recording and immediately execute the macro by pressing Ctrl+F12.  Press ESC to abord a recording.

Example

Perform the following steps to record a simple macro:

•	Press Ctrl+F11 to start recording

•	Press the Right arrow key three times.

•	Press Ctrl+F11 to end recording

After performing these steps, the Save Macro dialog box ("Macro", "Save last-macro..." or gui_save_macro command) will appear.

Specify the name for your macro in the "Macro Name" text box.  The various check boxes specify when your macro is allowed to be executed. The following paragraphs describe how to decide which check boxes to check.

Requires editor control

Check this box if your macro can only operate if the target is an editor control.

Allow in read only mode

Check this box if your macro does not modify the current buffer.

Allow when window is iconized

You will probably NOT want this box checked if your macro modifies the current buffer.  Whether to check this box is more a matter of personal taste.

Allow in non-MDI editor control

Check this box if your macro should be allowed in a non-MDI editor control.  This is typical for commands which require an editor control but do not open or close editor windows/buffers.

Edit

If you press this button, you can view the source code that has been generated without giving the macro a name.  After viewing the source you can use the "Save last-macro" menu item on the Macro menu to give this macro a name.  The Bind Command to Key dialog box will not be displayed if you press this button.

For this example, follow these steps:

•	Turn on the "Allow in read only mode" check box.

•	Turn on the "Allow in non-MDI editor control" check box.

•	Type "example" for the "Macro Name".

•	Press the "Save" button.

The next dialog box you will see is the Bind Command to Key dialog box.  For this example press Alt+E to edit the Slick-C source code.  For more information on the Bind Command to Key dialog box, see section "Changing Key Bindings.  You should now see some Slick-C source for the macro you just created.

#include "slick.sh"

_command example() name_info(','VSARG2_MACRO|VSARG2_MARK|

                        VSARG2_READ_ONLY|VSARG2_REQUIRES_EDITORCTL)

{

   _macro('R',1)

   cursor_right(3)

}

You can use our on-line help to find out more about the functions being called.  To get help on the "cursor_right" function, place your cursor some where on the function and press F1 or click on the question mark button on the button bar.


Hex Editing

To view a binary or text file in a hex/text view mode, use the "Hex" toggle command on the View menu.  If you close a file while viewing it in hex mode,  the next time you edit the file, it will displayed in hex/text view mode.  When the cursor is in the hex data, you can overwrite or insert hex nibbles (characters 0..F).  When the cursor is in the text data, you can overwrite or insert text characters as you would when you are editing a text file.

All of Visual SlickEdit's search and replace commands work while hex editing.  Only character selections are displayed when in hex editing mode.

Searching for Binary Characters

The easiest way to search for a sequence of binary characters is use regular expressions.  Regular expressions allow you to specify hex or decimal characters.

UNIX or Brief Regular Expression Examples

\x0d\x0a\x01\x02

\d13\d10\d1\d2

MicroEdge Regular Expression Examples

\x0d\x0a\x01\x02

\13\10\1\2

Hex Mode Key Bindings

Tab, Shift+Tab	Toggles cursor between hex data on left and text data on right.

Home	Moves cursor to beginning of hex/text line.

End	Moves cursor to last character of hex/text line.

Backspace	Deletes a byte to the left of the cursor and moves the cursor to the left.

Delete	Deletes the byte under the cursor.

The keys above override key bindings for your emulation.  Most of your other emulation keys will perform the same operation.  However, keys that are bound to the commands top_of_buffer, bottom_of_buffer, page_up, page_down, begin_line, end_line, begin_line_text_toggle, cursor_left, or cursor_right will perform hex/text cursor motion.


Editing Record Files

Visual SlickEdit is useful for editing text record files.  To edit a record file, use the Open dialog box (Ctrl+O or "File", "Open..."), and enter the record width in the Record Width text box.  For UNIX, click on the "Advanced>>" button to view the Record Width text box.  Currently, the width must be at least 2.  The editor will use its standard display mechanism to display the file.


Word Processing Features

Each buffer has its own margins, tabs, justification style, indent style, and word wrap style.  When a buffer is loaded these configuration options are set to the default values for that file extension or mode.  The default values for each file extension may be accessed by ("Tools", "Configuration", "File Extension Setup...").  The Document drop-down menu is used to temporarily change these option values.  You may have these default options set based on a format line at the first line of a file described later in this section.  Various spell checking features are accessible from the Spell Check menu ("Tools", "Spell Check").  Spell checking is discussed at the end of this section.

Tabs dialog box

("Document", "Tabs..." or gui_tabs command)

To change the default tab stops for specific file extensions, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...", select an extension, "Tabs").  To set tabs for the current buffer only, use the Tabs dialog box ("Document", "Tabs...").  Tabs may be set in increments or at specific column positions.  To specify an increment of 3, enter +3 in the text box.  To specify columns, you could enter "1 8 27 44" to specify tab stops that are not an increment of a specific value.  Tab stops continue past the last tab stop by repeating the difference of the last two tab stop values.

By default, the TAB key inserts enough spaces to move the text to the next tab stop.  The Shift+TAB key deletes enough spaces to move the text to the previous tab stop.  See section "Redefine Common Keys dialog box for information on other TAB and Shift+TAB key bindings.   Regardless of the TAB key binding, if "Indent with tabs" is on, a physical tab character is inserted (See section "Indent With Tabs).

tabs command

If you like using the command line, the tabs command can be used to temporarily change the tab settings for the current buffer.  The arguments to the tabs command are:

[+] t1 [+] t2 [+] t3 ... [+] tN

The '+' symbol is used to set tabs according to an increment value.

Example

tabs 1 7 13 16	Creates tab stops 1 7 13 16 19 21 24 ...

tabs +3	Creates tab stops 1 4 7 ...

tabs 1 4	Creates tab stops 1 4 7 ...

tabs 1 49 +3	Creates tab stops 1 4 7 ...

tabs 1 49 +3 53 250 +4	Creates tab stops 1 4 7 ...49 53 57 61 65 69 ...

tabs 10 +3	Creates tab stops 10 13 16 ...

Tab stops continue past the last tab stop by repeating the difference of the last two tab stop values.

Indent With Tabs

Normally, when auto indent is turned on and you press the ENTER key Visual SlickEdit will align the cursor under the first non-blank character of the previous line.  For some column oriented languages, such as Assembler, you may want to indent using tab characters.  Indent with tabs is off by default.  You can change the indent with tabs option for a particular file extension using the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...", select an extension, "Indent With Tabs").  To toggle indenting with tabs, use the Indent With Tabs menu item ("Document", "Indent With Tabs").

Margins dialog box

("Document", "Margins..." or gui_margins command)

Visual SlickEdit allows you to set the left, right and new paragraph margins.  To change the default margins for specific file extensions, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...", select an extension, "Margins").  To temporarily change the margins for the current buffer only, use the Margins dialog box ("Document", "Margins...").

After you set the margins, characters you type will be word wrapped within the left and right margin settings unless word wrap style is turned off.  To change the default word wrap style for specific file extensions, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...", select an extension, "Word Wrap").  The ("Document", "Justify...") menu item may be used to temporarily change the word wrap style for the current buffer.  After typing characters into a paragraph, there may be extra blanks or the text may not be justified correctly.  If so, select ("Document", "Format paragraph") to reformat the current paragraph.  The current paragraph is defined by a group of non-blank lines separated by a blank line.  Alternately, you may specify a selected area of text and reformat it by invoking ("Document", "Format Selection").

margins command

If you like using the command line, the ma or margins command ("Document", "Margins...") may be used to temporarily change the margins for the current buffer.  The ma command is an abbreviation of the margins command.  The arguments to the ma or margins command are:

margins [left [right [new-paragraph]]]

Specifying no parameters displays the current values.  When the left margin is specified and the new-paragraph margin is not, the new-paragraph margin is set to the same value as the left margin.

Example

ma 5 70 10	Set left, right, new-paragraph margins to 5 70,10.

ma 5 70	Set left, right, new-paragraph margins to 5,70,5.

ma	Display current values.

Justification Style

The Justification dialog box ("Document", "Justify..." or  gui_justify command) changes the justification style for the current buffer.   This affects word wrap as you type and reflow paragraph commands.  To change the justification style for specific file extensions, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...", select an extension, "Justify Style").  If you prefer using the command line, the justify command may be used to change the justification style for the current buffer.

Visual SlickEdit provides three justification styles:

Justification style	Word wrap effects

Left and Respace	Left justification with space character reformatting.  One space is placed between words except after the punctuation characters ".?!" which get two spaces.  If you only want one space after the punctuation characters ".?!", turn on "1 space after period".

Left	Left justification with respect for space characters between words.  This setting requires the save_options to be set such that trailing spaces are not stripped when a buffer is saved.  See section "Save tab.

Justified	Full justification.  Left and right edges of text will align exactly at margins. Full justification does not occur as you type.  Use the reflow_paragraph command ("Document", "Format Paragraph") when you are done typing to get full justification for the current paragraph.

Format Line

As described at the beginning of this section, the default margins, tabs, justification style, indent style, and word wrap style may be set for each file extension and may be accessed by Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").   However, if you want files of the same language to have a different default, you should use a format line for those files.  To create a format line, make the first line of text in your file contain "@SLICK".   The @SLICK keyword may be inside a comment.  When you save a buffer with a format line, the format line is updated.  Also anytime a word processing option is changed such as the margins, the format line will be updated.  The next time you open this file, the word processing options will be set according to the format line.


Spell Checking

The Spell Checking menu ("Tools", "Spell Check") contains all of Visual SlickEdit's spell checking features.  This menu provides spell checking from the cursor, spell checking a selection, spell checking the current word, spell checking multiple files, and access to the Spell Options dialog box.  When a misspelled or repeated word is found, the Spelling dialog box is displayed.

Spelling Dialog Box

("Tools", "Spell Check" or spell_check command)

Below is a picture of the Spelling dialog box:

Ignore

Ignores the misspelled or repeated word and continues spell checking.

Ignore All

Ignores all instances of the misspelled word until the Spelling dialog box is closed.

Change

Replaces the misspelled word with the word in the "Change To" text box and continues spell checking.

Change All

Replaces the misspelled word with the word in the "Change To" text box for the current occurrence and all additional occurrences found during this spell checking session.

Add User 1

Adds the misspelled word to the user list 1 of correctly spelled words and continues spell checking.  These words are saved in the text file "userdct1.dct" by default.

Add User 2

Adds the misspelled word to the user list 2 of correctly spelled words and continues spell checking.  These words are saved in the text file "userdct2.dct" by default.

Undo Last

Undoes the last spell checking modification.  Unfortunately, this undo operation is limited to last change made.

Options

Displays the Spell Options dialog box.  See Spell Options Dialog Box below.

Spell Options Dialog Box

Below is a picture of the Spell Options dialog box ("Tools", "Spell Check", "Spell Options..." or spell_options command):

Main Dictionary

Specifies the name of the main dictionary.  This text box is not useful yet.  We hope to provide tools for creating and modifying the main dictionary in the future.

Common List

Words in this file are words that are found most frequently and words of length two or less.  The common word list speeds up spell checking when most of the words in the buffers being checked are contained in the common word list.

User List 1

Specifies a text file which contains additional words that you want to be considered as correctly spelled words.  Each line can contain only one word.

User List 2

Specifies a text file which contains additional words that you want to be considered as correctly spelled words.  Each line can contain only one word.


Printing

Inserting a Formfeed

Our printing facility supports embedded formfeed characters.  The formfeed character must be the only character on the line.  To insert a formfeed into the current buffer, press the Ctrl+Q key (quote_key command), and Ctrl+L.  Alternately, you may use the Insert Literal dialog box ("Edit", "Insert Literal...") to insert a formfeed or any other character.  The menu item ("Tools", "Ascii Table") gives you access to an ASCII table of characters.

Print Setup Dialog Box

(printer_setup command)

non-UNIX platforms: For Windows, the Print Setup dialog box ("File", "Print", press "Setup..." button) is built into the operating system and depends on the print driver you are using.  We can only describe the kinds of features this dialog box provides.  This dialog box allows you to select the printer you want your documents printed to, landscape and portrait printing, output paper tray, and more.

UNIX: The UNIX version does not have a Print Setup dialog box.

Print Dialog Box

("File", "Print..." or gui_print command)

This dialog box is not present in the UNIX version of Visual SlickEdit.  See next section on "Text Mode Print Dialog Box" below.

The Print dialog box ("File", "Print...") is used to print the current buffer or selection.  Below is a picture of the Print dialog box:

General

Selection only

When on, only the selection is printed.

Visible lines only

When on, only visible lines are printed.  This option allows you to print selective display.

Print color coding

When on, language specific color coding is printed using the same font attributes (bold, italic, underline).

Print color

When on, language specific color coding is printed using the same colors.

Print hex

When on, printed output looks like our hex display mode.

Two  up

When on, specifies two columns where one page is printed in the left column and the next page is printed in the right column.  This is useful when printing in landscape mode especially when you are using a small font.

Orientation

Windows only:  Specifies whether text is printed top to bottom (portrait) or left to right (landscape).

Space between

This text specifies the width, in inches, between columns.  This text box is grayed, unless the Two Up check box is checked.

Number lines every

When non-zero, lines at intervals of this value are printed with line numbers.

Number of copies

Specifies the number of copies to print.

Header/Footer

Left, Center, and Right header

The left, center, and right header text boxes specify the title that appears at the top left, center, and right of each page respectively.  When one of the escape sequences %f, %d, or %p, is found, it is replaced with the filename, date, or page number respectively.

Left, Center, and Right footer

The left, center, and right footer text boxes specify the title that appears at the bottom left, center, and right of each page respectively.  When one of the escape sequences %f, %d, or %p, is found, it is replaced with the filename, date, or page number respectively.

Margins

Windows:  Top, bottom, left and right margins, in inches between the outer edge of the paper and the printed text.  Specify 0 for all margins to print the maximum amount of text.

After header

This is the space in inches between the header and the first line on the page.

Before footer

This is the space in inches between the last line on a page and the footer.

Schemes

Allows you to define or select a printing schemes.  For example, you might want to define a scheme which prints two up, landscape, and uses a small font.  System schemes are stored in "print.ini".  User defined schemes or modified system schemes are stored in "uprint.ini".

Font

Press this button to select the font used by the printer.

Setup

This button invokes the Print Setup dialog box.

Files/Buffers

This button expands or unexpands the dialog box.  When the dialog box is expanded, you can specify to print multiple files and/or buffers.

Subdirectories

Affects whether searching for file specified in the Files text box traverses subdirectories.

Files

Specifies files on disk to print.  If the file has already been opened (i.e. is a buffer), the buffer is printed.

Buffers

Specifies one or more buffers to print.  Press Ctrl+Click to select multiple buffers.

Search all project files

When checked, all files in the current project are printed in addition to other files/buffers specified.  BEWARE: you may end up printing a file twice if you specify other files/buffers in addition to your project files.

Invert

Click on the Invert button to select all buffers in the Buffers list box that are currently not selected and deselect all files which are selected.

Clear

Deselects all buffers in the buffer list.


Command Line and Text Box Features

To get on-line help on command line and text box editing keys, press Alt+H, 'K', and select "Command Line and Text Box Editing".

CUA Command Line and Text Box Editing

SlickEdit Command Line and Text Box Editing

Brief Command Line and Text Box Editing

Epsilon Command Line and Text Box Editing

VI Command Line and Text Box Editing

ISPF Command Line and Text Box Editing

GNU Emacs Command Line and Text Box Editing

Visual C++ Command Line and Text Box Editing

Quick Summary

The command line is a text box control just like the text boxes that appear in various dialog boxes.  The following is a summary of the text box editing keys:

Ins	Insert mode toggle.

Space	Expand partially typed parameter or insert a space.

?	List matches to partially typed parameter.  Type "Ctrl+Q ?" to insert a question mark.

Ctrl+Shift+O	Expand alias.  See section "Alias Facility.

Ctrl+E	Cut to end of line.

Ctrl+Backspace	Cut line.

Ctrl+K	Copy word to clipboard.

Ctrl+Shift+K	Cut word.

Ctrl+Shift+L	Lower case word.

Ctrl+Left	Previous word.

Ctrl+Right	Next word.

Ctrl+V	Paste.

Ctrl+X	Cut.

Ctrl+C	Copy.

Ctrl+Shift+X	Append cut.

Ctrl+Shift+C	Append to clipboard.

Ctrl+Shift+V	List clipboards.

Shift+Home	Select text between cursor and beginning of line.

Shift+End	Select text between cursor and end of line.

Shift+Click	Extend selection to mouse position.

Backspace	Delete previous character or selection.

Del	Delete character under cursor or selection.

Left	Move cursor left.

Right	Move cursor right.

End	Move cursor to end of line.

Home	Move cursor to beginning of line.

Double click	Select word.  Note this default may be changed depending upon user feed back.

Triple click	Select line.  Note this default may be changed depending upon user feed back.

The Visual SlickEdit command line also supports retrieval and allows you to run external programs or DOS internal commands.

Completion

Completion is a mechanism which helps you type a command or an argument to a command.  Visual SlickEdit's command line and dialog input fields support completion.  When you press the SPACE BAR key in one of these areas, Visual SlickEdit attempts to insert (complete) as much of the argument as possible.  For example, press Alt+M and 'O' to display the Open Form dialog box. type "_open", and press SPACE BAR.  You will see the word "_open" expanded to "_open_form".  The question mark key is also used for completion purposes to display a selection list of possible matches to an argument you have partially typed.  This is especially useful when you are not sure what you are looking for.   Press Alt+M and 'O' to display the Open Form dialog box again.  This time type "_c?".  You should now see a selection list of dialog boxes (also called forms) that start with "_c".   An item in the list can be selected by moving your cursor to an entry and pressing ENTER.  Some of the more useful dialog boxes which support completion are: Open, Save As, Go To Definition, Change Directory, and Bind Command to Key.  When you press SPACE BAR while entering an argument, you may see the message "Word expanded as much as possible".  Press "?" to list the matches.  Completion not only enables you to type in arguments faster but also can help you remember the argument.

Command Line Argument Retrieval

The term argument retrieval, sometimes called argument history, means that arguments you give to commands are saved for later use.  When you are prompted for an argument on the command line, press the UP and DOWN arrow keys to retrieve your previous or next argument.  For most commands, the last argument you entered is automatically displayed.

Shelling

You may use the Visual SlickEdit command line near the bottom of the MDI window to execute any program.  Click on the command line or press ESC to toggle the cursor to the command line and enter the program name and arguments and press ENTER. When you enter a command that the editor does not recognize as internal, a path search is performed to find an external program to execute.  To invoke a program whose name contains space characters, enclose the name in double quotes.  For example, "this is" would execute a program called "this is.exe" if it existed.

UNIX:  You will need to prefix your command with "dos " if your program name starts with a leading '/' character (specifying a path most likely) because Visual SlickEdit will think you are performing a search.

Executing the command dir (or ls) from the command line will invoke Visual SlickEdit's internal dir command.  To bypass an internal command, prefix the command with "dos ".  The DOS DIR command may be executed by typing "dos -w dir" and pressing the ENTER key.  The -w option specifies that you want to view the output of the dir command before the window is closed.  To get an operating system prompt, type the command "dos" with no arguments or select the menu item ("Tools", "OS Shell").

IMPORTANT: UNIX:  To execute a text mode program and view the resulting output, you must use the "-w" or "-t" option which run the program specified in an xterm window.  The "-w" options wait for a key press before the program terminates.   For example, "dos -w sgrep" will display help on our sgrep program.  If you don't need to wait for a key press, use the "-t" option.  For example, "dos -t man cc" will display help on the UNIX cc program.  You can change the xterm and specify xterm options that Visual SlickEdit uses by setting a VSLICKXTERM environment variable.  For example, setting VSLICKXTERM to "/usr/X11/bin/xterm -geometry 80x40" will create xterm windows with a width of 80 characters and a height of 40 characters.  See "Setting Environment Variables for more information.

Changing the Current Directory

You may use the command line to change the current directory or drive.  Press ESC to toggle the cursor to the command line and type "cd " followed by the directory you want to make active.  Instead of the command line, you may use the Change Directory dialog box ("File", "Change Directory...) to change directory.  Both methods support completion while entering the directory argument.  A faster way to change directory is to use aliases (see section "Directory Aliases).


Alias Facility

Visual SlickEdit's alias facility has two major purposes.  One purpose is for directory aliases which save you from having to type in long path names when you are prompted for a filename or directory.  Directory aliases are expanded by pressing Ctrl+Shift+O.  The other is for defining extension specific aliases which extend or modify syntax expansion (templates expanded when you press SPACE BAR).

Global directory aliases are stored in the file "alias.slk".  Extension specific aliases are stored in a file of your choice but typically have the extension "als".  We have decided to standardize on the "als" extension for alias files since "slk" files are for miscellaneous Visual SlickEdit configuration files.

See section "Directory Aliases for more information on directory aliases.  The remainder of this section will discuss extension specific aliases.

Extension Specific Aliases

("Tools", "Configuration", "File Extension Setup...", "Alias...")

The Alias Editor dialog box is displayed below:

Alias names are displayed in the list box at the top left of this dialog.  The value for the selected alias name is displayed in the editor control at the top right of this dialog box.

You can setup language specific aliases which are expanded (completed) when you press SPACE BAR.  These aliases can be additions or replacements to our existing syntax expansion.  For example, to add a comment to the end of C for, while, if, and switch statements, do the following:

Steps to Change Syntax Expansion:

1.	Bring up the Extension Options dialog box for C ("Tools", "Configuration", "File Extension Setup...", select "c" in the extension combo box).

2.	Press the "Alias..." button.  This will display the Alias Editor dialog box.

3.	Press the "New..." button and enter "for" for the alias name.

4.	Type the following lines in the editor control to the right of the alias name:

for (%\c;;) {

} /* for */

The "%\c" escape sequence above specifies the cursor placement after expansion is performed.

5.	Repeat steps 3 and 4 for the while, if, and switch keywords.

6.	Press the OK button to save your new aliases.

Note that the above steps replace our default syntax expansion for these keywords.  Our C brace style options will not affect aliases you define.

Alias Escape Sequences

The following escape sequences have special meaning when used within an alias:

%<env-var>%	Insert the value of the environment variable specified

%\d	Insert the date

%\t	Insert the time

%\i	Indent

%\b	Unindent

%\c	Place cursor

%\n	Current function name

%%	Percent character

%(arg-name)	Argument replacement.  See next section on "Aliases Which Prompt for Arguments"

Examples

Alias Name	Value

comment 	/************************************************/

 	/*   Date: %\d  Time: %\t                                              */

 	/************************************************/

if 	if(%\c){

 	%\i// Comment goes here

 	}

wm 	int APIENTRY WinMain(HANDLE hInstance, HANDLE hPrevInstance,

     LPSTR lpszCmdParam, int nCmdShow)

 	{

 	%\i%\c

 	}

Aliases Which Prompt for Arguments

There are times when you want your own arguments inserted into an alias.  The steps below illustrate defining a MessageBox alias for the C language which prompts for arguments.

Defining an Alias which Prompts for Arguments

•	Bring up the Extension Options dialog box for C ("Tools", "Configuration", "File Extension Setup...", select "c" in the extension combo box).

•	Press the "Alias..." button.  This will display the Alias Editor dialog box.

•	Press the "New..." button and enter "mb" for the alias name.

•	Type the following line in the editor control to the right of the alias name:

MessageBox(HWND_DESKTOP,"%(message)", "Debug", MB_OK|MB_TASKMODAL);

The "%(message)" text will be replaced with the text you are prompted for when you expand the alias.

•	Press the "Add..." button, enter the text as shown below, and press the OK button.

•	Press the OK button to save your new aliases.

Now that you have completed writing your MessageBox alias for ".c" extension files, edit a C file and type "mb<Ctrl+Shift+O>" to try out your alias.

MessageBox is one of the most commonly used functions when writing Microsoft Windows programs. The above example will save you some typing when using MessageBox. The MOTIF toolkit has a similar function but it takes different arguments.


Bookmarks

Using bookmarks allows you to save your edit position, move around possibly to other files and later return to your edit position.  Visual SlickEdit provides stack oriented bookmarks which may be pushed and popped and also named.  Bookmark names must consist of alpha-numeric characters and are limited to 100 characters in length.

Setting a Bookmark

set_bookmark command

Go to Bookmark

goto_bookmark command


Setting a Bookmark

You can set a bookmark quickly with one of the keys Ctrl+1, Ctrl+2..Ctrl+0.  These keys are use to set a bookmark with names 1, 2..0 respectively.    If the bookmark is already in use, the bookmarks are displayed in a menu with the cursor on the bookmark id that is being set, allowing it to be replaced or a different one selected.  Alternately, you may use the Bookmarks dialog box to specify your own name for a bookmark.  The Bookmarks dialog box allows you to delete the currently selected bookmark in the list box.

If auto restore is on (default is on), bookmarks are saved when exiting Visual SlickEdit and restored for use in your next edit session.

The following is a picture of the Bookmarks dialog box ("Search", " Bookmarks..." or set_bookmark command):

The lower list box shows the bookmark name, buffer name, line number, and line of text where the bookmark was set.

set_bookmark command

If you like using the command line, use the sb or set_bookmark command to set a bookmark at the cursor location in the active buffer.  The syntax for the command is:

sb [-r] [bookmark_name]

If a bookmark_name is not given on the command line, a list of the current bookmarks are displayed for reference and you are prompted to enter a bookmark_name or select a bookmark to replace.

If the -r (replace) option is used, the bookmark is replaced without prompting.

An automark function, which sets the next available bookmark, is enabled by entering a '#' or '##' as the bookmark name.

Examples

      sb             - Pop up the Set Bookmark dialog box

      sb 5          - Sets a bookmark with an id of 5 at the cursor

      sb ##        - Sets a bookmark using the next 2 digit number available as the bookmark name

Go to Bookmark

To go to a bookmark, use the Bookmarks dialog box (Ctrl+Shift+J or "Search", "Bookmarks..." or set_bookmark command).

goto_bookmark command

If you like using the command line, the gb or goto_bookmark command places the cursor at a specified bookmark.

gb [id]

If the id is not given or the id entered is not active, a menu with a list of the current bookmarks is displayed and you are prompted to select an id.

Examples

gb	Display the Go To Bookmark dialog box

gb 5	Goes to bookmark 5 if set or displays Go To Bookmark dialog box if not

gb 10	Goes to bookmark 10 if set or displays Go To Bookmark dialog box if not

You can switch to the next and previous bookmark by using the next_bookmark (nb) or prev_bookmark (pb) command.


Multiple Clipboard Support

To get on-line help on clipboard keys, Press Alt+H, 'K' , and select "Clipboard".

Clipboards can be used to copy or move text from anywhere to anywhere.  Anywhere means a file you are editing, the command line, a dialog text box, or another application that supports text clipboards, such as a word processor.  Use Ctrl+K ("Edit", "Copy word") to copy the current word to the clipboard.  Then use Ctrl+V to paste it anywhere.  Pressing Ctrl+K multiple times in succession creates one clipboard.  All clipboard related commands are available on the Edit drop-down menu.

When you invoke a cut or copy command, a clipboard is created.  You can insert this clipboard back into your buffer by pressing Ctrl+V.  This means you can actually use cutting text as another means of copying text.  For example, go to the beginning of a line with some text and press Ctrl+E to erase to end of line.  Now press Ctrl+V to paste the text back in.  Then move your cursor somewhere else in the buffer and press Ctrl+V.  You have just made a copy of a line of text without selecting anything first.  Pressing the same cut key multiple times in succession creates one clipboard.  If you press Ctrl+Shift+K three times to cut three words, you will get one clipboard that you can insert with Ctrl+V.  This is true for cut line (Ctrl+Backspace) and erase to end of line (Ctrl+E) as well.

Note: If you are using BRIEF emulation and you want a clipboard created when you cut text, bind the commands cut_word, cut_end_line, and cut_line to the appropriate keys.  See section "Changing Key Bindings for more information.

For information on selecting text see section "Selecting Text and Operating on Selected Text.

Visual SlickEdit keeps a stack of the last 15 (default maximum) of your most recently used clipboards.  The maximum number of clipboards may be changed by the General Configuration dialog box ("Tools", "Configuration", "General...", select General tab).  When you press Ctrl+Shift+V ("Edit", "List Clipboards..." or  list_clipboards command), you will see a dialog box that looks as follows:

The numbers on the far left are used to help you move the selection cursor.  The word following the number is the clipboard type and is not important when inserting a clipboard into the command line or a text box.  The number following the clipboard type indicates the number for complete or partial lines of text in the clipboard.  Only clipboards of 1 line may be inserted into the command line or text box.

Both Ctrl+V and Ctrl+Shift+V key sequences insert clipboard text into the text area or the command line.  The result of inserting a clipboard into the text area varies depending on the clipboard type.  A LINE type clipboard is inserted after the current line by default.  If you want LINE type clipboards inserted before the current line, change the line insert style ("Tools", "Configuration", "General...", More tab, "Line Insert Style..."). A BLOCK type clipboard is inserted before the current character and pushes over all text intersecting with the block.  No lines are inserted.  A CHAR type clipboard is inserted before the current character.

The View button allows you to look at the complete text for the selected condensed clipboard.  While viewing the clipboard, you may copy all or part of it to the operating system clipboard.


Comparing Files

We recommend that you use our Dynamic Difference Editing™ feature (see "DIFFzilla(TM)) instead of our comparing files feature.  However, our compare files feature can compare two parts of the same file.

The File Compare menu ("Tools", "File Compare") provides you with commands related to comparing files.  By default, all comparisons are performed on a line by line basis.  The compare command (F6) compares two buffers in two tiled windows starting from the cursor position of each window.  If the current window is not one of two tiled windows, you will be prompted for the files/buffers you want to compare and two tiled windows will set up for you.  Press F6 to start comparing files/buffers.

After a compare mismatch, you can use the resync command (Shift+F6 or "Tools", "File Compare", "Resync") to adjust the cursor in both windows to the next reasonable match.  Press F6 again to continue comparing the buffers in the two windows.

Use the Compare Options dialog box ("Tools", "File Compare", "Options...") to set various compare options.  To set the default compare options, click on the Save Settings button.

You can perform the following steps to manually set up two tiled windows before invoking the compare command:

•	Open (Ctrl+O) both files you wish to compare

•	Make current one of the files you wish to compare current.

•	Zoom the current window by clicking on the Maximize button.

•	Use the hsplit_windo command (Ctrl+H or "Window", "Hsplit") to create two tiled windows.

•	Use the link_window command ("Window", "Link Window") to display the other buffer in the newly created window.

Comparing Record Files

We recommend that you use our new Dynamic Difference Editing™ feature (see "DIFFzilla(TM)) instead of our comparing files feature.  However, our compare files feature is better for comparing small portions of two files.

If you want to compare two record files, you need to load the files you want to compare with a record width and set the compare options to perform a binary compare.  Fill in the Record Width text box of the Open dialog box which specifies a record width.  Under UNIX, click on the "Advanced >>" button to view the Record Width text box.  After you have loaded the two files, use the Compare Options dialog box ("Tools", "File Compare", "Options...") and check the Binary Compare check box.  All other options in the Compare Options dialog box are ignored when performing a binary comparison.


Configuring Visual SlickEdit

Don't assume that Visual SlickEdit only does something one way.  One of Visual SlickEdit's strong points is its degree of configurability.  You can configure Visual SlickEdit the way you want to work.

Almost all of Visual SlickEdit's configuration options are available from the configuration menu (F5 or "Tools", "Configuration").  If multiple users are accessing Visual SlickEdit on a network, you will want each user to define a VSLICKCONFIG environment variable which refers to a local directory.   This allows each user to have their own configuration.  If a user wants to make modifications to "vslick.ini", he/she should make a local copy of this file and place it in the VSLICKCONFIG directory.

Make sure you have read section "Start Here which covers the most common configuration changes.  This section is large and covers almost all configuration options.

The following configuration items have already been covered in early sections: Selecting an Emulation, Color Coding, and Alias Facility.

Environment Variables

General Configuration dialog box

Selecting an Emulation

Extension Options dialog box

Changing Key Bindings

Bind Command to Key Dialog Box

Editing Key Binding Source

Unbinding a Key

Finding out What Key(s) a Command is Bound to

Finding out What the Function of a Key is

Redefine Common Keys dialog box

File Options dialog box

Load Tab

Save Tab

Backup Tab

AutoSave Tab

File Filters Tab

Alias Facility

Color Coding

Color Settings Dialog Box

Font Configuration Dialog Box

Configuration Files

Configuration Changes Not On Configuration Menu

Saving Disk Space With Tab Compression

Configuration Macro Variables


Environment Variables

We recommend you set environment variables in "vslick.ini".  However, DO NOT set VSLICKCONFIG in "vslick.ini".  See section "Setting Environment Variables.

VSLICKRESTORE	Directory to store Auto Restore files.  See section "Auto Restore for more information.

VSLICKCONFIG	Directory where Visual SlickEdit should store user's local configuration files.   Used in multi-user environments.  Under UNIX, this defaults to the HOME environment variable when VSLICKCONFIG is not set.

VSLICK	Specifies additional command line arguments to editor as if you were typing them in when invoking the editor.

VSLICKPATH	One or more directories separated with ';' (UNIX: ':') where Visual SlickEdit should look for its files before searching the PATH.  In the future, we may remove this environment variable.  The separate environment variables speed up file searching by reducing the number of paths to be searched.

VSLICKMACROS	One or more directories separated with ';' (UNIX: ':') which contain macro files (*.e).  VSLICKPATH must also contain the directories listed here.

VSLICKBIN	One or more directories separated with ';' (UNIX: ':') which contain Visual SlickEdit binary files. VSLICKPATH must also contain the directories listed here.

VSLICKBITMAPS	One or more directories separated with ';' (UNIX: ':') which contain bitmap files (*.bmp. VSLICKPATH must also contain the directories listed here.

VSLICKMISC	One or more directories separated with ';' (UNIX: ':') which contain miscellaneous Visual SlickEdit files including *.vlx, *.slk, *.api, *.idx, vslick.sta (UNIX: vslick.stu), *.hlp, scommon.lst, main.dct, *.pif, *.ini (except for vslick.ini), and *.lst.  VSLICKPATH must also contain the directories listed here.

VSLICKALIAS	One or more filenames separated with ';' (UNIX: ':') which contain ALIAS definitions.

VSLICKTAGS	Specifies global tag files.  One or more filenames separated with ';' (UNIX: ':') which contain tags.  See section "Dynamic Tagging.

VSLICKBACKUP	Directory to place Visual SlickEdit backup files.  Affects +D (default) and -D backup configurations only.  See section "Backup tab for more information.

VSLICKSAVE	non-UNIX platforms only.  Allows save options to be specified per drive.  See section "Save tab for more information.

VSLICKLOAD	non-UNIX platforms only.  Allows load options to be specified per drive.  See section "Load tab for more information.

VSLICKXTERM	UNIX only.  Allows you to specify the default xterm program and arguments used by the dos command and shell function.  The complete path to the xterm program must be specified.  You may not specify the -e option in the command string.  For example, setting VSLICKXTERM to "/usr/X11/bin/xterm -geometry 80x40" will create xterm windows with a width of 80 characters and a height of 40 characters.

VSUSER	non-UNIX platforms only:  If you have a license code  (see "Help", "Programming Information..." ) in addition to a serial#, you are using our license manager.  Our license manager handles system crashes better if each user sets VSUSER environment variable to a unique name.

VST	Specifies additional command line arguments to the macro compiler as if you typed them in when invoking the compiler.


General Configuration Dialog Box

("Tools", "Configuration", "General...")

General Tab

Search Tab

Select Styles Tab

Special Characters Tab

More Tab

Exit Tab

Virtual Memory Tab


General Tab

Below is a picture of the General Configuration dialog box.

Select the various options you want and press the "OK" button to apply the configuration changes.  Your configuration changes for this dialog box are NOT saved on disk until you exit the editor.  By default, your configuration changes are automatically saved without prompting you.  If you want to be prompted to save your configuration changes when you exit the editor, select the Exit tab and turn on "Always prompt before saving configuration".

One file per window

Affects whether the Open dialog box (Ctrl+O) creates a window for each file opened.  If you are used to editors such as SlickEdit, Brief, VI, ISPF, EMACS, and PE you will not want this feature checked.

Maximize first window

When checked, the first MDI child edit window is maximized when it is created.  This option has no effect on Auto Restore.

Alt menu hotkeys

This option is grayed if you are using CUA emulation.  If you want Alt and a selected menu bar character to display the corresponding drop-down menu, check the Alt Menu Hotkeys check box.  If you do not check this box you can be more selective about key bindings because you are permitted to bind Alt keys you normally could not, such as Alt-F.  If you choose to bind Alt keys that are normally menu keys, do not  turn on this check box because you will lose those key bindings.

Command line prompting

Many of Visual SlickEdit's commands which display dialog boxes have equivalent commands which prompt for arguments on the command line.   If you want faster prompting than our dialog boxes allow, check command line prompting.  You can be more selective than this check box permits by changing your key bindings.  For example, you may only want to be prompted on the command line when you open files.  This can be done by binding the edit command to Ctrl+O which is bound to the gui_open command by default.

Here is an incomplete list of graphical commands and their command line counter parts:

Graphical Command	Command Line Version

gui_open	edit

gui_find	find

gui_replace	replace

gui_write_selection	put

gui_append_selection	append

gui_margins	margins

gui_tabs	tabs

gui_find_proc	find_proc

Alt menu

If you don't like accidentally being placed on the menu bar when you press the Alt and do not follow with another key, uncheck this box.

Change directory

This check box affects whether changing the directory in the directory list box and the drive combo box in the Open and Save As dialog boxes change the current directory.  When checked, the editor will change the current directory.

Top of file line

When checked, each buffer displays a line 0 which contains the text "Top of File".  This line is useful for inserting a line before the first line of a buffer when in CUA or SlickEdit emulation.  It is also useful in Selective Display because a '+' bitmap can be displayed on line 0.

Horizontal scroll bar

When checked, each edit window displays a horizontal scroll bar.  This check box does not affect edit window controls on dialog boxes.

Vertical scroll bar

When checked, each edit window displays a vertical scroll bar.  This check box does not affect edit window controls on dialog boxes.

Draw box around current line

When checked, a rectangle is drawn around the current line.  This makes it easier for you to tell where the cursor is.

Expand collapse single click

When checked, selective display plus/minus bitmaps may be expanded or collapsed with a single click.  This makes selective display operate similar to the Windows Explorer.  However, when this is on, you won't be able to select a line by clicking to the left of a text line which contains a selective display bitmap.

Fast open dialog

NT >=4.0 or Windows 95 or later only:  When checked, our faster Windows 3.1 style open dialog box is used to open and save files.

Auto list members

When on, members are listed when you type a member access operator ('.', '->', and '::' for C++, '.' for Java, "IN" and "OF" for COBOL). You can also access this feature on demand by pressing Alt+Dot. This helps you with identifiers when there is no member operator (list locals, global variables, current class members, etc.).  See "Context Tagging(TM) for more information.

Comments

When on, comments are displayed for the currently selected symbol in the list.

Idle

Idle time in milliseconds before Auto List Members displays the list.   If you don't want the Auto List Members list to appear when you are typing fast, set this to about 300 milliseconds.  Then if you finish typing the member before you stop typing for .3 seconds, the list will never appear.

Completion on space

When on, pressing space when list members is displayed performs completion.  For example, if the list contains "FLAG_CHAR" and "FLAG_LONG", then typing "FL<Alt+Dot><Space>" will complete up to "FLAG_".   You can always use Ctrl+Space when list members is displayed to perform completion.

Space always inserts space

When on, pressing space when list members is displayed inserts the current item in the list and inserts a space after it.

Insert open paren

When on, selecting an item in the list inserts the current item in the list and any extra characters typically required by the symbol.  For example, an open parenthesis is inserted after a function tag name for languages which require an open parenthesis after a function name.  For C++, a less than ('<') character is inserted after a template class tag names.

Preserve trailing

When on, only identifier characters before the cursor are replaced with an item is selected from a list members dialog.  Identifier characters after the cursor are preserved.

Auto function help

When on, Visual SlickEdit automatically displays the prototype and comments for a function when a function operator ( '(' for most languages) is typed and highlights the current argument within the displayed prototype. To access this feature on demand, press Alt+Comma. See "Context Tagging(TM) for more information.

Comments

When on, comments are displayed for when function help appears.

Auto syntax help

When on, Visual SlickEdit automatically displays help for statement syntax.  Currently this only affects COBOL.  For COBOL, statement syntax is display when <SPACE> is pressed.  For example, when you type "read ", help on the READ statement is displayed.

Word help filename

non-UNIX platforms only: Specifies the word help filenames used by the wh command (Ctrl+F1), wh2 command (Ctrl+F2), and wh3 command.  Specify the help files for the wh command (Ctrl+F1) first each separated with a plus sign.  Then use a semicolon to indicate the start of help files for the wh2 command (Ctrl+F2) and specify its help files separated with a plus sign.  You may use another semicolon to indicate the start of help files for the wh3 command.  However, this command is not bound to a key.

Windows:  Help files have the extension .MVB, .HLP, or .IDX.    Do not use a plus sign to specify more than one .IDX file or .MVB.  See "Windows Word Help for help on building an .IDX file.

Windows Example

CtrlF1a.hlp+CtrlF1b.hlp;CtrlF2.hlp

vslick.idx;win31wh.hlp+mscxx.hlp+errors.hlp+vslick.hlp

CtrlF1.idx;CtrlF2.idx

vslick.idx;c:\msdev\help\vcbks40.mvb

Files

When on, Visual SlickEdit will restore the files and windows that were opened in your last edit session.  When this is off, your files and windows will not be restored when you start the editor even if you have "Project Files" checked on.

Clipboards

When on, clipboards are saved across edit sessions.

Working directory

When on, the working directory is saved across edit sessions.

Process

When on, the concurrent process buffer is saved across edit sessions.

Workspace files

When on, switching workspaces will restore the files and windows that were opened for that workspace when the workspace was closed.  If you do not want any files and windows closed or opened when switching workspaces, turn this check box off.

Line modify

When on, the line modify flags are saved and restored when you save and open files.  This option has little use unless you turn on "Modified Lines" color coding in the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup..."). Line modify information for the last 200 files is saved.  Visual SlickEdit stores line modify information in temporary files placed in a "SelDisp" directory.

Selective display

When on, selective display is saved and restored when you save and open files.  Selective display for the last 200 files is saved.  Visual SlickEdit stores selective display information in temporary files placed in a "SelDisp" directory.

Class browser tree

When on, the class browser tree is restored across edit sessions.  Note that the current position (displayed selected) is always restored regardless of this setting.

Max clipboards

Specifies the maximum number of clipboards saved.  By default, Visual SlickEdit keeps a stack of your last 15 clipboards any one of which may be pasted with Ctrl+Shift+V ("Edit", "List Clipboards...").

Vertical line col

Specifies the editor window text column which should display a vertical line.  This text box is typically set to 80 to help you determine when you have typed text past column 80.  Specify 0 if you do not want a vertical line displayed.


Search Tab

("Tools", "Configuration", "General...", select Search tab)

Match case

When checked, various search commands default to case sensitive searches.

Regular expression

When checked, various search commands default to regular expression searching.  See section "Regular Expressions".

Wrap at beginning/end

When checked,  various search commands default to wrapping to the beginning or end of a buffer to complete a search.

Restore cursor after replace

When checked,  the cursor is restored to its original position after a search and replace operation completes and is not canceled.

Leave selected

When checked, the last occurrence of a search string that was found is left selected.  This also affects whether pressing ESC during a search and replace leaves the search string selected.

Regular expression syntax

When you choose a regular expression syntax, all search commands will use this syntax when regular expressions are turned on.  Note that the /, find, and c commands allow you to explicitly specify UNIX, Brief, or MicroEdge regular expressions.

Initialization options

Specifies how the Find dialog box "Search For:" combo box is initialized.


Select Styles Tab

("Tools", "Configuration", "General...", select Select Styles tab)

You will find that Visual SlickEdit has about every select style there is.  The Select Styles tab provides the following options:

User defined

When this is on, it means that your current selection style does not exactly match CUA or the emulation default style. This is disabled if you are in Brief  or EMACS emulation.

CUA (default)

In this style, selected text is deleted before a paste or character insert unless the selection is locked.  Pressing the BACKSPACE or DEL key deletes the selection unless the selection is locked.   Advanced selections (those selections not started with the mouse or Shift+<arrow keys>) are extended as the cursor moves.  Locking a selection requires one of the Visual SlickEdit emulation commands select_line, select_block, or select_char to be executed.  These commands may be accessed from the Select menu ("Edit", "Select...) in any emulation.

Emulation Default

This selection style is the emulation default.  It is disabled when in CUA or Visual C++ emulation.

Shift+Cursor always char select

When this is off, shift+<arrow keys> will perform line or block selections, depending upon the direction you move the cursor.  This is disabled if you are in Brief emulation.

Mouse selection creates clipboard

Turn on this check box if you like the way X windows programs let you use the left mouse button to create a clipboard and then use the middle mouse button to paste.

Extend selection as cursor moves

When on, the selection is extended to cursor position. This is disabled if you are in Brief or EMACS emulation.

Deselect after paste

Indicates whether pasted text is selected.  This is disabled if you are in Brief or EMACS emulation.

Inclusive character selection

Indicates whether a character selection includes the character following the cursor.  This is disabled if you are in Brief or EMACS emulation.

Delete selection before insert

Indicates whether a selection is deleted before new text is inserted.  This is disabled if you are in Brief  or EMACS emulation.

Auto deselect (i.e when cursor moves)

Indicates whether a selection should be cleared when the cursor moves or one of a few other editor operations occurs.  This is disabled if you are in Brief or EMACS emulation.


Special Characters Tab

("Tools", "Configuration", "General...", select Special Characters tab)

This tab lets you choose how special characters such as Carriage Return, Line Feed, Tab, Space, Virtual Space, and End of File characters are displayed.  How they appear depends on the "Window Text" font.  These characters are only displayed when the View menu has special viewing turned on for one or more of these special characters.  Select the Special Chars menu item ("View", "Special Chars") to turn on viewing of all special characters.

Those of you who want to be able to tell the differences between a DOS format text file and another format when View New Line Chars is turned on, should select something other than space for the End-Of-Line (2) character.  Under Windows, we recommend 13 for End-Of-Line (1) and 10 for End-Of-Line (2).


More Tab

("Tools", "Configuration", "General...", select More tab)

Start in insert mode

When checked, the insert mode is set to insert when the editor is invoked.  Otherwise, the insert mode is set to replace.

Throw away file lists

When on, modified file manager file lists may be modified and closed without being prompted to save.

Auto exit process

When on, the process buffer is automatically exited when the buffer is closed or the when exiting the editor.

Edit "A B C" start on file A

When on and you select more than one file to Open, the first file becomes the active buffer.

Short key names

When checked, key names in the MDI menu bar are condensed (non-CUA).  For long CUA key names, turn this check box off.

Reflow next

When on, the reflow_paragraph command ("Document", "Format Paragraph") places the cursor on the next paragraph after it has reformatted the current paragraph.  Otherwise, the cursor is kept at the same location within the current paragraph.

Protect read-only mode

When on, the editor will not let you modify a file that is in read only mode.  The save command always prompts you for a different output filename if the file is in read only mode.

Paren match style

The keyin_match_paren command must be bound to one of the keys ), ], or } for the Paren match style to have an effect. This feature always uses fast brace matching.

Parent Match Style	Effects

Highlight	Typing a closing parenthesis temporarily block selects the text within the parenthesis pair.

Cursor to Begin Pair	Typing a closing parenthesis temporarily places the cursor on the matching begin parenthesis.

None	Typing a closing parenthesis just inserts the close parenthesis.

Scroll style

Scroll style	Scroll effects

Center	When center scrolling is on and the cursor moves out of view, the cursor will be centered and the text will move by half the height or width of the window.

Smooth	Smooth scrolling is a line by line scroll of the screen that occurs when the cursor moves out of view.  Smooth scrolling is the default configuration.

Scroll When	Specifies how close in lines the cursor may get to the top or bottom of the window before scrolling occurs.  Does not affect horizontal scrolling.

Note that commands that move the cursor more than one page of text, such as searching, always center scroll text into view.

Preserve column on top/bottom

When on, the top_of_buffer (Ctrl+Home) and bottom_of_buffer (Ctrl+End) commands do not change the column position unless you are already at the top or bottom of the buffer.

Show tool tips

When checked, pop-up tool tip help messages are displayed when you hold your mouse pointer over a button bitmap.

Delay

Specifies delay in 10ths of a second before tool tip messages are displayed.

CR w/o LF erases line in process buffer

If you find that lines are getting erased in the concurrent process buffer, turn this option off.

Key message delay

Specifies the delay before a prefix key is displayed in 10ths of a second.  The prefix key is not displayed if the next key is pressed before the delay specified in this text box.

Hide mouse pointer

non-UNIX platforms only:  If checked, the mouse pointer is hidden when you start typing.  The mouse pointer reappears when you move the mouse or a dialog box is displayed.

Allow drag drop text

When checked, selected text may be copied or moved by dragging and dropping the selected text with the left mouse button.

Line insert style

When the line insert style is Before, commands which insert lines of text are inserted before the current line.  Otherwise, lines of text are inserted after the current line.

Next word style

When the next word style is begin, the next_word command (Ctrl+Right) places the cursor on the beginning of the next word.  Otherwise, the cursor is placed at the end of the next word.

Smart next window

Windows only: When on and Ctrl+Tab is bound to the next_window command (the default binding),  Ctrl+Tab can be used to switch between two edit windows when you have more than one edit window.   This is how Ctrl+Tab works in Visual C++ and how Alt+ESC works when switching applications in Windows.

Use block cursor

When on, a text mode style cursor is used instead of a vertical cursor.

Window left margin

Specifies the space between the left edge of the window and the editor text in inches.  This value has no effect when there are bitmaps displayed in the left margin since more space is necessary.


Exit Tab

("Tools", "Configuration", "General...", select Exit tab)

Always save configuration

(Default) When on, configuration changes are saved without prompting.

Always prompt before saving configuration

When on, you will prompted whether to save configuration changes.

Exit confirmation prompt

When on, you will be prompted whether you really want to exit the editor.


Virtual Memory Tab

("Tools", "Configuration", "General...", select Virtual Memory tab)

Spill File Path

This text box specifies a directory where spill files and temporary files should be placed.

non-UNIX platforms: This defaults to the directory specified the TEMP environment variable.  If it does not exists, the directory specified by the TMP environment variable is used.

UNIX platforms: This defaults to the directory specified the TMP environment variable.

Buffer cache size

Specifies the maximum amount of memory used to store text buffer data in kilobytes.  A value less than 0 specifies all available memory.  We recommend a value that is about one quarter the size of available memory for optimal performance.  If you have 16 megabytes of memory, 4000 is a good choice.  IF THE OPERATING SYSTEM STARTS SWAPPING BEFORE Visual SlickEdit's cache is full, your performance will be about 3 times worse.  So make sure this cache size is smaller than the amount of actual memory you have.

State cache size

Specifies the maximum amount of swappable state file data (parts of "vslick.sta" or "vslick.stu" under UNIX) in kilobytes to be kept in memory.  -1 specifies no limit.  0 specifies that the editor preload all state file data.  The smallest value is 200.

Tagging cache size

If you have a lot of memory and you have large tag files, you can improve tagging performance by increasing the tagging cache size.  For example, if you have 16 megabytes worth of tag files (.vtg files) and you have 64 megabytes of memory, choosing 8000 (8 megabytes) for the tagging cache size will drastically improve tagging performance.  Make sure you pick a small enough cache size so that the operating system does not perform memory swapping.


Extension Options dialog box

("Tools", "Configuration", "File Extension Setup..." or setupext command)

The Extension Options dialog box provides you with an easy way to select the default mode name, tabs, margins, word wrap style, justification, indent style, compile command, begin/end structure pairs, include directories, mode key table, and more for specific file extensions.

The Extension Options dialog box is displayed below:

IMPORTANT:  If you want your TABS for an extension to be different than your syntax indent, and indenting with tabs, be sure to check the Hack Tabs Backspace option on the Redefine Common Keys dialog box.

Extension

Select the extension you wish to modify from the Extension combo box.

Color Coding

Control name	Description

Lexer Name	Name of the lexer.  See "Color Coding for information on defining language specific coloring elements for a new language.

Modified Lines	When checked, displays line prefix area of modified lines in user specified color.  Inserted lines have one color and changed lines have another.

Current Line	When checked, displays current line in current line color.  You might want to try the "Draw box around current line" option on the General Configuration dialog box ("Tools", "Configuration", "General...", select General tab) instead of using this check box because it does not interface with other color coding.

The precedence of color from highest to lowest is current line, modified lines, and language specific.    To change the colors, use the Color Settings dialog box ("Tools", "Configuration", "Colors...").

Margins

Sets the left, right, and new paragraph margins.  See section "Margins dialog box for more information.

Justify Style

Visual SlickEdit provides three justification styles:

Justification style	Word wrap effects

Justified	Full justification.  Left and right edges of text will align exactly at margins.

Left and Respace	Left justification with space character reformatting.  One space is placed between words except after the punctuation characters ".?!" which get two spaces.  If you only want one space after the punctuation characters ".?!", turn on "1 space after period".

Left	Left justification with respect for space characters between words.  This setting requires the save options to be set such that trailing spaces are not stripped when a buffer is saved.  See section "Save options.

Word Wrap

When checked, the editor attempts to keep the cursor within the margins when entering text, moving the cursor, and deleting characters.

Indent With Tabs

Determines whether Tab key, ENTER key, and paragraph reformat commands indent with spaces or tabs.

Syntax Expansion

This option is sometimes grayed.  When checked, templates are inserted when SPACE BAR is pressed.  For example, when editing a C file, if <Space Bar> inserts an if template for the C language.

Indent Style

Indent Style	Word wrap effects

None	ENTER key always goes to the beginning of the line.

Auto	ENTER key indents according to previous line.

Syntax Indent	Enter key indents according to language syntax.  The value in the text box specifies the amount to indent for each level.  You will probably always want this value to match your tab stops.

Tabs

Tabs may be set in increments of some value or at specific column positions.  To specify an increment of 3, enter +3 in the text box.  To specify columns, you could enter "1 8 27 44" to specify tab stops that are not an increment of a specific value.

Mode Name

Gives a more meaningful name for this extension setup.  You need to define a mode name if you want the "Select Mode" ("Document", "Select Mode") menu item to work well.

Begin/end Pairs

Languages such as Modula-2, C, Java, Delphi, Pascal, Assembler and Slick-C which have begin/end structure pairs can take advantage of this feature. You specify the pairs in a format similar to a regular expression.  When you place the cursor on the begin or end keyword of the pair, invoke the command find_matching_paren (Ctrl+] or "Tools", "Match Paren") to find the match of the pair.  The examples below illustrate the syntax for defining the begin/end pairs.

Note: Begin/end pair matching is case sensitive by default.  Append ";I" to ignore case.

Examples:

(begin),(case)|(end);I

The above begin/end pairs are for the Pascal language.  The Pascal language requires a more sophisticated expression.  This expression indicates the keywords BEGIN or CASE start a block and the keyword END terminates the block.  The ',' is used to specify multiple begins or multiple ends.  The '|' operator is used to separate begins from ends.

(#ifdef),(#ifndef),(#if)|(#endif)

The above pairs are for the C language.  The C language has the added complication that #if is a sub-string of #ifdef.  Due to the implementation of begin/end matching, #ifdef must appear before #if.

Alias Filename

Each extension may have one alias file.  This allows you to define aliases which don't affect other extensions.  For example, you may have a comment header you use a lot or wish to change or add to our syntax expansion.  Press the "Alias..." button on this dialog box to define extension specific aliases.

Word Characters

The word characters affect the operation of all word oriented commands including word searching.  You may use a '-' character to specify a range such as A-Z which specifies upper case letters.  To specify the '-' character as a valid word character, place a '-' at the beginning or end of the word character string.

Truncation

Line truncation is typically used for mainframe languages such as COBOL, JCL, and OS/390 Assembler where there are line numbers (usually starting in column 73) which need to stay in the same column position.  For these languages, the truncation line length is set to 72.    When on, all editor operations do not allow the data to the right of the truncation line length to move or be modified.  For example, search and replace operations will not find data to the right of the truncating line length.  In addition, when a replace occurs, the data to the right of the truncation line length will not move.  If necessary, the replaced text is truncated to fit within the truncation line length.

Set this to "Auto" if you want the editor to determine the truncation line length based on the record format of the file (only OS/390 data sets can have a record format).  For files which do not have a record format, the truncation length is turned off.  For example, when "auto" is on and the record width of the file is 80, 72 is used as the truncation line length which is the record length minus eight.

Auto Caps

When on and a file is opened which contains no lower case characters, caps mode is turned on (not the same as caps lock).  When caps mode is on, all text is inserted in upper case.  This feature is intended to emulate ISPF.  Also see caps command.

Delete

Deletes the extension setup information.  This button is grayed when it is not allowed.  The Fundamental extension setup information may not be deleted.  An extension such as C, which has other extensions (such as H, CPP, and CXX) that refer to it, may not be deleted until all referring extensions that refer to it are deleted.

Refer To

The "Refer To" button allows you to make one extension's setup data refer to another.  For example, the "h" and "cpp" extensions refer to the "c" file extension.  When you modify the "h" or "cpp" extension setup, you are actually modifying the extension setup for all 3.  In addition, the "h" and "cpp" extensions will use the same tagging support as the "c" extension. This button is not enabled if other extensions already refer to this one.

Color Coding

Displays Color Coding Setup dialog box which allows you to modify language specific color coding for the current language.  New color coded keywords may be added.  This button also allows you create language specific color coding for new languages.  This button is always disabled if you are running Windows 3.1 due to limited dialog box resources.

Update

Updates the extension setup but does not close the dialog box.  This allows more than one extension's options to be modified while the Extension Options dialog box is displayed.

Options

This button accesses options such as minimum keyword abbreviation, and other language specific options.  Press this button to display the extension specific options dialog box, and press F1 for help. This button is grayed when it is not supported.

Project

This button displays the Project Properties dialog box.  Each extension may have its own compile command, build command, include directories, and more.  See section "Projects for more information.

New

Allows you to create a new extension and assign extension specific options.

Menu

Allows you to specify extension specific menus.  By default, extension specific menus are displayed when the right mouse button is pressed.  Use the Open Menu dialog box ("Macro", "Open/New Menu...") to create or modify a menu.  The mouse commands which display extension menus are mou_click_menu_block, mou_click_menu_line, and mou_click_menu.

Alias

This button displays the Alias Editor dialog box which gives you an easy way to define extension specific aliases.

Comments

This button displays the Comment Setup dialog box which has options for the box and line comments commands on the Document menu.


Changing Key Bindings

Bind Command to Key Dialog Box

("Tools", "Configuration", "Key Bindings...") or ("Macro", "List Macros...") or (gui_bind_to_key command)

Try using the Redefine Common Keys dialog box ("Tools", "Configuration", "Redefine Common Keys...") to see if you can do what you want there.  It is well organized for common key binding changes.

Below is a picture of the Bind Command to Key dialog box:

The basic steps for binding a command to a key are as follows:

•	Choose a command from the Command combo box

•	Click on the "Add Key or Mouse Click" button and press the key which you want the command bound to.

•	Click on the Bind button.

The Command combo box supports completion of command names.  If you don't know the name of the command but do know a key which invokes the command, click on the "Add Key or Mouse Click" button and press the key for which you want to know the binding.  Key binding information for the keys displayed in the Key Sequence text box is displayed above the Affect All Modes check box.  There are two ways to bind keys.  You can edit Slick-C source code representing all your key bindings or you can use this dialog box.  We recommend you use this dialog box unless you are making many key binding changes.  See section "Editing Key Binding Source for information on the other method.

Command

Specifies the command you want to bind.  Once entered, all key sequences the command is already bound to are displayed in the top right of this dialog box.

Add Key or Mouse Click

Once you press this button, you will be prompted to press a key or click the mouse.  The key or mouse click you have selected will be added to the Key Sequence text box.  If you make a mistake, press the Clear button to erase the contents of the Key Sequence text box.

Clear

Erases the contents of the Key Sequence text box.

Affect all modes

This check box is grayed if the current buffer does not have an extension specific event table defined.  You might want to uncheck this box if you want a particular key binding to only affect the current buffers mode.

Bind

The Bind button binds the command selected in the command combo box to the key sequence specified. This button is grayed until a valid command and key sequence is selected.

Unbind

Removes the key binding for the Key Sequence specified. This button is grayed if the Key Sequence text box is empty or is not bound to a command.

Quit

Closes the dialog box.  Key bindings changes are not cancelled.

Edit

This button is grayed if the command in the Command combo box is not valid.  You need to invoke the Bind Command to Key dialog from the ("Tools", "Configuration", "Key Bindings...") menu item for this button to be visible.  This button displays the Slick-C source for the command selected in the Command combo box.

Run

You need to invoke the Bind Command to Key dialog from the ("Tools", "Configuration", "Key Bindings...") menu item for this button to be visible.  This button executes the command selected in the Command combo box on the current buffer. This button is grayed in the command if the Command combo box is not valid.

Delete

Deletes the macro displayed in the Command combo box.  This button is only visible when you use the List Macros menu item, and is grayed if the command in the Command combo box is not valid.

Cmd Help

Displays help on the command selected in the Command combo box. This button is grayed if the command in the Command combo box is not valid.

Editing Key Binding Source

If you are creating a new emulation or change a lot of key bindings, you may want to edit your key binding source instead of using the Bind Command to Key dialog.  To create a Slick-C batch macro containing your current key bindings, enter the comand "list_source" on the Visual SlickEdit command line.  One of the files generated by this command is "vusrdefs.e".  It is placed in your configuration directory if the VSLICKCONFIG environment variable is set (defaults to $HOME/.vslick under UNIX) .  Otherwise, it is placed in your macros directory.  If you open this file (Ctrl+O), the first part of the source code will be your key bindings which look like this:

defeventtab default_keys

def  'A-a'-'A-z'=

def  'A-F6'=

def  'F10'=

def  'C-A'= select_all

def  'C-B'= select_block

def  'C-C'= copy_to_clipboard

def  'C-D'= gui_cd

...

The default_keys are the key bindings that are active in fundamental mode.  The other event tables defined by the defeventtab primitive are mode event tables which contain key bindings which override the fundamental mode key bindings.  Make changes to this buffer by adding or modifying the "def keyname= command" lines and then save the buffer by pressing Ctrl+S.  For complete information on the syntax for binding keys see section "Defining Events and Event Tables.  The valid key names are listed in the on-line help under "Event Names".  You can also list the keys names through the on-line help by invoking the command "help Event Names".  To run this Visual SlickEdit batch program, type the name "vusrdefs" without the extension on the command line.  The path is not necessary if it is included in your VSLICKPATH or PATH environment variable.

Unbinding a Key

To unbind a command from a key, invoke the Bind Command to Key dialog box ("Tools", "Configuration", "Key Bindings..."), use the "Add Key or Mouse Click..." button to select the key, and press the Unbind button.

Finding out What Key(s) a Command is Bound to

To find out what key(s) a command is bound to, invoke the Bind Command to Key dialog box ("Tools", "Configuration", "Key Bindings..."), and enter the command in the Command combo box.  The key bindings are displayed in the top right of the dialog box.

Finding out What the Function of a Key is

Use the what_is command("Help", "What is Key...") to determine the function of a key. It will prompt you to press a key.  If the key is bound to a command and our on-line help has a help item for it, the help on the command invoked by the key will be displayed.  Otherwise the message line displays the command, if any, the key is bound to.  This command will give the correct binding information regardless of whether or not you have changed the key bindings.


Redefine Common Keys dialog box

("Tools", "Configuration", "Redefine Common Keys...")

ENTER Key Configurations

BACKSPACE Key Configurations

DEL Key Configurations

HOME Key Configurations

TAB Key Configurations

BACKTAB Key Configurations

Cursor Wrap

Up/Down on Text

Line Wrap on Text

Jump Over Tab Characters

Pull Chars Backspace

Hack Tabs Backspace

Modal Tab

CUA Text Box

Enter Inserts Real Indent

Many users feel strongly about the function of the keys ENTER, BACKSPACE, DEL, HOME, TAB, BACKTAB, LEFT, RIGHT, UP, and DOWN.  For this reason, we provide a Redefine Common Keys dialog box specifically designed for changing the function of these keys ("Tools", "Configuration", "Redefine Common Keys...").  For changing the function of other keys, see section "Changing Key Bindings.

ENTER key configurations

Nosplit Insert Line

Inserts a blank line after the current line and aligns the cursor with the first non-blank character of the original line.  The current line is not split.

Split Insert Line (default)

Splits the current line at the cursor.  Enough blanks are inserted at the beginning of the new line to align it with the first non-blank character of the original line.

Maybe Split Insert Line

If insert state is on, the current line is split at the cursor.  Enough blanks are appended to the beginning of the new line to align it with the first non-blank character of the original line.  If the insert state is off, the cursor is moved to column one of the next line.

BACKSPACE key configurations

Rubout

Deletes the character to the left of the cursor.  If word wrap is on, the cursor will wrap to the previous line when the left margin is hit.  Otherwise the cursor is not wrapped to the previous line.

Linewrap Rubout (default)

Deletes the character to the left of the cursor.  The cursor always wraps to the previous line when the left margin is hit.  If you want line wrapping to occur when column one is reached, set the "Line Wrap On Text" check box on  ("Tools", "Configuration", "Redefine Common Keys...", "Line Wrap On Text...").

DEL key configurations

Delete Char

Deletes the character at the cursor.  If word wrap is on and no more characters exist on the current line, the next line is joined to the current line.

Linewrap Delete Char (default)

Deletes the character at the cursor.  If no more characters exist on the current line, the next line is joined to the current line.

HOME Key Configurations

Begin Line

Moves the cursor to column one.

Begin Line Text Toggle (default)

If the cursor is on the first non-blank character of the current line, the cursor is placed in column one.  Otherwise, the cursor is placed on the first non-blank character of the current line.

TAB Key Configurations

tab (default)

Places the cursor at the next tab stop if any.  Text is not moved.  Only the cursor moves.

Move Text Tab

Moves text from cursor to end of line to next tab stop if any.

Important: If indent with tabs is on, a tab character is inserted regardless of the tab key configuration.  See section "Indent With Tabs for more information.

BACKTAB Key Configurations

Backtab (default)

Places the cursor at the previous tab stop if any.  Text is not moved.  Only cursor moves.

Move Text Backtab

Moves text from cursor to end of line to previous tab stop, if any.

Cursor wrap

Determines whether the cursor LEFT and RIGHT commands wrap to the previous or next line respectively.

Up/Down on text

Determines whether the cursor UP and DOWN commands place the cursor in virtual space.  By default, cursor UP and DOWN goes to the same column of the next or previous line, regardless of the length of the line.

Line wrap on text

The line wrap on text option affects whether line wrapping occurs when the left margin is hit or column one is hit for the LEFT and RUBOUT key configurations.  By default, when word wrap is on, wrapping occurs when the left margin is hit regardless of the LEFT or RUBOUT key configurations.  Check this box if you want wrapping to occur when column 1 is reached.

Jump over tab characters

By default, moving the cursor over a tab character with the LEFT or RIGHT arrow key causes the cursor to jump across the virtual space.  To allow the LEFT and RIGHT arrow keys to cursor into virtual space of tab characters, turn this check box off.

Pull chars backspace

By default, pressing the BACKSPACE key when in replace mode removes the previous character and moves the cursor left.  If you just want the previous character to be replaced with a space character, turn this check box off.

Hack tabs backspace

By default, pressing the BACKSPACE key when the previous character is a tab causes the rest of the line to be pulled to the previous tab stop.  This is usually not what you want if you are in a mode that has a syntax indent for each level that is different from the TAB settings.  If you want your BACKSPACE key to delete through tab characters one column at a time, check this box on.

Modal tab

By default, pressing the TAB or Shift-TAB key when there is a selection indents or unindents the selection respectively.  If you do not want your TAB or Shift-TAB keys to operate differently when there is a selection, turn this check box off.

CUA Text Box

When this box is checked, the keys and Ctrl+X, Ctrl+C, and Ctrl+V perform cut, copy, and paste commands respectively for a text box other than the command line.  In addition, the dialog manager takes over the keys Alt+A..Alt+Z for selecting controls.   DO NOT check this box if you want all keys to operate the same in a text box as the command line and edit windows.

Enter inserts real indent

When this box is checked, the Enter key inserts real spaces or tabs representing your indent instead of virtual spaces.  Many users like this because pressing the End key will place your cursor after the blank text where you want to start typing the new text.


File Options dialog box

 ("Tools", "Configuration", "File Options...")

Load Tab

Save Tab

Backup Tab

AutoSave Tab

File Filters Tab

Note that the default load and save options are "safe" for editing binary files since all reformatting is turned off.   Otherwise, to ensure that no load or save reformatting takes place when you open and save binary files, turn on the "Binary" check box when you open the file.  It's not safe to edit binary files if "Show EOF Character" is off, "Expand Tabs to Spaces" is on, "Append EOF Character" is on, "Remove EOF Character" is on, or "Strip Trailing Spaces" is on.


Load Tab

("Tools", "Configuration", "File Options...", select Load tab)

The load options settings affect the Open dialog box and any other command which uses the e or edit commands to open a file.  Many of the load options can be overridden by checking the appropriate box in the advanced section of the Open dialog box.

Windows:  You can have different load options for different disk drives.  Define an environment variable called VSLICKLOAD and specify each drive followed by the appropriate switch.  For example, "set VSLICKLOAD= a: +L b:+L" specifies preloading files from floppy drives A and B.

The e or edit command switches and check boxes are described below.   A '+' turns a switch on and a '-' turns a switch off.

Load entire file

Switch +L.  When on, the entire contents of opened files are read into memory.    The "Line" status field may become blank if the file did not fit in the editors cache (defaults to 2 megabytes).  When this check box is off,  Auto Reload will not work until the file is saved.

Count number of lines

Switch +LC.  When on, the entire contents of opened files are read into memory and the number of lines in the file are counted.   The line number is always displayed in the "Line" status field.   The Load Entire File check box will have the same effect as this check box when the entire file can fit in the editors cache (defaults to 2 megabytes) and does not have to be spilled.

Truncate at EOF

Switch +LZ.  When on, the entire contents of opened files are read into memory and the number of lines are counted.  In addition, DOS format files are truncated when an EOF character is found.  The line number is always displayed in the "Line" status field.  This option is useful for REXX ".cmd" files which can have pcode appended to them after the EOF character.

Load partial if larger than

When on, and the file you are loading is greater than the size specified in the "Ksize" text box, the entire file is not read into memory.  Since the file handle remains open to your file, Auto Reload will not work until the file is saved.  The "Line" status field may go blank unless "Fast Line Count on Partial Load" is on.

File caching notes: Visual SlickEdit always reads the entire file for files that are color coded.  However, load partial still helps performance because the original file is used as a read only spill file.  You can determine when Visual SlickEdit has read your entire file by going to the bottom of the file.  If the line number is displayed when at the bottom of the file, the entire file has been read.   If the entire file has been read, this does not mean the entire file is in memory.  By default, Visual SlickEdit uses 2 megabytes for the buffer cache.  When the cache becomes full, modified blocks are written to the spill file.  Blocks that are not modified and can be reread from the original file are discarded.  Scrolling through a 2 gigabyte file requires no more than 2 megabytes of memory (default).  A search and replace operation which hits every block will require almost all blocks to be spilled.  Saving a 2 gigabyte file requires 4 gigabytes of disk space.  We must spill the file data first before saving the file.  Make sure you turn backups off before saving a large file since this will require additional disk space equal to the size of the file.  The block size is 16k.

Fast line count on partial load

Switch +LF.  When on, Visual SlickEdit will count the number of lines when files are opened.  The line number is always displayed in the "Line" status field.  This option is much faster than the "Count Number of Lines" option when editing files larger than the cache size (2 megabytes by default) because very little data is written to the spill file.  Since the file handle remains open to your file, Auto Reload will not work until the file is saved.

Show EOF character

Switch +LE.  When on, Visual SlickEdit will not remove the EOF character when files are loaded.

Expand tabs to spaces

Switch +E.  When on, the entire contents of files are read into memory and tabs are expanded into spaces.  If your tabs settings for the file being loaded are of the form "+<increment>" (like +4), then  tabs are expanded in increments of increment.  Otherwise tabs are expanded in increments of 8.  To set your tabs in a form "+<increment>", bring up the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup", select the extension, and set the "Tabs:" text box).  For languages such as REXX and UNIX shell scripts which require the contents of the file to be analyzed before the file type is known, the fundamental mode tab settings are used.

File locking

Switch +N.  When on, ensures that a file handle is kept open to the file for locking purposes.   This enables Visual SlickEdit to detect when another user is editing the same file.

UNIX: This feature is not yet supported by the UNIX version.

Auto reload

When on, Visual SlickEdit will detect when files you are editing have been modified by other applications and prompt you or automatically replace the file with the new copy on disk.  Under UNIX, this feature is turned off by default because many of the UNIX file systems don't give correct file time stamps.  This causes the editor to prompt you to reload a file which has not been modified.

Suppress reload prompt

When on, files you are editing which have been modified by other applications will automatically be replaced with the new copy on disk.

Auto read only

non-UNIX platforms only: When on, Visual SlickEdit will detect when another application changes the read only attribute of the file and turn on/off Read Only mode.

Reinsert after current

Switch +BP.  When on, buffer and window rings are rearranged so that after an operation which switches the active buffer/window such as Open, Go To Definition, or Cursor Error, you can switch back to the previous buffer or window with the prev_buffer or prev_window command.

Unmodified block spilling

Switch +S.  When on, unmodified blocks are spilled when the memory/buffer cache is full.  When the spill file destination is faster than the disk the file resides on (such as a floppy drive), you should set this switch to +S for optimal performance.

Use UNDO, max undo steps

Switch +U:max_undo_steps (ex. +U:32000 turns on undo and specifies 32000 step max).  When the Use UNDO check box is on, modifications to buffers may be undone.  The Max Undo Steps text box specifies the maximum number of steps that are stored.  Cursor motion may be undone but is not counted as a step.

Save/Restore file pos, max files

When the Save/Restore File Pos check box is on when you open a file, your cursor position is restored to its previous location when the file was closed.  The Max Files text box specifies the maximum number of cursor positions saved.  The most recently closed file positions are stored.


Save Tab

("Tools", "Configuration", "File Options...", select Save tab)

The save and backup options affect save operations.  The save command switches and check boxes are described below.   A '+' turns a switch on and a '-' turns a switch off.

non-UNIX platforms: You can have different save and backup options for different disk drives.  Define an environment variable called VSLICKSAVE and specify each drive followed by the options.  For example, "set VSLICKSAVE= a: +O b:+O" specifies no backup for floppy drives A and B.

Append EOF character

Switch +Z.  When on, an EOF character is appended to the end of DOS files when the buffer is saved.  This switch has no effect on UNIX, Macintosh, or binary files.

Remove EOF character

Switch +ZR.  When on, the EOF character is removed from the end of DOS files when the buffer is saved.  This switch has no effect on UNIX, Macintosh, or binary files.

Expand tabs to spaces

Switch +E.  When on, tabs are expanded to spaces according to the tab stops when the buffer is saved.

Strip trailing spaces

Switch +S.  When on, trailing spaces at the end of each line are stripped when the buffer is saved.

Save files on loss of focus

When on, all modified files will be saved when you switch to another application.

Reset line modify

Switch +L.  When on, line modify flags are reset when the buffer is saved.


Backup Tab

("Tools", "Configuration", "File Options...", select Backup tab)

Visual SlickEdit only makes a backup of a file the first time you save your file in a given edit session.  Your backup file may not represent your last save.  For more up-to-date backups, use our AutoSave feature.  See section "AutoSave Tab for more information.

Backup dir

Specifies backup directory used by "Global directory" or "Global nested directories" backup styles.  The backup directory may contain a drive specifier.  Sets the VSLICKBACKUP environment variable.

Same directory as *.BAK

Switch +DB.  When on, backup files are placed in the same directory as the destination file but the extension is changed to ".bak".  This option works well on networks.

Global directory

Switch +D.  When on, backup files are placed in a single directory.  The default backup directory is "\vslick\backup\" (UNIX: "$HOME/.vslick/backup").  The backup file gets the same name part as the destination file. For example, given the destination file "c:\project\test.c" (UNIX: "/project/test.c") , the backup  file will be "c:\vslick\backup\test.c" (UNIX: "$HOME/.vslick/backup/test.c").

non-UNIX platforms: For a network, you may need to create the backup directory with appropriate access rights manually before saving a file.  See "Backup Dir" above.

Global nested directories

Switch -D.  When on, backup file directories are derived from concatenating a backup directory with the path and name of the destination file.  The default backup directory is "\vslick\backup\" (UNIX: "$HOME/.vslick/backup").  For example, given the destination file "c:\project\test.c", the backup file will be "c:\vslick\backup\project\test.c" (UNIX: "$HOME/.vslick/backup/project/test.c").

non-UNIX platforms: For a network, you may need to create the backup directory with appropriate access rights manually before saving a file.  See "Backup Dir" above.

Use child directory

Switch +DK.  When on, backup files are placed in a directory off the same directory as the destination file.  For example, given the destination file "c:\project\test.c" (UNIX: "/project/test.c"), the backup file will be "c:\project\backup\test.c" (UNIX: "/project/backup/test.c").  This option works well on networks.

Make backup files

Switch +O (overwrite switch). Turns backup on/off.  When the +O options is given to the save command, no backup file is created regardless of the backup option settings.


AutoSave Tab

("Tools", "Configuration", "File Options...", select AutoSave tab)

The AutoSave tab allows you to turn on AutoSave to prevent losing data when an abnormal editor exit occurs (possibly from loss of electricity to your computer).  You must check the "AutoSave activated" check box in order to turn on AutoSave.

After you have set the AutoSave options the way you like, you may want to simulate an abnormal editor exit to get a better understanding of how AutoSave works.  To simulate an abnormal editor exit, modify one or two files, wait for an AutoSave to occur, and type the command fexit on the Visual SlickEdit command line.  The fexit command will EXIT the editor WITHOUT prompting you to save modified files or your configuration.  By default, AutoSave temporary files are placed in a directory called "autosave" below your configuration directory.

Note: AutoSave temporary files are deleted when the editor exits normally.  Once a file has been saved or closed, the AutoSave temporary file is deleted the next time AutoSave occurs.  This allows you to stay in the editor all day without creating hundreds of autosave files.  AutoSave temporary files are only needed for files that are modified.

AutoSave Limitations

Our current implementation of AutoSave does not save files which have no name.  In addition, AutoRestore does not restore files which do not yet exist on disk.  We recommend that you save your file at least once to ensure that the file has a name and exists on disk.

Save after period of inactivity

Specifies amount of idle time in minutes or seconds when modified files should be saved.  Set this value to 0 if you want this option ignored.

Save after period of time

Specifies amount of time in minutes or seconds when modified files should be saved.  Set this value to 0 if you want this option ignored.

AutoSave directory

Specifies the AutoSave directory if the "Save to different directory" option has been selected.  If the AutoSave directory is blank, "<configuration directory>\autosave" is used.  The configuration directory is defined by the VSLICKCONFIG environment variable.  non-UNIX platforms: If the VSLICKCONFIG environment variable is not set, the directory below the editor executable directory is used as the configuration directory. UNIX: If the VSLICKCONFIG environment variable is not set, "$HOME/.vslick" is used as the configuration directory.

Save to different directory

Specifies that all AutoSave temporary files be placed in the directory specified by the "AutoSave directory" text box.  This option makes it easy for you to cleanup or find all AutoSave files should an abnormal editor exit occur.  If you are editing two files with the same name (i.e. "makefile") but in different directories, one AutoSave temporary file will be overwritten by the other.

Same name, different extension

non-UNIX platforms:  Specifies that the AutoSave file be placed in same directory as the file being auto saved but given a different extension.  The third character of the extension is replaced with a ~ character.  The length of the extension is padded with underscores if the length of the extension is less than 3 characters.  For example, the AutoSave file for "test.c" is "test.c_~".  The AutoSave file for "test.prg" is "test.pr~".  If you are editing two files in the same directory which differ only by the third character, one AutoSave temporary file will be overwritten by the other.

UNIX:  Specifies that the AutoSave file be placed in same directory as the file being auto saved but a ~ character is appended to the name.  For example, the AutoSave file for "test.c" is "test.c~".  The AutoSave file for "test" is "test~".

Same name

Specifies that modified files be saved.  No AutoSave temporary files are created.

Largest file to AutoSave (K)

Files greater than this size will not be autosaved.   Set this value to 0 if you want all files autosaved.

AutoSave activated

When checked, the editor will AutoSave files after the specified period of inactivity or after the period of time specified.


File Filters Tab

 ("Tools", "Configuration", "File Options...", select File Filters tab)

The File Filters tab allows you to change the file specifications that appear in the "List files of type" combo box at the bottom left of the Open dialog box.  The first wildcard pattern(s) specified in the File Filters dialog box is used to initialize the Open dialog box.  Our default is to list all files.  You may want an initially smaller list which displays the source files you typically edit.


Color Settings Dialog Box

("Tools", "Configuration", "Colors..." or color command)

Use the Color Settings dialog box ("Tools", "Configuration", "Colors...") to change the default colors.  Select the screen element, then set the foreground and background colors, and press the Apply or OK button.  The Apply button updates the colors you have modified without closing the dialog box.

Set embedded language color

When on, you can define the colors for embedded source code.  For HTML, our syntax color coding recognizes the <script language="???"> tag and uses embedded language colors for the new language.  In addition, for Perl and UNIX Shell scripts, you can prefix your HERE document terminator with one of our color coding lexer names to get embedded language color coding.

Perl example

print <<HTMLEOF

<HTML><HEAD><TITLE>...</TITLE></HEAD>

<BODY>

...

</BODY>

</HTML>

HTMLEOF

Screen Element

Select the screen element before changing the foreground and background colors.  Most of the screen element items are obvious except for the following screen elements:

Cursor	The Cursor screen element is displayed in the active edit window when the cursor is placed on the Visual SlickEdit command line.  It is not the color of the blinking cursor (we wish we could change this color).

Window Text	This is the color other text which is not a specific syntax element.

Attribute	HTML only.  This is the color used for a recognized attribute of an HTML tag.  For example, the "src" attribute of the "img" tag gets this color.

Apply

Updates all modified screen elements.  The dialog box is not closed.

Reset

Restores all colors to the values they were when the editor was invoked.

Cancel

Restores all colors to the values they were when the colors dialog box was displayed.

Use system default

When checked, the operating system default colors are used.  Currently this check box is only enabled for the "Status" and "Message" fields.  For UNIX, the "System" default colors are selected by the editor and not the operating system.

Schemes>>

Expands the Color Settings dialog box so you can try different color schemes, or define your own.

Style

For color coded elements, you may also choose whether the element is bold, italic, or underlined.  For example, keywords are bold by default.

To try a different color scheme, pick a color scheme and press the "Apply" button.  If you want to keep your changes, press the OK button.  User defined color schemes are stored in "uscheme.ini".

To define a new color scheme, set your colors for the various screen elements and press the "Save Scheme..."button.  User defined color schemes are stored in "uscheme.ini".


Font Configuration Dialog Box

("Tools", "Configuration", "Font...")

Visual SlickEdit allows you to change the fonts used by edit windows, the command line, and status text.  Select the screen element you want to change and then select the font you want.

Windows:  Choose the "Terminal" font for the largest selection of nice looking fixed fonts.  These are the fonts for a command prompt.


Configuration Files

User Configuration Files:

User configuration changes are stored in the following files:

vslick.ini	This is a  text file which contains a few miscellaneous options.  The user configured backup directory is stored here.  In addition, some customizable environment variables for path searching for macros, bitmaps, and binary files are stored here as well.

user.vlx	This is a text file which contains color coding changes (keywords etc.).  This file is updated when you close the color coding dialog box.

vslick.sta	This is a binary file which dialog boxes, menus, macro pcode, key bindings, and all other configuration data not store in one of the other configuration files.  Both user and system configuration information is stored here.  Our installation or update program can safely replace this file because source representations of user configuration changes are stored in the Slick-C macro files vusrdefs.e (UNIX: vunxdefs.e), vusrobjs.e (UNIX: vunxobjs.e), and vusrsyNN.e (UNIX: vunxsyNN.e).  The first time a user runs the editor, configuration changes stored in the Slick-C macro files mentioned above are automatically transferred.

NOTE: The reason we store some configuration data in binary in "vslick.sta" and in some Slick-C macro files is so the configuration data can be loaded faster.

vusrdefs.e	(UNIX: vunxdefs.e) This is a Slick-C text file which contains the emulation setting, key bindings, color settings, file extension setup information, and some other miscellaneous options.

vusrobjs.e	(UNIX: vunxobjs.e) This is a text file which contains user defined dialog boxes and menus in Slick-C syntax.

vusrsyNN.e	(UNIX: vunxsyNN.e) This is a text file which contains system modified dialog boxes and menus.  These changes are NOT automatically transferred to Visual SlickEdit unless the version encoding matches (i.e.  NN matches the version of the editor).

*.als	This is a text file which contains user defined extension specific aliases.

ftp.ini	(UNIX: uftp.ini) This is a text file which contains user defined FTP configurations.

uprint.ini	This is a text file which contains user defined printing schemes.

usscheme.ini	This is a text file which contains user defined color schemes.

usrpacks.slk	This is a text file which contains user defined project packages.

ubox.ini	This is a text file which contains user defined box and line comment styles.

alias.slk	This is a text file which contains user defined global aliases (directory aliases).

projects.slk	(UNIX: uproject.slk) This is a text file which contains user defined extension specific projects.

uservc.slk	This is a text file which contains user defined version control systems.

uformat.ini	This is a text file which contains user defined beautifier schemes.

vrestore.slk	This is a text file which contains auto-restore information.  Note that the workspace files also contain auto-restore information, but only for the files/windows previously open.

usercpp.h	This is a text file which contains defines (default preprocessing) for tagging C++ and C code.

System Configuration Files:

Typically system configuration files are only modified by MicroEdge Inc. or OEM customers (except for those files which contain both user and system configuration data like "vslick.sta").  OEM customers may want to modify one of these files in order to ship a customized version of Visual SlickEdit.  If you use one of our dialogs to make a change to a user configuration file such as "user.vlx", you need to transfer your changes to the appropriate system configuration file ("vslick.vlx").  Beware that when you get a new version of Visual SlickEdit, you need to merge your "vslick.vlx" changes into the newly installed version.

vslick.ini	This is a text file which contains a few miscellaneous options.  The user configured backup directory is stored here.  In addition, some customizable environment variables for path searching for macros, bitmaps, and binary files are stored here as well.  Installation programs SHOULD NOT OVERWRITE this file unless the file does not exist.

vslick.vlx	This is a text file which contains system color coding lexer definitions.

vslick.sta	This is a binary file which dialog boxes, menus, macro pcode, key bindings, and all other configuration data not store in one of the other configuration files.  Both user and system configuration information is stored here.  Our installation or update program can safely replace this file because source representations of user configuration changes are stored in the Slick-C macro files vusrdefs.e (UNIX: vunxdefs.e), vusrobjs.e (UNIX: vunxobjs.e), and vusrsyNN.e (UNIX: vunxsyNN.e).  The first time a user runs the editor, configuration changes stored in the Slick-C macro files mentioned above are automatically transferred.

print.ini	This is a text file which contains system printing schemes.  This file is NOT modified by our dialogs and is not preserved when a new editor is installed.

vsscheme.ini	This is a text file which contains system color schemes. This file is NOT modified by our dialogs and is not preserved when a new editor is installed.

box.ini	This is a text file which contains system box and line comment styles. This file is NOT modified by our dialogs and is not preserved when a new editor is installed.

prjpacks.slk	(UNIX: uprjpacks.slk) This is a text file which contains system project packages. This file is NOT modified by our dialogs and is not preserved when a new editor is installed.

vcsystem.slk	(UNIX: uvcsys.slk) This is a text file which contains system defined version control systems. This file is NOT modified by our dialogs and is not preserved when a new editor is installed.

format.ini	This is a text file which contains system defined beautifier schemes.

alias.slk	This is a text file which contains user defined global aliases (directory aliases).  If this file does not exist, install programs should install the default "alias.slk" which contains two predefined aliases (filecomment and functioncomment).

syscpp.h	This is a text file which contains sytem defines (default preprocessing) for tagging C++ and C code.


Configuration Changes Not On Configuration Menu

Due to the large number of configuration items, and the lesser degree of importance of these options, we did not add these options to the configuration menu.

For information on printing options, see section "Printing.  For information on file compare options, see section "Comparing Files.  For information on spell checking options, see section "Spell Checking.

Saving Disk Space With Tab Compression

Column oriented operations are more convenient with files that do not have tab characters.  However, more disk space is consumed by space characters than the appropriate number of tab characters.  Specific file extensions may be selected to be compressed with tab characters when a save is performed.  By default, Visual SlickEdit does not compress any files.  The save command takes about 15% longer to compress a file with tabs while writing the file.  The amount of disk space saved by compressing a file with tabs varies from file to file.  For some assemblerfiles, the file size will reduce by 30%.  Tab compression of a line stops if there are quote characters.  Lines that are part of a line continuation from the previous line (last character of line is '\') are not tabbed.

To select the file extensions compressed with tabs when saved, execute the tab_ext command on the command line with no parameters and add the extension you want compressed.  Separate each extension with a space and prefix each extension with a dot.

Configuration Macro Variables

The macro variables below offer some additional options.  Use the set_var command to set a macro variable.  Invoke the set_var command with just the macro variable name to view the current line.

def_preplace

Default is 1.  If zero, the save command will NOT prompt you if you are inadvertently overwriting a file.  For example, if you invoke the command "save xyz", an "xyz" file already exists, and "xyz" is not the name of the current buffer, you are prompted by default whether you wish to overwrite the file.

   def_buflist

Default is 3.  This macro variable determines how the list_buffers commands displays the buffer list.  By default, the buffer list is sorted and path information is in a separate column to the right of the name.  This macro variable is composed with the following flags:

          SORT_BUFLIST_FLAG    	1

          SEPARATE_PATH_FLAG   	2

          SHOW_SYSTEM_BUFFERS_FLAG  4

Add the flags together to select a configuration.  Leaving out a flag removes the features.  If the buffer list is not sorted, the list will be in the order of the buffer ring.

   def_from_cursor

Default is 0.  If non-zero the commands upcase_word, lowcase_word, and cap_word will start case change from the cursor position instead of the beginning of the current word.

   def_modal_paste

Default is 0.  If non-zero, commands which insert a BLOCK type clipboard will overwrite the destination text if the cursor is in replace mode.

   def_binary_ext

Default is ".ex .obj .exe .lib".  This variable is used by the "editflst.e" macro for BRIEF emulation.  When the "editflst.e" macro is loaded, the extensions listed by this variable are filtered out by the edit command's completion.

   def_save_macro

Default is 1.  Set this variable to "0" if you do not want to be prompted with the Save Macro dialog box after ending macro recording.

Example  (Press ESC to place cursor on the command line)

set-var def-save-macro 0	Don't prompt to save recording macro.

set-var def-from-cursor	View the current value of the "def-from-cursor" macro variable.  The current value may be edited and set to a new value.


Calculating Mathematical Expressions

Calculator dialog box

("Tools", "Evaluate Expr..." or calculator command)

Choose the "Evaluate Expr..." menu item on the Other menu to invoke the calculator.  Our calculator is somewhat different than other calculators.  It lets you type in a mathematical expression from the keyboard or by clicking buttons, including parenthesis.   Almost all the editing keys you are familiar with such as undo, next word, and previous word are supported.  We have chosen a slightly enhanced C expression syntax.  Our calculator does support specifying binary numbers and allows just an 'x' prefix when specifying hexadecimal numbers.  To add the decimal numbers 135 and 288, simple type "135+288=".  Pressing the '=' character evaluates the expression and places the result on the next line.  Once you have the result, click on the Hex, Dec, Oct, Bin button to see the result in a different base.

Expressions With Mixed Bases

To add hex FF with octal 77 with binary 111 with decimal 99, perform the following steps:

•	Click the Hex button and type or click FF.

•	Type or Click +.

•	Click the Octal button and type or click 77.

•	Type or Click +.

•	Click the Bin button and type or click 111.

•	Type or Click +.

•	Click the Dec button and type or click 99.

•	Select the output base by clicking one of the base buttons and type or click = to compute the result.

MATH commands

Mathematical expressions may be evaluated by selecting expressions in a buffer and executing the add command ("Tools", "Add Selected Expr") or by executing one of the math commands on the Visual SlickEdit command line followed by an expression.  These commands support the same expression input.

The syntax of the math command is:

math	expression

The math command ("Tools", "Calculate expression...") evaluates the Slick-C language expression given and places the results in the message line.  Unlike the Slick-C language, octal numbersmay be specified by prefixing the number with a 0 and binary numbers may be specified by prefixing the number with 'b'.  If no operator is specified between two unary expressions, addition is assumed. The characters '$' and ',' are stripped from the expression before it is evaluated.  The mathx, matho, and mathbcommands evaluate the Slick-C language expression given and places the result in the message line in hexadecimal, octal, and binary respectively.

expression can have the following unary operators:

       	~      	bitwise complement

      	-      	Negation

       	+      	No change

The available binary operatorsare listed below from lowest to highest precedence.  A comma after the operator indicates that the next operator is of the same precedence.

        	&, |	bitwise and, bitwise or

^	xor

        	+, blank(s), -	addition, implied addition, subtraction

*, /, %	multiplication, division, remainder

** 	power

Hexadecimal numbers are prefixed with the characters "0x" or just "x". Octal numbers are prefixed with the character "O" or digit "0".

NOTE:  Not all Slick-C language operators are supported.

Example

math  2.5*2	Multiplies 2.5 times 2

math  5/2	Divides 5 by 2

mathx  255	Converts 255 to hexadecimal.

math   xFF	Converts hexadecimal FF to decimal

math   o77	Converts octal 77 to decimal

matho  255	Converts 255 to octal.

math  077+0xff+10	Adds octal 77, hex FF, and 10.

If overflow or underflow occurs, the message "Numeric overflow or underflow" will appear on the message line.  Floating point numbers may have up to a 32 digit mantissaand a 9 digit exponent.

Mathematical expressions may be typed into a buffer and evaluated with the add command.  This feature is known as document math.  The add command ("Tools", "Add Selected Expr") adds selected text and inserts the result below the last line of the selection.  If no operator exists between two adjacent numbers on the same line, addition is assumed.  The result of each adjacent line is added.  You may find yourself using Visual SlickEdit for simple spreadsheet tasks.

Prime numbers are often useful for sizing hash tables.  The isprime command (used from the command line) takes a decimal number as an argument and tells you if it is prime, and if not what its first divisor is.  The nextprime command takes a decimal number as an argument and finds the next greater prime number.


Sorting

Visual  SlickEdit uses a stable quicksort algorithm to sort text.  It is recommended that at least half the text be in memory for best speed results.

Sort Dialog Box

("Tools", "Sort..." or gui_sort command)

Below is a picture of the Sort dialog box ("Tools", "Sort..."):

Sort buffer

When on, the entire contents of the current buffer are sorted.

Sort on selection

When on, each line intersecting with the selection is sorted based on the selected column.  Sort On selection and Sort Within Selection have the same effect except when sorting a block or column selection.

Sort within selection

When on, the selected text is sorted.  Text outside a block or column selection is not moved.  Sort On Selection and Sort Within Selection have the same effect except when sorting a block or column selection.

Order

In an ascending sort, the lowest text item sorted is placed at the top.

Numeric sort

When on, a numeric compare is performed.  Visual SlickEdit supports C style floating point numbers with up to 32 digits mantissa.

Sort commands

If you prefer using the command line, text may be sorted by one of the commands sort_buffer, sort_on_selection, or sort_within_selection.   The syntax of these commands is:

sort_buffer [A][D][I][E] [-N|-F]

sort_on_selection [A][D][I][E] [-N|-F]

sort_within_selection [A][D][I][E] [-N|-F]

Multiple options having the following meaning may be specified:

A	Sort in ascending order.

D	Sort in descending order.

I	Case insensitive sort (Ignore case)

E	Case sensitive sort (Exact case which is the default)

-N	Specifies a numeric sort.  C style floating point numbers with up to 32 digit mantissa are supported.

-F	Specifies a filename sort.

The current buffer may be sorted by the sort_buffer command.

The text within a selected area may be sorted by the command sort_within_selection.  See section "Selecting Text and Operating on Selected Text for help on selecting text.  The sort_within_selection command supports line and block selections only.

To sort on a column field, use the Ctrl+B key to select an area of text and invoke the command sort_on_selection.  See section "Selecting Text and Operating on Selected Text for help on selecting text.  The sort_on_selectioncommand supports line and block selections only.

The commands sort_within_selection and sort_on-selection have the same effect when a line selection is used.  When a block selection is used the sort_within_selection command will only sort text inside the left and right edge of the block selection,  where as the sort_on_selection command will sort the lines over which the block selection extends based on the text within the block selection.


The Visual SlickEdit File Manager

The Visual SlickEdit file manager offers a rich set of file listing, selecting, and operating capabilities.  You can select, deselect, list, and unlist files by extension, attribute, and search pattern.  Once you have listed and selected the files to be operated on, you can copy, move, delete, change attribute, or backup the selected files.  Under non-UNIX platforms, the Visual SlickEdit file manager will handle multiple disk backups by requesting another disk and formatting it if necessary.  All file management capabilities are driven by the Slick-C language.  New Slick-C language commands may be written to be used by the file manager.  You may use the file manager to quickly search your hard disk to find a file you wish to edit, or perform a search and replace on a specific set of files.  The difference between the Visual SlickEdit file manager and other file managers is its extraordinary degree of programmability.

List Files dialog box

          DIR and LIST commands

          Selecting Files and Operating on Files

          Repeat Command on Selected dialog box

List Files Dialog Box

("File", "File Manager", "New File List..." or fileman command)

To start the Visual SlickEdit file manager, use the List Files dialog box ("File", "File Manager", "New File List...").  Below is a picture of the List Files dialog box:

File name

Specify in this text box one or more files separated by spaces.  Each file specification may contain wildcard characters.  For example, "*.c *.h" will list all C and H files.

Include system files

When checked, files with the system attribute set are included in the list.  This option is ignored on UNIX.  This option is always turned on under Windows if the "Show all files"explorer option is set.

Include hidden files

When checked, files with the hidden attribute set are included in the list. This option is ignored on UNIX.  This option is always turned on under Windows if the "Show all files"explorer option is set.

Subdirectories

When on, all subdirectories below each file specified in the File Name text box are searched.

dir and list commands

If you prefer using the command line, the file manager may be invoked by the commands dir or list.  The dir command creates a buffer and inserts a list of the files within a directory with columns for name, extension, size, date, time, attributes, and optional path.  The mode is changed to fileman mode.  The list command is the same as the dir command except it lists files at or below a directory you specify.  The fileman_mode commandmay be used to change the edit mode of the current buffer to fileman mode.

The syntax of the dir command is:

dir  {[ [- | +] option_letters] [ [@]filespec ]}

The syntax of the list command is:

list  {[ [- | +] option_letters] [ [@]filespec ]}

option_letters may be 'H','S','D','P','T' with the following meaning:

H	Include hidden files.  Defaults to OFF.  This option is ignored by the UNIX version.

S	Include system files.  Defaults to OFF.  This option is ignored by the UNIX version.

D	Include directory files. Defaults to ON for dir command.  Defaults to OFF for list command.

P	Append path.  Defaults to ON.

T	Tree file list. Defaults to OFF for dir command.  Defaults to ON for list command.

filespec may contain operating system wild cards such as '*' and '?'.  If filespec is not specified, the current directory is used.  '@' sign prefix to filespec indicates that filespec is a file or buffer which contains a list of file names to be used as arguments to this command.

Examples

dir	List file and directory entries of the current directory

dir @backup.lst	List file and directory entries specified by each line of the file "backup.lst".

dir *.c	List files and directory entries of the current directory that have the C file extension.

list @backup.lst	List files specified by each line of the file "backup.lst".

list	List all files starting from the current directory

non-UNIX Examples

dir c:\	List file and directory entries in the root directory of drive C

dir +HS c:\	List file and directory entries in the root directory of drive C including hidden and system files.

list c:\	List all files on drive C

list +HS c:\	List all files on drive C including hidden and system files.

UNIX Examples

dir $HOME	List file and directory entries in the HOME directory

dir ~	Same as above command

list $HOME	List all files starting from HOME directory.

Fileman Mode Keys

The following key bindings change when Fileman mode is active:

      	Alt+Shift+A	Select all files.

Alt+Shift+B	Backup selected files.

      	Alt+Shift+C	Copy selected files.

      	Alt+Shift+D	Delete selected files.

      	Alt+Shift+E	Edit selected files.

Alt+Shift+G	Search and Replace on selected files.

      	Alt+Shift+M	Move select files.

Alt+Shift+N	Keyin current line filename.

Alt+Shift+O	Fileman Sort dialog box.

      	Alt+Shift+R	Repeat Command on Selected dialog box.

      	Alt+Shift+T	Fileman Set Attributes dialog box.

      	ENTER	Edit current file or insert directory files.

      	Space Bar	Select current file toggle.

      	Shift+Up	Select and cursor up.

     	Shift+Down	Select and cursor down.

      	Shift+PgUp	Deselect and cursor up.

      	Shift+PgDn	Deselect and cursor down.

Selecting Files and Operating on Files

Selected files show the character '>' at the beginning of the line.  The file management commands which copy files, move files, delete files, or change attributes of files will only operate on the selected files.  Select files before executing a file management command.  You will receive the message "Select file(s) first.  Press F1 for help." if you forget to select files.

Most of the commands which select or deselect files can be access from the Select menu (Right Button, "Select" or "File", "File Manager", "Select").  The following commands select files:

fileman_space	(Space Bar) Toggles the selection character on/off.

fileman_selection_up	(Shift+Up) Selects the current file and moves the cursor to the previous

 line.

fileman_selection_down	(Shift+Down) Selects the current file and moves the cursor to the next

 line.

fileman_deselect_up	(Shift+PgUp) Deselects the current file and moves the cursor to the

 previous line.

fileman_deselect_down	(Shift+PgDn) Deselects the current file and moves the cursor to the next line.

select_all	(Alt+Shift+A or "File", "File Manager.", "Select", "All") Selects all files.

deselect_all	("File", "File Manager", "Select", "Deselect All")  Removes the selection character from all files.

select_reverse	("File", "File Manager", "Select", "Reverse Select") Toggles the selection character on or off for all lines.

select_attribute	("File", "File Manager", "Select", "Attribute")  This command selects files that contain a specific attribute search string you specify.

select_ext	("File", "File Manager", "Select", "Extension...") Selects all files with a given extension.  The extension should be entered without the '.' character.

select_mark	("File", "File Manager", "Select", "Highlight")  Selects all files within a marked area.

deselect_mark	("File", "File Manager", "Select", "Deselect Highlight") Removes the selection character from files within the selected area.

The following commands operate on the selected files:

fileman_backup	(Alt+Shift+B or "File", "File Manager", "Backup...) Backup selected files.  Files are copied to a directory of your choice.  The path of the source file is appended to the destination directory to determine each destination filename.

fileman_copy	(Alt+Shift+C or "File", "File Manager", "Copy...") Copy selected files.  Files are copied to a directory of your choice.  If the destination directory does not exist it is created.

fileman_move	(Alt+Shift+M or "File", "File Manager", "Move...") Move selected files.  Files are moved to a directory of your choice.  If the destination directory does not exist it is created.  The destination directory does not have to be on the same disk partition.

fileman_delete	(Alt+Shift+D or "File", "File Manager", "Delete...") Erase selected files.  A confirmation message box is displayed before the selected files are erased.

fileman_replace	(Alt+Shift+G or "File", "File Manager", "Global Replace...") Search and replace on selected files.

fileman_edit	(Alt+Shift+E or "File", "File Manager", "Edit...") Edit the selected files.

fileman_attr	(Alt+Shift+T or "File", "File Manager", "Attribute...") Change file attributes.  Windows: Displays menu for selecting read-only, hidden, system, or archive attribute.  UNIX: Displays menu for setting file permissions.

for_select	(Alt+Shift+R or "File", "File Manager", "Order")  Repeats a command you specify for each of the selected files.

non-UNIX platforms: You may place unformatted disks in the destination drive.  The Visual SlickEdit file manager will detect that the disk is not formatted and prompt you to provide a format command to format the disk.

Repeat Command on Selected Dialog Box

("File", "File Manager", "Repeat Command..." or for_select command)

You can create a command string which executes an internal macro command or an external program.  Parts of the filename may be inserted into the command string as well as a few other items.   The fmsay command may be used to test if you have built a command string properly.  The fmsay command does not touch your files in any way.  It simply displays the command that is about to be executed in the fileman status window.  Once you are satisfied with your command string, remove the fmsay command from your command string.


Setting Environment Variables

Setting Environment Variables in vslick.ini

We recommend that you place configuration environment settings specific to Visual SlickEdit in the file "vslick.ini".  However, do not set the VSLICKCONFIG environment variable in "vslick.ini" (VSLICKCONFIG determines where the editor looks for "vslick.ini").   For a complete listing of Visual SlickEdit configuration environment variables, see section "Configuring Visual SlickEdit.  When the editor starts up, it sets the value of environment variables specified in "vslick.ini".  Below is a sample "vslick.ini" file with an environment section.

non-UNIX example

[Environment]

VSLICKPATH=c:\vslick\win;c:\vslick\macros;c:\vslick\bitmaps;c:\vmacros

VSLICKALIAS=c:\vmacros\alias.slk

VSLICKINCLUDE=c:\vslick\macros;c:\vmacros

VSLICKTAGS=tags.vtg;c:\msdev\tags.vtg

VSLICKLOAD=a: +l b: +l

VSLICKSAVE=a: +o b: +o

MYPROJECTVERSION=c:\myprog4.2

UNIX Example

[Environment]

VSLICKPATH=/usr/lib/vslick:/usr/lib/vslick/macros:/usr/lib/vslick/bitmaps

VSLICKALIAS=%HOME%/vmacros/alias.slk

VSLICKINCLUDE=/usr/lib/vslick/macros

VSLICKTAGS=utags.vtg:/usr/include/utags.vtg

MYPROJECTVERSION=/myprog4.2

When the editor starts, the following environment variables are created by the editor:

VSDRIVE	(non-UNIX platforms) Drive letter followed by colon where editor executable resides.

VSDIR	Directory of editor executable with trailing backslash (UNIX: forward slash).

Environment variables may be embedded in any line within a section by placing % characters around the environment variable (as shown in the UNIX example above).

set command

You may change or view the environment while you are running Visual SlickEdit via the set command.   The operation of our built-in SET command is almost identical to the DOS SET command.  Use the set command to temporarily change one of Visual SlickEdit's configuration environment variables or any other environment variable.  For a complete listing of Visual SlickEdit configuration environment variables, see section "Environment Variables.  The syntax of the SET command is:

set [envvar_name [=value]]

When you invoke the set command with no parameters, a new buffer is created and the current environment variable settings are inserted.  The current value of an individual environment variable may be retrieved by executing the set command followed by the name of the environment variable.  Specifying the name of the environment variable followed by an equal sign and the new value will replace the value of an existing environment variable or assign a value to a new environment variable.  To remove an environment variable, specify the name of the environment variable followed by an equal sign, but omit the value parameter (ex. "set vslicktags=").  The DOS command shell removes environment variables in this way also.  The following steps are a convenient way to change the PATH environment variable:

•	Press the ESC key to toggle the cursor to the command line.

•	Type "set path" and press the ENTER key.  This will place the current value of the PATH variable on the command line.

•	Edit the current value and press the ENTER key.

The above steps may be used to change the value of any other environment variable by specifying a different environment variable name in the second step.  The set command supports completion on the environment variable name.  Typing "set ?" on the Visual SlickEdit command line will give you a selection list of all the environment variable names.


Invocation Options

The syntax for invoking Visual SlickEdit is:

vs {options} file1 file2 ...

Where options is one or more of the following:

+ or -new	Indicates whether a new instance of the editor should be created or if the existing instance should process the command line parameters.  +new creates a new instances.  Default is -new.

-sc config-path	Specifies the configuration directory.  Visual SlickEdit will use this directory to find and save configuration files.    Sets the VSLICKCONFIG environment variable to config-path..

-suo option-letters	OS/390: option-letters is a string of one or more of the folling letters:

m	Disable mouse over detection

t	Disable large toolbars

c	Disable cursor blink

These options we added to to reduce CPU utilization and speed up start time of the OS/390 version.

-sua	UNIX: Enables right alt key for foreign characters.

-supf kbdfile	UNIX: Specifies a keyboard file for mapping the keyboard at the X (modmap) level.  Some UNIX systems have poor keyboard mappings which need to be corrected so keys like Backspace and Delete (and sometimes others) work properly.  Use the xmapkeys program to generate the keyboard file.

-sr restore-path	Specifies the directory containing the Visual SlickEdit auto-restore files.  Sets the VSLICKRESTORE environment variable to restore-path.

-si kmax_var_space max_Nofvars

kmax_var_space specifies the amount of memory in kilobytes allocated for storing the contents of interpreter variables (default is 1000k.  max_Nofvars specifies the maximum number of local, static, and global variables there may be (default is 10000).

-st state_ksize	Specifies the maximum amount of swappable state file data in "vslick.sta" (UNIX: "vslick.stu") to be kept in memory, in kilobytes.  -1 specifies no limit.  0 specifies that the editor preload all state file data.  The default is 200k.

-sm max_file_size	Specifies the maximum amount of buffer text in megabytes that may be edited at one time.  Visual SlickEdit will automatically allocates more memory to allow for the editing of up to 2 gigabyte of files.    However, you may want to use this option to get better performance..

-x pcode_name	Alternate state file(.sta) or pcode file (.ex).

-m menu_file	Name of menu resource to use for MDI menu bar.

-p cmdline	Execute command with arguments given and exit.  No other options or filenames can be specified after this option since the rest of the command line is assumed to be the program name and space delimited arguments for this option.

-r cmdline	Execute command with arguments given and remain resident.  No other options or filenames can be specified after this option since the rest of the command line is assumed to be the program name and space delimited arguments for this option.

file1 file2 ...	Files to edit.  Filenames may contain wildcard characters ('*' and '?').

-#command	Execute command on active buffer.  For example, vs test.c -#bottom-of-buffer places the cursor at the end of test.c.  Use double quotes if your command has spaces (ex.  vs test.c "-#goto-col 50").

+ or -L[C]	Turn on/off load entire file switch.  The optional C suffix specifies counting the number of lines in the file.

+ or -S	Turn on/off unmodified block swapping to spill file.

+nnn	Load binary file(s)that follow with a record width nnn.

+T [buf_name]	Start a default operating system format temporary buffer with name buf_name.

+TU [buf_name]	Start a UNIXformat temporary buffer with name buf_name.

+TM [buf_name]	Start a MACINTOSHformat temporary buffer with name buf_name.

+TD [buf_name]	Start a DOS format temporary buffer with name buf_name.

+ or -E	Turn on/off expand tabs to spaces switch.  Default is off.

Note that if you specify a project filename with extension (".vpj"), Visual SlickEdit will Auto Restore the project.


Visual SlickEdit has full support for filenames up to 200 characters long.  If you need to edit a file whose name contains space characters, place double quotes around the name.

When you specify a file to edit, Visual SlickEdit automatically recognizes whether its format is DOS, UNIX, or MACINTOSHand adjusts accordingly.  Visual SlickEdit will not append an EOF character to a UNIX or MACINTOSH format text file when saved, regardless of the save options.  When text in one text file is copied to a buffer with another text file format, Visual SlickEdit translates the line separation characters to the destination buffer's format.

Example

vs project1.vpw	Auto Restore from workspace file.

vs project1.dsw	Auto Restore from a VC++ workspace file.

vs autoexec.bat config.sys	Edit two files.

vs "this is.c"	Edit a file with a space character.

vs test.c -#1000	Edit test.c and go to line 1000.

vs orders -#bottom-of-buffer -#/invoice/-

Edit orders file, go to bottom of buffer, and search backward for "invoice".

vs +70 test.exe	Edit binary file test.exe in record width 70.

vs *.c	Edit all C source files in the current directory.

vs -r list \	Start the file manager.

vs -xrich.sta  autoexec.bat	Specify different state file and edit the file autoexec.bat

When Visual SlickEdit is invoked, it concatenates the value of the environment variable VSLICK before the command line you specify.

When Visual SlickEdit does not find a file you wish to edit, an empty buffer is created with that name.


How Visual SlickEdit Finds External Files

There are several files Visual SlickEdit automatically looks for either immediately when the editor is invoked or during the course of operation. The search order for configuration files such as "vslick.ini", "vslick.sta" (UNIX: "vslick.stu"), and "vrestore.slk" is as follows:

•	Configuration directory.  The configuration directory is defined by the VSLICKCONFIG environment variable.  For UNIX, if  VSLICKCONFIG is not defined, then "$HOME/.vslick" is used.  For non-UNIX platforms, if VSLICKCONFIG is not defined, then the executable directory is used.

•	non-UNIX platforms: Current directory.

•	Paths specified in VSLICKPATH environment variable.

•	Paths specified in PATH environment variable.

The search order for executable files, batch macro programs, and miscellaneous files is as follows:

•	non-UNIX platforms: Current directory.

•	Configuration directory.  The configuration directory is defined by the VSLICKCONFIG environment variable.  For UNIX, if  VSLICKCONFIG is not defined, then "$HOME/.vslick" is used.  For non-UNIX platforms, if VSLICKCONFIG is not defined, then the executable directory is used.

•	Paths specified in VSLICKPATH environment variable.

•	Paths specified in PATH environment variable.


vlx File Format

This section describes the format of our color coding vlx files.  You may find our Color Coding Setup dialog box ("Tools", "Configuration", "Color Coding...") easier to user than editing this file directly.

The "vslick.vlx" file defines language specific coloring support for C++, C, Java, Delphi, Pascal, AWK, REXX, Perl, HTML, Modula-2, dBASE, COBOL, FORTRAN, Visual Basic, Ada, Slick-C, and Assembler languages.  You may modify this file or create your own ".vlx" file.

Perform the following steps to modify an existing language specific coloring definition:

•	Edit "vslick.vlx".

•	Search for one of the section names cpp, Java, xbase, Asm, Fortran, Ada, Modula-2, AWK, REXX, Perl, HTML, Pascal, Visual Basic, cobol, or Slick-C.

•	Modify the definition.  See below for information on syntax of definitions.

•	Invoke the cload command from the Visual SlickEdit command line.  If the current buffer has a ".vlx" extension, it will be loaded.  Otherwise you will be prompted to specify a filename.   Specify "vslick.vlx" including path as the filename.  Once the file is loaded you will see your changes immediately.

If you are creating a new lexer name (section name), perform all the above steps and also the steps below:

•	Display the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").

•	If this lexer definition is for a new extension, create the extension with the New button.  Otherwise, choose the appropriate extension.

•	Set the "Lexer Name" to the new lexer definition you created.

•	Turn on the "Language Specific" check box.

•	Press the "Update" button to commit the changes.

Files with a ".vlx" extension are text files which have a syntax similar to an ".ini" file.  If the first non-blank character in a line is a semicolon, the line is considered a comment.  Each definition of a language starts with a section name (the lexer name) enclosed in square brackets.  Within each section, are statements which look like name=value.

The statements may be one of the following:

case-sensitive= [Y | N]

Defines the case sensitivity for the language.  This statement must be the first or second statement within the section.

idchars=start_id_chars  after_id_chars

Defines the characters which are the start of a valid identifier and additional valid characters which may follow.  This statement must be the first or second statement within the section.  You may use a '-' character to specify a range such as A-Z which specifies upper case letters.  To specify a '-' or '\' character as a valid word character, place a backslash before the character.

styles= [style] [style] ...

Defines zero or more styles.  style may be one of the following:

linenum	Line numbers may be found as the first non-blank symbol of a line like BASIC.

dqbackslash	Characters following a backslash in a double quoted string are included in the string  (like C).

dqbackslashml	If a double quoted string ends in a backslash, it continues the string to the next line (like C).

dqmultiline	Doubled quoted strings are terminated by another double quote and can span multiple lines.

dqdoubles	Two double quotes represent one double quote.

dqterminate	Don't color code a string until the string is terminated.  This style does not support dqmultiline or dqbackslashml.

dqlen1	Double quoted strings contain exactly one character.

sqbackslash	Characters following a backslash in a single quoted string are included in the string  (like C).

sqbackslashml	If a double quoted string ends in a backslash, it continues the string to the next line.

sqmultiline	Single quoted strings are terminated by another single quote and can span multiple lines.

sqdoubles	Two consecutive single quotes represent one single quote (like Pascal).

sqterminate	Don't color code a string until the string is terminated.  This style does not support sqmultiline or sqbackslashml.

sqlen1	Single quoted strings contain exactly one character (like Ada).

amphhex	Hexadecimal numbers are of the form &Hdddd (like BASIC).

ampooct	Octal numbers are of the form &Odddd (like BASIC).

hexh	Hexadecimal numbers are of the form ddddH (like Intel Assembler).

octo	Octal numbers are of the form ddddO (like Intel Assembler).

octq	Octal numbers are of the form ddddQ (like Intel Assembler).

poundbase	Based numbers are of the form #base#number#exponent (like Ada).

underlineint	Numbers may have underlines between the numbers  (like Ada).

xhex	Hexadecimal numbers are of the form 0xhhhh (like C).

nonumbers	Don't color code numbers.  This style is useful for tag languages like HTML.  Using this style with other number color coding styles will produce unpredictable results.

rexxhex	Hexadecimal strings are followed by an upper or lower case x.  For example, '414141'X or "414141"X are REXX style hexadecimal strings which are both equivalent to the string "AAA".

packageimport	Language has Java syntax package and import statement where non-quoted filename follows package and import keyword.

idparenfunction	An identifier followed by an open parenthesis indicates a function (like C++ and Java).

html	Enables HTML syntax embedded languages and attribute coloring.

backslashescapechars

Backslash escapes the character that follows.  This is useful for UNIX shell scripts which use \" to indicate that the double quote is not the start a string.

heredocument	Enables support for Here Documents (UNIX Shell/Perl scripts ex. print <<HTMLEOF .... HTMLEOF).   Note that if you prefix your terminator with one of our lexer names you will get embedded language color coding.

perl	Adds support for Perl format statement and some other Perl specific changes.

mlcomment= start_symbol end_symbol [nesting] [followedby idchars] [colorname]

Defines a multi-line comment.  start_symbol and end_symbol define strings which start and end the comment.  Specify nesting if the lexer should look for another occurrence of start_symbol when looking for the end comment symbol.  The followedby idchars is used to require certain characters to follow start_symbol.    You may use a '-' character to specify a range such as A-Z which specifies upper case letters.  To specify a '-' or '\' character as a valid word character, place a backslash before the character.   followedby is ignored when the html style is specified.  Currently, start_symbol and end_symbol may not be valid identifiers.  No more than 4 multi-line comments may be defined.

colorname can be used to indicate that a different color such as keyword color be used instead of comment color when a match is found.  colorname may be keywordcolor, numbercolor, stringcolor, commentcolor, ppkeywordcolor, linenumcolor, symbol1color,symbol2color, symbol3color, or symbol4color.

mlcomment= start_symbol start_col [checkfirst|leading] end_symbol [lastchar]

Defines a multi-line comment.  This construct was designed to handle comments for the ATLAS language.  start_symbol and end_symbol define strings which start and end the comment.  start_symbol is only considered the start of a comment if it appears in column start_col.  checkfirst specifies that the lexer should check if the line is a comment before determining the color coding of symbols in the line.  When the checkfirst option is specified, start_symbol is limited to 1 character in length.  leading specifies that symbol is considered a line comment only if it appears as the first non-blank character.  Space or tab characters are considered blanks.  Currently, end_symbol may not be a valid identifier.  lastchar specifies that end_symbol must appear as the last character on a line to terminate the comment.  No more than 2 multi-line comments may be defined.

mlckeywords= [ keyword ] [ keyword ] ...

Defines keywords for the last mlcomment statement.  When one of these keywords follow the start_symbol defined for the last mlcomment statement the keyword color is used to color the comment instead of comment color.  Keywords do not have to be valid identifiers.  This statement is useful for tag languages like HTML.  See our HTML definition in the file "vslick.vlx" for an example.

keywordattrs= [mlckeyword] [ attribute ] [ attribute ] ...

Defines attributes for the mlckeyword specified which belongs to the last mlcomment statement. Currently this statement only supports HTML syntax attributes and requires that the HTML style be specified.  For example, "keywordattrs=SCRIPT LANGUAGE SRC".

linecomment= [ symbol ]  [col | col+ | start_col - end_col] [checkfirst|leading]

Defines a line comment.  symbol defines the character(s) which start this line comment.  If no column limits are specified, the remainder of the line is considered a comment regardless where symbol appears.  A plus sign after a column specifies an unlimited end_col.  checkfirst specifies that the lexer should check if the line is a comment before determining the color coding of symbols in the line.  When the checkfirst option is specified, symbol is limited to 1 character in length.  If symbol is not specified, all characters will be ignored at or after the column specified (ex. linecoment=73+).  This is useful for Fortran which requires that all characters at or after column 73 be ignored.  leading specifies that symbol is considered a line comment only if it appears as the first non-blank character.  Space or tab characters are considered blanks.

keywords= [ keyword ] [ keyword ] ...

Defines words that should be displayed in keyword color.  Keywords do not have to be valid identifiers.

cskeywords= [ keyword ] [ keyword ] ...

(case sensitive keywords) Defines words that should be displayed in keyword color only if  found in the case specified.  This statement should only be used for languages such as HTML which are case insensitive except for a few words.  For other languages, use the case-sensitive and keywords statements.  Keywords do not have to be valid identifiers.

ppkeywords= [ keyword ] [ keyword ] ...

Defines words that should be displayed in preprocessor color.  The first character of a preprocessor keyword must not be a valid identifer.  Preprocessing keywords must appear as the first non-blank symbol in the line.

symbol1= [ keyword ] [ keyword ] ...

Defines words that should be displayed in symbol1 color.  Keywords do not have to be valid identifiers.

symbol2= [ keyword ] [ keyword ] ...

Defines words that should be displayed in symbol2 color.  Keywords do not have to be valid identifiers.

symbol3= [ keyword ] [ keyword ] ...

Defines words that should be displayed in symbol3 color.  Keywords do not have to be valid identifiers.

symbol4= [ keyword ] [ keyword ] ...

Defines words that should be displayed in symbol4 color.  Keywords do not have to be valid identifiers.


Converting SlickEdit 2.3/2.4 Macros and Configuration

Perform the following steps to convert your SlickEdit configuration changes to Visual SlickEdit

•	Install Visual SlickEdit into a different directory than SlickEdit as described below.

•	Run the list_source command from the Configuration menu in SlickEdit to list the macro source for changes you have made.  This will create a file called "userdefs.e" (UNIX: "unixdefs.e").

•	non-UNIX platforms:  Copy the "userdefs.e" file to your local configuration directory (determined by the VSLICKCONFIG environment variable if you have one) or to the macros directory (defaults to "c:\vslick\macros") and change its name to "vusrdefs.e".

•	UNIX:  Copy the "unixdefs.e" file to your local configuration directory "$HOME/.vslick" and change its name to "vunxdefs.e".

•	Run Visual SlickEdit and type cleanup on the command line.  All options that are still present in Visual SlickEdit will be converted.

•	Save the resulting file created by cleanup and type vusrdefs on the command line to apply the changes to Visual SlickEdit.

To convert a macro source file you have written, perform the following steps:

•	Install Visual SlickEdit into a different directory than SlickEdit as described below if you have not already done so.

•	non-UNIX platforms:  Copy the macro source files you want to convert to your local configuration directory (determined by the VSLICKCONFIG environment variable if you have one) or to the macros directory (defaults to "c:\vslick\macros").

•	UNIX:  Copy the macro source files you want to convert to your local configuration directory "$HOME/.vslick".

•	Run Visual SlickEdit

•	Edit the macro source file in the Visual SlickEdit directory you wish to convert.

•	Type tconvert on the command line.  Our converter can convert about 95% of your macro source.  Typical conversion problems are documented in the text file "convert.doc" which is located in the configuration directory (defaults to "c:\vslick" or "/usr/lib/vslick" for UNIX).


Slick-C Language

Overview

Getting Started by Example

Compiling and Loading Macros

Language Constructs

Debugging Macros

Creating Dialog Boxes With the Dialog Editor

Objects and Instances

Built-in Controls

Adding a Bitmap Command Button or Check Box

Adding Dialog Box Retrieval

Menu Macro Programming

Common Dialog Boxes

String Functions Overview

Search Functions Overview

Buffer Input/Output Functions

Selection Functions Overview

DLL Interface

Shelling Programs From a Slick-C Macro

Hooking Exit and Other Events

Command Line Interfaces

Creating a State File

State File Caching

Error Handling and the RC Variable

Typical Mistakes

Interpreter Error Handling

Windows Structure


Overview

Some History

Why did Microsoft decide to use the Basic language as the extension language for products such as Word and Excel?  Why is Hypercard based on an English like grammar with container variables?  Why did data base companies roll their own languages instead of using C++?

The answer is simple.  The C and C++ languages are incomplete, too difficult, and too dangerous.  While software products have all become easier to use, why hasn't the most popular object-oriented language, C++ followed suit?

When considering the alternatives for extending a graphical version of SlickEdit, it was very clear that DLL's written in C/C++ should not be the primary means (see "DLL interface).   Extending the editor had to be easier to use, safe, and preferably more portable.  This was our reason for creating the Slick-C language.

A Recurring Theme

The easier to use programming languages always seem to add one or more of the features below to overcome problems in C++:

•	Safe string processing which requires no memory management.

•	Provide a language with more built-in primitives for building dialog boxes and building a graphical user interface.

•	Remove requirement to allocate and keep track of memory.

•	Reduce or remove the need for pointers.

•	Reduce need for declarations.

•	Container variables for more easily passing around different kinds of data.

To date some of the valiant attempts include Java, Delphi, Visual Basic, and Tcl/Tk.

Recognizing Problems in C++

In order to create something much better than C++, you must first understand its problems.   Below is a list of the problems:

•	Insufficient built-in types.    No boolean, string, or container type.

•	Too much memory management especially for objects.

•	No primitives for dialog boxes or building a graphical user interface.

•	Over use of pointers due to lack of language constructs.

•	Lots of declaration data required even for the simplest program.

•	Grammar is very large and ambiguous.

What Makes Slick-C the Best Attempt Yet

Slick-C has addressed all of the problems in C++.  The strongest features in Slick-C are listed below:

•	Language syntax is C++ with few major deviations.  Unlike Java, you can pass any type by reference or value as you would expect in C++.

•	Many built-in language and compiler/linker features for building graphical user interfaces.  Language supports graphical resources such as dialog box templates, menu templates, and bitmaps.  A control type is built-in so that compiler/linker detect references to controls which don't exist on a dialog box.

•	Typed and untyped variables.  A major problem with existing highly typed object oriented language such as C++ and Java is that they can't provide users with a good container type variable.  This makes these language unsuitable for simple editor macros, data base applications, or shell scripts which don't need the speed or rigidness of a highly typed language.  How many times have you heard someone first learning C++ say that they want to define a container class?  Then they find out it can't be done in any useful manner.  Slick-C is highly typed, but also provides a very powerful container type.  See container variable code samples below.

•	Better built-in types.  Arrays in Slick-C dynamically grow without requiring the user to allocation memory.  Hash tables (sometimes called associative arrays) dynamically grow and can be pre-initialized similar to an array.  A hash table is an array which can be indexed with a string.  One array or hash table can be assigned to another as long as the types are compatible.  The string type is much more integrated into the language.  String constants are converted to numeric types and boolean (1 or 0) types.  The switch statement supports string expressions.  There are separate string operators so you can determine whether a string or numeric operation will be performed without knowing the variable types.

•	Clipboard Inheritance® (US patent No. 5,710,926) provides inheritance specifically for dialog boxes.  This feature allows you to copy parts of existing dialog boxes to the clipboard, paste them elsewhere, and the original code still runs.  New code can be attached to the new controls without affecting the original controls.  New code can be added to the original controls to affect both instances of the controls; this is, of course, inheritance.  Creating inheritance for parts of dialog boxes is very natural because the Slick-C language has been designed for this feature.  See section "Clipboard Inheritance(R).

Work Still to be Done

We don't claim that Slick-C is finished.  What we have is the ground work for a language which will be the most powerful general purpose programming language.  To complete that language, it will need the following:

•	C++ style classes.  Like Java, we have decided that classes in Slick-C will not require a delete to free objects.

•	Support for enum.

•	Speed and size improvements for typed variables.  Currently Slick-C has been optimized for typeless container variables and strings.  String concatenation is 5 times faster than Java.  Integer arithmetic is 3 times slower than Java.  Floating point performance is much worse but can easily be optimized.  Some of the poor performance is due to the fact that Slick-C does 32 DIGIT integer and floating point arithmetic.  64 bit longs and smaller floating point numbers would really be big enough.

•	Support for char and short types for conserving memory.

•	Support for template classes.  Container variables are sometimes a more powerful mechanism (See sample code below) for accomplishing much of what is done with template classes.  However, users will likely want the speed and additional type checking of template classes.  Besides, many of us are already use to template classes.

•	instanceof operator like Java.  This primitive is very important because it can tell if a variable is an instance of a particular class which may be in the inheritance chain.  Currently, Slick-C has a _varformat() method, but it can't be enhanced to traverse an inheritance chain.

•	C++ code generation.  That is, the ability to convert Slick-C code into source code which can be compiled by any C++ compiler.

Container Variable Sample Code

These examples show what can be done in a language which truly supports typed variables and untyped container variables.

Here is how to define a set of stack routines in Slick-C which support any type of element.

void stacknew(typeless &stack)

{

     stack._makeempty();  // Destroy current contents of stack.

     stack[0]=0;          // Make an array and use first element as top count.

}

void stackpush(typeless &stack, typeless &value)

{

     stack[++stack[0]]=value;

}

typeless stackpop(typeless &stack)

{

    if (stack[0]<0) return('');

    // Make a copy of the element.

    result=stack[stack[0]--];

    // Free space allocated by value and delete array element.  _deleteel is a

    // built-in method which operates on arrays and hash tables.

    stack._deleteel(stack[0]+1);

    return(result);

}

defmain()

{

    // The above routines can handle variables of any type, including string constants.

    struct RECORD {

       int i;

       _str s;

    };

    // You can't make a limit on the number of elements in an array.

    // We will add support for initially allocating a specific number of elements.

    RECORD arecord[];

    arecord[0].i=4;arecord[0].s="element 0";

    RECORD symboltable:[];         // Declare a hash table/associative array

    symboltable:["name1"].i=1;symboltable:["name1"].s="element 0";

    stacknew(stack);

    stackpush(stack,arecord);      // Push an array onto the stack

    stackpush(stack,symboltable);  // Push a hash table/associative array onto the same stack

    stackpush(stack,"string");     // Push a string constant onto the same stack

}

This example illustrates how a container variable can access structure members as an array.  You can forget about implementing this elegantly in any other language.

/*

   Read lines of a file which contains tab delimited data into an

   array of structures.  Each line represents an array structure element.

   The tab delimited data on each line represents fields in the structure.

   We will assume the file contains valid data for filling this structure.

*/

int ReadTable(_str filename,typeless (&table)[])

{

   // Use an editor buffer to open and cache the file.  Data is read

   // in blocks from the file only.  We don't need this much power, but

   // Slick-C needs a few more non-editor file I/O functions.

   status=_open_temp_view(filename,temp_view_id,orig_view_id);

   if (status) return(status);

   top();up();  // Place cursor on line 0 before first line of file.

   for (j=0;;++j) {

      if (down()) break;

      get_line(line);

      if (line:=="") continue;

      rest=line;

      p= &table[j];  //Make p point to this structure element.

      // Here we access structure members as an array of elements

      p->[0]="";

      // Note that loop supports fields which are strings of length 0

      for (i=0;;++i) {

         if (rest:=="" && i) break;

         // Parse is similar to REXX.  We unable to come up with a function syntax

         // that we were satisfied with so with went with a REXX style syntax.

         // Place text up to but not included tab character into value variable.

         // Place tab character and rest of data in rest variable.

         parse rest with value "\t" +0 rest;

         if (substr(rest,1,1):=="\t") {

            rest=substr(rest,2);

         }

         p->[i]=value;

      }

   }

   _delete_temp_view(temp_view_id);

   activate_view(orig_view_id);

   return(0);

}

struct TABLE_ENTRY{

   _str name;

   int value;

};

// defmain is the main entry pointer for a Slick-C batch/script macro

defmain()

{

   TABLE_ENTRY table[];

   // Table file should exist

   // NOTE:  (TABLE_ENTRY []) is type compatible with (typeless [])

   status=ReadTable("table",table);

   if (status) {

      _message_box("Failed to read table file");

      return(1);

   }

   _message_box("First record:  name=":+table[0].name:+" value=":+table[0].value);

}


Getting Started by Example

There are three basic ways to extend Visual SlickEdit using Slick-C.  You may either write a key bindable command, an event driven dialog box, or a batch macro.


A Key Bindable Command

A key bindable command is the most common way to extend the editor.  Command macros may be bound to keys or invoked from a menu.  When you use macro recording, Slick-C source code is created for a key bindable command.  You may edit the source code for a recorded macro by using the list_macros command ("Macro", "List Macros...", Select a macro and press the Edit button).   See section "Recording Macros for more information.

Open a new file called "test.e" (invoke the File Open menu item and type "test.e") and insert the following lines:

_command hello()

{

     message("Hello World");

}

Invoke the load command (F12 or "Macro", "Load Module...") to compile and load your macro.  You have now defined a new command called hello which may be bound to a key or invoked from the Visual SlickEdit command line. Press the ESC key to place the cursor on the command line, type "hello" and press ENTER.  You should see the message "Hello World" in the message area.  Here's how you can bind your hello command to Alt+5.  Invoke the Bind Command to Key dialog box ("Tools", "Configuration", "Key Bindings..."), type "hello" in the text box, Click the "Add Key or Mouse Click..." button, and press Alt+5.  Press ESC or click on the Quit button to close the dialog box.  The editor will prompt you to save the configuration when you exit.  Newly loaded macro modules require the state file to be saved.


An Event Driven Dialog Box

Event driven forms are ideal for creating dialog boxes.  After creating the dialog box, the show command may be used to display the dialog box from the command line or from a menu item.  To display a dialog box from a key binding you must write a key bindable command which uses the show command to display the dialog box.

Perform the following steps to create a simple event driven dialog box:

•	Create a new form  ("Macro", "New Form").

•	Double click on the command button bitmap in the dialog editor Properties dialog box (above the check box bitmap which is a square box with an X in it).

•	Double click on the text box bitmap in the dialog editor Properties dialog box (the one with the letters "ab" in it).  If you can't see the dialog editor Properties dialog box, invoke the Properties menu item ("Window", "Properties") to make it visible.

•	Move the command button or the text box so they do not overlap.  Click on the object with the left mouse button, hold it, and drag to move the object.

•	Double click on the command button that appears on the form (not the bitmap in the dialog editor Properties dialog box).  The Select An Event dialog box should appear with "lbutton_up" displayed in the combo box.  Press the ENTER key to select the event.

•	You should be prompted with an Open dialog box for a new file which is to contain the source code for this dialog box.  Type "form1.e" and press ENTER.

If at any point you can't see the dialog editor Properties dialog box, invoke the Properties menu item ("Window", "Properties") to make it visible.

After the performing the above steps, you should see a file called "form1.e" with the following lines of code.

#include "slick.sh"

defeventtab form1

ctlcommand1.lbutton_up()

{

}

If you don't see the above code, this is probably because you already have a "form1.e" file.  If this is the case, modify the "form1.e" file to contains the lines of code above.

Modify the above code to add the statement  (ctltext1.p_text="Hello World";) as shown below

Example (we have added some comments you don't need)

#include "slick.sh"

// Define an event table for the dialog box window.

defeventtab form1

// Since this is the first event handler defined for this control and the

// name of this control does not match the last defined event table,

// the Slick-C translator automatically defines the event table

// form1.ctlcommand1 and defines the lbutton_up event handler within this

// new event table

ctlcommand1.lbutton_up()

{

   // Set the p_text property of the text box control

   ctltext1.p_text="Hello World";

}

Invoke the run_selected command ("Macro", "Load and Run Form") to load the code, load the dialog box, and display the dialog box.  Click the "ctlcommand1" button to display "Hello World" in the text box.  To close the Form1 dialog box, double click on the system menu (not all UNIX window managers close windows when you double click on the system menu) or press Ctrl+Shift+Space (in the running version of form1 and not the edited copy).  You can press Ctrl+Shift+Space while any dialog box is running in order to edit it (this includes the Properties dialog box).

You can display this dialog box from the command line by typing "show form1".  To display the dialog box modally enter "show -modal form1" on the command line.  The show command provides many powerful options.  For more information, see section "Displaying Dialog Boxes. show command.  The editor will prompt you to save the configuration when you exit.  Dialog box templates and compiled macros are stored in the state file ("vslick.sta" or "vslick.stu" under UNIX).

For more information about building event driven dialog boxes see section "Creating Dialog Boxes With the Dialog Editor.

The example code below illustrates how to write a command which displays a dialog box.  This is useful for binding a command to a key which displays a dialog box.

#include "slick.sh"

_command run_form1()

{

   // The -modal option disables other windows while the dialog box is displayed.

   show("-modal form1");

}


A Batch Macro

Batch macros are useful for trying out Slick-C primitives and are easier to share between multiple users.  Batch macros may not be bound to a key.  However, you can execute a batch macro from the command line or a menu item.

Open a new file called "hello.e" (invoke the File Open menu item and type "hello.e") and insert the following lines:

defmain()

{

     message("Hello World");

}

You have now defined a new batch macro called hello which may be invoked from the Visual SlickEdit command line.  Save your macro and press the ESC key to place the cursor on the command line.  Type "hello" and press ENTER.  You should see the message "Hello World" in the message area.  Batch programs must be saved before they are executed in order for the macro to get compiled.  Visual SlickEdit automatically compiles batch programs if no corresponding pcode file exists (hello.ex in our case), or the date of the source file is newer than the pcode file.


Compiling and Loading Macros

The two commands st and load ("Macro", "Load Module...") are provided for compiling Slick-C modules from within the editor.  The st command translates the module specified into binary code called pcode.  When no module is specified, the current buffer is translated.  The load command (F12 or "Macro", "Load Module...") will translate the module specified if necessary (MAKE), and load the resulting pcode.  When no module is specified, the current buffer is saved if necessary, translated, and loaded.  If a module is loaded which has already been loaded, it is replaced.  Both the commands invoke the external program "vstw.exe" (UNIX: vstw) to translate the source module into pcode.  DO NOT use the load command on batch programs.  After doing so you will no longer be able to execute the batch program until you use the unload command ("Macro", "Unload Module...").

A module which was loaded with the load command may be unloaded with the unload command ("Macro", "Unload Module...").   However, Visual SlickEdit's symbol table (called the names table) will still contain the name of globally scoped variables, procedures, and commands until you save the configuration.  The configuration is aumatically saved when you exit the editor.  You can invoke the save_config command from the Visual SlickEdit command line to save the configuration at any time.


Language Constructs

Comments

String Literals

Numeric Constants

Defining Constants

Operators

Assignment Operator

Scoping and Declaring Variables

Type Casting

How Typeless Container Variables Work

The IF Statement

Statement Block

Loops

Switch statement

Functions

defmain.  Writing Slick-C Batch files

Preprocessing

Pragma

Including Header Files

Defining Events and Event Tables

          def primitive

          Event Driven Dialog Boxes

Module Initializations

Comments

Slick-C supports both C++ comment styles.  Two forward slashes (//) declares the rest of the line to be a comment.  The two characters '/*' open a comment and '*/' closes a comment.  Unlike C++, comments may be nested.

Example

i=1;  //  this is a comment

/* this is a /* nested */ comment */

String Literals

Strings may be in single or double quotes.  Double quoted strings are identical to C++.  A backslash followed by a character has special meaning as follows:

\a	Bell character (7)

\b	Backspace character (8)

\f	Form feed character (12)

\n	New line character (10)

\r	Carriage return (13)

\t	Tab character (9)

\v	Visual character (11)

\?	Question mark character

\'	Single quote character

\"	Double quote character

\\	Backslash character

\xhh	Hexadecimal character code.

\ooo	Octal character code.

If single quotes are used, two single quotes consecutively represents one single quote character.  If double quotes are used, a backslash followed by a double quote represents one double quote character.  The operator ":==" used in the example below compares two strings for exact equality.  The Slick-C language does have a operator "==".  However, this operator will strip leading and trailing spaces and tabs from both operands (see section "Mathematical Operators for a list of operators).

Example

"abc":=='abc'

"Can't find file":=='Can''t find file'

"\t":==_chr(9)

A backslash (not inside quotes) followed by a character or a number has the special meaning as show below.  However, we don't recommend using this feature because it is not C++ compliant.  This features remains only for backward compatibility.

\a	Bell character

\b	Backspace character (8)

\f	Form feed character(12)

\n	New line

\r	Carriage return

\t	Tab

\v	Visual character (11)

\xdd 	Hex character code dd

\ddd 	Decimal character code ddd

Quoted strings adjacent to escape sequences are read (lexed) as one string.  No concatenationis performed.

Example

\n:==\10

\r:==\xd

      	\r:==\x0d

"\r\n":==\r\n

      	"1"\50 + "1"\49:== "23"  // 12 + 11=="23", not 1:+(2+1):+1=="131"

Numeric Constants

The Slick-C language has support for floating point numbersand hexadecimal numbers.  The mantissa is limited to 32 digits and the exponent is limited to 9 digits.  When precision is lost, the result is rounded.  Overflow and underflow are detected.  Floating point numbers have the following syntax:

[+|-] digits [.][digits][E[+|-]digits]

    OR

[+|-]  [.][digits][E[+|-]digits]

The leading sign may have blanks before and after.

Hexadecimal numbers are defined in the same way as the C language, as follows:

0x hexdigits

Example

      4

      "  + 4e2"

      4e2

      " -4E-2"

      -4E-2

      0xff

Defining Constants

Slick-C has full support for #define textual replacements like C/C++.  #define can be used for defining constants or in-line functions.

This syntax for defining a textual replacement is:

#define name[(param1,param2,...)] value

Use a backslash at the end of a line to indicate that the value text continues to the next line.  Any occurrence of name is replaced with the text value before the source is compiled.

Warning: When value represents a constant expression, we recommend you place parethesis around it to make sure there is not a problem with operator precedence.

Example

#define MAXLINES	15

#define MAXLINESP1	(MAXLINES+1)

#define max(a,b)	(  ( (a) >= (b) ) ? (a) : (b) )

#define min(a,b) 	(  ( (a) <= (b) )\

                   ? (a) : (b) )

defmain()

{

     x=4;

     y=7;

     a=max(x,y);

}

Now that Slick-C has full support for #define replacement macros we don't recommend that you use the current const primitive.  The Slick-C const primitive is more like Pascal than C++ and will confuse C/C++ programmers.

The variable name is not prefixed with a type name, the expression must be a constant, and the comma is optional.  The syntax for declaring a constant is:

const

         	variable = constant_expression [',']

         	variable = constant_expression [',']

         	....

The comma is used to declare more than one constant on the same line.  Constants may be used in mathematical expressions.

Example

   const

       LONG_CONST = "line 1" :+

                    "line 2" :+

                    "line 3"

       DOS_INT    = 0x21

Mathematical Operators

Slick-C uses the operator precedence of C.  An expression can have the following unary operators:

!e1	Logical not.  Result is 1 if e1 evaluates to 0.  Otherwise result is 0.

~e1 	Bitwise complement

-e1	Negation

+e1	No change

++v1	Increments the variable v1 and returns the result.

v1++	Returns the value of v1 and then increments the variable v1.

--v1	Decrements the variable v1 and returns the result.

v1--	Returns the value of v1 and then decrements the variable v1.

The binary and ternary operators for the Slick-C language are listed below from lowest to highest precedence.

=	Assign right operand to left operand

+=	Add left operand to right operand and assign to left operand.

-=	Subtract right operand from left operand and assign to left operand.

/=	Divide left operand by right operand and assign to left operand.

*=	Multiply left operand with right operand and assign to left operand.

^=	Bitwise XOR left operand with right operand and assign to left operand.

&=	Bitwise AND left operand with right operand and assign to left operand.

e1?e2:e3	If expression e1 is TRUE (not the string '0'), expression e2 is returned.  Otherwise, expression e3 is returned.

&&	Logical AND.  If left hand expression is false, right hand expression is not evaluated.

||	Logical OR.  If left hand expression is true, right hand expression is not evaluated.

|	Bitwise OR

^	Bitwise XOR

&	Bitwise AND

==	Equal.  Performs a numeric or string comparison depending on the operands.  This function is NOT like identical to the C strcmp function (see :== operator below).

NOTE:	If both operands are numbers, a numeric comparison is performed.  Otherwise a string comparison is performed. In any case, leading and trailing spaces and tabs are stripped before the comparison is performed.

>	Greater than.  Performs a numeric or string comparison depending on the operands.  See note under == operator.

>=	Greater than or equal.  Performs a numeric or string comparison depending on the operands.  See note under == operator.

<	Less than. Performs a numeric or string comparison depending on the operands.  See note under = operator.

<=	Less than or equal. Performs a numeric or string comparison depending on the operands.  See note under== operator.

!=	Not equal. Performs a numeric or string comparison depending on the operands.  See note under == operator.

:==	Exactly equal.  Always performs string comparison.  This is equivalent to the C expression (strcmp(a,b)==0).

:!=	Not exactly equal.  Always performs string comparison.

:<=	Exactly less than or equal.  Always performs string comparison.

:<	Exactly less than.  Always performs string comparison.

:>=	Exactly greater than or equal.  Always performs string comparison.

:>	Exactly greater than.  Always performs string comparison.

:+	Concatenation

<<	Bitwise shift left.

>>	Bitwise shift right.

+	Addition

-	Subtraction

/	Division with possible floating point result.

intdiv	Division with integer result.

*	Multiplication

%	Remainder

In addition to the operators above there is also implied concatenation.  When there is no binary operator between two unary expressions, concatenation is automatically performed.

All numeric operators, except bitwise operators, support floating point numbers.  Bitwise operators support 32 bit integers for all platforms.  In the future, bitwise operators will support 32 bit int and 64 bit long for all platforms.  There are two sets of comparison operators.  The operators <, >, =, !=, <=, and >= perform a numeric comparison if both string expressions are valid numbers.  The operators :<, :>, :==, :!=, :<=, and :>= always perform a string comparison.  Select the appropriate comparison operator for performing a string or numeric comparison.

Note:  Expressions may extend across line boundaries if the line ends in a binary operator or if the line ends with a backslash.

Example

   (1.0==1)            == 1

   (1e2==100)          == 1

   (1e2:==100)         == 0

   ("  abc  "=="abc")  == 1

   ("  abc  ":=="abc") == 0

   ("  abc  ":!="abc") == 1

   ("  1    "==1)      == 1

   ("  1    ":==1)     == 0

   ("abc":<"def")      == 1

   1   2        :=="12"

   1 ( 2)       :=="12"

   pow(4,2)     ==16

   5%2          ==1

   5/2          ==2

   5/2.0        ==2.5

   5 intdiv 2.0 ==2

   5&2          ==0

   5|2          ==7

   (10<7)       ==0

   (10:<7)      ==1

Assignment Operator

The simple assignment statement has the syntax:

         variable=expression;

Example

      i=1;

      i=i+1;

Assignment statements may be cascaded (x=y=z).  We decided it was too dangerous to allow assignment statements within if statements.  The compiler flags assignments within if statements as an error.

Scoping and Declaring Variables

A variable or identifier may contain any of the characters "A-Za-z$_0-9" and must start with one of the characters "A-Za-z_$".  The Slick-C language supports global, static (module),  and local scope variables.  Global variables may be accessed by any module.  The scope of a static variable is limited to the module it is defined in.  The scope of a local variable is limited to the function it is defined in.

Variables are declared just like in C++.  However, there are the following differences:

•	Classes not yet support.

•	void is only allowed as the returned type of a function.

•	char, short, and float types are not yet available.  All numeric types are signed.  The current Slick-C numeric types are int, long, and double.

•	Slick-C has a built-in string type _str.

•	Arrays, while declared similarly, cannot have a size limit.  Arrays elements are always dynamically allocated.

•	Slick-C provides a :[] hash table operator which is similar to the array operator [] except that you index hash tables with a string type.

•	There is no sizeof operator.  Since the Slick-C interpreter currently stores all types as container variables, the sizeof operator has no meaning.

•	Only global or static variables can be initialized with the "=" operator.

•	static structure members are not yet supported.

While we could show you the complex BNF syntax for declaring variables, this would likely only confuse you.  Instead we will break up declarations into categories.  If you don't already know the C language, a book on the C language would help you learn more about Slick-C.

Simple Variables

By simple variable we mean a variable which is not an array, hash table, structure, or function pointer.

The syntax for defining a simple variable is:

[static] TypeName variable1[=expression1] , variable2[=expression2] ...;

Where TypeName may be

boolean	Use this for variables which only take on the value 0 or 1 and are typically used with the boolean operators &&, ||, and !.  You can also use the new keywords "true" and "false".

int	32 bit signed integer.

long	32 DIGIT signed integer.  In the future this will be a  64 bit signed integer.  Same as older keyword bigint.  Currently this type supports a 32 DIGIT number.

double	32 DIGIT mantissa and 32 bit signed exponent.  Same as older keyword bigfloat.

_str	String.  Same as older keyword bigstring.

typeless	Container variable.  You can assign a typeless variable anything.  Even an array of whatever, or hash table of  whatever.

StructName	See section "struct" below.

UnionName	See section "union" below.

The comma is used to declare more than one variable of the same type.  Local variables do NOT have to be defined.  Using a variable not already defined as global or constant declares the variable to be a local typeless variable.  However, you may declare variables within the scope of a function to ensure that the variable will be local even if the name has been declared elsewhere as a global or constant.

Examples

// Declare a global integer

int	gi=1;

//Declare a module scope integer

static int	si=2+4;

//Declare some global string variables

_str	gstring1="Value1", gstring2="Value2";

//Declare a global large floating point variable

double	gd=1.4;

//Declare a global typeless variable

typeless	gt="xyz";

defmain()

{

   _str s; // Declare a local string variable

   t=gi; // Copy gi into local container variable t.

   message("t="t);

}

Details About Variable Initializations

Global and static numeric variables, which include boolean, int, long, and double, are initialized to 0 when no user-specified value is given.  Local variables of any type are not initialized.

Global and static variables declared as typeless or _str are initialized with "" (a zero length string) when no user specified initialization value is given.

Examples

boolean  globalboolean=true;

int      globalint;

double   globaldouble;

defmain()

{

   // will see "globalboolean=1 globalint=0 globaldouble=0"

   message("boolean="globalboolean" "globalint" "globaldouble);

}

struct

Structures are typically used to logically group data.  For example, a record in a data base might have a name, address, and phone number.  This can be logically grouped into a structure to make easier for you to remember what data needs to be filled in for a complete record.  Structures also can have the added effect  of reducing the number of global variables.  There is no sizeof operator like in C++.  Since the Slick-C interpreter currently stores all types as container variables, the sizeof operator has no meaning.

The syntax for defining a structure is:

[static] struct [StructName ] {

     member-variable-decl1;

     member-variable-decl2;

                     ...

} [variable1[={e1,e2, ...}] , variable2[={e1,e2, ...}], ...];

The struct declaration gives you the choice of defining your own type called StructName and/or to declare one or more variables.  The syntax of member-variable-decls is identical to declaring other variables except that static structure members are not yet supported.

The syntax for accessing a member of a struct variable is:

variable.member-name

Differences From C++

For a complete list of differences between Slick-C and C++, see section "Differences Between Slick-C and C++.

•	Space for structure elements is allocated when you access the element.

•	Structure data is not continuous.  This is obvious for string, array, and hash table member variables which contain variable size data.  However, even other types are some times stored else where.  In the future, after a few changes are made, we will document exactly how Slick-C lays out memory.

•	There is not a sizeof function which tells you the size of a structure in bytes.

Examples

struct PHONERECORD { // Define a type called PHONERECORD

   _str Name;

   _str PhoneNumber;

} gPhoneRecord;     // Declare a variable of that type.

PHONERECORD gPR={// Declare a variable of type PHONERECORD.

   "Steve","555-1346"

};

PHONERECORD gRecordArray[];  // See arrays below

struct PHONERECORD2 { // Define a type called PHONERECORD2

   _str Name;

   _str PhoneNumber;

   _str FaxNumber;

};

defmain()

{

   messageNwait("Name="gPR.Name" PhoneNumber="gPR.PhoneNumber);

   t=gPR;  // Copy phone record data into a local container variable

   //Container variables can access structure elements as an array.

   messageNwait("Name="t[0]" PhoneNumber="t[1]);

}

union

Unions are typically used in place of a struct in the case where you have mutually exclusive member variables.  For this case, a union will require less memory than a struct.  Memory is only allocated for one member variable at a time.

The syntax for defining a structure is:

[static] union [UnionName ] {

     member-variable-decl1;

     member-variable-decl2;

                     ...

} [variable1[={e1}] , variable2[={e1}], ...];

The union declaration gives you the choice of defining your own type called UnionName and/or to declare one or more variables.  The syntax of member-variable-decls is identical to declaring other variables except that static union members are not yet supported.

The syntax for accessing a member of a union variable is:

variable.member-name

Examples

union {

   int i;

   _str s;

   double d;

}gu={1};  // Type checking here is with first member variable.

#define KIND_INT 1

#define KIND_STRING 2

#define KIND_DOUBLE 3

defmain()

{

   struct {

      int kind;

      // Here we are nesting a union inside a struct.

      // This union only requires space for one of these

      // members at a time.

      union {

         int i;

         _str s;

         double d;

      }u;

   } x;

   x.kind=KIND_INT;x.u.i=1;

   ...

   switch (x.kind) {

   case KIND_INT:

      messageNwait("x.u.i="x.u.i);

      break;

   case KIND_STRING:

      messageNwait("x.u.s="x.u.s);

      break;

   case KIND_DOUBLE:

      messageNwait("x.u.d="x.u.d);

      break;

   }

}

Anonymous Unions

An anonymous union is a union member variable which has no name.  This saves you from having to type the union member variable name.

Example

defmain()

{

   struct {

      int kind;

      union {

         int i;

         _str s;

         double d;

      };  // No name for this union member variable

   } x;

   x.kind=1;x.i=1;

}

Arrays

Array variables are excellent for keeping track of a list of items.  If you want to prompt a user to select from an array of strings, use the _sellist_form (see on-line help).

The syntax for defining an array variable is:

[static] TypeName variable1[][={e1,e2, ...}] , variable2[][={e1,e2, ...}] ...;

The first element of an array starts at 0.  Use more than one set of [] for multi-dimensional arrays.  Notice that you do not define the maximum number of elements in the array.  This is because array elements are allocated when you access them.  The maximum number of elements that may be placed in an array is about 2 billion.  Your machine will likely run out of memory before this limit is ever reached.

Use the _length() method to determine the number of elements in an array.  The syntax for using this method is variable._length().

The following statements will empty an array:

array._makeempty();   // Empty the array

array=null;           // Empty the array.  Same as above.

Differences From C++

For a complete list of differences between Slick-C and C++, see section "Differences Between Slick-C and C++.

•	Space for array elements is allocated when you index into the array.

•	You cannot use pointer variables to traverse array elements.

•	You can't limit the number of elements that the array may contain.

•	Specifying an array variable WITHOUT the [] operator does not return a pointer to the first element.  Instead it refers to the entire array.  This allows you to copy one array to another or define a function which returns a copy of an array.

•	There is not a sizeof function which tells you the size of the array in bytes.  There is a _length method which tells you the number of elements in the array.

Examples

int	gai[]={1, 7, 12};

int	gaai[][]={{1},{1,2},{1,2,3}}; //two dimensional array

_str	gastring1[]={"Value1", "Value2"};

typeless	gat[]={"String", 1, 2.4};

defmain()

{

   t=gai; // Copy all the array elements into a local container variable

   t[t._length()]=45;   // Add another array element.

   for (i=0;i<t._length();++i ) {

        messageNwait("t["i"]="t[i]);

   }

#if 0

    // This C style pointer loop is not supported.

    p= &array[0];pend= &array[2];

    for (;p<pend;++p){  // If p and pend were declared as pointers,

    }                   // compiler would not allow < or ++.

#endif

}

Hash Tables

Slick-C provides a :[] hash table operator which is similar to the array operator [] except that you index hash tables with a string type.  The syntax for defining a hash table variable is:

[static] TypeName variable1:[][={s1=>e1,s2=>e2, ...] , variable2:[][={s1=>e1,s2=>e2, ...] ...;

Examples

#include "slick.sh"

int   ghi:[]={"Symbol1"=>1,"Symbol2"=>2,"Symbol3"=>3};

int   ghai:[][]={"Symbol1"=>{1},"Symbol2"=>{1,2},"Symbol3"=>{1,2,3}};

_str  ghstring:[]={"Symbol1"=>"Value1", "Symbol1"=>"Value2"};

defmain()

{

   messageNwait("ghi:['Symbol1']="ghi:["Symbol1"]);

   // Copy all the hash table elements into a local container variable

   t=ghi;

   t:["Symbol4"]=4;   // Add another hash table element.

   // The loop below illustrates how you can traverse the elements

   // in a hash table without knowing the string indexes.

   typeless i;

   boolean doModify;

   doModify=false;

   for (i._makeempty();;) {

      t._nextel(i);

      if (i._isempty()) break;

      if (doModify) {

         t._el(i)=4;  // Modify element

      } else {

         messageNwait("i="i" value="t._el(i));

      }

   }

}

Pointers Variables

Pointer variables in C++ are usually considered to be a bad thing.  Due to limits in the C++ language, pointers sometimes get over used.  However, pointers are what make C++ a "Systems" programming language.  You can write your own memory management routines, interface with hardware, and get that extra ounce of speed.  Currently you cannot use pointers in Slick-C to perform these types of low level functions.  Unlike C++, Slick-C pointers variables do not support arithmetic operations such as <, >,+, and -.  Only the operators == ,!=, and ! are allowed.  We added pointers to Slick-C because we felt that there are a few programming tasks which are more easily solved by pointers.  If you access an invalid pointer, Visual SlickEdit will not crash.  However, your Slick-C macro will stop running.

WARNING: When a module is reloaded, static variable addresses change.  Make sure you reinitialize global pointer variables which point to static (module scope) variables.

[static] TypeName *variable1[=&v1] , *variable2[=&v2] ...;

The unary & operator is used to return the address of a variable.  The unary * operator is used to pick up a pointer.  However, you need to use the operator -> (ex.  p->member-variable) to access members of a pointer to a structure.  See example below.

Differences From C++

For a complete list of differences between Slick-C and C++, see section "Differences Between Slick-C and C++.

•	Space for array elements is allocated when you index into the array.

•	You can't use pointer variables to traverse array elements.

•	You can't limit the number of elements that the array may contain.

•	There is not a sizeof function which tells you the size of the array in bytes.  There is a _length method which tells you the number of elements in the array.

Example

int	gi=1;

int	*gpi=&gi;

defmain()

{

   // Print out what gpi pointers to.

   messageNwait("*gpi="(*gpi));

   *gpi=2;     // Change value of gi

   messageNwait("get 2 here gi="gi);

   struct {

      int x,y;

   } st,*pst;

   st.x=1;st.y=2;

   pst=&st;

   messageNwait("pst->x="pst->x" pst->y="pst->y);

   // This works too, but using -> is easier

   messageNwait("(*pst).x="(*pst).x" (*pst).y="(*pst).y);

}

Pointers to Functions

Function pointer variables are useful for arguments to sort functions or for lookup tables which contain a particular function to call.  If you access an invalid function pointer, Visual SlickEdit will not crash.  However, your Slick-C macro will stop running.

WARNING: When a module is reloaded, static function addresses change.  Make sure you reinitialize global function pointer variables which point to static (module scope) functions.

[static] TypeName (*variable1)([ArgDecl1, ArgDecl2,...]){=function_name};

Where ArgDecl has the almost the same syntax as a variable declarations except static is not supported and the "&" operator is used to specify call by reference parameters.  Call by reference array and hash table parameters require parenthesis around the & and id.  See section "Argument Declarations.

The syntax for calling a pointer to function variable is:

(*pfn)([e1, e2,...])

Differences From C++

For a complete list of differences between Slick-C and C++, see section "Differences Between Slick-C and C++.

•	Only one syntax is currently supported for making a call with a pointer to a function variable.  The pfn(p1,p2,...) syntax is not yet supported.  This limitation is necessary for container variables because the compiler does not know the type of the variable.  However, we will add support for the other syntax for typed pointers to functions.

Examples

void proc(_str a)

{

   messageNwait("a="a);

}

defmain()

{

   // Assign a pointer to a function to the container variable "t"

   t=proc;

   (*t)("First call");

   // Declare a local pointer to function variable

   void (*gpfn)(_str a);

   gpfn=proc;

   (*gpfn)("Second call");

}


Type Casting

Slick-C enforces strict type checking on typed non-container variables.  There are times when you need to convert one type to another to prevent the compiler from complaining.  Type casting helps tell the compiler you know what you are doing.  In addition, type casting can change the value of an expression.  See examples below.

The syntax for converting one type to another is as follows:

(VarDeclWithoutName) expression

Where VarDeclWithoutName is identical to a variable declaration without the variable name except that the static keyword is not allowed.

Some casts are not allowed because they would require unrealistic assumptions by the compiler.  For example, you can't cast a struct type to another struct type.

Differences From C++

For a complete list of differences between Slick-C and C++, see section "Differences Between Slick-C and C++.

•	Currently Slick-C only supports the less ambiguous C style type casting.  We are not sure whether we should add the new C++ type casting syntax TypeName(variable).   The argument is between having an elegant less ambiguous grammar or conforming to C++ so there is nothing new to learn.

•	Because Slick-C does not allow low level manipulation of memory, you can't do things like type cast an "int *" to a "long *".

Examples

defmain()

{

   int i;

   double d;

   d=1.2;

   i=(int)d;  // i gets the value 1, NOT 1.2

   typeless t;

   t=1.2;

   i=t; // Here i gets 1.2 BUT

   // IN THE FUTURE this will NOT be the case because it

   // will be physically impossible to store a float in a 32 bit int.

   boolean b;

   b= i!=0;   // Can't use cast here.

   i=(int)b;  // Need cast here.

}


How Typeless Container Variables Work

Container variables are declared with the typeless keyword or are declared by an assignment to an undefined variable.  Slick-C has additional string operators so that the compiler always knows whether to perform a string or numeric operation.  The '+' operator always means add two numbers, and the concatenation operator ":+" always means concatenate two strings.  The compiler performs (double) floating point arithmetic on container variables.  Currently, there is only a very small difference in speed between arithmetic operations on integer type variables and container variables because, the Slick-C language has been optimized for string and container operations.  In the future, there will be design changes to optimize binary types like integers.  See section "Mathematical Operators for a complete list of operators

The container variable can store the contents of ANY typed variable.  This is easy for the interpreter right now since all typed variables are stored as container variables.  At run-time, the interpreter must check the current type of the container variable (sometimes convert it) to perform an operation.

Examples

   typeless t;

   t=1;  // Store an integer

   // Convert the contents of the variable t to a

   // floating pointer number (double type) and add 1.

   // NOTE: The interpreter is smart and will only perform

   // integer arithmetic here.

   t=t+1;

   // Since + always means addition, the compiler converts

   // string constants to the smallest possible numeric type

   t=t+"1";

   // Declare string variable

   _str s;

   s=1;  //Compiler will convert int to string

   t=1.2;

   // Must cast string type to int or compiler will complain.

   t=(int)t+(int)s;

   //Result is 2 and not 2.2 because of the cast of t

   // to int.

   //Destroy the integer and make an array.

   //Also make the 0 element an integer.

   t[0]=1;

   t[1]=2;  // Add another element;

   t2=t;   //Copy the array and all its elements

   struct {

      int x;

      int y;

   } st;

   st.x=1;st.y=2;

   t=st;

   // Print out the elements of the structure

   for (i=0;i<t._length();++i ) {

        messageNwait("t["i"]="t[i]);

   }

The IF Statement

The syntax for an if statement is:

if (expression ) statement

[else statement]

statement may be a C style statement block which contains multiple statements.  See section "Statement Block for more information.

IMPORTANT: The value 0 for all types is false.  All other values are true.  Like C++, Slick-C uses the value 0 for null pointers.  For the string type, only a one byte length string where the first character is an ASCII '0' is false.  A 0 length string ("") is true when used in a boolean expression.

Example

if (x<y) a=1;

if (x="a") {

    y=1;

} else if (x="b") {

   y=2;

} else if (x="c") {

   y=3;

} else if (x="d") {

   y=4;

}

Statement Block

A statement block is typically used to allow multiple statements within an if or loop construct.  However, it can also be used to declare a new local scope block.   Syntax:

{

    statement

    statement

    ...

}

statement may declare local variables.

Example

if (i<1) {

    int x=1;

    {

        int x;  // Can do the assignment here

        x=3;

    }

    // The variable x will be 1 here and not 3.

}

Loops

The syntax for valid Slick-C language loops are:

      [label:] while (condition_exp) statement

      [label:] for ([b4e1 ,b4e2 ... ,b4e3]; [condition_exp] ; [cont_e1 ,cont_e2 ... ,cont_e3]) statement

      [label:] do statement while ( condition_exp );

The while loop evaluates condition_exp first and then executes statement if condition_exp is true (not the value 0), the statement will continue to be executed until condition_exp becomes false (0) or a break statement is reached.

The C-style for loop is somewhat free form.  The expressions before the first semicolon of the for loop are executed before entering the loop.  The condition_exp expression is checked before entering the for loop as well.  If condition_exp is true (not the value 0), the statement is executed.  The statement will continue to be executed until condition_exp becomes false (0) or a break statement is reached.  When the bottom of the for loop is reached, but before condition_exp is checked again, the expressions after the second semicolon are executed.

The do loop executes statement first and then evaluates condition_exp.   If  expression is true (not the value 0).  The statement will continue to be executed until expression becomes false (0) or a break statement is reached.

Loops may be exited with the break primitive.  The continue primitive may be used to skip to the top of a loop.  Both of these primitives support an optional label argument (like Java).  If specified, the label must match the label of one of the loops you are currently in.

Using continue on a for loop causes the expressions after the second semicolon to be executed before condition_exp is checked.  When continue is used on a do statement the condition_exp is not checked and execution resumes at the top of the loop.

Example

outerloop:

   for(i=1;i<3;++i){

      for (j=1;;++j) {

         if (j==3) break outerloop;  //Exit both loops

         messageNwait("i="i);

      }

   }

   for(i=1;i<10;++i){

      messageNwait("i="i);

   }

   // The above for loop is equivalent to the loop below.

   i=1;

   for (;i<10;) {

      messageNwait("i="i);

      ++i;

   }

   for(i=1;i<10;++i) messageNwait("i="i);

   i=1;

   while (i <10) ++i;

   i=1;

   do {

      messageNwait("i="i);

   } while (i<10);

   status=search(":","@" /* No message option. */);

   for(;;) {

      if ( status ) {

         break;

      }

      get_line(line);

      messageNwait("found match line="line);

      status=repeat_search();

   }

Switch statement

Slick-C supports the C switch statement.  The Slick-C switch supports integers and string types.  The syntax of the switch statement is as follows:

      switch (expression) {

      [ case expression:

         statements

      ]

      [ case expression:

         statements

      ]

      ...

      [ default:

         statements

      ]

      }

The switch expression is evaluated and compared against all the case expressions.  Once a match is found, ALL statements below the case are executed, including those statements found in the next case and the default, until a break statement is reached.

Example

outerloop:

   for (i=1;;++i) {

      switch (i) {

      case 1:

      case 2:

         messageNwait("i=1 or i=2");

         break;  // Done with these cases

      case 3:

         break outerloop;

      }

   }


Functions

We use the term function to mean something that can be called in some manner from the macro language.  Slick-C has three kinds of functions: procedures, commands, and built-ins.  The sections that follow describe each of these, and their differences.

Defining a Procedure

Defining a Command

name_info Attributes

Function Prototypes

What is a Built-in Function?

Where Are the Functions?

Differences Between Commands, Built-ins, and Procs


Defining a Procedure

There are several differences between defining a procedure and defining a command with the _command primitive.  Unlike command functions, the scope of a procedure may be limited to a module.  Command functions may be invoked by typing the name on the Visual SlickEdit command line, from a menu item definition (see section "Changing or Adding Menus), by using the execute function,  or by typing the name followed by arguments in parenthesis in a Slick-C expression.   Procedures may only be called by the latter method and may not be bound to keys.  A procedure name must be a valid Slick-C identifier (same as C identifier).  However, the name of a command may be a keyword (not recommended), or a string constant of length one such as "/" (Visual SlickEdit uses this to define a search command).

The syntax for defining a procedure is:

       [static] [TypeName | void] id([ArgDecl1, ArgDecl2, ...])

      {

          statement

          statement

          ...

      }

Argument Declarations

The syntax for ArgDecls is the same as for declaring a variable except that the static keyword may not be used.  In addition, an & before the id declares a call by references parameter.  Call by reference array and hash table parameters require parenthesis around the & and id.  See example below.

The last argument in the declaration list may be an ellipse ('...'  3 dots) to indicate that the function accepts more arguments of any type.  Use the arg function to access these optional arguments.

TypeName specifies the return type of the function.  See section "TypeName.  If TypeName or void is not specified, return statement checking is relaxed.  When the void type is used, a value cannot be specified to the return statement.  The returnstatement is used to specify the result of the function call and exit the function.

The optional static key word is used to limit the scope of a procedure to the module it is defined in.  By default, procedures are global and may be accessed by any module.  Procedures are called by specifying the name followed by comma delimited arguments, if any, in parentheses.

Example

   // NOTE: The list, p1, and pfn parameters are call by reference parameters.

   // Like C++, the list parameter requires parenthesis around the & reference

   // operator and the name because the [] operator would otherwise be processed

   // first.  Sorry, we trying to avoid deviating much from C++ syntax.

   //

   // pfn is a reference to a pointer to a function.

   boolean proc(int &p1,_str p2,_str (&list)[],int (*&pfn)(int))

   {

      return(true);

   }

Default Arguments

The assignment operator has special meaning in an argument declaration.  It defines a default value

for an argument.  The default value is used if the caller does not specify the parameter.   Default arguments should always be specified in the function definition but not in the prototype.  Unlike C++, default arguments in prototypes have no effect on the compiled code.

Example

   static int proc2()

   {

      return("before");

   }

   int proc(_str p1=proc2():+"after",int p2=2)

   {

      return(p1+p2);

   }

   defmain()

   {

       proc();          // Used defaults

       proc("param1");  // Used the second default value

       proc("param1",3);

       proc(,3); -->This is not allowed

   }

Procedures may have up to 15 arguments defined.  The procedure may be called with more arguments than defined by the procedure declaration.  These "extra" arguments as well as the arguments defined in the procedure declaration can be retrieved by the function arg.  We recommend defining arguments with default values instead of using the arg function to make your code more understandable.  Calling the arg function with no parameters returns the number of parameters the function was called with.  The minimum number of arguments the procedure may be called with is defined by the procedure heading.

The OLD SYNTAX for defining a procedure is:

       [static] [type-name] id([ [var] id1, [var] id2, ... ])

      {

          statement

          statement

          ...

      }

The above syntax has the same meaning as the following new syntax:

       [static] [type-name] id(typeless [&] id1, typeless [&] id2, ...])

      {

          statement

          statement

          ...

      }

The keyword var placed before the parameter declares the parameter to be a call by reference parameter.


Defining a Command

The _command primitive is used to define a new command with argument completion.  Commands must be translated into pcode and loaded by the load command ("Macro", "Load Module...").  A command may be invoked by typing its name on the Visual SlickEdit command line,  from a menu item definition (see section "Changing or Adding Menus), a key, quoting its name in a Slick-C function, or typing its name followed by arguments in parentheses in a Slick-C expression.  Command procedures always have the scope global and may be bound to a key with the Bind Command to Key dialog box ("Tools", "Configuration", "Key Bindings...").

The syntax for defining a command is:

_command [TypeName | void] name1[,name2 [,name3... ]( [ArgDecl1, ArgDecl2, ...] )

                      [name_info(const_exp)]

{

       statements

}

TypeName specifies the return type of the command.  See section "TypeName.  If TypeName or void is not specified, return statement checking is relaxed.  When the void type is used, a value cannot be specified to the return statement.  The returnstatement is used to specify the result of the function call and exit the function.  If your command uses the arg function to access arguments, specify an ellipse ("...") for the last argument.

The syntax for ArgDecls is the same as for declaring a variable except that the static keyword may not be used.  In addition, an & before the id declares a call by references parameter.  Call by reference array and hash table parameters require parenthesis around the & and id.  However, all typed or named arguments must have a default value.

The last argument in the declaration list may be an ellipse ('...'  3 dots) to indicate that the function accepts more arguments of any type.  Use the arg function to access these optional arguments.

The name of a command may be a valid Slick-C identifier, keyword (not recommended), or string constant of length one such as "/" (Visual SlickEdit uses this to define a search command).

Example

   //Allow command in read only mode

   //Use ellipse because this accesses arguments

_command int goto_line(...)

            name_info(','VSARG2_READ_ONLY|VSARG2_REQUIRES_EDITORCTL)

{

   param=arg(1);

   if (param=="" || ! isinteger(param)) {

       message('Please specify line number');

       return(1);

   }

   p_line=param;

   return(0);

}

_commmand void mycommand(_str filename="") name_info(FILE_ARG)

{

   if (filename=="") {

      _message_box("No filename specified");

   }

   message("filename="filename);

}

Commands get unnamed command line arguments by calling the arg function.  When a command is invoked from the command line, the expression arg(1) contains the rest of the command line after the name with leading spaces removed.  For example, invoking the edit command "e file1 file2" calls the e command with "file1 file2" in arg(1).  The parse built-in is an excellent function for parsing a command line string (see on-line help for more information on parse).  When another macro calls a command, more than one argument string may be passed.  Calling the arg function with no parameters returns the number of parameters the command or procedure was called with.


name_info Attributes

The optional constant expression const_exp is used for argument completion, restricting when the command can be executed, and a few other options.

const_exp IS A SINGLE CONSTANT STRING EXPRESSION.  A comma character in the string indicates the end of an argument.

The first argument in const_exp indicates the type of word arguments the command accepts and is used for argument completion purposes.  For a list of already defined argument types, look in the file "slick.sh" for constants that end in "_ARG".  const_exp may contain one or more of the _ARG constants.  Separate each _ARG constant with a space.  A '*' character may be appended to the end of a completion constant to indicate that one or more of the arguments may be entered.

The second argument (after the quoted comma) specifies when the command should be enabled/disabled, and a few other things.  One or more of the following flags may be specified and ORed together with the bitwise OR ('|') operator:

VSARG2_CMDLINE  // Command supports the command line.

                // VSARG2_CMDLINE allows a fundamental mode

                // key binding to be inherited by the command line

VSARG2_MARK     // ON_SELECT event should pass control on

                // to this command and not deselect text first.

                // Ignored if command does not require an editor control

VSARG2_QUOTE    // Indicates that this command must be quoted when

                // called during macro recording.  Needed only if

                // command name is an invalid identifier or

                // keyword.

VSARG2_LASTKEY  // Command requires last_event value to be set

                // when called during macro recording.

VSARG2_MACRO    // This is a recorded macro command. Used for completion.

VSARG2_TEXT_BOX // Command supports any text box control.

                // VSARG2_TEXT_BOX allows a fundamental mode

                // key binding to be inherited by a text box

VSARG2_NOEXIT_SCROLL // Do not exit scroll caused by using scroll bars.

                     // Ignored if command does not require an editor control

VSARG2_EDITORCTL // Command allowed in editor control.

                 // VSARG2_EDITORCTL allows a fundamental mode

                 // key binding to be inherited by a non-MDI editor control

VSARG2_NOUNDOS   // Do not automatically call _undo('s').

                 // Require macro to call _undo('s') to

                 // start a new level of undo.

VSARG2_READ_ONLY  // Command allowed when editor control is in strict

                  // read only mode. Ignored if command does not require an

                  // editor control

VSARG2_ICON   // Command allowed when editor control window is iconized

              // Ignored if command does not require an editor control

VSARG2_REQUIRES_EDITORCTL       // Command requires an editor control

VSARG2_REQUIRES_MDI_EDITORCTL   // Command requires MDI editor control

VSARG2_REQUIRES_AB_SELECTION    // Command requires selection in active buffer

VSARG2_REQUIRES_BLOCK_SELECTION // Command requires block/column selection

                                // in any buffer

VSARG2_REQUIRES_CLIPBOARD       // Command requires editorctl clipboard

VSARG2_REQUIRES_FILEMAN_MODE    // Command requires active buffer to be

                                // in fileman mode

VSARG2_REQUIRES_TAGGING   // Command requires <ext>_proc_search/find-tag support

VSARG2_REQUIRES_SELECTION // Command requires a selection in any buffer

VSARG2_REQUIRES_MDI  // Command requires MDI interface may be because

                     // it opens a new file or uses _mdi object.

                     // Commands with this attribute are removed

                     // from pop-up menus which the MDI interface is

                     // not available (editor control OEMs).

Example

#include "slick.sh"

// This command supports completion where the first argument

// is a filename and the second argument is an environment variable.

_command test1(...) name_info(FILE_ARG" "ENV_ARG)

{

     parse arg(1) with file_name env_name;

     message("file_name="file_name" env_name="env_name);

}

// This command is enabled only when the target is an editor control

// which has a selection.

_command void gui_enumerate()

        name_info(','VSARG2_REQUIRES_EDITORCTL|VSARG2_REQUIRES_AB_SELECTION)

{

     ...

}

// This commmand supports completion on multiple filenames

_command e,edit(...) name_info(FILE_ARG'*,'VSARG2_CMDLINE|VSARG2_REQUIRES_MDI)

{

     ...

}

The edit command allows any number of file name arguments to be given.  When the user is presented with a selection list of file names, many files may be selected with the SPACE BAR key.  If a '*' is appended to the end of the a completion constant, that command must support a space delimited list of strings.  Double quotes are placed around arguments with embedded spaces.

The value of const_exp may be retrieved by the built-in function name_info.


Function Prototypes

Function prototypes are used to give the compiler type information about a function without providing any code.  Slick-C reduces the need for prototypes by performing some argument checks at link time.  When the linker finds an uninitialized variable error, it will recommend that you add a function prototype to your source so the compiler can find your error.  You may need a function prototype if you want to use the function address in an expression.  Prototypes are not allowed for event functions.

The syntax for defining a function prototype is identical to defining a function except that a semicolon (';') is placed after the closing parenthesis of the parameter list.  Unlike C++, default arguments in prototypes have no effect on the compiled code.  No code or name_info is given.

Example

   int proc(_str s,_str list[]);  // Function prototype

   int (*pfn)(_str s,_str list[])=proc;  //Pointer to function

   _command void command1(...);  // Function prototype

   _command void command1(...) {  //Must have ... here to match prototype

      // Use arg function here to get or set arguments.

   }


What is a Built-in Function?

A built-in function is a function which was implemented in the interpreter and was not written in the Slick-C language.


Where Are the Functions?

There are over 1200 documented functions and 200 properties.

There are two ways we suggest you find the function you are looking for.  First, you can use the menu item ("Help", "Macro Functions by Category...") which shows you smaller lists of these functions by category.  Second, you can look at source code for commands we have already written which you think will call functions similar to ones you need.  For example, lets say you want to write a macro which gets the word at the cursor and does something with it.  Try to think of a command in Visual SlickEdit which operates on the current word.  The upcase_word command (Ctrl+Shift+U) upper cases the word at the cursor.  If you don't know the name of the command but you do know the key which invokes the command, use the what_is command ("Help", "What is Key...") to find out the name of the command that gets executed.  Now that you have the name of the command, use the find_proc command ("Macro", "Find Slick-C Proc...") to bring up the macro source code.  If you executed the command "find_proc upcase_word", you will quickly see a procedure called cur_word which looks a lot like what you want.  Place your cursor on any part of the cur_word procedure and press the "?" button on the button bar.


Differences Between Commands, Built-ins, and Procs

•	A command definition looks like a procedure that starts with the  _command primitive and has an optional name_info construct after the arguments.  Built-ins are not defined.

•	Commands and built-ins always have the scope global. Procedures may have the scope static (module) or global.

•	Commands may be bound to keys.  Built-ins and procedures may not.

•	Commands may be invoked from the command line or the execute function.  Built-ins and procedures may not.

•	Built-ins that do not return a value do not require parentheses when called (this will change in the future).  For example, the left built-in may be called by with left or left().   We recommend always using parentheses so you don't have to remember which function requires parentheses.

•	A command may be given the same name as a built-in.  However, this limits how the command may be called within a macro (use the execute function).  None of our commands have the same name as a built-in so you can call all our commands just like any other function.

•	Only commands may be given non-alphanumeric single character names such as +,=,!,@,#,$, etc.  However, this limits how the command can be called within a macro (place the command in quotes or use the execute function).


defmain.  Writing Slick-C Batch files

A batch macro contains a special function named defmain.  Slick-C batch files have the extension ".e".  Batch macros may be invoked by typing the name (extension not required) followed by arguments on the Visual SlickEdit command line, quoting the name in a macro, or by using the execute function.  If the batch macro needs to be recompiled (MAKE), the Slick-C Translator is invoked before the batch macro is executed.  DO NOT use the load command to load a batch program because defmain will not be invoked and the module will remain in memory.  If you accidentally load a batch program, use the unload command to unload it.  When a batch program is executed, the defmain procedure is called after the procedure definit is called (see section "Module Initializations).

The syntax of the defmain function is:

       [TypeName | void] defmain()

       {

                statement

                statement

                ...

        }

TypeName specifies the return type of the function.  See section "TypeName.  If TypeName or void is not specified, return statement checking is relaxed.  When the void type is used, a value cannot be specified to the return statement.  The return value of defmain is placed in the predefined rc global variable.  Beware,  the execute function only supports returning an int type.  You will need to check the global rc variable for other types.

The arg function is used to retrieve the command line arguments passed to the defmain procedure.   ALL command line arguments will be in arg(1).  Use the parse statement to easily parse multiple space delimited arguments.

Example

   defmain()

   {

      messageNwait("Arguments given: "arg(1));

      parse arg(1) with word1 word2 .;

      messageNwait("word1="word1" word2="word2);

      return(0)

   }

The example above displays the arguments given to the macro on the Visual SlickEdit message line.  If you define a procedure in a batch program, use the static keyword when possible to conserve memory.   Visual SlickEdit stores the names of global procedures and variables in a names table.

Extending the editor with a batch macro has the advantage of conserving memory and reducing the size of the state file.  In addition, batch macros can more easily be shared between multiple users.  The editor keeps the batch macro loaded only while it is executing.  External batch macro names and arguments are not supported by completion.  To provide completion, you must define a command with the _command primitive and have it call the external batch program.  If you name the command the same name as the batch program (without the extension), use the xcom function to bypass internal command searching.

There are two ways to invoke a Slick-C batch macro:

1.	Enter the name of the module (extension not necessary) followed by arguments on the Visual SlickEdit command line.

2.	Enter "vs -p program" at the shell prompt, where program is the name of the batch program and "vs" is the name of the editor.  The "-p" option tells Visual SlickEdit to terminate when the batch program completes.  Alternatively, you may use the "-r" option to have Visual SlickEdit remain resident after the batch program completes.

For any of the above methods, Visual SlickEdit will invoke the translator to compile the source code file if the source code file exists and its date is later than the date of the pcode (.ex) file.


Preprocessing

Preprocessing in Slick-C is indentical to C/C++ except that a #error directive has been added.  Preprocessing allows you to conditionally compile source code or define textual replacements

The syntax of the Slick-C language conditional if block is:

#if expression

    [statements]

{#elif expression

   [statements]}

[#else

   [statements]]

#endif

There may be nothing more than space or tab characters preceding a '#'.  Text on the same line following #else or #endif is not allowed.  Unlike C, the expression specified MUST be valid.

To display an error message and abort the compile, use the #error directive as shown below.

#error expression

Typically preprocessing is used to help write macros which operate on multiple operating systems or environments.  The following constants are automatically defined by the Slick-C translator.

__PCDOS__	Non-zero if current operating system is Windows.  Use machine() built-in function to determine at run-time which of these operating systems you are running.

__UNIX__	Non-zero if current operating system is UNIX compatible.

__NT__	Non-zero if the current operating system is Microsoft NT compatible.

__VERSION__  	Version number of Visual SlickEdit.

The above identifiers have two underscore characters before and after the alphabetic name part.

In addition, you can use the Slick-C translator -d option to define a constant for use by preprocessing.  To test whether a constant has been defined, use the defined() function.

Example

   #if !defined(my_constant)

   	#define my_constant "default value"

   #endif

   #if __PCDOS__

       name="c:\util\myprog"

   #elif __UNIX__

       name="/usr/bin/myprog"

   #else

       #error "Don't know what to do for this OS"

   #endif


Pragma

#pragma is used to change various options during the course of a compile.  Slick-C offers the following options:

#pragma option(autodecl [, ( on | off ) ] )

Turns autodeclvars and autodeclctls on/off.  If the second argument is not given, value is restored to command line invocation value.  Default is on.

See autoodeclvars and autodeclctls below

#pragma option(autodeclvars [, ( on | off ) ] )

Turns autodeclvars on/off.  If the second argument is not given, value is restored to command line invocation value.  Default is on.

When on, compiler will attempt to automatically declare typeless variables when an assignment is made.

#pragma option(autodeclctls [, ( on | off ) ] )

Turns autodeclctls on/off.  If the second argument is not given, value is restored to command line invocation value.  Default is on.

When on, compiler will attempt to automatically declare control variables.

#pragma option(redeclvars [, ( on | off ) ] )

Turns redeclvars on/off.  If the second argument is not given, value is restored to command line invocation value.  Default is off.

When on, any variable may be redeclared as a typeless variable.  We use this to generate code for variables without having the type information.

#pragma option(strictreturn [, ( on | off ) ] )

Turns strictreturn on/off.  If the second argument is not given, value is restored to command line invocation value.  Default is on.

When on and an explicit return type is given to a function, the compiler will flag an error if a return statement is potentially missing.

#pragma option(strictellipse [, ( on | off ) ] )

Turns strictellipse on/off.  If the second argument is not given, value is restored to command line invocation value.  Default is on.

When on, a nellipse (... 3 dots) must be given as the last argument to a function or prototype for type checking to succeed when calling function with extra arguments.

Note that all #pragma options may be specified by command line compiler options.  Run vst.exe (UNIX: vst) with no arguments to view compiler options.  You may use the VST environment variable to specify compiler options for all your macros.


Including Header Files

The syntax of the include statement is:

#includestring_constant

Includes the file specified by string_constant for compiling.  If string_constant does not specify a path, the Slick-C translator will look in the same directory of the main source file.   Otherwise, the path specified by string_constant is searched.  If the file is not found, the Slick-C translator will look for the include file in the directories specified by the VSLICKINCLUDE and VSLICKPATH environment variables.  Include files may be nested.


Defining Controls

While typically you do not need to tell the compiler about a control you are referring to.  There are a couple of cases you must declare a control.  This can happen when the compiler can't safely assume that you are referring to a control, or when the compiler is confused about what dialog box the control you are accessing is on.  The compiler needs to tell the linker which dialog box is supposed to contain your control.

The syntax for declaring a control variable is:

[_nocheck] ObjectName ControlName;

OR

[_nocheck] _control ControlName;

Where ObjectName may be one of the following: _text_box, _combo_box, _image, _picture_box, _command_button, _radio_button, _check_box, _label, _list_box, _gauge, _spin, _vscroll, or _hscroll.

The _nocheck keyword tells the compiler not to check if the control exists on the current dialog box.

Currently the "[_nocheck] ObjectName ControlName;" declaration is only allowed outside the scope of a function.  We will add support for local procedure scope in the future.  The "_nocheck _control ControlName;" declaration already supports local procedure scope.

Example

// Create a form with a command button named ctlcancel, and

// gauge named ctlgauge1.  Set the cancel and default

// properties of the command button to true.

//

#include "slick.sh"

static boolean gcancel

_command test()

{

   // Need to tell compiler ctlgauge1 is a control because

   // the form1_wid.ctlgauge1 is too ambiguous.

   _control ctlgauge1;

   // Show the form modeless so there is no modal wait

   form1_wid=show("form1");

   // Disable all forms except form1_wid

   disabled_wid_list=_enable_non_modal_forms(0,form1_wid);

   gcancel=0;

   for (i=1;i<=100;++i) {

      // Read mouse, key, and all other events until none are left or

      // until the variable gcancel becomes true

      process_events(gcancel);

      if (gcancel) {

         break;

      }

      // Do work here.  Replace the delay below with the operation

      // you want to do.  The delay makes this example look more real.

      delay(10);

      form1_wid.ctlgauge1.p_value=i;

   }

   // Enable all forms that were disabled.

   _enable_non_modal_forms(1,0,disabled_wid_list);

   form1_wid._delete_window();

}

defeventtab form1

ctlcancel.lbutton_up()

{

   gcancel=1;

}


Defining Events and Event Tables

Event tables provide a mechanism for describing event/key bindings by source code, creating event driven dialog boxes, and describing inheritance.

def primitive

The def primitive is used to bind a key sequence or event to a command or procedure and is not typically used when creating event driven dialog boxes.  The defeventtab primitive selects the active event table that the def primitive sets the bindings to.  If no defeventtab declaration exists before the first def primitive the default_keys event table is used.  The default_keys event table defines the event handlers for Fundamental mode.  The source code representing the bindings is translated and then the event tables are loaded either by the load commandor by executing the module as a batch program.  See section "defmain.  Writing Slick-C batch programs." for information on batch programs.  Even though executing the module as a batch program unloads the module when the defmain function terminates, the event table changes remain present.  This is because the command or procedure names and the event tables are both maintained separately from the modules.  The def primitive adds or replaces the binding of a event table already in memory and may be used to unbind a key.

The syntax for defining a key is:

           def  {prefix_key} event [- event] [, event [- event]] ... = [command]

Command may be either a command (defined with _command) or global procedure.  If command is not specified, the existing event is unbound.  The words prefix_key and event above may be any valid event name (see section "Event Names" in the Appendix).  Some event names do not need to be quoted.  However, you may want to always quote the event names so you don't have to remember which ones requires quotes.

Example

    def "A-x"=safe_exit  // Note that "A-a" is different than "A-A"

                         // which requires the ALT and SHIFT keys to

                         // be pressed.

    def "A-?"=help

    def "C-X" "b"=list_buffers

    def \0 - \255= nothing

The defeventtab primitive is used to define a new event table.  The syntax for defining a an event table is:

            defeventtab  name

name may contain a dot ('.') character.  The dot is used to separate the form name from the control name.  The def primitive changes the binding of events of the last event table defined.  If no event table is defined, the default_keys event table is used.

Example

   defeventtab  c_keys

   def " "=c_space

   def "ENTER"=c_enter

Event tables are global in scope.  When an event table is loaded by the load command or by executing the module as a batch program, the new bindings will replace the event bindings of the existing event table.  If the event table specified by defeventtab does not exist, a new one is created.

Event Driven Dialog Boxes

Event tables are also used to create event driven dialog boxes and inheritance.  Much of the event table definition code is automatically inserted by the dialog editor.  However, once you are more familiar with event tables, you will probably type in some event table definition code yourself.  If some of the terminology we use is confusing, you may want to read the section Creating Dialog Boxes With the Dialog Editor first.  To attach an event table to a form (dialog box outer window) or form control, define an event table with the same name (p_name property) as the form.  Dot the form name with the control name if you plan on specifying inheritance for an event table attached to a control.

defeventtab form_name[.control_name] [_inherit [etab_name]]

The _inherit primitive lets you link one event table to another.  This makes it possible to perform Clipboard Inheritance® (see section "Clipboard Inheritance" for more information).  If no name follows the _inherit keyword, the inheritance is unlinked.  You can add event handlers by using the def primitive or by defining an event handler function as follows:

[ReturnType] ctl_name.event [- event] [, event [- event]] ...( [ArgDecl1, ArgDecl2,...])

{

    statements

}

If ctl_name is the same name as the last event table form name (name before dot), the event handler is attached to an event table named form_name.  Otherwise, the event handler is attached to an event table named form_name.ctl_name.  The word event above may be any valid event name (see "Event Names").  Some event names do not need to be quoted.  However, you may want to always quote the event names so you don't have to remember which ones require quotes.

The syntax for ArgDecls is the same as for declaring a variable except that the static keyword may not be used.  In addition, an & before the id declares a call by references parameter.  Call by reference array and hash table parameters require parenthesis around the & and id.

Example (form with text box and OK button)

#include "slick.sh"

// Define an event table for the dialog box window.

defeventtab form1

// Since this is the first event handler defined for this control and the

// name of this control does not match the last defined event table, the

// Slick-C translator automatically defines the event table

// form1.ctlcommand1 and defines the lbutton_up event handler within

// this new event table

void ctlcommand1.lbutton_up()

{

   // Set the p_text property of the text box control

   ctltext1.p_text="Hello World";

}

When the above code is loaded with the load command ("Macro", "Load Module..."), the editor attaches the form1.ctlcommand1 event table to a control named ctlcommand1 on form form1.   A form1 event table is not created because no event handler for this event table was defined.  When you save the configuration ("Tools", "Configuration", "Save Configuration..."), event tables that are not used are deleted.


Module Initializations

The Slick-C language provides two module initialization functions called definit and defload.  If present, the procedures definit and defload are called when a module is loaded.  definit is called before defload.  Once the module is saved by the write_state command, the definit procedure is invoked each time the editor is invoked.  This gives your modules a chance to perform initializations such as creating a temporary file, or allocating a selection, or bookmark.

The syntax for defining the special functions definit and defload  are:

definit()

{

     statements

}

defload()

{

     statements

}

The return value of these functions is always void.  Therefore, you cannot specify an argument to the return statement.  For better performance, use the defload primitive instead of the definit primitive when possible since the definit primitive forces a module to be loaded when the editor is invoked.

When definit is called, the expression arg(1) indicates whether the module was loaded with the load command or when the editor initialized.  When a module is loaded, arg(1) returns 'L'.  Otherwise arg(1) returns a null string ("").

The remainder of this section will present two useful examples of using definit.

Example

int gmarkid= -1;

definit()

{

   //  If this is an editor invocation

   if (arg(1)!="L") {

      gmarkid=-1;    // Indicate no mark is allocated.

   }

}

There are two subtle points to this example when assuming that the gmarkid variable will be used to contain an allocated mark id (also called selection handle).  First, the variable gmarkid is scoped as global and not static.  This is because we want the mark to remain allocated when this module is reloaded.  When the module is reloaded, an unload of the module occurs first and the _free_selection built-in is not called to free a mark already allocated (there is no defunload primitive).  Modules with static variables (module scope) lose their value when reloaded.  Second, the value of arg(1) is used to make sure that the variable gmarkid is initialized only when the editor is invoked and not when the module is loaded.

Use the example below as a template for creating a temporary buffer in the hidden window.

Example

#include "slick.sh"

definit()

{

   get_view_id(view_id);

   activate_view(HIDDEN_VIEW_ID);

   status=find_view(".bookmark");

   if ( status ) {

      /* Create a buffer and view in hidden window. */

      status=load_files("+c +t");

      if (status) {

         // The nls function may be used for national language support

         // in the future.

         _message_box(nls('Could not create bookmark buffer'))

         return;

      }

      p_buf_name=".bookmark";_delete_line();

      p_buf_flags= THROW_AWAY_CHANGES|HIDE_BUFFER|KEEP_ON_QUIT;

   }

   // Note: ELSE case cannot empty bookmark buffer unless mark ids

   // are freed.  Might as well leave them.

   get_view_id(bookmark_view_id);

   activate_view(view_id);

}


Debugging Macros

Fortunately the Slick-C translator (vstw.exe UNIX: vstw) is fast, so that debug messages may be inserted into your code and compiled quickly.  Use the messageNwait (pronounced as "message and wait") function to display a message and wait until a key is pressed.  The _message_box function may be used to display a dialog box with a message and wait until you press ENTER.  Two nice features are described in the following sections that will help you debug and work on Slick-C macros.

These ".e" extension aliases can come in handy:

m	messageNwait("%\n: %\c");

mb	_message_box("%\n: %\c");

Finding Procedures

The find_proc command("Macro", "Find Slick-C Proc...") finds Slick-C source code or help for a Slick-C tag name you specify.  This is especially useful if you are browsing a macro and you want to find out what a function does.  You can find the procedure at the cursor by pressing the Ctrl+Dot key.

The syntax of the find_proc command is:

       find_proc proc_name

Command Line Examples

find_proc find_proc        	Finds the source code for find_proc.

find_proc cursor_up         	Finds the source code for cursor_up.

find_proc substr           	Displays help on substr built-in.

Finding Runtime Errors

When a Slick-C error occurs, a message box with a "Slick-C Error" title is displayed.  Usually the Slick-C Stack toolbar is displayed listing the call stack at the time of the error.  Double click in this toolbar to view source for a call stack entry.  The find_error command("Macro", "Find Slick-C Error") finds the last Slick-C interpreter run time error.  The module with the error is loaded and the cursor is placed on the line causing the error.


Creating Dialog Boxes With the Dialog Editor

Dialog Box Creation Overview

Dialog Editor Summary

Creating a Form

Adding Controls

Moving Controls

Selecting Controls

Setting Properties

Sizing Controls

Adding Event Handlers

Loading and Running the Form

Saving a Form

Adding a Cancel Button

Adding an OK Button and Closing a Dialog Box

Displaying Dialog Boxes. show command

          on_create and on_load Events

          Return Value of Show

          Modal and Modeless Dialog Boxes

          Dialog Box Parent Window

          Remembering a Dialog Box Previous Position

Clipboard Inheritance(R)

          How Visual SlickEdit's File Open Dialog Box was Built

Dialog Box Inheritance Order


Dialog Box Creation Overview

Creating event driven dialog boxes in Slick-C is similar to Microsoft Visual Basic™ except that the language has C++ style syntax and is more object oriented.

Here are some key differences from Visual Basic:

•	When an event is sent to a control or dialog box, the object receiving the event MUST be the active object (not necessarily the same as the system focus).  This is a major difference between Slick-C and Visual Basic.  If a button control receives an event and executes a statement like this, p_caption="New button caption", the button's caption is changed and NOT the caption for the dialog box, which is what Visual Basic would do.

•	Built-in properties all start with the prefix "p_" to avoid these keywords from conflicting with your own identifiers.

•	A more general method of object instance referencing is used.  See section "Instance Expressions for more information.

•	Almost all properties that can be accessed at design-time may also be accessed at run-time.  For example, the p_name property for a control or dialog box may be set after the dialog box is displayed.

•	Event tables are used to group event handlers for controls.  Event tables in Slick-C are used in a similar fashion to classes in C++.

•	Slick-C has sophisticated and powerful Dialog Box Inheritance Order.  See section "Dialog Box Inheritance Order for more information.

•	Parent, child, next, and previous (p_parent, p_child, p_next, p_prev) creation order relationships are all maintained when dialog boxes are created.

•	Event tables can be linked together.  One event table can inherit the event handlers of another event table.  The event table links can be changed at run-time.

•	The dialog editor allows event tables to be transferred through the clipboard.  Controls from the same or different dialog boxes may reference the same event tables.  There is no need for control arrays.  See section "Clipboard Inheritance(R) for more information.

•	Functions may be used as methods which operate on an instance of an object.  See section "Using Functions as Methods for more information.


Dialog Editor Summary

Press Ctrl+Shift+Space to edit a dialog box that is being run.  If you accidentally press Ctrl+Shift+Space when the Properties dialog box is active, you will be editing the Properties dialog box.  Double Click on the system menu to close the edited Properties form.  Some UNIX window manager managers do not close windows when you double click on the system menu.

Creating Controls

•	Double click left mouse button on Properties dialog box control bitmap to create a control in the center of the form.

•	Click left mouse button on Properties dialog box control bitmap.  Click left mouse button on form, drag, and lift mouse button to create control the size of the dotted rectangle.

Selecting Controls in Form

LButton	If the control is not already selected, this deselects all selected controls and selects the current control.

Shift+LButton	Toggle selection of a control on/off.

LButton-ClickNDrag	When you click and drag on the form, a dotted rectangle is displayed.  When you lift the left mouse button, the controls within the rectangle are selected.

Deleting Controls

•	Select control(s).  Press Backspace or Del key to delete the selected controls

Setting Properties

•	Select control(s).  Click left mouse button on property in Properties list box.  Type new value in Properties combo box.  Use combo box arrow or dots to assist in entering a value.  Press ENTER when Properties list box is active, this sets the property.

•	Select control(s).  (some properties) Double click the left mouse button on the property in the Properties list box to go to the next value of the property.  For color and picture properties, a dialog box is displayed.

Aligning Controls

•	Select the control you want to align the other controls to.  Select the other controls with Shift+LButton.  Double click the left mouse button on one of the properties x or y to align the controls in the x or y direction.  Press the ENTER key on the value in the Properties combo box.

Sizing Controls

•	To size a single control, select the control and click and drag one of the selection handles with the left mouse button.

•	To size multiple controls, select the controls and set the width or height property.

•	To size multiple controls, select the controls and press Shift+Left, Shift+Right, Shift+Up, or Shift+Down arrow to move lower right corner of the selected controls by one pixel.

Moving Controls

•	Select control(s).  Click and drag with the left mouse button on any of the selected controls.

•	Select control(s).  Set the x or y property.

•	Select control(s).  Press Left, Right, Up, or Down arrow to move selected controls by one pixel.

Miscellaneous Assignments While Form is Active

RButton	Displays menu with various dialog editor commands.

Ctrl+Shift+Space	Loads form and Slick-C code.  Runs dialog box.  If you accidentally press Ctrl+Shift+Space when the Properties dialog box, you will be editing the Properties dialog box.  Double Click on the system menu to close the edited Properties form.  Some UNIX window manager managers do not close windows when you double click on the system menu.

Ctrl+S	Load form and save into state file.  Under UNIX, this may just list source for the form that can be executed the next time you invoke Visual SlickEdit.

Ctrl+L	Load form

Ctrl+C	Copy selected controls.

Ctrl+V	Paste controls from the clipboard.

Ctrl+X	Cut selected controls.

Ctrl+A	Select all controls with same parent as the already selected control(s).

Tab	Deselects all controls and selects next control in tab order (p_tab_index).

Shift+Tab	Deselects all controls and selects previous control in tab order.

LButton-Double-Click	(on control) Displays Select an Event Function dialog box for adding or modifying event handlers.

Miscellaneous Menu Items

System Box of form, Show Properties	Display Properties dialog box.

Window menu, Properties	Display Properties dialog box.

Window menu, Selected Form	Display selected form (form being edited).

Macro menu, New Form	Creates a new dialog box with a default name.

Macro menu, Open Form	Open existing dialog box or create new dialog box.

Macro menu, Grid	Sets the distances between the dots on edited form.

The remainder of this section discussing various pieces of building a dialog box.


Creating a Form

We use the term form to refer to the outer window of a dialog box.  The objects within the dialog box are called "controls".  We also use the term form to refer to the entire dialog box as well.  A new form can be created in one of two ways:

1.	Use the New Form menu item ("Macro", "New Form").

                          OR

2.	Use the Open Form menu item ("Macro", "Open Form...") and specify the name of a form that does not already exist.


Adding Controls

("Window", "Properties..." or show_properties command)

Below is a picture of the Properties dialog box:

The bitmaps on the left of the Properties dialog box are used to create controls.  There are two ways to create a control.  You can double click the left mouse button on the bitmap of the control you want to create.  This will place a new control in the middle of the selected form (form1 for this sample session).  However, with this method, you cannot create a control and place it within another control.  The Picture Box and Frame controls allow you to place controls inside of them.

Here's another way to create a control.  Performs these steps now to create a text box control on form1:

•	Single click the mouse button on the text box bitmap so that it appears pressed in (like the arrow bitmap above).

•	Move your mouse so that it appears on top of the form, form1, you are editing.  If you can no longer see the form you are editing, use the Selected Form menu item ("Window", "Selected Form") to display it.  Notice that the mouse pointer does not look like a pointer any more.  It should look like a large thin plus sign.    This lets you know that you are in creation mode.

•	To create the text box control, click the left mouse button, and, while holding it down, move the mouse pointer to the right and to create a dotted rectangle.  When you release the mouse, the text box control will appear within the rectangle.


Adding Event Handlers

Set the form name and the control names ("name" property in Properties list box) before adding code to the dialog box because these names will be referenced in the code.  We recommend prefixing your control names with "ctl" so you can easily recognize them.  To add an event handler, perform the steps below:

•	Double click on the control in the dialog box for which you want to add code (not the bitmap in the Properties dialog box).  The Select An Event dialog box should appear.

•	Choose an event and press the OK button.

•	If this is the first event handler for this dialog box, you will be prompted with an Open dialog box for a new file to contain the source code for this dialog box.  Type a unique filename.  Usually this filename is derived from the name of the dialog box you are creating (like "form1.e").

After performing the above steps, the dialog editor will insert an event function definition into your source file and place your cursor in the function.


Loading and Running the Form

Invoke the run_selected command ("Macro", "Load and Run Form") to "run" the current dialog box you are editing.  This will load the code, load the dialog box, and run the dialog box.  The edited dialog box is not closed when you run it.  To close the dialog box, double click on the system menu (some UNIX window manager managers do not close windows when you double click on the system menu) or press Ctrl+Shift+Space (in the running version of your dialog box and not the edited copy).  You can press Ctrl+Shift+Space when any dialog box is running to edit it (this includes the Properties dialog box).

You can display your dialog box from the command line by typing "show <FormName>".  To display the dialog box modally enter "show -modal <FormName>" on the command line.  The show command provides many powerful options.  For more information, see section "Displaying Dialog Boxes. show command.  Dialog box templates and compiled macros are stored in the state file ("vslick.sta" or "vslick.stu" under UNIX).

The example code below illustrates how to write a command which displays a dialog box.  This is useful for binding a command to a key which displays a dialog box.

#include "slick.sh"

_command void run_form1()

{

   // The -modal option displays other windows while the dialog box

   // is displayed.

   show("-modal form1");

}


Saving a Form

Click on the form being edited and press Ctrl+S.


Adding a Cancel Button

Double click the left mouse button on the command button control.  Set the "caption" property to "Cancel" , set the "cancel" property to TRUE, and set the "name" property to "".  You can set the cancel property to TRUE by double clicking the left mouse button on the cancel property in the Properties list box.   As a rule of thumb, you should set the name property of a control (never the form) to "" if you are not going to reference the control by name because it wastes code space.  Pressing the Cancel button (the command button with the p_cancel property set to TRUE) when your dialog box is running will close the dialog box even though you have not written any code.  If you do add code to your cancel button, you will need to close the dialog box yourself (p_active_form._delete_window(); will do the job) .


Adding an OK Button and Closing a Dialog Box

•	Create a command button control by double clicking on the command button control in the Properties dialog box.

•	Set the "caption" property to "OK", set the "default" property to TRUE, and set the "name" property to "ctlok"

•	Double click on the command button control in the dialog box for which you want to add code (not the bitmap in the Properties dialog box).  The Select An Event dialog box should appear.

•	Choose the lbutton_up event and press the OK button.

•	If this is the first event handler for this dialog box, you will be prompted with an Open dialog box for a new file to contain the source code for this dialog box.  Type a unique filename.  Usually this filename is derived from the name of the dialog box you are creating (like "form1.e").

After performing the above steps, the dialog editor will insert an event function definition into your source file and place your cursor in the function.  Add the code as shown below.

#include "slick.sh"

defeventtab form1

// Code for OK button.

ctlok.lbutton_up()

{

   // Close the dialog box and return a value. The _delete_window

   // function allows modal dialog boxes to return a value.  For

   // more information, see section

   // "Displaying Dialog Boxes. show command"  below. Each object

   // in the dialog box will receive an on_destroy event.

   // NOTE: If "" is a valid return value. Return 1 here and store

   // your results in the global _param1 variable.

   p_active_form._delete_window("return value");

   // Statements after closing a dialog box are executed.

}

There are some subtle points about closing a dialog box.  First, if a modal dialog box returns a value, the value "" (zero length string) MUST be returned to indicate the dialog box has been canceled.  This convention is used so that when running a dialog box, you can press Ctrl+Shift+Space to safely cancel and edit the dialog box.  Second, you will need to use the global container variables _param1.._param10 to return multiple strings.  Alternately, you can make an array or structure and place it in _param1.  If you do place your string results in the global variables _param1.._param10, make sure your dialog box returns 1 (or any value other than "") to indicate that the dialog box was not canceled.


Displaying Dialog Boxes. show command

The most common way to display a dialog box is with the show command.  The show command can be called in function style syntax from within a macro.  It can also be invoked from the command line or a menu item (see section "Changing or Adding Menus for more information).

Command line call syntax:

show cmdline

Function call syntax:

show(cmdline [,arg1 [,arg2 ... [argN]]])

cmdline is a string in the format:

[option] form_name

option may be one of following:

-mdi	Keep the form on top of the MDI Window.

-app	Keep the form on top of the Visual SlickEdit Application Window.  This allows the MDI Window to be displayed on top of the form.

-xy	Restore the previous x, y position of the dialog box.  If the old position cannot be found, the dialog box is centered.  When the dialog box is closed, the x, y position is automatically saved (the dialog manager calls _save_form_xy).

-hidden	Do not make the form visible.

-modal	Run the form modally.  All other forms are disabled.  Control returns to the caller when the form window is deleted with _delete_window.

-nocenter	Do not center the form.

-new	Normally, when a form is already displayed, the existing form is given focus.  This option allows for multiple instances of a form to be displayed.

-reinit	UNIX only.  Ignored by other platforms.  Causes _delete_window function to make the form invisible instead of deleting the form.  The destroy events are dispatched even though no windows are actually destroyed.  Next time show is called for the same dialog box, the invisible dialog box is made visible, some properties are reinitialized, and the create events are sent.  Be careful when using this option.  Not all dialog boxes can use this option without minor modifications.  The form_parent() function will not work because the next time the form is used, the parent is not changed to the new parent specified.

-hideondel	UNIX only. Same as -reinit option except no properties are reinitialized when the invisible dialog box is shown again.

form_name specifies a form or menu resource.  If it is an integer, it must be a valid index into the names table of a form or menu.  Otherwise, it should be the name of an existing form or menu that can be found in the names table.

on_create and on_load Events

When a dialog box and all its objects are created, each object receives an on_create event.  The on_create event receives the arg1, arg2,...,argN arguments given to the show function.  After the on_create events are sent, the form receives an on_load event.  You CANNOT set the final focus in an on_create event.  Use the _set_focus function during the on_load event to set the initial focus to a control other than the control with lowest tab index (p_tab_index) that is enabled and visible.

Return Value of Show

If the "-modal" option is given, the return value given to _delete_window is returned.  "" is returned if the dialog box is edited or destroyed during an on_create event.  Use the global variables _param1.._param10 to return more than one string value.  Alternately, you can make an array or structure and place it in _param1.

If the "-modal" option is not given, the form window id is returned if successful.  Otherwise, a negative error code is returned.

Example

// This example requires that you create a form called form1 with a command button and load

// this file.

#include "slick.sh"

_command mytest()

{

    result=show("-modal form1");

    if (result=="") {

       return(COMMAND_CANCELLED_RC);

    }

    message("_param1="_param1" _param2="_param2);

}

defeventtab form1

ctlcommand1.on_create()

{

   // Global variable _param1.._param10 are defined in "slick.sh" to

   // allow for multiple strings

   // to be returned in separate variables.  Alternatively, if the

   // return strings do not contain spaces, you could concatenate

   // them together with a space and use the parse built-in to easily

   // separate them.

   _param1="string1";

   _param2="string2";

   // Close the dialog box and indicate that the dialog box was not

   // canceled. Each object in the dialog box will receive an

   // on_destroy event.

   p_active_form._delete_window(1);

}

Example

// This example requires that you create a form called form1 with a

// command button and load this file.

#include "slick.sh"

_command void mytest()

{

   show("-modal form1","param1 to on_create", "param2 to on_create");

}

defeventtab form1

ctlcommand1.on_create(_str arg1="", _str arg2="")

{

   //arg1=arg(1);  Could get the arguments with the arg built-in

   //arg2=arg(2);

   messageNwait("arg1="arg1" arg2="arg2);

}

Example

#include "slick.sh"

defmain()

{

   index=find_index("form1",oi2type(OI_FORM));

   if (!index) {

      messageNwait("form1 not found");

      return(1);

   }

   // Can specify name table index instead of name

   // When show is called without the "-modal" option, the

   // positive window id (instance handle) of the form created

   // is returned.

   form_wid=show("-hidden -nocenter "index);

   if (form_wid<0) {

      return(1);

   }

   // Place the form at the top left corner of the display.

   form_wid.p_x=form_wid.p_y=0;

   // Make the form visible

   form_wid.p_visible=1;

   return(0);

}

Modal and Modeless Dialog Boxes

If you do not want the MDI Window or any other form to get focus when your dialog box is displayed, specify the "-modal" option to the show command.  When the "-modal" option is given, other forms including the MDI Window, are disabled (p_enabled=0) until the form is closed.  In addition, the _delete_window function can be used to return a value (see example above).

Modeless Example

#include "slick.sh"

defmain()

{

   // When show is called without the "-modal" option, the positive

   // window id (instance handle) of

   // the form created is returned.

   form_wid=show("-hidden -nocenter form1");

   if (form_wid<0) {

       return(1);

   }

   // Place the form at the top left corner of the display.

   form_wid.p_x=form_wid.p_y=0;

   // Make the form visible

   form_wid.p_visible=1;

   return(0);

}

Sometimes you need to display a status dialog box while doing some sort of processing.  This requires a modeless dialog box so control is returned to you.  However, you still probably want to disable all other dialog boxes including the MDI window while you do your processing.

Advanced Modeless Example

#include "slick.sh"

static typeless gcancel;

_command void test()

{

   // Show the form modeless so there is no modal wait

   form1_wid=show("form1");

   // Disable all forms by the one with p_window_id==form_wid.  A

   // space delimited string of disabled form window ids is returned.

   disabled_wid_list=_enable_non_modal_forms(0,form_wid);

   gcancel=0;

   for (;;) {

      // Read mouse, key, and all other events until non are left

      // or until the variable gcancel becomes true.

      process_events(gcancel);

      if (gcancel) break;

      // Do your processing here

   }

   // Enable the forms that were disabled.

   enable_non_modal_forms(1,0,disabled_wid_list);

   form1_wid._delete_window();

}

defeventtab form1

ctlcancel.lbutton_up()

{

   gcancel=1;

}

Dialog Box Parent Window

The parent window of a dialog box form has two uses.  First, the dialog box will always remain on top of the parent window.  Use the show command and specify the "-app" option if you want to allow a modeless dialog box to appear behind the MDI window.  The "-mdi" option of the show command can be used to make sure a dialog box stays on top of the MDI window.

Command Line Examples

show -app _calc_form

show -mdi -new _calc_form

Second, the parent window is used by some dialog boxes such as the Find, Replace, and Spelling dialog boxes to determine which buffer to operate on.  This allows these dialog boxes to support the editor control.  To do this, they call the _form_parent function during an on_create event to get the window id of the window which contains the buffer to be operated on.  This does mean that these dialog boxes only support certain parent windows.  For example, the Find dialog box will not run correctly if the "-app" option of the show command is used.

Remembering a Dialog Box Previous Position

By default, the show command centers the dialog box to the current form or MDI window.  Usually this is fine.  However, sometimes it is nice for a dialog box to reappear in the same position it was in when the user closed the dialog box.  To do this, specify the "-xy" option to the show command.  This adds the IS_SAVE_XY flag to the p_init_style property.  When the dialog box is closed, the x and y position of the dialog box is stored and later saved in the auto restore file ("vrestore.slk" by default) when you exit the editor.  The form is centered if the old x,y position information cannot be found.


Clipboard Inheritance(R)

Clipboard Inheritance® (US patent No. 5,710,926) is a mechanism by which objects can be transferred from one place to another via the clipboard in order to create new instances which inherit the code of the original objects.  Code for the new instances can be added, affecting only the new instances, and code of the original instances can be modified, affecting both instances.  This is, of course, just another way to describe inheritance.  The difference is that, with Slick-C, the inheritance links are built for you in a very intuitive, natural way.

The most obvious flaw in Microsoft Visual Basic™, Hypercard, and other high level user interface building systems, is the loss of event handlers when you copy controls or dialog boxes from one place to another via the clipboard.

A sample problem with some heavily commented source code will best demonstrate how the Slick-C language works.

Lets say we want to create a group of controls which are needed by Visual SlickEdit's File Open dialog to allow the user to specify the various supported file formats.  The file formats Visual SlickEdit supports are:

•	DOS.  Each line is separated with a carriage return, followed by linefeed.

•	Macintosh.  Each line is separated with a carriage return only.

•	UNIX.  Each line is separated with a linefeed only.

•	Record width.  A user specified number of bytes placed in each line.

•	A single user specified line separator character.

Here is a partial dialog box which can handle Visual SlickEdit's file formats:

And here is the code which drives this dialog box:

// The names of the controls do not need to be declared.

// The names of the radio button controls are ctlopendos, ctlopenmac, ctlopenunix,

// ctlopenauto

// The first text box is named ctlopenlinesep and the text box below it is named

// ctlopenwidth.

defeventtab form1

// Define the lbutton_up event for the DOS radio button.  This function will get called

// when any of the radio buttons get turned on.  The event table automatically created

// here is called form1.ctlopendos.

ctlopendos.lbutton_up()

{

   // Set the text displayed in both text boxes to nothing so the users

   // knows that the radio button format has been chosen.

   ctlopenlinesep.p_text='';

   ctlopenwidth.p_text='';

}

static zap_radio_buttons()

{

   ctlopendos.p_value=0;

   ctlopenmac.p_value=0;

   ctlopenunix.p_value=0;

   ctlopenauto.p_value=0;

}

// Define the on_change event for the first text box.  For a text box, the on_change event

// gets called when the users modifies the text in the text box.  The event table

// automatically created here is form1.ctlopenlinesep.

ctlopenlinesep.on_change()

{

   if (p_text!='') {

      ctlopenwidth.p_text='';   // Clear out the other text boxes text.

      zap_radio_buttons();    // Turn off all the radio buttons

   }

}

// Define the on_change event for the second text box.  The event table

// automatically created here is form1.ctlopenwidth.

ctlopenwidth.on_change()

{

   if (p_text!='') {

      ctlopenlinesep.p_text=''; // Clear out the other text boxes text.

      zap_radio_buttons();    // Turn off all the radio buttons

   }

}

Notice that only the first radio button ctlopendos has an event handler defined.  The other radio buttons just need to use the form1.ctlopendos event table.  This can be accomplished in the dialog editor in one of two ways.   You can use Clipboard Inheritance® or, if the radio buttons are already created, you can just set the p_eventtab property of the other radio buttons to form1.ctlopendos.  To use Clipboard Inheritance® you would simply write the lbutton_up event code for the DOS radio button, copy the DOS radio button to the clipboard, paste it back onto the dialog box within the frame, and set the p_caption property for the new radio button to MAC.  Either of these two methods can be used to propagate an event table.  When ctlopendos.lbutton_up() function gets called, it simply gets and sets the properties of controls which obviously exist on this dialog box.

How Visual SlickEdit's File Open Dialog Box was Built

Clipboard Inheritance® is a much more powerful concept than you may think.  If you take a close look at some of Visual SlickEdit's complex dialog boxes, you will find out that there are massive amounts of inheritance going on which was simply created by copying some controls to the clipboard, and pasting them.

Below is a picture of Visual SlickEdit's ("fast" Windows 3.1 style) Open File dialog box.

The Open File dialog box has the form name _edit_form.  This dialog box was actually created by copying the _open_form dialog box (code links and all) to the clipboard, pasting it, and then adding the "Find File..." button and the advanced controls.  The _open_file form can be thought of as the base File Open dialog box class.  It is used for all other File Open, and Save As operations except for opening files for editing which requires additional controls.  The inherited code from the base class File Open dialog required no changes except for the OK button.  For this, we simply replaced the OK button code with new code.  The "Find File..." displays a dialog box which has all the same advanced controls.  Yes, you guessed it.  We simply took the advanced controls from the Open File dialog box ("_edit_form") and all its related controls, and copied them onto the Find File dialog box.   The only additional code required was for the "OK" button which was needed to return the results of the advanced options to the caller.

Visual SlickEdit's Find and Replace dialog boxes both allow searching across multiple files and/or buffers.  The controls for selecting files and buffers on these dialog boxes share the same code.  You might want to copy these controls onto your own dialog box to provide multiple file and buffer processing for some other operation.  In Visual SlickEdit 2.0, we pasted these controls onto the Print dialog box.

It is important to note that while these examples did not require linking one event table to another, the dialog editor recognizes when inheritance is required and will automatically link event tables together.  The statement below illustrates the syntax for linking one event table to another.

defeventtab dlgbox2.textbox1 _inherit dlgbox1.textbox1


Dialog Box Inheritance Order

Each control in Slick-C has two properties called p_eventtab and p_eventtab2.  The p_eventtab property defines the user level 1 inheritance.  User level 1 inheritance is intended to allow you to modify the event handlers for one specific instance of a control without affecting any other (except when Clipboard Inheritance® is used).  Like Microsoft Visual Basic™, you simply double click on the combo box when you want to add an event handler.  The dialog editor will automatically insert the function declaration code necessary so you need only add statements within the function.  Once you have written the event handler and loaded the new code, the p_eventtab property displayed in the Properties list box will be updated to reflect that you have defined a user level 1 event table.  The p_eventtab2 property defines the user level 2 inheritance.  User level 2 inheritance is typically used to affect all controls of a specific type.   Normally the dialog editor sets these properties for you when a control is created.  For example, when you create a combo box control with the dialog editor, the p_eventtab2 property is automatically set to _ul2_combobx.  The _ul2_combobx event table defines the default processing used by every combo box.   The user level 1 event handler receives an on_change event (sent from the user level 2 code) when the text in the combo box changes.

Visual SlickEdit uses a pre-defined inheritance order called the Dialog Box Inheritance Order for lack of a better title.   When a control receives an event, the following search begins to determine which event handler should get control:

1.     IF and ONLY if the event we are searching is a key event, check the dialog box frame's user level 1 inheritance.

2.	Check current control's user level 1 inheritance.

3.	Check current control's user level 2 inheritance.

4.	Check automatic inheritance.  Only the text box, combo box, and editor window can have any automatic inheritance.  This is how your emulation is supported in these controls.

5.	Check dialog box frame's user level 1 inheritance.

6.	Check dialog box frame's user level 2 inheritance

7.	Check dialog manager inheritance.

As soon as an event handler is found, the search stops and the event handler is executed.  Each inheritance level can have up to 20 linked event tables.  This limit is only to avoid infinite event table link loops.  At run-time it is possible, but unusual, to change all inheritance links and event tables for any object.  The eventtab_inherit function can be used to get or set an event table inheritance link.

Through trial and error, we found the above Dialog Box Inheritance Order to be the most powerful.  It allowed us to write the dialog manager, and all the default control event handling in  Slick-C.


Objects and Instances

Every object instance can be uniquely identified by a window id (also called instance handle).  Slick-C treats objects and windows the same.  However, some objects, such as the image control, have a window id but DO NOT allocate an operating system resource known as a window.

The Active Object

The Active Form

Instance Expressions

Using Functions as Methods


The Active Object

When an object receives an event, that object is the active object.  More specifically, the p_window_id property is set to the instance handle of that object.  You can change the active object by setting the p_window_id property to another object's window id.  Accessing a property without specifying a control name or instance handle accesses the property of the active object and not the active form.  This is significantly different than Microsoft Visual Basic™.  For example, if a button control receives an event and executes a statement like this, p_caption="New button caption", the button's caption is changed and NOT the caption for the dialog box, which is what Visual Basic would do.

IMPORTANT:  Changing the active object does NOT change the focus.  Use the _set_focus method to change the focus.


The Active Form

Slick-C has a p_active_form property which returns an instance handle to the current form.  The Slick-C interpreter actually does not keep track of what form is active.   The active form can be found rather quickly by traversing through the parents (p_parent) of the active object until a form is reached.


Instance Expressions

The following examples illustrate common instance expressions:

ctltext1.p_text="test";	// Assuming ctltext1 has been declared globally or locally, lookup the

// ctltext1 control of the active form to get the window id, and set the

// p_text property.

x=_control ctltext1;	// Put the window id of the "ctltext1" control of the active form.

// in the variable x.  The variable x does not have to be declared.

// There are cases where the _control keyword  is not needed.  It is

// better to always use it so you don't have to worry.

x.p_text="test";	// Set the p_text property of the object referenced by the instance

// expression x.

(x+1-1).p_text="test";	// Same as previous statement.  This shows that any valid Slick-C

// language expression may be used to get the window id.

x.(x+1-1).x.p_text="test";	// Same as the previous statement but wastes more code spaces.  This

// shows that multiple dots ('.') may be used in an instance expressions.

form_wid=p_active_form;	// Get the window id of the active form.

form_wid.ctltext1.p_text="test";

// Lookup ctltext1 as if the object referred to by the variable form_wid

// were the active object.

p_next.p_next.p_prev.p_prev.p_text="test";

// Waste some code space and access the p_text property of the

// active object.

p_window_id=_control ctltext1;

// Make the ctltext1 control the active object.

p_text="test";	// Access the p_text property of the active object.

_cmdline.p_text="test";	// _cmdline is a constant window id defined in "slick.sh".

// Set the command line p_text property to "test".  Cool!!


Using Functions as Methods

A command or procedure may be called as a method without any additional declaration data.   The sample Slick-C source below illustrates this feature:

#include "slick.sh"

defmain()

{

   // Call the tbupcase function as a method to operate on Visual

   // SlickEdit's command line.  _cmdline is a constant instance

   // handle defined in "slick.sh".

   _cmdline.tbupcase();

}

// This function uppercases the text in a text box or combo box

// input field and has been written to operate on the current object.

tbupcase()

{

   // The p_text property is used to get and set the contents of a

   // text box or combo box input field

   p_text=upcase(p_text);

}

Notice that tbupcase is not defined to be a method of a particular class.  There are a significant number of functions which can operate on any Visual SlickEdit object.  This features also allows macros written in text mode SlickEdit to be converted into Visual SlickEdit macros and used as methods.  What's more interesting is that most functions in Visual SlickEdit are written to operate on the current object which means you have access to one heck of a lot of methods.  Using functions as methods is very useful when writing dialog box event handlers.  The on-line help indicates which functions can be used as methods for specific objects.  If a function is called and a statement within the function is not valid for the current object, the macro is stopped, and a dialog box is displayed indicating the error.   The find_error command ("Macro", "Find Slick-C Error") may then be used to locate the source of the error.  While using a function as a method is useful, it lacks the ability to define two functions with the same name which operate on different objects.  This can be solved by allowing a class name (possibly one of our built-in class names: _text_box, _combo_box etc.) when defining the function, like in C++.  We plan to add this to a future version of Visual SlickEdit.


Built-in Controls

Label Control

Spin Control

Text Box Control

Editor Control

Frame Control

Command Button Control

Radio Button Control

Check Box Control

Combo Box Control

List Box Control

Vscroll Bar Control

Hscroll Bar Control

Drive List Control

File List Box Control

Directory List Box Control

Picture Box Control

Gauge Control

Image Control

Adding a Bitmap Command Button or Check Box


Label Control

Label Properties

Label Methods

The label control is used to display text in any font.   Labels optionally may be aligned left, aligned right, centered horizontally, centered vertically, or centered horizontally and vertically. if you don't need to align the label, we recommend you set the p_auto_size property to TRUE to ensure that the text inside the window fits.  A common use of a label control is to place it to the left of a text box to tell the user about what goes in the text box.   Select the Label control and use the up, down, left, and right arrow keys to help you center the label to the text box.

For a complete list of label control properties, methods, and events, use the menu item ("Help", "Macro Functions by Category").


Spin Control

Spin Events

Spin Properties

Spin Methods

The most common use of a spin control is to increment or decrement a number displayed in a text box (the text box usually appears to the left of the spin control).  This can be performed WITHOUT writing any code, simply by making the "tab_index" property of the text box one less than the "tab_index" property of the spin control.  You will get an error if there is no text box with a tab index one less than the spin control, unless the "increment" property of the spin control is set to zero.  The easiest way to do this is to create the text box and then create the spin control.  You will want to turn off the "auto_size" property of the text box so you can make the height of the text box larger than the font.  Once you get the Spin control close to the right edge of the text box,  select the spin control and use the up, down, left, and right arrow keys to help you center the Label to the spin control.  The default increment is 1.  You can also use the spin control to increment/decrement the value in a gauge or scroll bar control or increment/decrement a hexadecimal number displayed in a text box.  In this case, however, you must set the "increment" property of the spin control to zero and process the on_spin_up and on_spin_down events yourself.  The on_change event is called with a reason set to CHANGE_NEW_FOCUS before an on_spin_up or on_spin_down event to allow you to return the window id of the control you want to get focus, after spinning is completed.  Return '' if you don't care.

Example

#include "slick.sh"

// This example requires form name form1 with a text box and spin

// control. The spin control should be named ctlspin1 and the

// "increment" property should be zero. The tab index of the text

// box MUST be one less than the spin control. This code does not

// reference the name of the text box so that you can use Clipboard

// Inheritance(R) to create multiple working copies of a spin control

// capable if increment/decrementing the value in a text box control

// without writing any new code.

defeventtab form1

ctlspin1.on_change(reason)

{

   if (reason==CHANGE_NEW_FOCUS) {

      return(p_prev);

   }

}

ctlspin1.on_spin_up()

{

   new_dec_value=hex2dec(p_prev.p_text)+1;

   p_prev.p_text=dec2hex(new_dec_value);

}

ctlspin1.on_spin_down()

{

   new_dec_value=hex2dec(p_prev.p_text)-1;

   p_prev.p_text=dec2hex(new_dec_value);

}

For a complete list of spin control properties, methods, and events, use the menu item ("Help", "Macro Functions by Category").


Text Box Control

Text Box Events

Text Box Properties

Text Box Methods

The text box control allows the user to enter a single line of text.  Use the editor control to allow any number of lines to be entered.  Text boxes support completion with the SPACE BAR and question mark keys.  Set the "completion" property of the text box if there is an existing completion type which suits your needs.  The FILE_ARG completion type is the most common.  It provides completion on file names.  You can write new commands which operate in all text boxes, edit windows, and editor controls.

Example

#include "slick.sh"

_command void upcase_line()

      name_info(","VSARG2_TEXT_BOX|VSARG2_REQUIRES_EDITORCTL)

{

    init_command_op();

    get_line(line);

    replace_line(upcase(line));

    retrieve_command_results();

}

Bind the upcase_line command above to Alt+F12.  Notice that this command works in all text boxes, edit windows, and editor controls.  The key binding may not work in a text box if you bind upcase_line to one of the CUA keys Alt+A..Alt+Z, Ctrl+X, Ctrl+C, or Ctrl+V.  Use the Redefine Common Keys dialog box ("Tools", "Configuration", "Redefine Common Keys...") to allow all key bindings to be inherited into text box controls.

For a complete list of text box control properties, methods, and events, use the menu item ("Help", "Macro Functions by Category").


Editor Control

Editor Control Events

Editor Control Functions

Editor Control Properties

Editor Control Methods

The editor control allows a user to enter multiple lines.  We use the editor control to view clipboards, for our calculator, and for version control comments.  Almost all your key bindings for an MDI edit window will work in an editor control even if you have changed your emulation.  You can use macro recording (see section "Recording Macros) to write a new command which works in an edit window and editor control.  Just check the "Allow in non-MDI editor control" check box when you finish recording your macro.

For a complete list of editor control properties, methods, and events, use the menu item ("Help", "Macro Functions by Category").


Frame Control

Frame Events

Frame Properties

Frame Methods

The frame control is used to group a set of related controls.  Often, radio buttons are placed inside of a frame control to tell the dialog manager that only one of the radio buttons in the group can be turned on at a time.

There are two ways to place a control inside a frame control:

•	Click the left mouse button on the bitmap in the Properties dialog box of the control you want to place inside the frame.   Click and drag with the left mouse button inside the frame control to create the control with the size of the rectangle displayed.

•	Copy or cut the control you want to place inside the frame to the clipboard.   Select the frame control and press Ctrl+V to paste the control inside the frame control.

For a complete list of frame control properties, methods, and events, use the menu item ("Help", "Macro Functions by Category").


Command Button Control

Command Button Events

Command Button Properties

Command Button Methods

The command button control is most typically used to create an OK, Cancel, or Help button.  See section "Adding a Cancel Button and section "Adding an OK button and Closing a Dialog Box for more information.

For a complete list of command button control properties, methods, and events, use the menu item ("Help", "Macro Functions by Category").


Radio Button Control

Radio Button Events

Radio Button Properties

Radio Button Methods

Radio buttons must be grouped.  Unlike check boxes, when one radio button is on, the other radio buttons in the same group are off.  Radio buttons are considered in the same group if they have the same parent.  Usually radio buttons are grouped by placing them inside a picture box or frame control.  A picture box can have its "border_style" property set to "BDS_NONE" to give the appearance that the picture box control does not exist.

Use one of the following methods to place a radio button inside a frame or picture box:

•	Click the left mouse button on the radio button bitmap in the Properties dialog box.   Click and drag with the left mouse button inside the frame or picture box control to create the control with the size of the rectangle displayed.

•	Copy or cut the radio button(s) you want to place inside the frame or picture box to the clipboard.   Select the frame or picture box and press Ctrl+V to paste the control(s) inside it.

For a complete list of radio button control properties, methods, and events, use the menu item ("Help", "Macro Functions by Category").


Check Box Control

Check Box Events

Check Box Properties

Check Box Methods

A check box is used for a true/false option.  Check boxes may have the box part displayed to the left or right of the caption.

For a complete list of check box control properties, methods, and events, use the menu item ("Help", "Macro Functions by Category").


Combo Box Control

Combo Box Events

Combo Box Properties

Combo Box Methods

A combo box is used in place of a text box for combo box retrieval, when only a fixed set of responses are allowed, or when a common set of responses are known and a different response may be typed in.  Combo box retrieval is a mechanism by which the combo list box displays the previous responses entered in the text box of the combo box.  The combo box has three styles ("style" property).  Use the style which best suits your needs.  The PSCBO_NOEDIT style is used when only a fixed set of responses are allowed.  Combo boxes support completion with the SPACE BAR and question mark keys.  Set the "completion" property of the combo box if there is an existing completion type which suits your needs.  The FILE_ARG completion type is the most common.  It provides completion on file names.

Example

//  This example illustrates combo box retrieval.

//  This example requires a form named "form1", an OK button named

// "ok", and combo box named "ctlcombo1".

defeventtab form1

ctlok.lbutton_up()

{

   // When the OK button is pressed, you will want to save combo box

   // retrieve information.

   _append_retrieve(_control ctlcombo1,ctlcombo1.p_text);

}

ctlok.on_create()

{

   // Fill in the combo box list

   ctlcombo1._retrieve_list();

}

A combo box consists of 4 controls: the root window, text box, picture box, and list box.  The properties and methods of the sub-controls may be accessed individually with the p_cb, p_cb_text_box, p_cb_picture, p_cb_list_box instance handle properties.  The p_cb_picture property is only available when the control is displayed.

Example

defeventtab form1

ctlcombo1.on_create()

{

   // To make the loop a little more efficient, activate the list

   // box of the combo box control

   p_window_id=p_cb_list_box;

   for (i=1;i<=100;++i){

      // Add an item to the active list box.

      _lbadd_item("line="i);

   }

   // Activate the root window of the combo box.

   p_window_id=p_cb;

}

Example

#include "slick.sh"

defeventtab form1

ctlcombo1.on_create()

{

   // Show a picture which indicates that clicking on the picture

   // box button displays a dialog box. _pic_cbdots is a global

   // variable defined in "slick.sh" which is a handle to a picture.

   p_cb_picture.p_picture=_pic_cbdots;

}

ctlcombo1.lbutton_down()

{

   // Check if the left mouse button was pressed inside the picture

   // box of the combo box

   if (p_cb_active==p_cb_picture) {

       result=show("-modal form2");

       // process result here

       return("");

   }

   // Skip user level 1 inheritance and execute the default event

   // handler defined by user level 2 inheritance.

   call_event(p_window_id,lbutton_down,2);

}

Example

// This example requires a form named "form1", command button named

// "ok", a combo box named "ctlcombo1", and another command button

// named "ctlcommand1

#include "slick.sh"

defeventtab form1

ctlok.lbutton_up()

{

   // Check if text in combo box text is valid.  You might think you

   // could use a non-editable style combo box.  However, many users

   // prefer typing in names using completion, to using the mouse to

   // select an item out of a list box.

   status=ctlcombo1._cbi_search("","$");

   if (status) {

      _message_box("Combo box contains invalid input");

      return("");

   }

   // have valid input

}

ctlcommand1.lbutton_up()

{

   // Add some items to the combo box list

   ctlcombo1.p_cb_list_box._lbadd_item("Hello")

   ctlcombo1.p_cb_list_box._lbadd_item("Open");

   ctlcombo1.p_cb_list_box._lbadd_item("New");

   // Make the correct item in the combo box list current so combo

   // box retrieval works better. _cbi_search searches for p_text

   // in the combo list box.  The "$" specifies that an exact match

   // should be found and not a prefix match.

   status=ctlcombo1._cbi_search("","$");

   if (!status) {

      messageNwait("Found it!");

      // Select the line in the combo box so that an up or down arrow

      // selects the line above or below and not the current line.

      ctlcombo1.p_cb_list_box._lbselect_line();

   }

}

A combo box receives an on_change event with a reason argument under the following circumstances:

reason	Description

CHANGE_OTHER	p_text  property changed, probably because of typing.

CHANGE_CLINE	p_text property changed because selected line in list box changed and the list was visible.

CHANGE_CLINE_NOTVIS

p_text property changed because a key was pressed which scrolls the list (up, down, pgup,pgdown) while the list was invisible.

CHANGE_CLINE_NOTVIS2

Same as CHANGE_CLINE_NOTVIS.  Sent to user level 2 inheritance only.  User level 2 inheritance will receive the CHANGE_CLINE_NOTVIS reason as well if the user level 1 inheritance does not catch the on_change event.

The on_drop_down event is sent to a combo box with a reason argument.  The reason argument specifies one of the following conditions:

DROP_UP	After combo list box is made invisible.

DROP_DOWN	Before combo list box is made visible.

DROP_INIT	Before retrieve next/previous.  Used to initialize list box before it is accessed.

DROP_UP_SELECTED	Mouse released while on valid selection in list box and list is visible

Example

#include "slick.sh"

defeventtab form1

ctlcombo1.on_drop_down(reason)

{

   if (reason==DROP_INIT) {

      if (p_user=="") {

          p_user=1;   // Indicate that the list box has been filled.

          // Insert one heck of a lot of items

          p_cb_list_box._insert_name_list(COMMAND_TYPE);

          p_cb_list_box._lbsort();

          p_cb_list_box._lbtop();

      }

   }

}

For a complete list of combo box control properties, methods, and events, use the menu item ("Help", "Macro Functions by Category").


List Box Control

List Box Events

List Box Properties

List Box Methods

A list box is used to allow the user to choose from a fixed set of items.  Multiple items from the list may be selected at once by setting the "multi_select" property to MS_SIMPLE_LIST or MS_EXTENDED (used by Open dialog box).  A list box receives an on_change event, with a reason argument set to CHANGE_SELECTED, when items are selected or deselected because of a key press or mouse event.  None of the _lb??? functions cause an on_change event.  Use the _find_longest_line() function to find the longest line in a list box.

Example

// This example requires a form named "form1", a command button

// named "ok", and a list box named "ctllist1".

#include "slick.sh"

defeventtab form1

ctllist1.on_change(reason)

{

   // Check the reason value.  In the future we may add more reason

   // values for the list box.

   if (reason==CHANGE_SELECTED) {

       // IF any items in the list box is selected

       if (p_Nofselected) {

           ctlok.p_enabled=1;    // Enable the OK button

       } else if(!ctlok.p_enabled){

           ctlok.p_enabled=0;    // Disable the OK button

       }

   }

}

Example

//This example illustrates adding pictures to a list box.

#include "slick.sh"

#define PIC_LSPACE_Y 60    // Extra line spacing for list box.

#define PIC_LINDENT_X 60   // Indent before for list box bitmap.

defeventtab form1

ctllist1.on_create()

{

   // Add some extra line height.

   p_pic_space_y=PIC_LSPACE_Y;

   // _pic_??? arguments are global variables defined in "slick.sh"

   // which are name table indexes to pictures.  You can create and

   // load your own pictures.  All our bitmaps are shipped with the

   // editor.  Use the bitmap file "_drremov.bmp as a template for

   // creating your own bitmap for a  list box.  You can load your

   // own bitmap files with the _update_picture function.

   _lbadd_item("a:",PIC_LINDENT_X,_pic_drremov);

   _lbadd_item("b:",PIC_LINDENT_X,_pic_drremov);

   _lbadd_item("c:",PIC_LINDENT_X,_pic_drfixed);

   // The p_picture property must be set to indicate that this list box

   // is displaying pictures and to provide a scaling picture for

   // the p_pic_point_scale property.  The p_pic_point_scale property

   // allows the picture to be resized for fonts larger or smaller than

   // the value of the p_pic_point_scale point size. If

   // p_pic_point_scale is 0, the picture is not scaled.

   p_picture=picture;

   p_pic_point_scale=8;

}

Example

// This example illustrates how to resize a dialog box based on the

// longest item in a list box.

#include "slick.sh"

defeventtab form1

ctllist1.on_create()

{

   _lbadd_item("Line1");

   _lbadd_item("This is a longer line2");

   _lbadd_item("This is the longest item in the list box");

   longest=_find_longest_line();

   // Add on a little to account for the left and right borders of the

   // list box.  Have to convert client width because its in pixels.

   list_width=longest+ p_width-_dx2lx(p_xyscale_mode,p_client_width);

   form_wid=p_active_form;

   // Again we have to account for the left and right borders.

   // Multiply p_x of list box by two to show equal amounts of

   // spacing on each side of the list box.

   form_width=2*p_x+ list_width+ form_wid.p_width-

              _dx2lx(form_wid.p_xyscale_mode,form_wid.p_client_width);

   p_width=list_width;

   form_wid.p_width=form_width;

   // Now make sure the whole dialog box can be seen on screen

   form_wid._show_entire_form();

}

Example

// This example illustrates how to disable a list box and make the

// items in the list box appear grayed.

#include "slick.sh"

defeventtab form1

ctllist1.on_create()

{

   _lbadd_item("item1");

   _lbadd_item("item2");

   p_no_select_color=1;

   p_enabled=0;

   p_forecolor=_rgb(80,80,80);

}

For a complete list of list box control properties, methods, and events, use the menu item ("Help", "Macro Functions by Category").


Vscroll Bar Control

Vscroll Bar Events

Vscroll Bar Properties

Vscroll Bar Methods

A scroll bar control is typically used to allow the user to choose an integer that has a fixed range or to display the completion status of some process.  Set the "min", "max", "small_change", and "large_change" properties to define the minimum integer value, maximum integer value, increment/decrement which occurs when arrows are pressed, and increment/decrement which occurs when click left button between arrow and thumb box respectively.

The on_change event is sent after dragging the thumb box is completed.  The p_value property contains the new scroll position and will be in the range p_min..p_max.

The on_scroll event is sent while you click and drag the thumb box of a scroll bar.

Example

#include "slick.sh"

defeventtab form1

ctlvscroll1.on_scroll()

{

   message("on_scroll p_value="p_value);

}

ctlvscroll1.on_change()

{

   message("on_change p_value="p_value);

}

For a complete list of scroll bar control properties, methods, and events, use the menu item ("Help", "Macro Functions by Category").


Hscroll Bar Control

Hscroll Bar Events

Hscroll Bar Properties

Hscroll Bar Methods

See Vscroll Bar control above.


Drive List Control

Drive List Events

Drive List Properties

Drive List Methods

The drive list is a combo box which allows selection of different disk drives.  The Open dialog box uses this control.

The drive list control receives an on_change event with a reason argument of CHANGE_DRIVE when the drive is changed by selecting a different drive from the combo list box.

Example

#include "slick.sh"

defeventtab form1

ctlcombo1.on_change(reason)

{

   if (reason==CHANGE_DRIVE) {

      message("Item selected from list.  Current drive is now "_dvldrive());

   }

}

For a complete list of drive list control properties, methods, and events, use the menu item ("Help", "Macro Functions by Category").


File List Box Control

File List Box Events

File List Box Properties

File List Box Methods

The file list box control displays a list of files.  Multiple files may be selected by setting the "multi_select" property to MS_SIMPLE_LIST or MS_EXTENDED (used by Open dialog box).

A file list box receives an on_change event with a reason argument under the following circumstances:

reason	Description

CHANGE_SELECTED	Occurs when items are selected or deselected because of a key press or mouse event.  None of the _lb??? functions cause an on_change event.

CHANGE_FILENAME	_flfilename() function was called which changed the file names listed.

Example

#include "slick.sh"

defeventtab form1

ctlcommand1.lbutton_up()

{

   ctllist1._flfilename("*.bat","c:\\");

}

ctllist1.on_change(reason)

{

   if (reason==CHANGE_FILENAME) {

       message("File list display directory "_flfilename());

   }

}

For a complete list of file list box control properties, methods, and events, use the menu item ("Help", "Macro Functions by Category").


Directory List Box Control

Directory List Box Events

Directory List Box Properties

Directory List Box Methods

The Directory list box control displays a list of directories.

A file list box receives an on_change event with a reason argument under the following circumstances:

reason	Description

CHANGE_SELECTED	Occurs when items are selected or deselected because of a key press or mouse event.  None of the _lb??? functions cause an on_change event.

CHANGE_PATH	_dlfilename() function was called which changed the file names listed, the user double clicked the left mouse button, or the user pressed the ENTER key.

Example

// This example requires a form named "form1", a text box named

// "ctltext1", and a directory list box named "ctllist1".

#include "slick.sh"

defeventtab form1

ctllist1.on_change(reason)

{

   if (reason==CHANGE_PATH) {

      // Set the text in the text box to current directory. Changing

      // directories with the directory list box control changes the

      // editor's current directory.

      ctltext1.set_command(_dlpath(),1);

   }

}

For a complete list of directory list box control properties, methods, and events, use the menu item ("Help", "Macro Functions by Category").


Picture Box Control

Picture Box Events

Picture Box Properties

Picture Box Methods

The picture box is typically used to place other controls inside of it like the frame control.  The picture box is capable of displaying bitmaps, displaying bitmap buttons, and all the features of the image control.  However, the image control has better performance than the picture box because it does not require a system resource known as a window.  We recommend you use the image control (see section "Image Control) for display bitmaps and bitmap buttons.

For a complete list of picture box control properties, methods, and events, use the menu item ("Help", "Macro Functions by Category").


Gauge Control

Gauge Events

Gauge Properties

Gauge Methods

The gauge control is typically used to indicate the completion status of some process.

For a complete list of gauge control properties, methods, and events, use the menu item ("Help", "Macro Functions by Category").

Example

// Create a form with a command button named ctlcancel, and

// gauge named ctlgauge1.  Set the cancel and default

// properties of the command button to true.

//

#include "slick.sh"

static boolean gcancel

_command test()

{

   // Need to tell compiler ctlgauge1 is a control because

   // the form1_wid.ctlgauge1 is too ambiguous.

   _control ctlgauge1;

   // Show the form modeless so there is no modal wait

   form1_wid=show("form1");

   // Disable all forms except form1_wid

   disabled_wid_list=_enable_non_modal_forms(0,form1_wid);

   gcancel=0;

   for (i=1;i<=100;++i) {

      // Read mouse, key, and all other events until none are left or

      // until the variable gcancel becomes true

      process_events(gcancel);

      if (gcancel) {

         break;

      }

      // Do work here.  Replace the delay below with the operation

      // you want to do.  The delay makes this example look more real.

      delay(10);

      form1_wid.ctlgauge1.p_value=i;

   }

   // Enable all forms that were disabled.

   _enable_non_modal_forms(1,0,disabled_wid_list);

   form1_wid._delete_window();

}

defeventtab form1

ctlcancel.lbutton_up()

{

   gcancel=1;

}


Image Control

Image Events

Image Properties

Image Methods

The image control performs a subset of the features of the picture box control.  However, it has better performance because an operating system resource known as a window is not required.  The image control is best used for creating bitmap buttons for button bars or tool bars.

Adding a Bitmap Command Button or Check Box

Perform the following steps to add a bitmap button to a dialog box:

1.	Create a new form for editing ("Macro", "New").

2.	Create an image control.  Double click on the image control (Looks like slanted rectangle) in the dialog editor.

3.	Set the p_picture property to bbfind.bmp  Make sure you specify the full path (c:\vslick\bitmaps (UNIX: /usr/lib/vslick/bitmaps) is the default path used by installation program).

4.	Set the p_command property to gui_find.  Notice that the down arrow of the combo box displays all the editor commands.

5.	Set the p_message property to Searches for a string you specify.

6.	Set the p_style property to  PSPIC_FLAT_BUTTON or PSPIC_BUTTON.

In step 3, we have you enter the "bbfind.bmp bitmap as an example.  The "bb" prefix indicates that this is a bitmap that can be used by a toolbar.  You can edit the "bbfind.bmp file with paint brush (pbrush.exe).  Use "bbblank.bmp as a template for creating your own bitmap buttons.

Example

// This example illustrates how to load your own picture like

// a toolbar button.

#include "slick.sh"

defeventtab form1

ctlimage1.on_create()

{

   index=_update_picture(-1,bitmap_path_search("bbfind.bmp));

   if (index<0) {

       if (index==FILE_NOT_FOUND_RC) {

          _message_box("Picture bbfind.bmpwas not found");

       } else {

          _message_box("Error loading picture bbfind.bmpn\n"get_message(index));

       }

       return("");

   }

   p_picture=index;

   p_command="gui_find";

   p_message="Searches for a string you specify";

   p_style=PSPIC_FLAT_BUTTON;

}

Example

// This example illustrate how to give the appearance of a button

// being pushed in.  While you can do this by setting styles, here

// you can see how some other functions accomplish this task.

// For this example, create a form named form1 and an image control

// named ctlimage1.

#include "slick.sh"

defeventtab form1

ctlimage1.on_create()

{

   index=_update_picture(-1,bitmap_path_search("bbfind.bmp));

   if (index<0) {

       if (index==FILE_NOT_FOUND_RC) {

          _message_box("Picture bbfind.bmpwas not found");

       } else {

          _message_box("Error loading picture bbfind.bmpn\n"get_message(index));

       }

       return("");

   }

   p_picture=index;

   p_command="gui_find";

   p_message="Searches for a string you specify";

   p_style=PSPIC_BUTTON;

}

ctlimage1.lbutton_down()

{

   // Reset the button counter so we don't get

   // double and triple click events.

   get_event('B');

   mou_mode(1)

   mou_capture();

   done=0;

   event=MOUSE_MOVE;

   for (;;) {

      switch (event) {

      case MOUSE_MOVE:

         mx=mou_last_x("m");  // "m" specifies mouse position in

                              // current scale mode

         my=mou_last_y("m");

         if (mx>=0 && my>=0 && mx<p_width && my<p_height) {

            if (!p_value) {

               // Show the button pushed in.

               p_value=1;

            }

         } else {

            if (p_value) {

               // Show the button up.

               p_value=0;

            }

         }

         break;

      case LBUTTON_UP:

      case ESC:

         p_value=0;  // Restore the button state

         done=1;

      }

      if (done) break;

      event=get_event();

   }

   mou_mode(0);

   mou_release();

   say('out');

   return("");

}

For a complete list of image control properties, methods, and events, use the menu item ("Help", "Macro Functions by Category").


Adding Dialog Box Retrieval

Dialog box retrieval is a mechanism which allows previous responses for check boxes, radio buttons, text boxes, and combo boxes to be retrieved.   Press F7 and F8 to retrieve the previous or next response.  For example, if you want to repeat your last Search and Replace again,  display the Replace dialog box ("Search", "Replace") and press ENTER.  The Replace dialog box displays your last response including all check boxes.   Try two search and replace commands with this dialog box and then try pressing F7 or F8 when the Replace dialog box is displayed.  Your responses to dialog boxes are saved for your next session when you exit the editor and auto restore is on ("Tools", "Configuration", "More Options...").

Example

// This example illustrates how to add dialog box retrieval to your own

// dialog boxes.  Create a form named "form1", a text box (any name), a

// check box (any name), and a command

// button named "ok".

#include "slick.sh"

defeventtab form1

ctlok.on_create()

{

   // Retrieve the previous response to this dialog box.

   _retrieve_prev_form();

}

ctlok.lbutton_up()

{

   _save_form_response();

   p_active_form._delete_window(1);

}


Changing or Adding Menus

You may change or add menu items by using our Menu Editor dialog box ("Macro", "Menus...", select a menu).  To create a new menu, use the Open Menu dialog box ("Macro", "Menus...") and press the New button.  A quick way to bind a pop-up menu to a mouse click is to use the Show button on the Open Menu dialog box while recording a macro.  When you are finished recording the macro, our Bind Command to Key dialog box is displayed which allows you to bind your new macro to a mouse click.


Menu Macro Programming

This section describes macro programming details about menus.   You do not need to read this section unless you are attempting more advanced menu item enabling or you are writing macros which manage menus.  See on-line help on Menu Editor dialog box for information on developing menus without macro programming.

Menu Events

Menu Properties

Menu Functions

Menu Item Properties

Menu Item Functions

Creating and Editing Menu Resources

Defining a Menu Resource

Predefined Attributes For Auto-Enabling Commands

Macro Callbacks for Enabling Commands

Putting a Menu Bar on a Form

Displaying a Menu as a Pop-up


Creating and Editing Menu Resources

Modified menus are stored in the state file "vslick.sta" (UNIX: "vslick.stu") The easiest way to create or change a menu is to use the Open Menu dialog box ("Macro", "Menus...").  After you have selected the menu, the Menu Editor dialog box is displayed which allows you to easily edit a menu resource.  Once the menu is created, you may use the show, mou_show_menu, or _menu_show function to run the menu by displaying it as a pop-up.  The _menu_set method may be used to create a menu bar on a form.  Another way to create or change a menu is to define or modify a menu resource.  See section "Defining a Menu Resource" for more information.


Defining a Menu Resource

Use the insert_object command to insert macro source code for a menu into the current buffer.  You can edit the resource properties and then run the macro to apply the resource changes.  You can ignore the message "No main entry point".  Changing a menu resource WILL NOT change any menu bars.  Menu bars represent menu resources that have been loaded.  See _menu_load function in the on-line help for information on loading a menu resource.

A menu definition has the following format:

_menu menu_name {

submenu menu_item, help_command, help_message, categories

     menu_item, command, categories, help_command, help_message

     ...

endsubmenu

submenu

     ...

endsubmenu

...

}

The items in italics have the following meaning:

menu_item	Menu item name in double quotes.  Use '&' to choose selection character.

command	Any editor command.  Place cursor on Visual SlickEdit command line and press '?' to list all editor commands.

help_command	Command to be executed when F1 is pressed.  Usually it is a help or popup_imessage command.

categories	Specifies zero or more help categories in double quotes.  Multiple help categories are separated with '|'.

help_message	A single line message in double quotes displayed on message line.

Sample Menu Definition:

_menu mymenu {

submenu "&File", "Help file menu", "Displays File drop-down menu","ncw"

     "&New", "new", "", "help new", "Creates a new file to edit"

     "&Open\tCtrl+O","gui_open","", "help gui_open", "Open a file"

endsubmenu

submenu "&Edit", "Help edit menu", "Displays Edit drop-down menu","ncw"

      "Cu&t", "cut", "sel|nrdonly", "help cut", "Deletes the selection and copies it to the clipboard"

}


Predefined Attributes For Auto-Enabling Commands

For convenience, Visual SlickEdit has some predefined enable/disable attributes which you can specify for any command.  You specify these attributes in the name_info of a command definition.  Auto-Enabling attributes affects the enable/disable state for a command placed in a menu or in a toolbar.

Example

#include "slick.sh"

_command void top_of_buffer()

name_info(',' VSARG2_READ_ONLY| VSARG2_REQUIRES_EDITORCTL)

{

   ...

}

The above command will be disabled when there is no editor control to operate on.  For more examples, and a complete list of attributes see section "name_info Attributes".


Macro Callbacks for Enabling Commands

If our auto-enable attributes do not give you what you need, you can define a enable/disable callback for your command.  The name of the callback function you define is based on the name of your command as shown below:

Example

#include "slick.sh"

static boolean gSomeOtherState;

/*

  This function gets called if your command is used in a menu or toolbar.

  You must return a combination of the MF_ flags ORed together.

  BEWARE: If an _OnUpdate callback causes a Slick-C run-time error, you

  may not see the error.  In addition, the timer used for toolbars,

  Context Tagging(TM), AutoSave, and some other features may be

  automatically terminated.  Exit and restart the editor to restart

  this timer.  Use the "say" function to debug your _OnUpdate

  callback

*/

int _OnUpdate_mycommand(CMDUI &cmdui,int target_wid,_str command)

{

   //say('h1');

   // Lets assume this command requires the target to be an

   // editor control with a selection.

   // IF the target is not an editor control

   if ( !target_wid || !target_wid._isEditorCtl()) {

      //say('disabled at h2');

      return(MF_GRAYED);

   }

   //say('h3');

   // IF the editor control does not have a selection

   if (!target_wid.select_active2()) {

      //say('disabled at h4');

      return(MF_GRAYED);

   }

   //say('h5');

   if (gSomeOtherState) {

      //say('disabled at h6');

      return(MF_GRAYED);

   }

   //say('enabled at h7')

   return(MF_ENABLED);

}

_command void mycommand() name_info(','VSARG2_REQUIRES_EDITORCTL)

{

   // Some code here...

}

// This command effects the enable/disable of mycommand

_command void mycommand2(_str argument="0")

{

   gSomeOtherState=(argument)?1:0;

   // Indicate that the enable state of the toolbar buttons must be

   // updated.  The _tbSetRefreshBy function is very fast.

   // Toolbars will be updated after the macro terminates and

   // the user stops typing fast.

   _tbSetRefreshBy(VSTBREFRESHBY_USER);

}


Putting a Menu Bar on a Form

The following sample code illustrates how to place a menu on a form as a menu bar.

#include "slick.sh"

// Create a form called form1 and set the border style to anything BUT

// BDS_DIALOG BOX.  Windows does not allow forms with a dialog

// box style border to have menu bars.

defeventtab form1

form1.on_load()

{

    // Find index of Visual SlickEdit MDI menu resource

    index=find_index(def_mdi_menu,oi2type(OI_MENU));

    // Load this menu resource

    menu_handle=p_active_form._menu_load(index);

    // _set_menu will fail if the form has a dialog box style border.

    // Put a menu bar on this form.

    _menu_set(menu_handle);

    // You DO NOT need to call _menu_destroy.  This menu is destroyed

    // when the form window is deleted.

}

form1.on_init_menu()

{

    // Gray out all menu items which are not allowed when there no child windows.

    _menu_set_state(p_menu_handle,"!ncw",MF_GRAYED,"C");

}


Displaying a Menu as a Pop-up

If the show or mou_show_menu function suits your needs, we recommend that you use one of them.  The following sample code illustrates how to display a menu as a pop-up.

Example

#include "slick.sh"

defmain()

{

   // Low-level code to display Visual SlickEdit menu bar as pop-up.

   // Could just use show or mou_show_menu function.

   index=find_index("_mdi_menu",oi2type(OI_MENU))

   if (!index) {

       message("Can't find _mdi_menu");

   }

   menu_handle=_menu_load(index,"P");

   // Display this menu in the menu of the screen.

   x=_screen_width()/2;y=_screen_height()/2;

   flags=VPM_CENTERALIGN|VPM_LEFTBUTTON;

   _menu_show(menu_handle,flags,x,y);

   _menu_destroy(menu_handle);

}


Common Dialog Boxes

The following are several important dialog box forms and functions you may want to use in your own macros.  See on-line help for examples and detailed information.   Use the menu item ("Help", "Search...") to get detailed on-line help for these items.

General purpose forms and dialog box functions:

_textbox_form	General purpose form which displays a variable number of text boxes or combo boxes.

_sellist_form	General purpose form which displays a list box, an optional combo box, and a variable number of command buttons.

_open_form	General purpose form used to open and save files which does not have the advanced controls.

_edit_form	General purpose form used to open and save files which has the advanced controls used for the ("File", "Open...") dialog box of Visual SlickEdit.

_font_form	General purpose form used to prompt for a font.

_choose_font	non-UNIX platforms only.  General purpose dialog box built-in to operating system used to prompt for a font.

_printer_setup	non-UNIX platforms only.  General purpose dialog box built-in to operating system used for printer setup.

There are a lot of commands which display dialog boxes.  To find out what command a particular menu item invokes,  place your cursor on the menu item and press F1 to get help on the command.  If a key displays a dialog box, you can find out the command the key executes by using the Bind Command to Key dialog box ("Tools", "Configuration", "Key Bindings...").


String Functions Overview

The following are commonly used string functions.  See on-line help on String Functions for a complete list.

_str center(_str string,int width [,_str pad_ch])

Returns string padded evenly on left and right with spaces or a character you choose with the optional argument pad_ch.

_str dec2hex(long number [,int base])

Returns number converted to base specified.

_str expand_tabs(_str string [,int start [,int count [,_str option]]])

Very similar to substr function except that this function supports tab  characters very well.

_str field(_str string,int width)

Returns string padded with trailing spaces to width characters

long hex2dec(_str number [,int base])

Returns number converted to base specified.

_str indent_string(int width)	If indent with tabs is on, a string of tabs of length width is returned.  Otherwise, a string of spaces of length width is returned.

boolean isalnum(_str ch)	Returns non-zero value if ch is a numeric or alphabetic character.

boolean isalpha(_str ch)	Returns non-zero value if ch is an alphabetic character.

boolean isdigit(_str ch)	Returns non-zero value if ch is a numeric character.

boolean isinteger(_str string)	Returns non-zero value if string is a valid int.  If string is floating point number, 0 is returned.

boolean isnumber(_str string)	Returns non-zero value if string is a valid double (floating pointer number).

_str last_char(_str string)	Returns last character of string.  If string is null, the space character is returned.

int lastpos(_str needle [,_str haystack [,int start [,_str options]]])

Returns the position (1..length(haystack)) of the last occurrence of needle in haystack.  If needle is not found, 0 is returned.  Regular expressions are supported.

int length(_str string)	Returns the number of characters in string.

_str lowcase(_str string)	Returns string converted to lower case.

_str number2onoff(_str number)	Returns "off" if number==0.  Otherwise "on" is returned.

_str number2yesno(_str number)	Returns "N" if number==0.  Otherwise "Y" is returned.

parse expr with template	This function is wonderful!  It breaks apart the expression expr given into variables that appear in template, and much more.

boolean parseoption(_str &cmdline ,_str option_ch)

Strips "+" or "-" option from cmdline.  Returns non-zero number if option_ch was found.

int pos(_str needle [,_str haystack [,int start [,_str options]]])

Returns the position (1..length(haystack)) of the first occurrence of needle in haystack.  If needle is not found, 0 is returned.  Regular expressions are supported.

boolean setonoff(_str &name,_str value)

Sets name to 1 or 0 corresponding to value="on" or value="off".  Returns 0 if input value is valid.  Displays message if value is not "on" or "off".

boolean setyesno(int &name,_str value)

Sets name to 1 or 0 corresponding to value="Y","Yes" or value="N","No".  Returns 0 if input value is valid.  Displays message if value is not "Y" or "Yes", "N" or "No".

_str stranslate(_str string, _str replace_string,_str search_string, _str search_options)

Returns string with all occurrences of search_string replaced with replace_string.

_str strip(_str string ,_str ltb [,_str strip_char])	Returns string stripped of leading and/or trailing strip_char.

_str strip_filename(_str filename, 'P'|'D'|'E'|'N')

Returns filename with part stripped.  P=Path, D=Drive, E=Extension, N=Name.

_str strip_last_word(_str &line)

Returns the last space delimited word in line.   The last word and trailing spaces are deleted from line.

_str strip_options(_str cmdline ,_str &options)

Returns cmdline without words that start with the characters "-", "+", or "[".  options variable is set to stripped option words.

_str substr(_str string ,int start [,int len [,_str pad]])

Returns length characters of string beginning at start.  By default, length defaults to rest of string.  If length is greater than length of string, the return string is padded with blanks or pad character if specified.

_str translate(_str string [,_str output_table [,_str input_table [,_str pad]]])

Returns string with characters translated according to arguments.

_str upcase(_str string)	Returns string converted to upper case.

int verify(_str string, _str reference [, "M"|"" [,int start]])

Returns the position (1..length(string)) of first character not matching or matching a character in reference.  0 is returned on failure.

_str word(_str string,int Nth)	Returns the Nth space or tab delimited word in string.  "" is returned if the Nth word does not exist.

See on-line help for examples and detailed information on these functions.   Use the menu item ("Help", "Search...") to get detailed on-line help for these functions.  For a list of string related functions, use the help item ("Help", "Macro Functions by Category").


Search Functions Overview

Visual SlickEdit has two levels of search functions.  The high level functions provide a few extra features (user interfacing and multiple file searching) not provided by the lower level built-in functions.  For best speed, use the built-in functions.  The built-in functions can be used without affecting the high level search commands such as the find_next command.  In addition, the built-in functions are not affected by the global editor search options.  For a list of search related functions, use the help item ("Help", "Macro Functions by Category").  For a complete list of search related functions, see on-line help on Search Functions.

See on-line help for examples and detailed information on these functions.   Use the menu item ("Help", "Search...") to get detailed on-line help for these functions.

High Level Search Functions

gui_find	Displays Find dialog box and performs search using the find or _mffind functions.

gui_replace	Displays Replace dialog box and performs search using gui_replace2 or _mfreplace functions.

gui_replace2	Performs search and replace based on arguments given.  This function is very similar to the replace function, except that this function uses a dialog box to prompt the user where to replace.

find_next	Searches for next occurrence of search string used by any of these high level search functions.  This function is not affected by previous searches done with low-level built-in functions.

find	Performs search based on arguments given.

replace	Performs a replace based on arguments given.  The user is prompted where to replace via the message line.

_mffind	Performs a multiple file and/or buffer search based on the arguments given.

_mfreplace	Performs a multiple file and/or buffer search based on the arguments given.

Lower Level Built-in Functions

search	Performs search, or search and replace, based on arguments given.   Does not support wrapping to top/bottom of file.   When performing a replace, the user is not prompted at all.

repeat_search	Searches for the next occurrence of search string used by last call to the search built-in.

Example

// This example searches for lines which contain a particular search

// string and places the lines in another window and buffer.

defmain()

{

   orig_wid=p_window_id;

   // The +w option forces a new window to be created.  The +t options

   // force a new buffer to be created.

   status=edit("+w +t");

   if (status) {

      _message_box("Unable to create temp window and buffer\n\n":+

                   get_message(status));

   }

   _delete_line();  // Delete the blank line

   output_wid=p_window_id;

   p_window_id=orig_wid;

   top();   // Place the cursor at the top in column 1.

   status=search("if","w@");// Case insensitive word search for "if"

                            // "@" specifies no string not found message.

   for (;;) {

      if (status) {

         break;

      }

      get_line(line);

      // Place the cursor at the end of the line so no more occurrences can

      // be found on this line.

      _end_line();

      output_wid.insert_line(line);

      status=repeat_search();

   }

   // Make the output window active so we can see the results

   p_window_id=output_wid;

}

Example

// This example is very similar to the example above except that the

// output data is placed in a view and buffer.  The only advantage in

// using a view and buffer is that the output can be displayed

// in a list box without the user having to see a new window created.

#include "slick.sh"

defmain()

{

   // Create a temporary view and buffer within the current window.

   // Each window can store multiple cursor positions (views) to any buffer.

   orig_view_id=_create_temp_view(temp_view_id);

   if (orig_view_id=="") {

      return("");

   }

   activate_view(orig_view_id);

   top();   // Place the cursor at the top in column 1.

   status=search("if","w");   // Case sensitive word search for if

   for (;;) {

      if (status) {

         // clear the pending message caused by built-in search failing

         clear_message();

         break;

      }

      get_line(line);

      // Place the cursor at the end of the line so no more occurrences

      // can be found on this line.

      _end_line();

      activate_view(temp_view_id);

      insert_line(line);

      activate_view(orig_view_id);

      status=repeat_search();

   }

   // Display the buffer in a list box.

   // The _sellist_form dialog box will delete the temp view and buffer

   // The original view must be activated before showing the _sellist_form or

   // the dialog box will operate strangely

   activate_view(orig_view_id);

   result=show("_sellist_form -mdi -modal",

               "Sample Selection List",

               SL_VIEWID|SL_SELECTCLINE,	// Indicate next argument is view_id

               temp_view_id,

               "OK",

               "",	// Help item

               "",	// Use default font

               ""   	// Call back function

              );

   if (result) {

      message("Selection list cancelled");

   } else {

      message("Item selected is "result);

   }

}


Buffer Input/Output Functions

The following are commonly used Input/Output Functions which operate on buffers and do not require a selection:

void _insert_text(_str string[, int Binary, _str NLChars])

Inserts string at cursor position.

void _delete_text(int len [,"C"])

Delete len bytes starting from the cursor position.

_str _expand_tabsc(int start, int count [,"E"|"S"])

Returns data from current line starting at column (not byte position) start.   count columns of text are returned.

void get_line(_str &line)	Retrieves current line.

void replace_line(_str line)	Replaces current line.

void insert_line(_str line)	Inserts line after current line.

int delete_line()	Deletes the current line.

_str get_text([int count [,int seek_pos])	Gets a stream of text starting at cursor.

_str cur_word(int &start_col [,_str from_cursor,_str end_prev_word])

Gets the current word.

int _buf_transfer(int src_buf_id [,start_linenum [,end_linenum [,start_col [,end_col]]]] )

Transfers data from src_buf_id to cursor.

void keyin(string)	Inserts string of characters as if typed from the keyboard.  This function is SLOW because it performs word wrap.

See on-line help for examples and detailed information on these functions.   Use the menu item ("Help", "Search...") to get detailed on-line help for these functions.

Using selection functions is also an excellent way to transfer buffer data.  For more information, see section "Selection Functions Overview.


Selection Functions Overview

Visual SlickEdit supports multiple selections.  However, only one selection may be active or visible.  Selections are specified by handles.  The _alloc_selection built-in returns a handle to a selection.  The function _free_selection frees a selection associated with the selection handle given.  Most selection functions accept a selection handle.  A handle of '' specifies the active selection or selection showing, which is always available.  The _free_selection function cannot free the active selection.   To free the active selection, you must use the _show_selection function first to make another selection the active selection.  The actual handle number of the active selection is returned by the expression _duplicate_selection("").  For a list of selection related functions, use the help item ("Help", "Macro Functions by Category").

Example

//  Duplicate the current line.

mark_id=_alloc_selection();

//

if (mark_id<0) {

   message(get_message(mark_id));

   return(rc);

}

_select_line(mark_id);

_copy_to_cursor(mark_id);

// This selection can be freed because it is not the active selection.

_free_selection(mark_id);

// This code copies selected text and keeps the resulting selection on

//  the source text instead of the destination text.

if (_select_type()==""){

   message(get_message(TEXT_NOT_SELECTED_RC));

   return(1);

}

mark_id=_duplicate_selection()   // Make a copy of the active selection.

_copy_to_cursor();

old_active_mark_id= _duplicate_selection("")    // Save the active selection id.

// Must make another mark active before the old active mark can be freed.

_show_selection(mark_id);           // Make copy of visible mark active

_free_selection(old_active_mark_id);

Writing Selection Filters

The module "markfilt.e" provides the procedure filter_selection for filtering selected text.  Define a global procedure that accepts a string and returns a string.  Then pass the name of the procedure to the filter_selection procedure.

Example

// This batch program converts the marked text into hexadecimal ascii

// codes. Each hexadecimal ascii code is separated by a comma. one

// possible use of this function could be to convert a binary font

// file into hexadecimal ascii codes to be compiled into a C  program.

#include "slick.sh"

defmain()

{

  if (_select_type()=="" ) {

    message(get_message(TEXT_NOT_SELECTED_RC));

    return(TEXT_NOT_SELECTED_RC);

  }

  // Under scores must be converted to dashes.

  return(filter_selection("hex-filt"));

}

_str hex_filt(string)

{

    line="";

    for(i =1;i<=length(string);++i) {

      line=line:+dec2hex(_asc(substr(string,i,1))):+","

    }

    return(line);

}


DLL Interface

Visual SlickEdit has a DLL interface for Windows, LINUX, Solaris Intel, and Solaris SPARC.  We expect to provide our DLL interface for more UNIX platforms in the future.  We recommend using our Slick-C macro language instead of our DLL interface except when you need to interface to another programs DLL, when you need better speed, or when our Slick-C macro language is missing a function you need.  Once a DLL function has been added, it can be called from a Slick-C macro just like any other Slick-C function.  In fact, DLL functions can be used for timer call backs and any place a Slick-C function is used.  To get started using our DLL interface, edit the file "simple.c" in the <vslick>\samples\simple directory and read its comments for more information.  Currently, all VSAPI functions have the prefix "vs".  Use the ("Help", "Search") menu item and type "vs" for a list of VSAPI functions.


Shelling Programs From a Slick-C Macro

To execute another program from a Slick-C macro you can use the shell built-in, the dos command, or the execute built-in.   The latter method is similar to executing a command on Visual SlickEdit's command line, and allows you to create expressions which executes Slick-C internal commands, Slick-C batch programs, or external programs.  If you are only interested in executing an external program, use the shell built-in or the dos command described in the on-line help.

Example

   // Capture the output of Slick GREP and process the error messages.

   dos("-e grep DEBUG *.c");

   // Redirect the output of grep to a file.

   shell("grep DEBUG *.c >junk");

   // Run the DOS dir command and wait for a key to be pressed before

   // closing command shell window.

   shell("dir *.c >junk","w");

   // Display the Calculator dialog box.  Show is an internal command.

   execute("show _calc_form");


Hooking Exit and Other Events

Invoking a Macro When Visual SlickEdit is Invoked

To invoke any macro command defined by _command or an external program when the editor initializes, use the "-#" invocation option.  For example, invoking the command "vs makefile -#bottom_of_buffer" loads the file "makefile" and executes the bottom_of_buffer command.  To invoke a command with parameters, place the command and parameters inside double quotes.  Another method for getting macro code to execute without changing any invocation options is to create a module with a definit entry point.  See section "Module Initializations for more information.

Invoking a Macro Before Visual SlickEdit Terminates

If you want a function to get invoked when the editor exits, create a macro procedure with a name that has the prefix "_exit_".  For example, the following procedure will automatically get invoked when Visual SlickEdit exits:

Example

   _exit_cleanup_stuff()

   {

      messageNwait("Got here");

   }


Command Line Interfaces

This section describes how to write macros with command line interfaces.

Command Line Arguments

get_string Procedure

Single Argument Prompting with support for Prompt Style

Command Line Arguments

When a command is invoked from the command line, the expression arg(1) contains the rest of the command line after the name with leading spaces removed.  Alternately, the command can declare a named argument whose value is the same as arg(1).  For example, invoking the edit command "e file1 file2" calls the e command with "file1 file2" in arg(1).  The parse built-in is an excellent function for parsing a command line string (See on-line help for more information on parse).  When another macro calls a command, more than one argument string may be passed.  Calling the arg function with no parameters returns the number of parameters the command or procedure was called with.

Example

#include "slick.sh"

// This command supports completion on a filename followed by an

// environment variable argument

_command test1() name_info(FILE_ARG" "ENV_ARG")

{

    parse arg(1) with file_name env_name;

    message("file_name="file_name" env_name="env_name);

}

// This command supports completion on a filename followed by an

// environment variable argument

_command test1(_str cmdline="") name_info(FILE_ARG" "ENV_ARG")

{

    parse cmdline with file_name env_name;

    message("file_name="file_name" env_name="env_name);

}

The string constant expression given to the name_info keyword is used for argument completion, restricting when the command can be executed, and a few other options.  See section "name_info Attributes for more information.

get_string Procedure

The get_string procedure reads a single argument from the user.  See get_string procedure in the on-line help for a complete description.

Example

#include "slick.sh"

_command test2()

{

   if (get_string(file_name,"Filename: ",FILE_ARG";Help message")) {

      return(1);  // Cancel key pressed.

   }

   if (get_string(env_name,"Environment variable name: ",

                     ENV_ARG";Help message","PATH") ) {

      return(1);  // Cancel key pressed.

   }

   message("file_name="file_name" env_name="env_name);

}

Single Argument Prompting with support for Prompt Style

The prompt procedure is an easy and efficient way to write a command which accepts one command line argument, or prompts for the argument if it is not given.  If the user presses ESC while being prompted for the argument, execution will not continue.  See prompt procedurein the on-line help for a complete description.

Example

// This command supports completion on an environment variable argument

#include "slick.sh"

_command test3() name_info(ENV_ARG)

{

   // If the user selects to abort, the prompt procedure stops execution.

   env_name=prompt(arg(1),"Environment variable name: ");

   message("env_name="env_name);

}


Creating a State File

The following steps will build the state file, "vslick.sta" (UNIX: "vslick.stu"), from scratch:

The paths used in these examples are the default paths used by our installation program.  However, yours may be different.

non-UNIX platforms:

NOTE: <exedir> in the examples below is "win" for Windows, "alpha" for Windows NT Alpha AXP, "mips" for Windows NT Mips, and "ppc" for Windows NT PowerPC by default.

c:\vslick\<exedir>\vstw  c:\vslick\macros\main

Compile the boot strap module.  This is a graphical application so for Windows 3.1 you must invoke this command from the Program Manager.

c:\vslick\<exedir>\vs  -xc:\vslick\macros\main.ex

Execute the "boot strap" module.    This is a graphical application so for Windows 3.1 you must invoke this command from the Program Manager.

write_state c:\vslick\vslick.sta	Invoke this command from the Visual SlickEdit command line.

Use "vslick.stu" for UNIX.

UNIX:

vst /usr/lib/vslick/macros/main	Compile the boot strap module.

vs -x/usr/lib/vslick/macros/main.ex

Execute the "boot strap" module.

write_state /usr/lib/vslick/vslick.stu

Invoke this command from the Visual SlickEdit command line.

Use "vslick.stu" for UNIX.


State File Caching

By default, Visual SlickEdit does not load a module, event, dialog box template, or picture from "vslick.sta"(UNIX: "vslick.stu") until it is referenced.  Using the definit primitive (see section "Module Initializations) forces a module to be loaded when the editor is invoked.  The default state file cache is about 200k.  You may set this size with the "-st" invocation option or with the General Configuration dialog box ("Tools", "Configuration", "General...", select Virtual Memory Tab).  When the state file cache becomes full, the least recently used module, dialog box template, event table, or picture is removed from memory to reduce the cache size.

You may have critical modules which you want permanently stored in memory.  Place the no_code_swapping key word somewhere in your module (usually the top) to force a module to be loaded and permanently stored in memory when Visual SlickEdit is invoked; then, should a critical disk failure occur reading the state file, Visual SlickEdit will not be crippled.  A few of Visual SlickEdit's modules which provide basic editing capabilities remain permanently in memory.


Error Handling and the RC Variable

The rc variableis a predefined global (meaning accessible from all loaded modules) variable.  We have been moving the Slick-C language away from needing to use the rc global variable for error handling.  Most functions which set the rc variable, also return the error code so you don't have to use rc.  The following functions require you to use the rc variable for error handling: buf_match, and get_env.

By convention, functions which use integer error codes return negative error codes which correspond to the error codes in "rc.sh".  For these functions, 0 means success and possitive codes means the error code is not in "rc.sh".

Some functions display an error message on the Visual SlickEdit message line.  Use the clear_message function to clear the message.

Example

   // Cause a message

   _deselect();_copy_to_cursor();

   // Clear the message

   clear_message();


Typical Mistakes

Common programming mistakes occur when writing Slick-C language programs.  One mistake is to use the rc variable in an IF statement when the rc variable has changed.  The following example illustrates the mistake:

Example

   // Don't write code like this.

   search("xyz");   // rc is set to 0 if "xyz" is found.

   mark=_alloc_selection();

   if (rc) {    // Was "xyz" found?

         ...

The above sequence of statements does NOT work because the _alloc_selection function sets the rc variable.  If you execute a statement before the IF statement, save the value of rc in a temporary variable.

Example

   // Write code like this.

   // rc is set to 0 if "xyz" is found and status is assigned rc.

   status=search("xyz");

   mark=_alloc_selection();

   if (status ) {    // Was "xyz" found?

         ...

Another common programming mistake is to rely on rc for all error conditions.  Most functions do not set rc.  It is better to assign the return value to a variable.

Example

   // Don't write code like this.

   search("xyz");   // RC is set to 0 if "xyz" is found.

   if (rc) {    // Was "xyz" found?

      ...

   // Write above code like this.

   // rc is set to 0 if "xyz" is found and status is assigned rc.

   status=search("xyz");

   if (status ) {    // Was "xyz" found?

         ...


Interpreter Error Handling

The two primitives _suspendand _resumemay be used to process errors which would normally halt the interpreter.

The _suspend primitive pushes a new level of error handling.  After a _suspend has been executed, errors which halt the interpreter will set the variable rc to the error code and resume execution at the first statement after _suspend.  The _resume function restores the interpreter stack and code position to the state it was in after the last _suspend was executed.  Be sure to execute _resume to restore the suspend/resume stack.

Note:  It is unfortunate that all graphical operating environments we know of do not support keyboard signal handling for graphical programs.  Should any graphical operating system add keyboard signal handling, we will happily include support for keyboard signal handling in the _suspend and _resume functions.

Example

defmain()

{

   status=_suspend();

   if (status) {

      if (status<0) {

         _message_box(get_message(status));

         return(status);

      }

      return(0);

   }

   i=arg(1)+1;    /* Handle invalid number argument */

   message("i="i);

   rc=1;  // rc is the return value of the _suspend function

   resume();

}


Windows Structure

This section describes the internal data structure the editor uses to keep track of windows,buffer positions(views), and buffer data.  You need not read this unless you want to write a Slick-C macro which manipulates windows, views, and buffers.

The picture below represents invoking Visual SlickEdit with two files loaded (buffers b2 and b3) and two windows (w1 and w2) viewing those files.

The extra window w0 is a hidden window used to allow quick switching to system buffers such as ".command" and ".killed".  To reduce the size of the drawing we have not given the buffers names.  Visual SlickEdit has one hidden window which cannot be displayed.  If you to attempt to leave the hidden window active, another window will be made active when the editor refreshes the screen.  Since window w1 is active, you currently see window w1 of buffer b2.  You might be able to see window w2 of buffer b3.if the window w1 does not overlap window w2.

Visual SlickEdit maintains a ring of buffers and a ring of windows.  Where each window MAY contain a ring of views.  However, by convention all windows except the hidden window contain ONE view.  Some macros temporarily create extra views in other windows, but they delete them before they terminate.  The  built-ins _next_buffer and _prev_buffer activate the next and previous buffers.  _next_window and _prev_window move around the window ring.  _next_view and _prev_view move around the active view ring.  The built-in function load_files inserts views, windows, and/or buffers. _delete_buffer removes the active buffer from the buffer ring and activates the previous non-hidden buffer.  _quit_view removes the active view from the active windows view ring.  The previous view becomes the new active view.  When _quit_view is executed and only one view exists in the active window, the window is removed and the previous window becomes active.  You cannot delete the hidden window.

A view holds the information necessary for the editor to remember your location and scroll position in a buffer.  A view also contains a window id and a buffer id.  Activating a view with the activate_view built-in activates the window and buffer specified by the view as well as selecting the cursor location/scroll position.

Each buffer maintains a non-active view.  When a buffer is activated by one of the built-ins _next_buffer, _prev_buffer, _delete_buffer or load_files (assuming you don't use an option which overrides this) the active view information is saved in the active buffer's non-active view, and the new buffers non-active view information is copied into the active view.

Below is a description of the contents of each structure.

Some window properties are:

p_window_x, p_window_y	Top left coordinates of window.

p_window_height, p_window_width

Height and width of window.

p_tile_id	Indicates which windows are part of a tile window group and whether a window is zoomed. Windows of a tiled window group have the same tile_id.  A zoomed window has a negative tile_id.

p_x	The top left x position of  window.

p_y	The top left y position of  window.

p_height	Window height.

p_width	Window width.

p_view_id	Pointer to active view.

p_next	Window id of next window.    (_next_window)

p_prev	Window id of previous window. (_prev_window)

p_child	Window id of child window.

Some view properties are:

block,line within block	Accessible via point and goto_point.

p_line	Line number of current line.

p_col	Column position within current line. 1..2 billion

p_left_edge	Column scroll position.

p_cursor_x	Text cursor x position.

p_cursor_y	Text cursor y position.

p_window_id	Window id.

p_buf_id	Buffer id.

Some buffer properties are:

p_buf_name	Name of buffer.

p_buf_flags	Indicates whether a buffer is hidden and may specify other buffer options.  See help on "internal-variables"

p_Noflines	Number of lines in file.

p_modify	Non zero indicates buffer has been modified.

p_margins	String containing left,right and new paragraph margins ( 1..2 billion).

p_tabs	String containing up to 2 billion tab stops.

p_mode_name	Name of current mode.

Glossary

absolute

A file name that has a complete path specification.

binding

The attachment of a command to a key.

buffer

We use the term buffer to mean a file that has been loaded into Visual SlickEdit.  Once a file has been loaded, you can safely perform modifications to the buffer without modifying the file on disk until you save the buffer.

clipboard

A temporary storage area we use to transfer text or dialog box controls from one place to another.  Since the Microsoft Windows operating system does not have adequate multiple clipboard support, Visual SlickEdit stores multiple text clipboards internally.

container variable

A Slick-C variable of type typeless.

concurrent

Running at the same time as something else.

delimiter

A separator of two objects.

edit window

A rectangular viewing area used to display buffers.   More specifically, an MDI (Multiple Document Interface) child window which displays a buffer.

filename

Name of a file on disk or the name used when storing a file on disk.

global

A variable or identifier that can be accessed by more than one module.

keyin

A sequence of characters entered into edit window or command line as if typed from the keyboard.

local

A variable that may be accessed by only one procedure.

make

A process started when a source file has a later date than a target file.

mark

Highlighted text.  We have tried to use select and selection instead of mark.

module

Source code whose function is to provide a set of tasks or a task.  A single unit that can be compiled.

octal

Base 8 arithmetic.

pcode

The binary result of a translation of source code.  The translation is done to speed up the interpretation of source code.

relative

A file name with the shortest name possible that distinctly identifies the location of a file.

selection

A highlighted region of text which is typically operated by a command which affects only the region.  In the dialog editor, your selection is indicated by 8 square handles which surround the control.

state file (file extension .sta for non-UNIX platforms, .stu for UNIX)

A file which stores enough configuration information to enable the editor to load this file and restore the configuration in subsequent edit sessions.

static

A macro variable whose scope is more than a single procedure but limited to the module it is defined in.

view

A view contains the information necessary for the editor to remember your location in a buffer.

window

A rectangular viewing area.  We also use this term in the more advanced sections of this manual to refer to the operating system resource known as a window.  Do not confuse this term with the Microsoft Windows operating system.


Event Names

Event names are used as arguments to the def primitive.  Event names are also used when comparing events returned by the get_event or test_event built-in functions or when defining and event handler function.

An event name is a string literal of length one or more.  See section "String Literals" for complete information on defining strings.  An event name string of length one specifies an ASCII character. To keep the macro source compatible, some event names do not have to be quoted as long as the '_' character is used instead of the '-' character.  The acceptable event constants are listed below:

ASCII characters

\0..\255	Backslash is used for non-displayable keys.  You may also quote displayable characters such as "a" or "4".  The keys \1..\29 are also represented by the keys "C-A","C-B".."C-Z","C-[","C-\\","C-]","C-^", and "C-_".  The ASCII keys \129..\255 are the same key binding as \128.

Function keys

"F1", "F2"..."F12"

Extended keys

"ENTER", "TAB", "ESC", "BACKSPACE", "PAD_STAR", "PAD_PLUS", "PAD_MINUS", "HOME", "END", "LEFT", "RIGHT", "UP", "DOWN", "PAD_5", "PGUP", "PGDN", "DEL", "INS", "PAD_SLASH"

Mouse events

"LBUTTON-DOWN", "LBUTTON-DOUBLE-CLICK", "LBUTTON-TRIPLE-CLICK", "RBUTTON-DOWN", "RBUTTON-DOUBLE-CLICK", "RBUTTON-TRIPLE-CLICK", "MBUTTON-DOWN", "MBUTTON-DOUBLE-CLICK", "MBUTTON-TRIPLE-CLICK", "LBUTTON-UP", "RBUTTON-UP", "MBUTTON-UP"

ON events

"ON-CHANGE", "ON-CHANGE2", "ON-CLOSE", "ON-CREATE", "ON-CREATE2", "ON-DESTROY", "ON-DESTROY2", "ON-DROP-DOWN", "ON-GOT-FOCUS", "ON-HSB-BOTTOM", "ON-HSB-LINE-DOWN", "ON-HSB-LINE-UP", "ON-HSB-PAGE-DOWN", "ON-HSB-PAGE-UP", "ON-HSB-THUMB-POS", "ON-HSB-THUMB-TRACK", "ON-HSB-TOP", "ON-LOAD", "ON-LOAD-FOCUS", "ON-RESIZE", "ON-SCROLL", "ON-SCROLL-LOCK", "ON-SPIN-DOWN", "ON-SPIN-UP", "ON-VSB-BOTTOM", "ON-VSB-LINE-DOWN", "ON-VSB-LINE-UP", "ON-VSB-PAGE-DOWN", "ON-VSB-PAGE-UP", "ON-VSB-THUMB-POS", "ON-VSB-THUMB-TRACK", "ON-VSB-TOP"

CTRL/SHIFT/ALT combinations

"A-<Extended key>", "C-<Extended key>", "S-<Extended key>", "S-C-<Extended key>"

For example, "A-ENTER", or "A-TAB" or "S-C-END"

"A-<Function key>", "C-<Function key>", "S-<Function key>"

For example, "A-F1".

"A-<Mouse event>", "C-<Mouse event>", "S-<Mouse event>"

For example, "A-LBUTTON-DOWN"

"C-S-<Extended key>", "C-<Extended key>", "S-<Extended key>"

For example, "A-ENTER" or "A-TAB"

"A-<ASCII character 0..128>"

Note that "A-a" is a different key than "A-A" which requires ALT and SHIFT keys to be pressed.  Also note that "A-"\1 is equivalent to "A-C-A".

"C-A", "C-B"..."C-Z", "C-[", "C-\\", "C-]", "C=^", "C-_", "C-,", "C-."

The keys \1..\29 are also represented by the these keys.

"C-S-A,"C-S-B"... "C-S-Z", "C-S-1", "C-S-2"..."C-S-0"

"C-A-A".."C-A-Z"

Note that "A-"\1 is equivelent to "A-C-A".

Miscellaneous keys

"C-A-ENTER", "C-A-TAB", "C-A-ESC", "C-A-BACKSPACE"

"C-PRTSC", "C-CTRL", "A-ALT"

Miscellaneous events

"ON-SELECT"

Here are examples of uses for key names in the Slick-C language:

Example

def "A-x"=safe_exit  // Note that "A-a" is different than "A-A" which

                     // requires the ALT and SHIFT keys to be pressed.

def "A-?"=help

def "C-X" "b"=list_buffers

def \0 - \255= nothing

ctlcombo1.on_change()

{

}

ctlcombo1."c-s-a"()	// Define event handler for Ctrl+Shift+A

{

}

ctlcombo1."a"-"z", "A-"Z"()	// Define event handler for characters A-Z

                          // upper and lower case

{

}

void p()

{

   for (;;) {

      key=get_event();

      if (key:==name2event("ESC") break;

      if (key:==name2event("UP")) {

          ...

      } else if (key:==name2event("DOWN") ) {

          ...

      }

   }

}


Differences Between Slick-C and C++

Structures

•	Space for structure member variables is allocated when you access the member.

•	Structure data is not continuous.  This is obvious for string, array, and hash table member variables which contain variable size data.  However, even other types are some times stored else where.  In the future, after a few changes are made, we will document exactly how Slick-C lays out memory.

•	There is not a sizeof function which tells you the size of a structure in bytes.

Arrays

•	Space for array elements is allocated when you index into the array.

•	You can't use pointer variables to traverse array elements.

•	You can't limit the number of elements that the array may contain.

•	Specifying an array variable without the [] operator does not return a pointer to the first element.  Instead it refers to the entire array.  This allows you to copy one array to another or define a function which returns a copy of an array.

•	There is not a sizeof function which tells you the size of the array in bytes.  There is a _length method which tells you the number of elements in the array.

Example

struct PHONERECORD {

   _str name;

   _str PhoneNumber;

};

defmain()

{

   PHONERECORD list[];  // No size limit is allowed here.

   //Allocate space for 0 index and name member

   list[0].name="Joe";

   // Allocate space for PhoneNumber member.

   list[0].PhoneNumber="555-1234";

   PHONERECORD list2[];

   list2=list;   // Copy the entire array into list2

   t=list2;  // Now copy the entire array into a container variable.

}

Hash Tables

Slick-C provides a :[] hash table operator which is similar to the array operator [] except that you index hash tables with a string type.  See section "Hash Tables" for more information.

Assignment Statement

Assignment statements in Slick-C are not as shallow as C++.   Array, hash table, and structure types are recursively traversed.   Pointers are not traversed.

Example

struct {

   int a[];

} s1,s2;

s1.a[0]=1;

s2=s1;  // Copy stucture and all elements of array.

Comparison Operator

The == and != operators support comparing container types, arrays, hash tables and structures.  Complex types are traversed recursively like the assignment statement.  Strings within an array, hash table, or struct must match exactly (spaces matter).

Preprocessing

•	Preprocessing expressions may use string and floating point expressions.

switch Statement

•	The switch statement supports string expressions in addition to integer expressions.

Labeled Loops

break and continue statements take an optional label parameter so you can break a specific loop (like Java).

Example

  outerlabel:

       for (;;) {

          for (;;) {

             if (...) break outerlabel;

             if (...) continue outerlabel;

          }

       }

Variable Argument Functions

An arg function is provided to allow you define functions which accept a variable number of arguments.  The arg function may be used on the left side of an assignment statement.

   defmain()

   {

      p("Param1",2,x);

   }

   void p()

   {

      messageNwait("Called with "arg()" arguments");

      for (i=1;i<=arg();++i) {

         messageNwait("arg("i")="arg(i));

      }

      //All undeclared variable parameters are passed by reference.

      //so when a variable is passed, we can change the contents of

      //the callers variable.

      arg(3)="New value for x";

   }

Built-in Graphics Primitives

You can define dialog box resources and menu resources.  There are primitives for defining event handlers for dialog boxes and declaring control types.  This allows the Slick-C linker to detect a reference to a control which does not exist on a dialog box before you execute your code.  See section "An Event Driven Dialog Box" for a simple example.

Clipboard Inheritance (R)

Clipboard Inheritance® (US patent No. 5,710,926) provides inheritance specifically for dialog boxes.  This feature allows you to copy parts of existing dialog boxes to the clipboard, paste them elsewhere, and the original code still runs.  New code can be attached to the new controls without affecting the original controls.  New code can be added to the original controls to affect both instances of the controls; this is, of course, inheritance.  Creating inheritance for parts of dialog boxes is very natural because the Slick-C language has been designed for this feature.  See section "Clipboard Inheritance(R).

End of Statement.  Semicolon

Currently Slick-C assumes end of line is a semicolon except under a few conditions.  Expressions may extend across line boundaries if the line ends in a binary operator or if the line ends with a backslash.  In addition, parenthesized expressions may extend across line boundaries.  In the future, Slick-C will enforce strict semicolons to conform with C++.

Type Checking

For the most part, type checking in Slick-C is identical to C++ except for the following

•	The typeless type is compatible with ALL other types.

•	String constants are automatically converted to numeric types where necessary.

•	Integer types are automatically converted to string types

•	Functions do not have to have prototypes.   However, when a prototype is given, strict type checking is enforced like you would expect.  We will eventually add a #pragma option to require prototypes.

Things Not Supported Yet

•	You can't define your own classes, methods, or inheritance.  The important class, public, private, and new keywords are not supported yet.  Like Java, we have decided that classes in Slick-C will not require a delete to free objects.

•	Only one syntax is currently supported for making a call with a pointer to a function variable. The pfn(p1,p2,...) syntax is not yet supported.  This limitation is necessary for container variables because the compiler does not know the type of the variable.  However, we will add support for the other syntax for typed pointers to functions.

•	char and short types are not yet available.

•	template classes are not yet supported.  Container variables are sometimes a more powerful mechanism for accomplishing much of what is done with template classes.  However, users will likely want the speed and additional type checking of template classes.  Besides, many of us are already use to template classes.

•	Function overloading is not yet supported.

•	enum is not yet supported.

•	Currently Slick-C only supports the less ambiguous C style type casting.  We are not sure whether we should add the new C++ type casting syntax TypeName(expression).  The argument is between having an elegant less ambiguous grammar or conforming to C++ so there is nothing new to learn.  If you have an opinion on this topic, let us know.

•	Because Slick-C does not allow low level manipulation of memory, you can't do things like type cast an "int *" to a "long *".

•	There are no character constants defined using single quote characters.  We are not sure what our plans here.  Slick-C currently allows the use of single quotes to define strings.  Single quoted strings are much more readable for filenames or regular expressions which require the use of backslashes.  We may need to change this syntax so that single quotes may be used for character constants.

•	goto is not supported.  It may never be supported since Slick-C supports labeled loops.


Frequently Asked Questions

This section covers common technical support questions:

Q: How do I transfer my configuration?

Q: Frequently asked license manager questions.

Q: Why doesn't Auto List Members work for me?

Q: Why doesn't Auto Function Help work for me?

Q: What is a project in Visual SlickEdit?

Q: What is a workspace in Visual SlickEdit?

Q: What is tagging?

Q: I use Visual C++.  How do I compile from inside of Visual SlickEdit?

Q: How do I compile from inside of Visual SlickEdit?

Q: Why can't I run my compiler in Visual SlickEdit?

Q: Why am I getting a VSLICKERRORPATH line in my ".process" buffer?

Q: I miss the "old" File Open dialog.  How do I get it back?

Q: Why doesn't my alias expand when I press SPACE BAR or Ctrl+SPACE BAR?

Q: How do I get my foreign language characters to display properly?

Q: How do I type my foreign language characters?

Q: How do I see the name of the function I am editing?

Q: What is the "Symbol" tab on the Ouput toolbar?

Q: Why can't I set environment variables in the ".process" buffer?

Q: Why doesn't my TAB key move text?

Q: How do I get my TAB key to insert a real tab character?

Q: Where are the small or large nice looking fonts?

Q: Why is the left edge of my window a different color?

Q: How do I setup a new file extension in Visual SlickEdit?

Q: How do I add or modify keywords in my color coding?

Q: How do I add color coding for my language?

Q: My toolbar has disappeared.  How do I get it back?

Q: My toolbar is undocked.  How do I redock it?

Q: How do I keep the currently-selected-text selected after I copy it to the clipboard?

Q: How do I toggle the Project or Output toolbar on/off using the keyboard?

Q: How do I reset all my toolbars to their original docked position?

Q: How do I add a new button to a toolbar?

Q: How do I remove a button from a toolbar?

Q: How do I get the cursor to snap to the end of a line when I click?

Q: How do I un-install Visual SlickEdit?

Q: I am using Reflection X 6.0 for Windows and my left ALT key causes keyboard problems?

Q: How do I break out of a long search?

Q: What is Win32s?

Q: Do I need to install Win32s?

Q: How do I un-install Win32s?

Q: I get a "GROWSTUB" GPF dialog under Windows 3.1.

Q: How do I break out of an infinite Slick-C loop?

Q: Visual SlickEdit locks up my system under Windows 3.1.


Q: How do I transfer my configuration?

Each user's configuration is automatically transferred to a newly installed version of Visual SlickEdit when they run the new version.  Some configuration changes will not be transferred such as changes to our menus, and changes to our dialog boxes.  Changes to our toolbars are preserved only if you are upgrading from 3.0b or after.

non-UNIX platforms:  For single user configurations you need to install the new version of Visual SlickEdit on top of the previous version in order for your configuration to be transferred to the new version.

SINGLE USER NON-UNIX PLATFORMS:

To manually transfer your configuration changes from the previous version of Visual SlickEdit, perform these steps:

•	If you are currently running the new version of Visual SlickEdit, close the editor now.

•	If you have made color coding changes, copy your "vslick\user.vlx" file into the "vslick" directory of the new version.

•	If you have recorded macros, copy your "vslick\macros\vusrmacs.e" into the "vslick\macros" directory of the new version.

•	To tranfer other configuration changes, bring up the previous version of Visual SlickEdit.  Activate the Visual SlickEdit command line at the bottom of the editor (ESC for most emulations) and type "list-source" and press ENTER.  This will create the macro file "vusrdefs.e", and possible another macro file called "vusrobjs.e" in your "vslick\macros" directory. Copy "vusrdefs.e" and (optionally) "vusrobjs.e", into the vslick\macros directory of the new version.

•	Run the new version of Visual SlickEdit.

•	If you ran the "list-source" command, type "vusrmods" and press ENTER on the Visual SlickEdit command line.  This will switch emulations if necessary, and run "vusrdefs.e" and "vusrobjs.e" (if present).

•	If you copied your recorded macros file ("vslick\macros\vusrmacs.e"), load this macro now with the Load Module dialog box ("Macro...", "Load Module...").

MULTI-USER NON-UNIX PLATFORMS:

To manually transfer your configuration changes from the previous version of Visual SlickEdit, perform these steps:

•	If you have made color coding changes, copy your "user.vlx" file located in the directory specified by your VSLICKCONFIG environment variable into the your VSLICKCONFIG directory of the new version.

•	If you have recorded macros, copy your "vusrmacs.e" file located in the directory specified by your VSLICKCONFIG environment variable into the VSLICKCONFIG directory of the new version.

•	To tranfer other configuration changes, bring up the previous version of Visual SlickEdit.  Activate the Visual SlickEdit command line at the bottom of the editor (ESC for most emulations) and type "list-source" and press ENTER.  This will create the macro file "vusrdefs.e", and possible another macro file called "vusrobjs.e" in the directory specified by your VSLICKCONFIG environment variable.  Copy "vusrdefs.e" and (optionally) "vusrobjs.e", into the VSLICKCONFIG directory of the new version.

•	Run the new version of Visual SlickEdit.

•	If you ran the "list-source" command, type "vusrmods" and press ENTER on the Visual SlickEdit command line.  This will switch emulations if necessary, and run "vusrdefs.e" and "vusrobjs.e" (if present).

•	If you copied your recorded macros file ("vusrmacs.e"), load this macro now with the Load Module dialog box ("Macro...", "Load Module...").

UNIX PLATFORMS:

To manually transfer your configuration changes from the previous version of Visual SlickEdit, perform these steps:

•	If you have made color coding changes, copy your "user.vlx" file located in your $HOME/.vslick directory into the your $HOME/.vslick directory of the new version.

•	If you have recorded macros, copy your "vusrmacs.e" file located in your $HOME/.vslick directory into the your $HOME/.vslick directory of the new version.

•	To tranfer other configuration changes, bring up the previous version of Visual SlickEdit.  Activate the Visual SlickEdit command line at the bottom of the editor (ESC for most emulations) and type "list-source" and press ENTER.  This will create the macro file "vusrdefs.e", and possible another macro file called "vusrobjs.e" in your $HOME/.vslick directory. Copy "vusrdefs.e" and (optionally) "vusrobjs.e", into the $HOME/.vslick directory of the new version.

•	Run the new version of Visual SlickEdit.

•	If you ran the "list-source" command, type "vusrmods" and press ENTER on the Visual SlickEdit command line.  This will switch emulations if necessary, and run "vusrdefs.e" and "vusrobjs.e" (if present).

•	If you copied your recorded macros file ("vusrmacs.e"), load this macro now with the Load Module dialog box ("Macro...", "Load Module...").


Q: Frequently asked license manager questions.

See License Manager in the on-line help.


Q: Why doesn't Auto List Members work for me?

A: Make sure you have created tag files for your run-time libraries (see section "Tag Files).   In addition, you should create a project and add your source files to it so your source is tagged as well. If you still have a problem, see section "Context Tagging(TM) Limitations" in the on-line help.


Q: Why doesn't Auto Function Help work for me?

A: Make sure you have created tag files for your run-time libraries (see section "Tag Files).   In addition, you should create a project and add your source files to it so your source is tagged as well.  If you still have a problem, see section "Context Tagging(TM) Limitations" in the on-line help.


Q: What is a project in Visual SlickEdit?

A: A project in Visual SlickEdit is a great way of organizing your work into a nice neat package.  This package includes a working directory, compile/build command lines (where you tell us what to execute for your compile/build), and which source files you want as part of the project.  Once you supply us with this information, you can do compiles/builds from within Visual SlickEdit and have your error messages automatically processed.  See section "Projects for more information.


Q: What is a workspace in Visual SlickEdit?

A: The purpose of a workspace is to allow you to share projects in multiple workspaces and allow you to define dependencies between projects.  For example, building project A might depend on building project B first which is a utility libary linked with project A.  You may find that you only need one project for each of your workspaces.  In this scenario, workspaces don't help you.  One non-obvious feature you get with workspaces is compatibility with other vendors workspaces.  Visual SlickEdit supports opening Visual C++ and Tornado workspaces.  This allows more seemless integration with these products.  The data for each workspace is stored in an ASCII (EBCDIC for OS/390) file which has the extension ".vpw". See section "Projects for more information.


Q: What is tagging?

A: "Tagging" (or "Procedure Tagging") is a facility that allows you to quickly and easily build a database of function definitions, function prototypes, global variables, and various other constructs depending on the language you are working with.  This tag data is also used to implement our Context Tagging(TM) features which include Auto List Members and Auto Function Help.  Visual SlickEdit automatically creates and maintains a tag database for files in your project.  Once a tags database is built, you can simply jump to the location of the tag (maybe a function definition), by putting your cursor on the name and hitting a hot-key (Ctrl+Dot for CUA emulation).  If you want to "pop" back to where you were, simply hit another hot-key (Ctrl+Comma for CUA emulation).  See section "Dynamic Tagging for more information. The tag databases are also used by our Class Browser.  See section "Class Browser for more information.


Q: I use Visual C++.  How do I compile from inside of Visual SlickEdit?

A: See section Using Visual SlickEdit With Visual C++.


Q: How do I compile from inside of Visual SlickEdit?

A: There are a couple of ways to do it.  The most common way is to setup a Project within the editor.  You do this by clicking on the "New..." menu item under the Project menu. Select the appropriate package (or choose "None"), enter the project name, choose a directory, enter the executable name.  Add your source files to the project by using the project Files Tab ("Project", "Project Properties...", select Files Tab).  Fill in the Working Directory using the project Directories Tab ("Project", "Project Properties...", select Directories Tab).  Then use the project Tools Tab ("Project", "Project Properties...", select Tools Tab) to set your build and compile command strings, and you're done.  To load the source files that you specified in your project, use the "Load Files..." menu item under the Project menu.  The compile and build commands are on the Project menu and will show you key bindings specific to your emulation. See section "Projects for more information.

The second way to add compile/build support is to bring up the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup..."), select the extension you want to affect, click on the "Project..." button, and type in your compile/build command strings.  This is an extension-wide setting, but remember, if you have a project open with a compile/build command defined, the extension specific compile/build command is ignored.  See section "Compiling From Within the Editor for more information


Q: Why can't I run my compiler in Visual SlickEdit?

A: Windows 95 or later, and Windows NT: Some older 16 bit compilers will not run in our concurrent process buffer.  From the Project Properties dialog ("Project", "Project Properties..."), turn off the "Ouput to process buffer" check box for the "Compile" and/or "Build" tools.  Some compilers which prompt for input can't be run in the concurrent process buffer.  If this is your problem, turn off the "Capture output" check box on the Project Properties dialog ("Project", "Project Properties...") for the "Compile" and/or "Build" tools.

A: UNIX:  Some compilers which prompt for input can't be run in the concurrent process buffer.  If this is your problem, turn off the "Capture output" check box on the Project Properties dialog ("Project", "Project Properties...") for the "Compile" and/or "Build" tools.


Q: Why am I getting a VSLICKERRORPATH line in my ".process" buffer?

A: This fixes an old error process limitation where the compiler's error ouput was dependant upon what was the current directory.  This allows you to change the current directory after a compile and still process your error output.  This change was necessary to implement our new project dependancies features.

It is possible to suppress this output for a Project command.  However, you should not suppress this output if the command creates error output that you want processed. Goto ("Macro", "Set Macro Variable..."), enter the variable def_no_error_info_commands, and add the name of your program your project command executes to the list of program names.


Q: I miss the "old" File Open dialog.  How do I get it back?

A: Go to the "Tools"..."Configuration"..."General" menu item and, on the "General" tab, check the box for "Fast open dialog".


Q: Why doesn't my alias expand when I press SPACE BAR or Ctrl+SPACE BAR?

A: SPACE BAR:  Aliases will only expand if the alias is the first and only word on the line.

A: Ctrl+SPACE BAR:  We changed the command bound to Ctrl+Space because we felt context tag completion was more important and this kept our key binding for this the same as Visual C++.  The new binding for the "expand_alias" command is Ctrl+Shift+O.  If you don't like this binding, use our Key Bindings dialog ("Tools", "Configuration", "Key Bindings...") to change your key bindings.


Q: How do I get my foreign language characters to display properly?

A: Windows:  Our default font uses the OEM character set.  This font will not display foreign characters correctly.  You need to choose a font which uses the "Western" Script character set.  To change the font, bring up the Font Configuration dialog ("Tools", "Configuration", "Font..."), select the "Window Text" element, and choose the courier font (or any other font which has or defaults to the "Western" script character set).


Q: How do I type my foreign language characters?

A: UNIX: You need to invoke Visual SlickEdit with the "-sua" option.  This will allow the right Alt key to support foreign language character entry.  To avoid having to type this option every time you run Visual SlickEdit, set the VSLICK environment variable to "-sua".


Q: How do I see the name of the function I am editing?

A:  There are three techniques for seeing the name of the current function.

[applies to Visual SlickEdit 2.0 and above] -- Use the prev-proc command (Ctrl+UP) to jump to the top of the current function and look at its signature, then use Undo (F9) to return to where you were.

[applies to Visual SlickEdit 3.0 and above] -- With the project toolbar visible, select the "Procs" tab. All functions in the current buffer will be visible and the current function will be highlighted.

[applies to Visual SlickEdit 4.0 and above] -- From the Visual SlickEdit menu bar, select "View-->Toolbars", switch to the Categories tab and select the "Bookmarks and Tags" category. Drag the "Current Context" combo box control to a button bar. This control will dynamically display the tag currently being edited, that is, the symbol or local variable that the cursor is in the scope of. In addition, you can pull down the combo box to see all locals and tags in the current buffer and select one to jump to it.


Q: What is the "Symbol" tab on the Ouput toolbar?

A: The "Symbol" tab on the "Output" toolbar displays either a list of symbols matching the symbol under the cursor in the current buffer, or, in the case that there is exactly one tag matching, it shows the source code for that tag. When the editor focus in on the Project toolbar, Tag Properties toolbar, List Members dialog, or Inheritance dialog, the Symbol Window "previews" the currently selected tag in the list or tree control.

The following options apply to the Symbol tab when the focus is in the current buffer and Visual SlickEdit is attempting to display the tag currently under the cursor.  Only extension specific tag files are searched. If the current editing mode does not support tagging, then all tag files are searched.

•	Case-Sensitive -- If turned on, Visual SlickEdit will attempt to find the symbol using a case-sensitive match first. If no matches are found, it will automatically revert to a case-insensitive search.

•	Tag Types -- Allows you to filter out certain types of tags that you do not want to be displayed in the preview window. The primary purpose of this function is to help resolve tags with the same name but different purposes, such as the definition and declaration of a function in C, or the name of a class and a class constructor in Java. If a search using the filters results in no matches, a second search is done, ignoring the tag type filters.

When the focus in in the "Symbol:" text box on the Output Symbol Tab, the following search operations may be performed to find tags in the current context.

•	Incremental search matches tags as you type. First it searches for an exact match to the tag, without regard for the current context. If no exact match is located, it searches for a prefix match.

•	Prefix matching can be forced by typing "*" at the end of the symbol prefix you wish to match. For example, type "XmSet*" to list all symbols starting with the string "XmSet", including XmSet itself (if such a symbol is defined).

•	Class members can be searched by first typing the qualified class name followed by :: and a symbol prefix. For example to see the "get" members of the ANSI C time structure (struct tm), you would type "tm::tm_". If not matches are found for the tag in the given class, the class name is ignored.

When the focus is not in the current buffer, the Symbol tab may also perform a function if it is visible. In most of these cases, it is functioning as a "Preview" window allowing you to look briefly at a tag before actually jumping to it or using it in code.

•	focus in Procs tabIf the focus is in the Procs tab (on the Project toolbar), the currently selected tag will be shown. The tag type filters are disregarded.

•	focus in Class browser tabIf the focus is in the Procs tab (on the Project toolbar), the currently selected tag will be shown. The tag type filters are disreguarded. In the case of functions and function prototypes, if the currently selected item is a function, the function will be shown in the preview window, if it is a prototype, the prototype will be shown. Thus, what is shown in the preview window depends on what is shown in the class browser, which is typically whatever appears in the class definition.

•	focus in Inheritance tree dialog, Class ParentsIf the focus in the tree control on the left-hand side of the Inheritance tree dialog (the class list), the currently selected class will be shown, if it can be resolved.

•	focus in Inheritance tree dialog, MembersIf the focus is in the tree control on the right-hand side of the Inheritance tree dialog (the member list), the currently selected item will be shown, which is the item as it appears withing the class definition.

•	focus in Tag Properties "References" tabIf the focus is in the References tab of the Tag Properties toolbar, the currently selected item will be shown in the symbol window. In this case, the current item does not represent a tag, it simply represents a file position (the position of the symbol reference). By using the output tab in conjunction with the class browser and tag properties dialog, you can do the following:

Select a symbol from the class browser.

View the list of references in the References tab.

Select and preview references in the Symbol tab.

•	focus in Tag Properties "Calls" tabIf the focus is in the "Calls" tab of the Tag properties toolbar, the currently selected item will be shown in the symbol window, just as it is for the class browser.

•	List members dialog visibleWhen the list members dialog is visible, either a result of pressing Alt+. or Auto List Members, the currently selected item is previewed in the symbol window.


Q: Why can't I set environment variables in the ".process" buffer?

A: Windows 3.1: The problem is the amount of environment space we are getting from Windows for our process.    If you are trying to run a compile, and you need to set environment variables to do it, then try running the compile in a batch (.bat) file and set the environment variables in there.  You can also try running a second copy of command.com like this: "command.com /e:xxxx /c BatchProgramAndArgs" where xxxx is your environment size (i.e. 1024, 2048, etc).

A: Windows 95 or later: The problem is the amount of environment space we are getting for our process.  Edit your "config.sys" file and add or edit a SHELL line like the one below:

SHELL=c:\command.com c:\   /p   /e:2048

Where /e:2048 specifies an environment size of 2048 bytes.  Make this larger if you still are out of environment space.


Q: Why doesn't my TAB key move text?

A: Bring up the Redefine Common Keys dialog box ("Tools", "Configuration","Redefine Common Keys...") and select "Tab" from the list box on the left.  Then select "Move text tab" from the list box on the right and click on "OK".


Q: How do I get my TAB key to insert a real tab character?

A: Bring up the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...") and select the extension you want to affect.  The "fundamental" extension is used for files with no extension or which are not in the list.  Turn on the "Indent With Tabs" check box and click on the "OK" button.


Q: Where are the small or large nice looking fonts?

A: Windows, Windows 95 or later, Windows NT:  Choose the "Terminal" font for the largest selection of nice looking fixed fonts.  These are the fonts used in the DOS box.


Q: Why is the left edge of my window a different color?

A: Bring up the Color Settings dialog box ("Tools", "Configuration", "Colors...") and set your "Line Number" color to match your "Window Text" color.  This is typically a problem when your 1.7 color configuration is transferred to a newer version.


Q: How do I setup a new file extension in Visual SlickEdit?

A: Bring up the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...") and click on the "New..." button.

To setup color coding for a new language, bring up the Color Coding Setup dialog box ("Tools", "Configuration", "Color Coding...") and click on the "New..." button on the far right of the dialog box.   If you create a new color coding lexer, you will need to fill in the "Lexer Name" text box on the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...") to see your color coding.


Q: How do I add or modify keywords in my color coding?

A: Bring up the Color Coding Setup dialog box ("Tools", "Configuration", "Color Coding...", select the "Lexer Name" you want to affect) and use the "New..." and "Delete" buttons on the left/middle of the dialog box.


Q: How do I add color coding for my language?

A: To setup color coding for a new language, bring up the Color Coding Setup dialog box ("Tools", "Configuration", "Color Coding...") and click on the "New..." button on the far right of the dialog box.  You will need to fill in the "Lexer Name" text box on the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...") to see your color coding.


Q: My toolbar has disappeared.  How do I get it back?

A: Go to ("View","Toolbars...") and click on the Toolbars tab.  Double click on the name of the toolbar to bring it back.


Q: My toolbar is undocked.  How do I redock it?

A: To redock the toolbar, click your mouse on the gray area of the toolbar (for example, the gray area next to the tabs on the Output and Project toolbars) and drag it to the location where you would like to dock it.  When the outline of the toolbar changes shape and/or clarity, you are in docking position.  Release the mouse to dock.


Q: How do I toggle the Project or Output toolbar on/off using the keyboard?

A: To toggle the toolbars on and off, we have created two macros: toggle_output() and toggle_project() that will show and hide their respective toolbar in the previous location.  You can call the two macros from the Visual SlickEdit command line, or you can bind them to keys under ("Tools", "Configuration", "Key Bindings...") . To bind them to a key, type the name of the macro on the line marked  Command and then click on "Add Key or Mouse Click".  Then, press the key combination you wish to bind the macro to and click on "Bind".  Repeat this with the other macro and then click on Done.


Q: How do I reset all my toolbars to their original docked position?

A: To restore the toolbars back to their default positions, exit the editor, and delete the vrestore.slk file (located in your $HOME/.vslick directory for Unix, and in your executable directory for Windows).  The toolbars will be displayed in their default positions when you restart the editor.


Q: How do I add a new button to a toolbar?

A: Go to ("View","Toolbars...") and click on the Categories tab.  There, select a button category.  Click on one of the toolbar buttons shown and drag it to the toolbar you would like to add to and release.  The button will now be added to the toolbar.

If you would like a user defined button, select the "User Definable Tools" category and drag one of the buttons to the toolbar.  Then, right click on the toolbar button and select Properties from the menu.  In the Properties dialog, provide the button with a command, a message to be displayed when you place your mouse pointer on the button, and even a bitmap file if you would like.


Q: How do I remove a button from a toolbar?

A: Bring up the Toolbar Customization dialog box ("View","Toolbars...").   Now drag the button you want to remove off the toolbar and release the mouse.


Q: How do I keep the currently-selected-text selected after I copy it to the clipboard?

A: Goto ("Macro", "Set Macro Variable...") and set the variable def_deselect_copy to a value of 0. Don't forget to save your configuration


Q: How do I get the cursor to snap to the end of a line when I click?

A: Set the macro variable def_click_past_end to 0 ("Macro", "Set Macro Variable...").


Q: I get a "GROWSTUB" GPF dialog under Windows 3.1.

A: The problem is an incompatibility between Win32s and the MS Mouse 9.01 mouse driver you are running.   Create a directory and run the "hd1061.exe" (from our installation CD or one of the diskettes) self extracting executable.  A readme file will tell you what to do.


Q: Visual SlickEdit locks up my system under Windows 3.1.

A: Your installation of Win32s may have gone wrong and you don't know it.  See section "Q: How do I un-install Win32s? to uninstall Win32s, then reinstall Win32s.  Visual SlickEdit requires Win32s 1.3 or later.  Run the game Freecell that comes with Win32s as a test.  If you still have problems, it might be a conflict between your video driver and Win32s.  As a test, try switching to a generic VGA or generic 800x600 video driver and restart Windows.  If the problem goes away, then you need to obtain updated Video drivers either from an online service or from the video card manufacturer.   See the Video Card section on our web page at http://www.slickedit.com/info.htm.

OR

Try turning OFF 32-bit Disk Access and 32-bit File Access (this applies to Windows for Workgroups and some later Windows 3.1 versions)

OR

Is there another application or game that may have installed Win32s without your knowledge?  If you suspect this then see section "Q: How do I un-install Win32s? to uninstall Win32s, then reinstall it.

OR

If the above solutions do not work, then you should first unload any device drivers that other applications have installed to see if they are causing a conflict.  If this turns out to be the problem, then contact the manufacturer and find out if they have a revision of the driver that works with Win32s (they probably do).  Remember, Win32s is a Microsoft product (not ours), so a software manufacturer will want to fix a conflict between their software and Win32s.  Finally, if none of the above works, then either email our technical support at support@slickedit.com or call at 919 303-7400 and ask for technical support (have your serial# handy).  If you send email, please be very specific about your machine's configuration, whether you run on a network, any device drivers you have loaded over and above the ones that normally get installed with the operating system, and anything else you deem relevant.  We'll be happy to help.


Q: How do I un-install Visual SlickEdit?

A: Windows NT, Windows 95 or later:  Run the vsuninst.exe program in the "\vslick\win" directory.

A: UNIX:  Delete the /usr/lib/vslick directory and everything under it.

A: Windows 3.1:  Delete the \vslick\ directory and everything under it.  Also edit your \windows\system.ini file and remove the following line from the [386Enh] section:

device=x:\vslick\win\wemu387.386

You also need to uninstall Win32s.  See section "Q: How do I un-install Win32s?.


Q: I am using Reflection X 6.0 for Windows and my left ALT key causes keyboard problems?

A: The problem lies with the Reflection X server.  WRQ has a patch to correct the problem on their FTP site called xpatch01.zip and unzips into a replacement rx.exe.


Q: How do I break out of a long search?

A: To break out of a long search, hold down Ctrl+Alt+Shift.


Q: How do I break out of an infinite Slick-C loop?

A: To break out of a an infinite loop in the Slick-C macro language, hold down Ctrl+Alt+Shift.  If the infinite loop occurs in a timer hold down Ctrl+Alt+Shift+F1.


Q: What is Win32s?

A: Win32s is a 32 bit layer over 16-bit Windows.  You do not need to install Win32s if you ONLY plan on running Windows NT or Windows 95 or later.   Visual SlickEdit requires this 32-bit subsystem to run under Windows because it is a native Win32 application and must make 32-bit calls.


Q: Do I need to install Win32s?

A: If you plan on running Visual SlickEdit under 16-bit Windows 3.1x, then you MUST install Win32s BEFORE installing Visual SlickEdit.


Q: How do I un-install Win32s?

A: To Delete Win32s:

1.	Remove the following line from the [386Enh] section in the SYSTEM.INI file:

Device=<WINDOWS>\<SYSTEM>\win32s\w32s.386

Where <WINDOWS> and <SYSTEM> are where the Windows and System directories are respectively.

2.	Modify the following line from the [BOOT] section in the SYSTEM.INI file:

drivers=mmsystem.dll winmm16.dll

to the following (remove winmm16.dll):

drivers=mmsystem.dll

3.	Delete the following files from the <WINDOWS>\<SYSTEM> subdirectory or from the SYSTEM directory in network installations:

W32SYS.DLL

WIN32S16.DLL

WIN32S.INI

4.	Delete all the files in the <WINDOWS>\<SYSTEM>\win32s subdirectory or the <SYSTEM>\win32s subdirectory in network installations.  Then delete the subdirectory itself.

5.	Restart windows.


Editor Control Overview

This section is intended to give an overview of some important issues and cover some commonly asked questions.   It is very important you read these sections.

Files you Ship With Your Product

Making Sure Your Users Don't Lose Configuration Changes

Editor Control API

Creating an Editor Control Window

Using the Editor MDI Interface

Displaying Editor Status Indicators

Adding Editor Commands to Your Menu

Determining Whether Editor Text Has Been Modified

File and Workspace History Callbacks

Hooking the Right Click Menu

Break Point Manager

Popup Debugger Help on Current Word

Making Configuration Changes

Compiler Package Configurations

Configuring Dialog Boxes

Configuring Menus

Hooking Editor Keys

Editor Control Support

Update Patches and New Versions

Creating Your Own Patch for Visual SlickEdit

Editor Control Toolbars

Threaded Applications


Files You Ship With Your Product

A full installation of the editor control is about 20 meg.  However, if you don't want to ship macro source, the installation will require only 13 megabytes.

•	The following file MUST NOT be shipped with your product

vs.exe	Visual SlickEdit product.  It has been included so you can do testing, make configuration changes, and try out our editor control.  You may need it for macro developement.

•	The following list files indicate what Visual SlickEdit files to ship with your product.

\mdisamp\vslick\ship.lst

Windows NT and Windows 95/98/2000 support. Installation without macro source.  We expect most OEM's not to ship macro source.  However, it makes no difference to us.  The Visual C++ support files (vckwds.lst,vckwds.hlp, msbsc60.dll) are not in this list because we are assuming you don't need them.

\mdisamp\vslick\shipmac.lst

Windows NT and Windows 95/98/2000 support.  Full installation with macro source and the ability for the user to extend the editor with DLL's.  The Visual C++ support files (vckwds.lst,vckwds.hlp, msbsc60.dll) are not in this list because we are assuming you don't need them.

Note that there are files not in any of these lists.  Most of these files get created when configuring the editor.  You do not need them.  However, if you create your own alias files, DLLs, or macros, you need to include them.

•	vsapi.dll is not in any of the lists above.  You need to ship this file as well but it must be in the same directory as your executable which was linked with vsapi.lib.

Here is a list of some files you may not need to ship with your product:

vslick/bitmaps/*.bmp

The bitmap files are only need if a users wants to customize Visual SlickEdit toolbars.  If you are not using Visual SlickEdit toolbars, you do not need these files.

listvtg.exe

If you don't want to list Visual SlickEdit tag databases,  remove this file.  This program is a command line utility that is not used by any VSE macro.

java.api, mfc.api, c.api, win32.api, js.api, api.idx:

   If you don't need any or some of our API Apprentice databases,

dparse.dll

If you don't want any support for delphi or pascal, remove this file.

vslick.hlp,vslick.lst:

If you don't want access to our on-line help, you can remove these files.  The default configuration of the F1 key uses these files.


Making Sure Your Users Don't Lose Configuration Changes

We recommend you try to preserve your users configuration changes.  Follow these guide lines when installing the Visual SlickEdit files:

•	If "vslick.ini" already exists, don't replace this file.  All path information in "vslick.ini" is relative, so even if the installation files are moved around, the paths are correct.

•	If "project.slk" already exists, don't replace this file.  The default "project.slk" is empty.  Our install program does not copy the empty "project.slk" if a "project.slk" already exists.

•	If "alias.slk" already exists, don't replace this file.  Our install program does not copy this file if it already exists.

•	We recommend you backup the following configuration replaced by your install program: "vslick.sta", "vslick.ini", and "alias.slk".

•	We do not backup macro files in our install program.  We expect our users to put their macros in their own source files or to make their own backups of their own files.

•	The installed "vslick\vslick.sta" must be "marked" to indicate that configuration changes need to be transfered to the newly installed version.  This can be accomplished by marking the state file before it is placed on your CD or by enhancing your installation program run the "marksta" program to mark the newly installed state file.  This utility program sets the date of the state file to the current date and sets the source level to 0.  These changes tell the editor that the users configuration changes must be applied to the newly installed state file.

Example

     marksta c:\oem\vslick\vslick.sta

If you want the source to marksta, let us know.  It is a very small and simple program.


Editor Control API

The editor control API offers you a simple way to create a new window which contains an editor control  (See Creating an Editor Control Window).  In addition, if you have an MDI application, we recommend you implement our MDI interface callbacks.   You do not have to implement these callbacks in order to plug the editor control into an MDI application.  By implementing the MDI callbacks you get the following features without any additional work:

Multi-File Search and Replace

Multi-File Spell Checking

Multi-File Difference

Toolbars

All of our toolbars require MDI callbacks.  For example, double clicking on a class browser item creates/accesses MDI child edit windows in order to go to the tag.  This is true for many other toolbar tabs as well.  The OEM editor control CD contains all the bitmaps we use in our toolbars.  You can use these to create your own toolbars.  Note that it is unlikely that you will be able to dock any of our toolbars.  See section  Editor Control Toolbars for more information.

AutoRestore

Project AutoRestore

List buffers

This is popular for SlickEdit, Brief, and EMACS emulation users.  This command can be easily reimplemented.

List modified

When you exit VSE, it displays a list of the modified buffers and allows you to choose which to save.  This command can be easily reimplemented.

Complete Emulation Windowing

Includes:  Tile window, zoom/unzoom, and non-one file per window support.

Our tiled windowing works on multiple MDI children.  Splitting a window creates a new MDI child. While this is not common in IDE's, Visual SlickEdit and EMACS users especially like this.

Slick-C Dialog Development

File Manager

Our current MDI callbacks do not support window splitting which does not create another MDI child.  However, you can add this yourself.


Creating an Editor Control Window

The basic steps for creating an editor control window are:

•	Call vsInit to initialize the API.  This function can only be called once.

•	If you are opening a file from disk, call vsBufEdit to create a buffer to contain the file.

•	Call vsCreateEditorCtl to create an editor control window for viewing a buffer.  If you called vsBufEdit, specify the buffer id of the new buffer here.  If you did not call vsBufEdit, specify -1 for the buffer id and an empty buffer will be created for you.  It is likely that you will want to store some instance data of your own for each editor control.  To do this specify the pdata parameter to vsCreateEditorCtl.  For example, if you wanted each editor control to have its own message line you could store the window handle of the message line in pdata.  Use the vsWinQData function to retrieve pdata later.

•	If you did not call vsBufEdit, call vsSelectEditMode or vsCommandName to select the edit mode corresponding to a specific extension.  The Visual SlickEdit Extension Setup dialog box is used to configure the extension support.

Take a look at the "tiny" sample application for a simple editor control example.  The "mdisamp" sample contains an example of creating an MFC or WIN32 dialog box with an editor control.


Using the Editor MDI Interface

The basic steps for using the editor MDI interface are:

1.	Call vsInit to initialize the API. This function can only be called once.  Specify the VSAPIFLAG_MDI_WINDOW flag in the VSINIT.APIFlags field to indicate that sufficient MDI callbacks have been implemented.  Set some or all of the VSINIT.pfnMDI??? callback fields.   Some MDI callbacks are optional.  See VSINIT structure in "vs.h" for complete documentation.

2.	Create a new MDI Child.

3.	If you are opening a file from disk, call vsBufEdit to create a buffer to contain the file.

4.	Call vsCreateEditorCtl to create an editor control window viewing a buffer.  Make sure you specify VSWID_MDI for the mdi_wid parameter.  If you called vsBufEdit, specify the buffer id of the new buffer here.  If you did not call vsBufEdit, specify -1 for the buffer id and an empty buffer will be created for you.  It is likely that you will want to store some instance data of your own for each editor control.  To do this specify the pdata parameter to vsCreateEditorCtl.  For example, our MFC MDI sample program stores a pointer to the CView in each MDI Child editor control.  From an MFC CView our sample can access the CDocument and the MDI Child frame. Use the vsWinQData function to retrieve pdata later.

5.	If you did not call vsBufEdit and you are NOT in the VSINIT.pfnMDICreateEditWindow callback, call vsSelectEditMode or vsCommandName to select the edit mode corresponding to a specific extension.  The Visual SlickEdit Extension Setup dialog box is used to configure the extension support.

6.	Call vsMDISetActiveChild when the active MDI child is changed.  Otherwise, some VSE commands (like toolbar button commands) will operate on the wrong MDI child.

Take a look at the "mdisamp" sample MFC application.  Even if your application is not an MFC application, a lot of the callback code in this sample will help you.   However, the MFC code for implementing the pfnMDICreateEditWindow callback will just confuse you if you are implementing a non-MFC MDI application.

In that case, just implement steps 2-4.


Displaying Editor Status Indicators

To display editor status indicators like line, column, read only, etc. you need to implement the update-editor-status callback.

void VSAPI CallbackUpdateEditorStatus (

                  int wid,int RefreshFlags,

                  int linenum,

                  int col,

                  const char *pModeName,int ModeNameLen,

                  int StatusFlags,

                  int reserved)

{

}

Use vsCallbackSet to set the update-editor-status callback as follows:

     vsCallbackSet(editorctl_wid,

                             VSCALLBACK_WIN_UPDATE_EDITOR_STATUS,

                              CallbackUpdateEditorStatus);

For more information on this callback function see help on vsCallbackSet.  If you use our MDI interface, you can implement the VSINIT.pfnMDIUpdateEditorStatus callback.  This callback gets called for the active MDI child.  However, it also gets called when there are no MDI children.


Adding Editor Commands to Your Menu

Visual SlickEdit has about 750 commands.  The easiest way to find the command you are looking for is to run Visual SlickEdit and use the menu editor or check the editor key bindings.  Commands are executed using vsExecute, vsCallIndex, or by a key binding.  We recommend you use vsExecute to execute a command from a menu.  For example, the following code executes the Find dialog box:

vsExecute(editorctl_wid, "gui_find");

editorctl_wid is the id of the editor control returned by vsCreateEditorCtl.  "gui_find" is the name of the VSE command that executes the Find dialog box.


Determining Whether Editor Text Has Been Modified

Visual SlickEdit has a text change callback (see vsCallbackAdd).  However, the VSP_MODIFYFLAGS property can be used to determine if a buffer's text has changed more efficiently and without requiring any global variables.  The high 31 bits of this property are set to 0, whenever an edit is made.  MicroEdge reserves the low 16 bits of this property.

The following code illustrates how to check whether a specific buffer's text has changed:

Example

#define   MODIFYFLAG_BUFFER_COMPILED    0x10000

/*

    compile editor buffer if necessary.

*/

void MaybeCompileBuffer(int editorctl_wid)

{

     int ModifyFlags;

     ModifyFlags=vsPropGetI(editorctl_wid,VSP_MODIFYFLAGS);

     if (ModifyFlags & MODIFYFLAGS_BUFFER_COMPILED) {

          // No edits have been made to this buffer since the last time

          // this buffer was compiled.

          return;

     }

     CompileBuffer(editorctl_wid);

     // Indicate that this buffer has been compiled since the last edit was made.

     vsPropSetI(editorctl_wid, ModifyFlags,

                     ModifyFlags|MODIFYFLAG_BUFFER_COMPILED);

}

Note that we use a similar algorithm to determine whether we need to retag a buffer.  The only difference is that we check on save and every 3 seconds.  You may want to create your own timer which gets or sets a bit in the modify flags.


File and Workspace History Callbacks

If you want to be notified when a file is opened in the editor, you need to implement the add file history callback.  Use the vsCallbackSet function to set the VSCALLBACK_APP_MENU_ADD_FILE_HISTORY callback.  Note that vsBufEdit does not call this callback.

If you want to be notified when a workspace file is opened in the editor, you need to implement the add project history callback.  Use the vsCallbackSet function to set the VSCALLBACK_APP_MENU_ADD_WORKSPACE_HISTORY callback.  If you are not using Visual SlickEdit Workspaces, ignore this callback.


Hooking the Right Click Menu

If you want to be notified when a right click menu is about to be displayed in the editor, you need to implement the popup menu callback.  Use the vsCallbackSet function to set the VSCALLBACK_APP_POPUP_MENU callback.  This callback gets a menu handle parameter.  This callback allows you to enable, disable, add, or delete menu items before the menu is displayed.  Use the vsMenu??? functions to modify the menu.   See help vsCallbackSet for more information on this callback.


Break Point Manager

Visual SlickEdit provides a Break Point Manager to make it easy for you to integrate a debugger.  Link your application with "breakpt.lib" and include "breakpt.h" to access break point manager functions.  The break point manager provides the following features:

•	Bitmaps are displayed for you.   By integrating the break point manager, Visual SlickEdit can reduce the space used between the text and the left edge of the window automatically when no debug bitmaps are displayed there.

•	Deferred break points.  Set break points before a file is opened.  Deferred break points are automatically set when you open a file with vsBufEdit or when you rename a buffer with vsCommandName or save as.  When you close a buffer, the break points are automatically deferred.

•	Allows editing while debugging.  While you can edit while debugging, you will find that break points may not end up where you think you set them.  There are various algorithms that can be used such as using old line numbers to try to improve this.  However, no algorithm is perfect.  The standard seems to be to leave it up to the user to recompile.

•	A default set of debugger bitmaps similar to Visual C++.

•	Ability to add or customize debugger bitmaps.

Below is a list of the most commonly used break point manager functions:

void VSAPI vsBPMStartDebugMode();

You only need to call this function if you want to have strict old line number support.  Starts debug mode for all MDI editor buffers and sets the old line numbers. When additional editor buffers are added, they are put into debug mode.   Existing editor controls not registered as MDI children are not put in debug mode.  If you are not using our MDI API's, use the vsBPMStartDebugModeFor function for editor controls containing source code.

void VSAPI vsBPMStartDebugModeFor(int wid);

You only need to call this function if you want to have strict old line number support.  Starts debug mode for a specific editor control and sets the old line numbers.  When additional editor buffers are added, they are put into debug mode.

void VSAPI vsBPMEndDebugMode();

Ends debug mode.  Frees all editor debug data and removes bitmap display.  You should call this function when the user is done debugging.

void VSAPI vsBPMEndDebugModeFor(int wid);

Ends debug mode for a specific editor control. Frees all editor debug data and removes bitmap display.  You still need to call vsBPMEndDebugMode once.

void VSAPI vsBPMEndDebugModeForB(const char *pszBufName); // Updates old line numbers

Ends debug mode for a specific buffer.  Frees all editor debug data and removes bitmap display.  You still need to call vsBPMEndDebugMode once.

int VSAPI vsBPMSetBreakPoint(int wid, int LineNum=-1);

Sets a break point at the current line of the specified editor control.

int VSAPI vsBPMSetBreakPointBL(const char *pszBufName,int LineNum);

Sets a break point at the line specified of the specified editor control.

void VSAPI vsBPMRemoveBreakPoint(int wid, int LineNum=-1);

Removes a break point at the current line of the specified editor control.

void VSAPI vsBPMRemoveBreakPointBL(const char *pszBufName,int LineNum);

Removes a break point at the line specified of the specified editor control.

int VSAPI vsBPMDisableBreakPoint(int wid, int LineNum=-1);

Disables a break point at the current line of the specified editor control.

int VSAPI vsBPMDisableBreakPointBL(const char *pszBufName,int LineNum);

Disables a break point at the line specified of the specified editor control.

void VSAPI vsBPMRemoveDisableBreakPoint(int wid, int LineNum=-1);

Removes the disabled break point flag at the current line of the specified editor control.

void VSAPI vsBPMRemoveDisableBreakPointBL(const char *pszBufName,int LineNum);

Removes the disabled break point flag at the line specified of the specified editor control.

int VSAPI vsBPMToggleBreakPoint(int wid, int LineNum=-1);

Toggles a break point at the current line of the specified editor control.

int VSAPI vsBPMSetExecLine(int wid, int LineNum=-1);

Sets the current execution line flag at the current line of the specified editor control.

int VSAPI vsBPMSetExecLineBL(const char *pszBufName, int LineNum);

Sets the current execution line flag at the line specified of the specified editor control.

void VSAPI vsBPMRemoveExecLine(int wid, int LineNum=-1);

Removes the current execution line flag at the current line of the specified editor control.

void VSAPI vsBPMRemoveExecLineBL(const char *pszBufName,int LineNum);

Removes the current execution line flag at the line specified of the specified editor control.

int VSAPI vsBPMSetStackExecLine(int wid, int LineNum=-1);

Sets a stack execution flag at the current line of the specified editor control.

int VSAPI vsBPMSetStackExecLineBL(const char *pszBufName,int LineNum);

Sets a stack execution flag at the line specified of the specified editor control.

void VSAPI vsBPMRemoveStackExecLine(int wid, int LineNum=-1);

Removes a stack execution flag at the current line of the specified editor control.

void VSAPI vsBPMRemoveStackExecLineBL(const char *pszBufName,int LineNum);

Removes a stack execution flag at the line specified of the specified editor control.

void VSAPI vsBPMClearAllBreakPoints();

Clears all break points including all disabled break points.  Execution line flags remain unchanged.


Popup Debugger Help on Current Word

Use the vsMouCurWord function to retrieve the word and/or selection under the mouse pointer.  See help on vsMouCurWord for an example.


Making Configuration Changes

Included with the OEM editor CD is a copy of Visual SlickEdit (\mdisamp\vslick\win\vs.exe).  For simple configuration changes like color coding, colors, extension support, and key bindings, use the Configuration menu ("Tools", "Configuration") to make your configuration changes.  See "Configuration Files" for information on what files store various configuration information.


Compiler Package Configurations

If you are using Visual SlickEdit projects, you may want to customize the compiler packages that Visual SlickEdit supports.  To customize the compiler packages do the following:

•	Edit the ASCII file "prjpacks.slk".  When you see the setup information for the other compiler packages it will be obvious what you need to do.

•	If you want to set the default compiler package, run Visual SlickEdit.   From the macro menu execute the "Set Macro Variable" menu item.  Type "_compiler_default" for the variable, and set it to your compiler package.  The default compiler package will be selected when the New Project dialog box is displayed.

•	To test your changes, create a new project ("Project", "New...").


Configuring Dialog Boxes

If you need to modify the code for some of our dialog boxes, please call us first.  We are hoping to avoid or at least reduce the need for source code modifications.

You can write your own dialog boxes in C++, or whatever language you choose to front end the editor.  This section covers using Slick-C to create or modify dialog boxes.   See section An Event Driven Dialog Box or Slick-C Language for information on learning how to program in Slick-C.

The easiest customization to make to our dialog boxes is to make some controls invisible.  Typically, this does not require any source code changes.  Other changes will likely require you to modify the code for the dialog box.  DO NOT place your modifications in our source files.  This will make it much easier to merge your code later.   Note that Slick-C allows two files to have functions or event handlers with the same name.  The functions or event handlers in the last file loaded replace functions or event handlers of the same name in other files.  This makes it much easier to put minor changes in separate files.

If you create new dialog boxes in Slick-C, use the insert_object command ("Macro", "Insert Form/Menu Src...") to insert the source code for your dialog boxes into a file.  Even though "vslick.sta" has binary versions of your dialogs, you will need to reapply your changes when you receive a new state file.  We recommend you place all your resource changes in a file called "<OEM>objs.e".


Configuring Menus

Because we provide hooks for the right click menu, it is unlikely that you will need to modify these menus.  See Hooking the Right Click Menu for more information.  However, you may want to create new extension specific menus for your own language.

Use the Menu Editor ("Macro", "Menus..") to create or modify editor menus.  To set the extension specific menus, use the Extension Setup dialog box ("Tools", "Configuration", "File Extension Setup..."), select your extension, and click on the "Menu..." button.

If you create new Slick-C menus, use the insert_object command ("Macro", "Insert Form/Menu Src...") to insert the source code for your menus into a file.  Even though "vslick.sta" has binary version of your menus, you will need to reapply your changes when you receive a new state file.  We recommend you place all your resource changes in a file called "<OEM>objs.e".


Hooking Editor Keys

You may want to take over a key that the editor is using.  For example, in our "tiny" sample program, we wanted Alt+F4 to exit the application when the editor has focus.  If this was a Windows WIN32 or MFC dialog box program we would not have to write any code because the dialog manager takes over this key.  Since it was not, we had to add some additional code.  We used vsLibExport to register a command called "safe_exit" to replace the Slick-C version of this command which is bound to Alt+F4 in CUA emulation.  This allows our sample program to support emulations which have the safe_exit command bound to different keys or multiple keys.

If we wanted our sample program to take over Alt+F4 even when thesafe_exit command was not initially bound to Alt+F4, we would use the vsSetEventTabIndex function to bind the safe_exit command to Alt+F4.


Editor Control Support

Your technical support may have a need to call our technical support to get help with a customer problem.  For this reason we strongly recommend you have a way to display the Visual SlickEdit version.  Use the statement vsGetMessage(SLICK_EDITOR_VERSION_RC,szTemp,255) to get the Visual SlickEdit DLL version information.  Under Windows, we recommend your "About" box display the Visual SlickEdit version.


Update Patches and New Versions

Note that if you have made any configuration changes to what we ship, you will need to create your own custom patch for the editor.  See section Creating Your Own Patch for Visual SlickEdit.

When you receive update patches or new versions of the editor you will need to perform the following steps to apply your configuration changes to the editor:

•	Backup ALL your Visual SlickEdit files just in case you make a mistake (like forgetting which files you changed).

•	Unzip the patch files (named something like "vsp50b_w.zip") into a temporary directory.

•	Change to the temporary directory containing the patch files.

•	Run the MicroEdge update program:

update <path>vslick\win\vs.exe

This will automatically update all files we have changed.

•	Run the new "vs.exe".  This will apply your "vuserdefs.e" configuration changes.  This will also load any DLL or new Slick-C macro files you have loaded.

•	From the Visual SlickEdit command line, type <OEM>objs and press enter to apply dialog box and menu resource changes you have made.

•	Merge your "vslick.vlx" changes with ours.

•	Merge your "prjpacks.slk" changes with ours.

•	Merge your "vcsystem.slk" (UNIX: uvcsys.slk) with ours.

•	Merge your "print.ini" with ours.

•	Merge your "box.ini" with ours.

•	Merge your "vsscheme.ini" with ours.


Creating Your Own Patch for Visual SlickEdit

If you have customized Visual SlickEdit in any way, you will need create your own custom patch for Visual SlickEdit.  Following these steps when creating your own patch for Visual SlickEdit:

•	Run our update program on your development installation of Visual SlickEdit.  See Update Patches and New Versions.

•	Merge your configuration changes with ours.  Most of your configuration changes should have beeen applied when you ran our update on your installation of Visual SlickEdit.  However, if you made a custom "vslick.vlx", you will need to merge your changes with ours.

•	Uncompress the files in our update to determine what files and being replace.  Note that sometimes our updates include files which did not previously exist.  Ship your version of each file in our update.

•	Create your own update program to update the Visual SlickEdit files.  See guide lines in section Making Sure Your Users Don't Lose Configuration Changes


Editor Control Toolbars

If you are using the MDI interface API's you may want to make use of the Visual SlickEdit toolbars.  Unfortunately, unless all your toolbars are Slick-C toolbars you won't be able to dock our toolbars.  We have thought about reimplementing our toolbars in MFC or some other standard.  However, so far our OEMs don't seem to be using any standard.

If you do create or modify Slick-C toolbars, you may want to edit "toolbar.e" which contains the toolbar default tables.  This will allow users to reset their toolbars to your defaults.  Currently, we don't have a mechanism for making these changes in a separate macro file.


Threaded Applications

The Visual SlickEdit API calls are not thread safe (i.e. you can only be in one API call at a time).  You need to synchronize your calls into the Visual SlickEdit API.  Under Windows, we recommend the same thread make all calls into our API. This way you don't have to know which calls create windows.  For example, vsInit creates some invisible windows.  In addition, after vsInit is called this thread must eventually execute a GetMessage/Dispatch message loop.  Our windows DLLs do not require any external C run-time DLLs.  Therefore, it does not matter whether your program is multi-threaded or single threaded.


CUA Keys

Cursor Movement

Inserting Text

Deleting Text

Searching

Selection

Clipboard

Command Line and Text Box Editing

Files and Buffers

Windowing

Compiling and Programming Support

Macros

Miscellaneous


CUA Cursor Movement

Left arrow	Cursor left

Right arrow	Cursor right

Up arrow	Cursor up

Down arrow	Cursor down

Ctrl+Home	Top of buffer

Ctrl+End	Bottom of buffer

Home	Begin line

End	End line

PgUp	Page up

PgDn	Page down

Ctrl+Left	Previous word

Ctrl+Right	Next word

Ctrl+PgUp	Top of window

Ctrl+PgDn	Bottom of window

Tab	Indent to next tab stop

Shift+Tab	Back indent text to previous tab stop

Ctrl+J	Go to line


CUA Inserting Text

Ins	Insert/overwrite toggle

Enter	Insert a line

Ctrl+Q	Quote next character typed


CUA Deleting Text

Del	Delete char under cursor

Backspace	Delete char before cursor

Ctrl+Backspace	Cut line

Ctrl+E	Cut to end of line

Ctrl+Shift+K	Cut word


CUA Searching

Ctrl+F	Find

Ctrl+R	Replace

Ctrl+G	Find next occurrence

Ctrl+Shift+G	Find previous occurrence

Ctrl+I	Incremental search

Ctrl+Shift+I	Reverse incremental search

Ctrl+Alt+Shift+F2	Stop search or search & replace


CUA Selection

Ctrl+A	Select all

Ctrl+B	Select block/column

Ctrl+L	Select line

F8	Select character/stream

Ctrl+U	Deselect

Ctrl+X	Cut selection

Backspace, Del	Delete selection

Tab	Indent selection

Shift+Tab	Unindent selection

Shift+F7	Shift selection left

Shift+F8	Shift selection right

Alt+=	Execute commands in selection

Shift+<Cursor keys>	Start or extend char/stream selection

Click & Drag	Start char/stream selection

Right-Click & Drag	Start block/column selection

Shift+Click	Extend selection

Ctrl+Right-Click	Move selection to cursor

Ctrl+Shift+Right-Click	Copy selection to cursor

Double-Click	Select word

Triple-Click	Select line


CUA Clipboard

Ctrl+C, Ctrl+Ins	Copy selection to clipboard

Ctrl+Shift+C	Append selection to clipboard

Ctrl+K	Copy word to clipboard

Ctrl+Shift+V	List clipboards and optionally paste one

Ctrl+V, Shift+Ins	Paste

Ctrl+Backspace	Cut line

Ctrl+E	Cut to end of line

Ctrl+Shift+K	Cut word

Ctrl+X, Shift+Del	Cut selection

Ctrl+Shift+X	Append cut selection


CUA Command Line and Text Box Editing

Ctrl+X	Cut selection

Ctrl+C	Copy selection to clipboard

Ctrl+V	Paste

Ctrl+Shift+C	Append selection to clipboard

Ctrl+Shift+X	Append cut selection

Ctrl+Shift+V	List clipboards and optionally paste one

Esc	Cursor to command line toggle

Space	Complete argument

'?'	List arguments

Ctrl+Left 	Previous word

Ctrl+Right	Next word

Ctrl+Shift+U	Upcase word

Ctrl+Shift+L	Lowcase word

Ctrl+Shift+K	Cut word

Ctrl+E	Cut to end of line

Ctrl+Backspace	Cut line

Ins	Insert/overwrite toggle

Ctrl+Q	Quote next character

Ctrl+K	Copy word to clipboard

Up arrow	Retrieve previous command

Down arrow	Retrieve next command

Shift+<Cursor keys>	Start or extend char/stream selection

Click & Drag	Start char/stream selection

Shift+Click	Extend selection

Double-Click	Select word

Triple-Click	Select line


CUA Files and Buffers

F2, Ctrl+S	Save current buffer

Ctrl+N	Next buffer

Ctrl+P	Previous buffer

F4	Save and quit current buffer

F7, Ctrl+O	Edit a file or find buffer

Ctrl+Shift+B	List buffers

F6	File compare

Shift+F6	Resync after compare mismatch


CUA Windowing

Ctrl+H	Split window horizontally

Ctrl+Tab, Ctrl+F6	Next window

Ctrl+Shift+Tab, Ctrl+Shift+F6	Previous window

Ctrl+Shift+Z	Zoom window toggle

Ctrl+F4	Close window

Alt+F1	API Apprentice on current word

Alt+F2	Move window edge

Alt+F3	Create window edge

Ctrl+F5	Restore

Ctrl+F7	Move

Ctrl+F8	Size

Ctrl+F9	Minimize

Ctrl+F10	Maximize


CUA Compiling and Programming Support

Alt+.	List symbols.  Ctrl+PgUp/Ctrl+PgDn for next/previous definition. Shift+PgUp/Ctrl+PgDn to page up/down in comment.

Alt+,	Function argument help.  Ctrl+PgUp/Ctrl+PgDn for next/previous definition. Shift+PgUp/Ctrl+PgDn to page up/down in comment.

Ctrl+Space	Complete symbol

Ctrl+.	Push a bookmark and go to the definition of the symbol at cursor

Ctrl+/	Push a bookmark and go to the first reference to the symbol at cursor

Ctrl+,	Pop bookmark

Ctrl+G	Find next reference

Ctrl+Shift+G	Find previous reference

Ctrl+M	Build project

Ctrl+Shift+Down	Next error

Ctrl+Shift+Up	Previous error

Ctrl+Shift+S	Set next error

Ctrl+Shift+E	List errors

Shift+F10	Compile current buffer

Alt+1	Cursor to error/include file

F12	Make and load current macro buffer

Ctrl+Shift+M	Start concurrent process

Ctrl+Shift+P	Expand extension specific alias

Ctrl+Shift+O	Expand global alias


CUA Macros

Ctrl+F11	Start/end macro recording

Ctrl+F12	Terminate recording & run last recorded macro

F12	Make and load current macro buffer

Ctrl+Break	Halt Slick-C macro that is prompting for a key with get_event()

Ctrl+Alt+Shift+F2	Halt Slick-C macro that is executing.  Use this to terminate infinite loops.

Ctrl+Shift+Space	If running a dialog box, edits current dialog box.

Use this to close a dialog box that won't close.

If editing dialog box or macro, load and run dialog box/macro.


CUA Miscellaneous

F1	Help for mode or context

F5	Configuration menu

F10	Menu bar

Ctrl+F1	SDK help on word at cursor

Alt+F4	Safe exit

Ctrl+Shift+,	Complete previous word/variable

Ctrl+Shift+.	Complete next word/variable

Ctrl+Shift+Space	Complete more

Esc	Cancel or command line toggle

F9, Ctrl+Z, Alt+Backspace	Undo

Shift+F9	Undo with cursor motion grouping

Ctrl+Y	Redo

Ctrl+Shift+H	Hex display toggle

Ctrl+Shift+U	Upcase word

Ctrl+Shift+L	Lowcase word

Ctrl+Shift+J	Go to bookmark

Ctrl+1..Ctrl+0	Set bookmark 1..0

Ctrl+]	Match parenthesis

Ctrl+Shift+O	Expand alias at cursor

Ctrl+D	Change directory

Alt+F5	Restore MDI window

Alt+F7	Move MDI window

Alt+F8	Size MDI window

Alt+F9	Minimize MDI window

Alt+F10	Maximize MDI window


Visual C++ Keys

Cursor Movement

Inserting Text

Deleting Text

Searching

Selection

Clipboard

Command Line and Text Box Editing

Files and Buffers

Windowing

Compiling and Programming Support

Macros

Miscellaneous


Visual C++ Cursor Movement

Left arrow	Cursor left

Right arrow	Cursor right

Up arrow	Cursor up

Down arrow	Cursor down

Ctrl+Home	Top of buffer

Ctrl+End	Bottom of buffer

Home	Begin line

End	End line

PgUp	Page up

PgDn	Page down

Ctrl+Left	Previous word

Ctrl+Right	Next word

Ctrl+PgUp	Top of window

Ctrl+PgDn	Bottom of window

Tab	Indent to next tab stop

Shift+Tab	Back indent text to previous tab stop

Ctrl+G	Go to line, offset, bookmark, error, definition, or reference

Ctrl+J	Previous preprocessing condition

Ctrl+K	Next preprocessing condition


Visual C++ Inserting Text

Ins	Insert/overwrite toggle

Enter	Insert a line

Ctrl+Q	Quote next character typed


Visual C++ Deleting Text

Del	Delete char under cursor

Backspace	Delete char before cursor

Ctrl+L	Cut line

Alt+Shift+L	Cut sentence


Visual C++ Searching

Ctrl+F	Find

Ctrl+H	Replace

F3	Find next occurrence

Shift+F3	Find previous occurrence

Ctrl+I	Incremental search

Ctrl+Shift+I	Reverse incremental search

Ctrl+Alt+Shift+F2	Stop search or search & replace


Visual C++ Selection

Ctrl+A	Select all

Ctrl+B	Select block/column

Ctrl+F8	Select line

F8	Select character/stream

Ctrl+Shift+J	Select previous preprocessing condition

Ctrl+Shift+K	Select next preprocessing condition

Alt+U	Deselect

Ctrl+X	Cut selection

Backspace, Del	Delete selection

Tab	Indent selection

Shift+Tab	Unindent selection

Shift+F7	Shift selection left

Shift+F8	Shift selection right

Alt+=	Execute commands in selection

Shift+<Cursor keys>	Start or extend char/stream selection

Click & Drag	Start char/stream selection

Right-Click & Drag	Start block/column selection

Shift+Click	Extend selection

Ctrl+Right-Click	Move selection to cursor

Ctrl+Shift+Right-Click	Copy selection to cursor

Double-Click	Select word

Triple-Click	Select line


Visual C++ Clipboard

Ctrl+C, Ctrl+Ins	Copy selection to clipboard

Ctrl+Shift+C	Append selection to clipboard

Ctrl+Shift+V	List clipboards and optionally paste one

Ctrl+V, Shift+Ins	Paste

Ctrl+L	Cut line

Ctrl+X, Shift+Del	Cut selection

Ctrl+Shift+X	Append cut selection

Alt+Shift+L	Cut sentence


Visual C++ Command Line and Text Box Editing

Ctrl+X	Cut selection

Ctrl+C	Copy selection to clipboard

Ctrl+V	Paste

Ctrl+Shift+C	Append selection to clipboard

Ctrl+Shift+X	Append cut selection

Ctrl+Shift+V	List clipboards and optionally paste one

Esc	Cursor to command line toggle

Space	Complete argument

'?'	List arguments

Ctrl+Left 	Previous word

Ctrl+Right	Next word

Ctrl+Shift+U	Upcase word

Ctrl+U	Lowcase word

Ctrl+L	Cut line

Ctrl+Shift+L	Delete line

Ins	Insert/overwrite toggle

Ctrl+Q	Quote next character

Alt+N	Insert buffer name

Up arrow	Retrieve previous command

Down arrow	Retrieve next command

Shift+<Cursor keys>	Start or extend char/stream selection

Click & Drag	Start char/stream selection

Shift+Click	Extend selection

Double-Click	Select word

Triple-Click	Select line


Visual C++ Files and Buffers

F2, Ctrl+S	Save current buffer

Ctrl+O	Edit a file or find buffer

Ctrl+Shift+B	List buffers

F6	File compare

Shift+F6	Resync after compare mismatch


Visual C++ Windowing

Ctrl+Tab, Ctrl+F6	Next window

Ctrl+Shift+Tab	Previous window

Ctrl+F4	Close window


Visual C++ Compiling and Programming Support

Ctrl+Alt+T, Alt+.	List symbols.  Ctrl+PgUp/Ctrl+PgDn for next/previous definition. Shift+PgUp/Ctrl+PgDn to page up/down in comment.

Ctrl+Shift+Space, Alt+,	Function argument help.  Ctrl+PgUp/Ctrl+PgDn for next/previous definition. Shift+PgUp/Ctrl+PgDn to page up/down in comment.

Ctrl+Space	Complete symbol

F12, Ctrl+.	Push a bookmark and go to the definition of the symbol at cursor

Shift+F12, Ctrl+/	Push a bookmark and go to the first reference to the symbol at cursor

Ctrl+,	Pop bookmark

F3	Find next reference

Shift+F3	Find previous reference

F4, Ctrl+Shift+Down	Next error

Shift+F4, Ctrl+Shift+Up	Previous error

F7	Build project

Shift+F10	Compile current buffer

Ctrl+F5	Project execute

Ctrl+Shift+G	Cursor to error/include file

Ctrl+F12	Make and load current macro buffer

Ctrl+Shift+M	Start concurrent process


Visual C++ Macros

Ctrl+Shift+R	Start/end macro recording

Ctrl+Shift+P	Terminate recording & run last recorded macro

Ctrl+F12	Make and load current buffer

Ctrl+Break	Halt Slick-C macro that is prompting for a key with get_event()

Ctrl+Alt+Shift+F2	Halt Slick-C macro that is executing.  Halt Slick-C macro that is executing.  Use this to terminate infinite loops.

Ctrl+Shift+Space	If running a dialog box, edits current dialog box.

Use this to close a dialog box that won't close.

If editing dialog box or macro, load and run dialog box/macro.


Visual C++ Miscellaneous

F1	Help for mode or context

F10	Menu bar

Ctrl+F1	SDK help on word at cursor

Alt+F4	Safe exit

Ctrl+Shift+,	Complete previous word/variable

Ctrl+Shift+.	Complete next word/variable

Esc	Cancel or command line toggle

Ctrl+Z, Alt+Backspace	Undo

Ctrl+Shift+Z, Ctrl+Y	Redo

Ctrl+Shift+H	Hex display toggle

Ctrl+1..Ctrl+0	Set bookmark 1..0

Ctrl+E, Ctrl+]	Match parenthesis

Ctrl+Shift+O	Expand alias at cursor

Ctrl+D	Activates search history

Alt+F5	Restore MDI window

Alt+F7	Project properties

Alt+F8	Beautify selection

Alt+F9	Minimize MDI window

Alt+F10	Maximize MDI window

Ctrl+Up	Scroll up

Ctrl+Down	Scroll down

Ctrl+Shift+T	Transpose words

Alt+Shift+T	Transpose lines


SlickEdit Keys

Cursor Movement

Inserting Text

Deleting Text

Searching

Selection

Clipboard

Command Line and Text Box Editing

Files and Buffers

Windowing

Compiling and Programming Support

Macros

Miscellaneous


SlickEdit Cursor Movement

Left arrow, Ctrl+J	Cursor left

Right arrow, Ctrl+L	Cursor right

Up arrow, Ctrl+I	Cursor up

Down arrow, Ctrl+K	Cursor down

Ctrl+Home, Ctrl+X Ctrl+U	Top of buffer

Ctrl+End, Ctrl+X Ctrl+J	Bottom of buffer

Home, Ctrl+U	Begin line

End, Ctrl+O	End line

PgUp, Ctrl+P	Page up

PgDn, Ctrl+N	Page down

Ctrl+Left	Previous word

Ctrl+Right	Next word

Ctrl+PgUp	Top of window

Ctrl+PgDn	Bottom of window

Tab	Next tab stop

Shift+Tab	Previous tab stop


SlickEdit Inserting Text

Ins, Ctrl+X Ctrl+O	Insert/overwrite toggle

Enter	Insert a line

Alt+N	Insert buffer name

Ctrl+X Tab	Move text tab

Ctrl+Q	Quote next character typed

Alt+S	Split line at cursor


SlickEdit Deleting Text

Del, Ctrl+D	Delete char under cursor

Backspace	Delete char before cursor

Ctrl+Backspace	Cut line

Ctrl+E	Cut to end of line

Alt+W	Cut word

Alt+J	Join line to cursor


SlickEdit Searching

Ctrl+F	Find next occurrence

Ctrl+Shift+F	Find previous occurrence

Ctrl+S	Incremental search

Ctrl+X Ctrl+Z	Resume search&replace (Supports command line replace command only)

Ctrl+X Ctrl+R	Reverse incremental search

Ctrl+Alt+Shift+F2	Stop search or search & replace


SlickEdit Selection

Alt+B	Select block/column

Alt+L	Select line

Alt+Z	Select character/stream

Alt+U	Deselect

Alt+C	Copy selection to cursor

Alt+K	Cut selection

Alt+M	Move selection to cursor

Alt+F	Fill selection

Shift+F7	Shift selection left

Shift+F8	Shift selection right

Ctrl+F3	Upcase selection

Ctrl+F4	Lowcase selection

Alt+A	Move/overlay block

Alt+O	Overlay block selection

Alt+E	Go to end of selection

Alt+Y	Go to beginning of selection

Ctrl+X Ctrl+P	Reflow selection

Alt+=	Execute commands in selection

Shift+<Cursor keys>	Start or extend char/stream selection

Click & Drag	Start char/stream selection

Right-Click & Drag	Start block/column selection

Shift+Click	Extend selection

Ctrl+Right-Click	Move selection to cursor

Ctrl+Shift+Right-Click	Copy selection to cursor

Double-Click	Select word

Triple-Click	Select line


SlickEdit Clipboard

Alt+V, Ctrl+Ins	Copy selection to clipboard

Ctrl+X Ctrl+W	Copy word to clipboard

Ctrl+X Ctrl+Y	List clipboards and optionally paste one

Ctrl+Y, Shift+Ins	Paste

Ctrl+Backspace	Cut line

Ctrl+E	Cut to end of line

Alt+W	Cut word

Alt+K, Shift+Del	Cut selection


SlickEdit Command Line and Text Box Editing

The following keys are different in all Text Boxes except the command line if the CUA Text Box check box is checked ("Tools", "Configuration", "Redefine Common Keys"):

Ctrl+X	Cut selection

Ctrl+C	Copy selection to clipboard

Ctrl+V	Paste

Alt+A..Alt+Z	Taken over by dialog manager for selecting controls

Command Line Keys

Esc, Ctrl+A	Cursor to command line toggle

Space	Complete argument

'?'	List arguments

Ctrl+Left 	Previous word

Ctrl+Right	Next word

Ctrl+F1	Upcase word

Ctrl+F2	Lowcase word

Alt+W	Cut word

Ctrl+E	Cut to end of line

Ctrl+Backspace	Cut line

Alt+V	Copy selection to clipboard

Ins	Insert/overwrite toggle

Ctrl+Q	Quote next character

Ctrl+X Ctrl+W	Copy word to clipboard

Ctrl+Y 	Paste

Ctrl+X Ctrl+Y 	List clipboards and optionally paste one

Alt+N	Insert buffer name

Ctrl+Space	Expand alias at cursor.  Use ALIAS command to define aliases.

Up arrow, Ctrl+I	Retrieve previous command

Down arrow, Ctrl+K	Retrieve next command

Shift+<Cursor keys>	Start or extend char/stream selection

Click & Drag	Start char/stream selection

Shift+Click	Extend selection

Double-Click	Select word

Triple-Click	Select line


SlickEdit Files and Buffers

F2, Ctrl+X Ctrl+S	Save current buffer

F3, Ctrl+X 'K'	Quit current buffer

F8, Ctrl+B	Next buffer

Ctrl+F8, Ctrl+V	Previous buffer

F4	Save and quit current buffer

F7	Edit a file or find buffer

Ctrl+X Ctrl+B	List buffers

Ctrl+X 'B'	Find buffer

F6	File compare

Shift+F6	Resync after compare mismatch


SlickEdit Windowing

Ctrl+X '2'	Split window horizontally

Ctrl+W, Ctrl+Tab	Next window

Ctrl+Shift+Tab	Previous window

Ctrl+Z	Zoom window toggle

Ctrl+X '1'	One window


SlickEdit Compiling and Programming Support

Alt+.	List symbols.  Ctrl+PgUp/Ctrl+PgDn for next/previous definition. Shift+PgUp/Ctrl+PgDn to page up/down in comment.

Alt+,	Function argument help.  Ctrl+PgUp/Ctrl+PgDn for next/previous definition. Shift+PgUp/Ctrl+PgDn to page up/down in comment.

Ctrl+H, Ctrl+.	Push a bookmark and go to the definition of the symbol at cursor

Ctrl+/	Push a bookmark and go to the first reference to the symbol at cursor

Ctrl+X Ctrl+H, Ctrl+,	Pop bookmark

Ctrl+F	Find next reference

Ctrl+Shift+F	Find previous reference

Ctrl+Space	Complete symbol

Ctrl+F5, Ctrl+X 'M'	Build project

Alt+F10, Ctrl+X Ctrl+N	Next error

Ctrl+X 'N'	Set next error

Ctrl+F6	Compile current buffer

Alt+1	Cursor to error/include file

Ctrl+X Ctrl+L	Make and load current macro buffer

Ctrl+C	Stop concurrent process

Ctrl+X Ctrl+M	Start concurrent process

Ctrl+Shift+P	Expand extension specific alias

Ctrl+Shift+O	Expand global alias


SlickEdit Macros

Ctrl+R	Start/end macro recording

Ctrl+T	Terminate recording & run last recorded macro

Ctrl+X Ctrl+L	Make and load current buffer

Ctrl+Break	Halt Slick-C macro that is prompting for a key with get_event()

Ctrl+Alt+Shift+F2	Halt Slick-C macro that is executing.  Use this to terminate infinite loops.

Ctrl+Shift+Space	If running a dialog box, edits current dialog box.

Use this to close a dialog box that won't close.

If editing dialog box or macro, load and run dialog box/macro.

Ctrl+X 'E'	Run last recorded macro

Ctrl+X '('	Start recording macro

Ctrl+X ')'	End recording macro


SlickEdit Miscellaneous

F1	Help for mode or context

F5	Configuration menu

F10	Menu bar

Alt+X, Ctrl+X Ctrl+C	Safe exit

Ctrl+Shift+,	Complete previous word/variable

Ctrl+Shift+.	Complete next word/variable

Ctrl+Shift+Space	Complete more

Esc, Ctrl+G	Cancel

F9	Undo

Ctrl+F9	Undo with cursor motion grouping

Shift+F9, Ctrl+X 'R'	Redo

Ctrl+Shift+H	Hex display toggle

Ctrl+F1	Upcase word

Ctrl+F2	Lowcase word

Shift+F5	Center line

Shift+F1	Scroll up

Shift+F2	Scroll down

Shift+F3	Scroll left

Shift+F4	Scroll right

Alt+S	Split line

Alt+J	Join line

Alt+P	Reflow paragraph

Alt+T	Match parenthesis

Alt+R	Fundamental mode for next key press

Ctrl+X Ctrl+E	OS Shell

Ctrl+X Ctrl+D	Alias change directory


Brief Keys

Cursor Movement

Inserting Text

Deleting Text

Searching

Selection

Clipboard

Command Line and Text Box Editing

Files and Buffers

Windowing

Compiling and Programming Support

Macros

Miscellaneous


Brief Cursor Movement

Left arrow	Cursor left

Right arrow	Cursor right

Up arrow	Cursor up

Down arrow	Cursor down

Ctrl+PgUp, Home(3x)	Top of buffer

Ctrl+PgDn, End(3x)	Bottom of buffer

Home	Begin line

End	End line

Alt+G	Go to line

Alt+J	Go to bookmark

PgUp	Page up

PgDn	Page down

Ctrl+Left	Previous word

Ctrl+Right	Next word

Ctrl+Home, Home(2x)	Top of window

Ctrl+End, End(2x)	Bottom of window

Tab	Insert tab or next tab stop

Shift+Tab	Previous tab stop

Shift+Home	Left side of window

Shift+End	Right side of window


Brief Inserting Text

Alt+I	Insert/overwrite toggle

Enter	Maybe split insert line

Alt+Q	Quote next character typed

Ctrl+A	Insert buffer name

Ctrl+Enter	No split Insert line


Brief Deleting Text

Del	Delete char or selection

Backspace	Delete char before cursor

Pad-Minus	Cut line or selection

Alt+K	Delete to end line

Ctrl+K	Delete word

Alt+D	Delete line

Ctrl+Backspace	Delete previous word


Brief Searching

Alt+S, F5	Search forward

Shift+F5	Search again

Alt+F5, Ctrl+Shift+F5	Search backward

Ctrl+F5	Case sensitivity toggle

Ctrl+F6	Regular expr. toggle

Alt+T, F6	Translate forward

Shift+F6	Translate again

Alt+F6, Ctrl+Shift+F6	Translate backward

Ctrl+S	Forward incremental search

Ctrl+Alt+Shift+F2	Stop search or search & replace


Brief Clipboard

Ctrl+E	Copy word to clipboard

Ctrl+L	Paste recent clipboard

Ins, Ctrl+Y, Shift+Ins	Paste

Pad-Plus, Ctrl+Ins	Copy selection to clipboard

Pad-Minus, Shift+Del	Cut line or selection


Brief Command line and Text Box Editing

The following keys are different in all Text Boxes except the command line if the CUA Text Box check box is checked ("Tools", "Configuration", "Redefine Common Keys"):

Ctrl+X	Cut selection

Ctrl+C	Copy selection to clipboard

Ctrl+V	Paste

Alt+A..Alt+Z	Taken over by dialog manager for selecting controls

Command Line Keys

F10, Esc	Cursor to command line toggle

Space	Complete argument

'?'	List arguments

Alt+I	Insert/overwrite toggle

Alt+Q	Quote next character

Ctrl+E	Copy word to clipboard

Ins, Ctrl+Y	Paste

Ctrl+L	Paste recent clipboard

Ctrl+A	Insert buffer name

Ctrl+Space	Expand alias at cursor.  Use ALIAS command to define aliases.

Ctrl+Right	Next word

Ctrl+Left	Previous word

Ctrl+F1	Upcase word

Ctrl+F2	Lowcase word

Ctrl+F7	Capitalize word

Alt+K	Delete to end line

Ctrl+K	Delete word

Alt+D	Delete line

Ctrl+Backspace	Delete prev word

Up arrow	Retrieve previous command

Down arrow	Retrieve next command

Shift+<Cursor keys>	Start or extend char/stream selection

Click & Drag	Start char/stream selection

Shift+Click	Extend selection

Double-Click	Select word

Triple-Click	Select line


Brief Files and Buffers

Alt+W	Save current buffer

Ctrl+Minus	Quit current buffer

Alt+E	Edit a file or find buffer

Alt+X	Safe exit w/write all option

Alt+O	Change buffer name

Ctrl+F10	File compare

Shift+F10	Resync after compare mismatch

Alt+B	List buffers

Alt+N	Next buffer

Alt+Minus	Previous buffer

Ctrl+X	Save all buffers and exit

Alt+R	Read file


Brief Windowing

F1	Change window

F2	Move window edge

F3	Create window edge

F4	Delete window edge

Ctrl+Z	Zoom window toggle

Ctrl+J	Split window horizontally

Ctrl+W, Ctrl+Tab	Next window

Ctrl+Shift+Tab	Previous window

Shift+Left	Switch to left window

Shift+Right	Switch to right window

Shift+Up	Switch to window above

Shift+Down	Switch to window below


Brief Compiling and Programming Support

Alt+.	List symbols.  Ctrl+PgUp/Ctrl+PgDn for next/previous definition. Shift+PgUp/Ctrl+PgDn to page up/down in comment.

Alt+,	Function argument help.  Ctrl+PgUp/Ctrl+PgDn for next/previous definition. Shift+PgUp/Ctrl+PgDn to page up/down in comment.

Ctrl+.	Push a bookmark and go to the definition of the symbol at cursor

Ctrl+/	Push a bookmark and go to the first reference to the symbol at cursor

Ctrl+,	Pop bookmark

Ctrl+Space	Complete symbol

Alt+F9, Ctrl+Shift+F9	Build project

Alt+F10, Ctrl+Shift+F10	Compile current buffer

Ctrl+N	Next error

F9	Make and load macro

Ctrl+P	List errors

Ctrl+O	Stop concurrent process

Ctrl+I	Start concurrent process

Ctrl+G	List buffer procedures

Ctrl+Shift+P	Expand extension specific alias

Ctrl+Shift+O	Expand global alias


Brief Selection

Alt+C	Select block/column

Alt+L	Select line

Alt+M	Inclusive char selection

Alt+A	Non-inclusive char selection

Del	Delete selection

Pad-Minus	Cut selection

Tab	Indent selection

Shift+Tab	Unindent selection

Shift+F8	Shift selection right

Alt+Y	Go to beginning of selection

Ctrl+F3	Upcase selection

Ctrl+F4	Lowcase selection

Alt+=	Execute commands in selection

Alt+F	Fill selection

Click & Drag	Start char/stream selection

Right-Click & Drag	Start block/column selection

Shift+Click	Extend selection

Ctrl+Right-Click	Move selection to cursor

Ctrl+Shift+Right-Click	Copy selection to cursor

Double-Click	Select word

Triple-Click	Select line


Brief Macros

F7	Start/end macro recording

Shift+F7	Pause recording toggle

F9	Make and load macro module

F8	Run last recorded macro

Alt+F7, Ctrl+Shift+F7	List recorded macros

Alt+F8, Ctrl+Shift+F8	Save last recorded macro

Ctrl+Break	Halt Slick-C macro that is prompting for a key with get_event()

Ctrl+Alt+Shift+F2	Halt Slick-C macro that is executing.  Use this to terminate infinite loops.

Ctrl+Shift+Space	If running a dialog box, edits current dialog box.

Use this to close a dialog box that won't close.

If editing dialog box or macro, load and run dialog box/macro.


Brief Miscellaneous

Alt	Menu bar

Alt+H	Help for mode or context

Ctrl+F	Configuration menu

Alt+X	Safe exit

Ctrl+Shift+,	Complete previous word/variable

Ctrl+Shift+.	Complete next word/variable

Ctrl+Shift+Space	Complete more

Ctrl+X	Write all buffers and exit

Esc	Cancel

Alt+H	Help for mode or context

Ctrl+F	Configuration menu

Ctrl+Shift+H	Hex display toggle

Ctrl+T	Line to top

Ctrl+B	Line to bottom

Alt+U, Pad-Star	Undo

Ctrl+F9	Undo with cursor motion grouping

Ctrl+U	Redo

Shift+F1	Scroll up

Ctrl+D, Shift+F2	Scroll down

Shift+F3	Scroll left

Shift+F4	Scroll right

Ctrl+F1	Upcase word

Ctrl+F2	Lowcase word

Ctrl+F7	Capitalize word

Ctrl+R	Repeat next key stroke

Alt+Z	Shell to DOS

Alt+V	Version

Alt+P	Print selection

Ctrl+C	Center line

Alt+1, Alt+2 ... Alt+0	Set bookmark

Ctrl+Q	Fundamental mode for next key press

Ctrl+Shift+O	Expand alias at cursor

Alt+/	Alias change directory


Epsilon Keys

Cursor Movement

Inserting Text

Deleting Text

Searching

Selection

Clipboard

Command Line and Text Box Editing

Files and Buffers

Windowing

Compiling and Programming Support

Macros

Miscellaneous


Epsilon Cursor Movement

Ctrl+A, Alt+Left	Begin line

Ctrl+E, Alt+Right	End of line

Left arrow, Ctrl+B	Cursor left

Right arrow, Ctrl+F	Cursor right

Ctrl+N, Down arrow	Next line

Ctrl+P, Up arrow	Previous line

Ctrl+V, PgDn	Page down

Alt+V, PgUp	Page up

Ctrl+Home, Alt+<	Top of buffer

Ctrl+End, Alt+>	Bottom of buffer

Ctrl+Left, Alt+B	Previous word

Ctrl+Right, Alt+F	Next word

Home	Beginning of window

End	End of window

Ctrl+Alt+B	Previous level

Ctrl+Alt+F	Next level

Alt+)	Match parenthesis

Alt+[, Alt+Up	Previous paragraph

Alt+], Alt+Down	Next paragraph

Alt+M	First non blank

Alt+A, Ctrl+Up	Previous sentence

Alt+E, Ctrl+Down	Next sentence

Ctrl-X 'G'	Go to line


Epsilon Inserting Text

Ins	Insert/overwrite toggle

Tab, Ctrl+I	Indent to previous line or insert tab character

Enter, Ctrl+M, Ctrl+J	Insert a line

Ctrl+O	Split line

Ctrl+Q	Insert literal


Epsilon Deleting Text

Alt+\	Delete horizontal space

Ctrl+X Ctrl+O	Delete blank lines

Alt+Del	Cut previous level

Ctrl+Alt+K	Cut level

Ctrl+Backspace	Cut line

Ctrl+K	Cut to end of line

Alt+D	Cut word

Alt+K	Cut sentence

Ctrl+Alt+H	Cut previous word

Del, Ctrl+D	Delete character under cursor

Backspace, Ctrl+H	Delete character before cursor


Epsilon Searching

Ctrl+S	Incremental search

Ctrl+R	Reverse incremental search

Ctrl+Alt+S	Regular expression search

Ctrl+Alt+R	Reverse regular expression search

Alt+%	Search and replace with prompting

Alt+&	Search and replace without prompting

Ctrl+Alt+Shift+F2	Stop search or search & replace


Epsilon Selection

Ctrl+2	Select character/stream

Alt+@	Select block/column

Alt+H	Select paragraph

Ctrl+X Ctrl+X	Exchange point and start selection

Ctrl+X 'W'	Write selection to file

Ctrl+Alt+\ 	Indent selection

Ctrl+X Ctrl+Alt+I 	Tabify selection

Ctrl+X Alt+I	Untabify selection

Shift+F7	Shift block selection left

Shift+F8	Shift block selection right

Shift+<Cursor keys>	Start or extend char/stream selection

Click & Drag	Start char/stream selection

Right-Click & Drag	Start block/column selection

Shift+Click	Extend selection

Ctrl+Right-Click	Move selection to cursor

Ctrl+Shift+Right-Click	Copy selection to cursor

Double-Click	Select word

Triple-Click	Select line


Epsilon Clipboard

Ctrl+W, Shift+Del	Cut selection

Ctrl+Y, Shift+Ins	Paste

Alt+Y	Select clipboard to insert

Alt+W, Ctrl+Ins	Copy selection to clipboard

Ctrl+X Ctrl+A	Copy word

Ctrl+K	Cut to end of line

Alt+D	Cut word

Alt+K	Cut sentence

Alt+Del	Cut previous level

Ctrl+Alt+K	Cut level

Ctrl+Alt+H	Cut previous word

Ctrl+Alt+W	Append next clipboard


Epsilon Files and Buffers

Ctrl+X Ctrl+S	Save current buffer

Ctrl+X 'K'	Quit buffer

Ctrl+X 'B'	Select buffer

Ctrl+X Ctrl+F	Edit a file or find buffer

Ctrl+X Ctrl+W	Save and rename buffer

Ctrl+F7	Write buffer to file

Ctrl+F2, Ctrl+X 'C'	Compare windows

Ctrl+X Ctrl+B, Ctrl+X Alt+B           List buffers

Ctrl+X Ctrl+V	Replace buffer with a file on disk

Ctrl+X 'I'	Insert file

Ctrl+X 'W'	Write selection to file

Ctrl+X 'D'	Directory edit mode

Ctrl+F10	Resync after compare mismatch


Epsilon Windowing

Ctrl+X '2'	Split window horizontally

Ctrl+X '1'	One window

Ctrl+X 'O', Alt+PgDn	Next window

Ctrl+X 'P', Alt+PgUp	Prev window

Ctrl+X Ctrl+D	Delete window

Home	Cursor to beginning of window

End	Cursor to end of window

Ctrl+PgDn	Shrink window

Ctrl+PgUp	Expand window


Epsilon Compiling and Programming Support

Alt+.	List symbols.  Ctrl+PgUp/Ctrl+PgDn for next/previous definition. Shift+PgUp/Ctrl+PgDn to page up/down in comment.

Alt+,	Function argument help.  Ctrl+PgUp/Ctrl+PgDn for next/previous definition. Shift+PgUp/Ctrl+PgDn to page up/down in comment.

Ctrl+Space	Complete symbol

Ctrl+X 'M', Ctrl+F5	Build project

Ctrl+X Ctrl+N, Alt+F10	Next error

Alt+F6	Compile current buffer

Ctrl+C	Stop concurrent process

Ctrl+X Ctrl+M	Start concurrent process

Ctrl+X ',', Ctrl+.	Push a bookmark and go to the definition of the symbol at cursor

Ctrl+X Ctrl+H, Ctrl+,	Pop bookmark

Ctrl+X '.'	Go to tag

Ctrl+X Alt+,	Tag Files dialog box

F3	Make and load current macro buffer

Ctrl+Shift+P	Expand extension specific alias

Ctrl+Shift+O	Expand global alias


Epsilon Macros

Ctrl+X 'E'	Run last recorded macro

F3	Make and load current buffer

Ctrl+X Alt+N	Save last recorded macro

Ctrl+X '('	Start/end macro recording

Ctrl+X ')'	End macro recording

Ctrl+Break	Halt Slick-C macro that is prompting for a key with get_event()

Ctrl+Alt+Shift+F2	Halt Slick-C macro that is executing.  Halt Slick-C macro that is executing.  Use this to terminate infinite loops.

Ctrl+Shift+Space	If running a dialog box, edits current dialog box.

Use this to close a dialog box that won't close.

If editing dialog box or macro, load and run dialog box/macro.


Epsilon Command Line and Text Box Editing

The following keys are different in all Text Boxes except the command line if the CUA Text Box check box is checked ("Tools", "Configuration", "Redefine Common Keys"):

Ctrl+X	Cut selection

Ctrl+C	Copy selection to clipboard

Ctrl+V	Paste

Alt+A..Alt+Z	Taken over by dialog manager for selecting controls

Command Line Keys

F2, Alt+X	Cursor to command line toggle

Ctrl+D	Delete character

Ctrl+H, Backspace	Delete previous character

Tab, Ctrl+I	Insert tab character

Ctrl+J, Enter, Ctrl+M	ENTER argument

Space	Complete argument

'?'	List arguments

Ins	Insert toggle

Alt+\	Delete horizontal space

Ctrl+Q	Quote next character

Ctrl+Space	Expand alias at cursor.  Use ALIAS command to define aliases.

Ctrl+K	Cut to end of line

Ctrl+Alt+H	Cut previous word

Alt+D	Cut word

Ctrl+W, Shift+Del	Cut selection

Ctrl+Y, Shift+Ins	Paste

Alt+Y	Paste recent clipboard

Ctrl+Alt+W	Append next clipboard

Alt+C	Capitalize word

Alt+L	Lowcase word

Alt+U	Upcase word

Ctrl+T	Transpose characters

Alt+T	Transpose words

Ctrl+N, Down	Retrieve previous argument (cmdline only)

Ctrl+P, Up	Retrieve next argument (cmdline only)

ESC, Ctrl+[	Complete and enter argument (cmdline only)

Shift+<Cursor keys>	Start or extend char/stream selection

Click & Drag	Start char/stream selection

Shift+Click	Extend selection

Double-Click	Select word

Triple-Click	Select line


Epsilon Miscellaneous

F1, Alt+?, Ctrl+-	Help for mode or context

Alt+P	Configuration menu

F10	Main menu for mode

Ctrl+X Ctrl+C	Safe exit

Ctrl+Shift+,	Complete previous word/variable

Ctrl+Shift+.	Complete next word/variable

Ctrl+Shift+Space	Complete more

Ctrl+G	Cancel

F9, Ctrl+X 'U'	Undo

Shift+F9, Ctrl+X 'R'	Redo

Ctrl+F9	Undo w/cursor grouping

Ctrl+Shift+H	Hex display toggle

Ctrl+T	Transpose characters

Alt+T	Transpose words

Ctrl+X Ctrl+T	Transpose lines

Alt+U	Upcase word

Alt+L	Lowcase word

Alt+C	Capitalize word

Ctrl+X 'F'	Set margins

Alt+Q	Reflow paragraph

Alt+S	Center line within margins

Alt+)	Find matching start paren

Ctrl+L	Center line within window

Ctrl+Shift+O	Expand alias at cursor

Ctrl+X '/'	Alias change directory

F8, Ctrl+F8	Set macro variable

F4	Bind to key

F5	Where is

F6	What is

F7	Change directory

Ctrl+X Ctrl+E	Shell

Ctrl+X Ctrl+Z	Resume

Ctrl+X '='	Display information on cursor position

Ctrl+X 'L'	Count lines

Alt+~	Modify toggle

Alt+Z	Scroll down

Ctrl+Z	Scroll up

Argument/Repeating a key

Ctrl+U	Select number of times to invoke a command. Sets argument-count.

Ctrl+K	Cuts argument-count complete lines

Ctrl+X Ctrl+O	Change number of blank lines at or before cursor to argument-count

Ctrl+X Ctrl+I, Ctrl+X Tab	Indent or unindent selected lines by argument-count characters

Alt+0..Alt+9	Select argument-count 0..9


VI Keys

Cursor Movement

Inserting Text

Deleting Text

Searching

Selection

Clipboard

Command Line and Text Box Editing

Files and Buffers

Windowing

Compiling and Programming Support

Macros

Miscellaneous


VI Cursor Movement

Left arrow, Ctrl+J	Cursor Left

Right arrow, Ctrl+L	Cursor right

Up arrow, Ctrl+I	Cursor up

Down arrow, Ctrl+K	Cursor down

Ctrl+Home, Ctrl+X Ctrl+U   Top of buffer

Ctrl+End, Ctrl+X Ctrl+J	Bottom of buffer

Home	Begin line

End, Ctrl+O	End line

PgUp, Ctrl+B	Page up

PgDn, Ctrl+F	Page down

Ctrl+Left	Previous word

Ctrl+Right	Next word

Ctrl+PgUp	Top of window

Ctrl+PgDn	Bottom of window

Tab	Indent to next tab stop

Shift+Tab	Indent to previous tab stop

Command mode only

l, Space, Right	Cursor right

h, Backspace, Left	Cursor left

+, Enter	Begin next line

j, Ctrl+N, Down	Cursor down

k, Ctrl+P, Up	Cursor up

-	Begin previous line

^	Begin text

0	Begin line

$	End line

G	Go to line

|	Go to column

w	Next word

W	Next non-white space word

b	Previous word

B	Previous non-white space word

e	End of word

E	End of non-white space word

(	Previous sentence

)	Next sentence

{	Previous paragraph

}	Next paragraph

[[	Previous section

]]	Next section

%	Find matching paren

H	Move to upper-left corner of window

M	Move to middle of window

L	Move to lower-left corner of window

'	Jump to bookmarked line

`	Jump to bookmarked column


VI Inserting Text

Ctrl+V	Quote next character typed

Ctrl+X Tab	Move text tab

Alt+N	Insert buffer name

Ins	Insert/overwrite toggle

Command mode only

i	Insert text

I	Insert text at beginning of line

a	Append text

A	Append text after end of line

o	Insert text below current line

O	Insert text above current line


VI Deleting Text

Del	Delete character under cursor

Ctrl+E	Cut to end line

Ctrl+Backspace	Cut line

Alt+J	Join line to cursor

Ctrl+W	Delete previous word

Command mode only

x	Delete character under cursor

X	Delete character before cursor

d	Delete text

D	Delete to end of line


VI Searching

Ctrl+R	Find next occurrence

Ctrl+Shift+R	Find previous occurrence

Ctrl+S	Incremental search

Ctrl+X Ctrl+Z	Resume search & replace (Command line only)

Ctrl+X Ctrl+R	Reverse incremental search

Ctrl+Alt+Shift+F2	Stop search or search & replace

Command mode only

/	Search forward

?	Search backward

n	Forward repeat last search

N	Backward repeat last search

f	Forward character search

F	Backward character search

t	Move cursor up to character

T	Move cursor backward after character

;	Repeat character search

,	Reverse repeat character search

m	Set bookmark


VI Selection

Alt+Z	Select character/stream

Alt+L	Select line

Shift+F7	Shift block selection left

Shift+F8	Shift block selection right

Shift+<Cursor keys>	Start or extend char/stream selection

Click & Drag	Start char/stream selection

Right-Click & Drag	Start block/column selection

Shift+Click	Extend selection

Ctrl+Right-Click	Move selection to cursor

Ctrl+Shift+Right-Click	Copy selection to cursor

Double-Click	Select word

Triple-Click	Select line


VI Clipboard

Ctrl+Ins	Copy selection to clipboard

Ctrl+X Ctrl+W	Copy word to clipboard

Ctrl+X Ctrl+Y	List clipboards and optionally paste one

Ctrl+Y, Shift+Ins	Paste

Ctrl+Backspace	Cut line

Ctrl+E	Cut to end of line

Alt+K, Shift+Del	Cut selection

Command mode only

p	Paste text after the cursor

P	Paste text before the cursor

y	Copy text to clipboard

Y	Copy line to clipboard


VI Command Line and Text Box Editing

The following keys are different in all Text Boxes except the command line if the CUA Text Box check box is checked ("Tools", "Configuration", "Redefine Common Keys"):

Ctrl+X	Cut selection

Ctrl+C	Copy selection to clipboard

Ctrl+V	Paste

Alt+A..Alt+Z	Taken over by dialog manager for selecting controls

Command Line Keys

Ctrl+A	Cursor to command line toggle

Space	Complete argument

'?'	List arguments

Ctrl+Left	Previous word

Ctrl+Right	Next word

Ctrl+F1	Upcase word

Ctrl+F2	Lowcase word

Ctrl+F5	Capitalize word

Ctrl+E	Cut to end of line

Ctrl+Backspace	Cut line

Ins	Insert/overwrite toggle

Ctrl+V	Quote next character

Ctrl+X Ctrl+W	Copy word to clipboard

Ctrl+Y	Paste

Ctrl+X Ctrl+Y	Paste recent clipboard

Alt+N	Insert buffer name

Ctrl+Space	Expand alias at cursor.  Use ALIAS command to define aliases

 or EX command ABBR.

Up arrow, Ctrl+I	Retrieve previous command

Down arrow, Ctrl+K	Retrieve next command

Shift+<Cursor keys>	Start or extend char/stream selection

Click & Drag	Start char/stream selection

Shift+Click	Extend selection

Double-Click	Select word

Triple-Click	Select line


VI Files and Buffers

F2, Ctrl+X Ctrl+S	Save current buffer

F3, Ctrl+X 'K'	Quit current buffer

F8	Next buffer

Ctrl+F8	Previous buffer

F4	Save and quit current buffer

F7, Ctrl+X Ctrl+F	Open a file or find buffer

Ctrl+X Ctrl+B	List buffers

Ctrl+X 'B'	Find buffer

F6	File compare

Shift+F6	Resync after compare mismatch


VI Windowing

Ctrl+X '2'	Split window horizontally

Ctrl+Tab	Next window

Ctrl+Z	Zoom window toggle

Ctrl+X '1'	One window


VI Compiling and Programming Support

Alt+.	List symbols.  Ctrl+PgUp/Ctrl+PgDn for next/previous definition. Shift+PgUp/Ctrl+PgDn to page up/down in comment.

Alt+,	Function argument help.  Ctrl+PgUp/Ctrl+PgDn for next/previous definition. Shift+PgUp/Ctrl+PgDn to page up/down in comment.

Ctrl+Space	Complete symbol

Ctrl+], Ctrl+.	Push a bookmark and go to the definition of the symbol at cursor

Ctrl+/	Push a bookmark and go to the first reference to the symbol at cursor

Ctrl+X Ctrl+], Ctrl+,	Pop bookmark

Ctrl+X 'M', Ctrl+F5	Build project

Ctrl+X Ctrl+N, Alt+F10	Next error

Ctrl+X 'N'	Set next error

Ctrl+F6	Compile current buffer

Alt+1	Cursor to error

Ctrl+X Ctrl+L	Make load current macro buffer

Ctrl+C	Stop concurrent process

Ctrl+X Ctrl+M	Start concurrent process

Ctrl+Shift+P	Expand extension specific alias

Ctrl+Shift+O	Expand global alias


VI Macros

Ctrl+F11	Start/end macro recording

Ctrl+X Ctrl+L	Make and load current macro buffer

Ctrl+Break	Halt Slick-C macro that is prompting for a key with get_event()

Ctrl+Alt+Shift+F2	Halt Slick-C macro that is executing.  Use this to terminate infinite loops.

Ctrl+Shift+Space	If running a dialog box, edits current dialog box.

Use this to close a dialog box that won't close.

If editing dialog box or macro, load and run dialog box/macro.

Ctrl+X '('	Start recording macro

Ctrl+X ')'	End recording macro

Command mode only

.	Repeat last insert or delete


VI Miscellaneous

Alt+X, Ctrl+X Ctrl+C	Safe exit

F10	Menu bar

F1	Help for mode or context

F5	Configuration menu

Ctrl+Shift+H	Hex display toggle

Ctrl+Shift+,	Complete previous word/variable

Ctrl+Shift+.	Complete next word/variable

Ctrl+Shift+Space	Complete more

Esc, Ctrl+Q	Cancel

F9	Undo

Ctrl+F9	Undo with cursor motion grouping

Shift+F9, Ctrl+X 'R'	Redo

Shift+F1	Scroll up

Shift+F2	Scroll down

Shift+F3	Scroll left

Shift+F4	Scroll right

Shift+F5	Center line

Alt+J	Join line

Ctrl+F1	Upcase word

Ctrl+F2	Lowcase word

Alt+P	Reflow paragraph

Alt+R	Fundamental mode for next key press

Alt+T	Match parenthesis

Ctrl+Shift+O	Expand alias at cursor

Ctrl+X Ctrl+D	Alias change directory

Ctrl+X Ctrl+E	Shell to DOS

Command mode only

u	Full undo

U	Undo with cursor motion grouping

c	Change text

C	Change to end of line

r	Overstrike character(s)

R	Overstrike text

s	Substitute character(s)

S	Substitute line

<	Shift text left

>	Shift text right

J	Join line

:	EX command mode

Q	EX editor mode

&	Repeat last SUBSTITUTE

Esc, Ctrl+[	Command mode


GNU Emacs Keys

Cursor Movement

Inserting Text

Deleting Text

Searching

Selection

Clipboard

Command Line and Text Box Editing

Files and Buffers

Windowing

Compiling and Programming Support

Macros

Miscellaneous


GNU Emacs Cursor Movement

Alt+G	Go to line

Ctrl+A	Begin line

Ctrl+E	End of line

Left arrow, Ctrl+B	Cursor left

Right arrow, Ctrl+F	Cursor right

Ctrl+N, Down arrow	Next line

Ctrl+P, Up arrow	Previous line

Ctrl+V, PgDn	Page down

Alt+V, PgUp	Page up

Home, Alt+<	Top of buffer

End, Alt+>	Bottom of buffer

Alt+Left, Ctrl+Left, Alt+B	Previous word

Alt+Right, Ctrl+Right, Alt+F	Next word

Ctrl+Alt+B	Previous level

Ctrl+Alt+F	Next level

Alt+)	Match parenthesis

Alt+[, Alt+Up	Previous paragraph

Alt+], Alt+Down	Next paragraph

Alt+M	First non blank

Alt+A, Ctrl+Up	Previous sentence

Alt+E, Ctrl+Down	Next sentence

Ctrl-X 'G'	Go to line

Alt+Home	Top of file in next window

Alt+End	End of file in next window

Alt+PgDn	Page down next window

Alt+PgUp	Page up next window


GNU Emacs Inserting Text

Ins	Insert/overwrite toggle

Tab, Ctrl+I	Indent to previous line or insert tab character

Enter, Ctrl+M, Ctrl+J	Insert a line

Ctrl+O	Split line

Ctrl+Q	Insert literal


GNU Emacs Deleting Text

Alt+\	Delete horizontal space

Ctrl+X Ctrl+O	Delete blank lines

Alt+Del	Cut previous word

Ctrl+Alt+K	Cut level

Ctrl+Backspace	Cut previous word

Ctrl+K	Cut to end of line

Alt+D	Cut word

Alt+K	Cut sentence

Ctrl+Alt+H	Cut previous word

Del, Ctrl+D	Delete character under cursor

Backspace, Ctrl+H	Delete character before cursor


GNU Emacs Searching

Ctrl+S	Incremental search

Ctrl+R	Reverse incremental search

Ctrl+Alt+S	Regular expression search

Ctrl+Alt+R	Reverse regular expression search

Alt+%	Search and replace with prompting

Alt+&	Search and replace without prompting

Ctrl+Alt+Shift+F2	Stop search or search & replace


GNU Emacs Selection

Ctrl+Shift+2	Select character/stream

Alt+@	Select next word

Alt+H	Select paragraph

Ctrl+X Ctrl+X	Exchange point and start selection

Ctrl+X 'W'	Write selection to file

Ctrl+Alt+\ 	Indent selection

Ctrl+X Ctrl+Alt+I 	Tabify selection

Ctrl+X Alt+I	Untabify selection

Shift+F7	Shift block selection left

Shift+F8	Shift block selection right

Shift+<Cursor keys>	Start or extend char/stream selection

Click & Drag	Start char/stream selection

Right-Click & Drag	Start block/column selection

Shift+Click	Extend selection

Ctrl+Right-Click	Move selection to cursor

Ctrl+Shift+Right-Click	Copy selection to cursor

Double-Click	Select word

Triple-Click	Select line


GNU Emacs Clipboard

Ctrl+W, Shift+Del	Cut selection

Ctrl+Y, Shift+Ins	Paste

Alt+Y	Select clipboard to insert

Alt+W, Ctrl+Ins	Copy selection to clipboard

Ctrl+X Ctrl+A	Copy word

Ctrl+K	Cut to end of line

Alt+D	Cut word

Alt+K	Cut sentence

Alt+Del	Delete previous word

Ctrl+Alt+K	Cut level

Ctrl+Alt+H	Cut previous word

Ctrl+Alt+W	Append next clipboard


GNU Emacs Files and Buffers

Ctrl+X Ctrl+S	Save current buffer

Ctrl+X 'K'	Quit buffer

Ctrl+X 'B'	Select buffer

Ctrl+X Ctrl+F	Edit a file or find buffer

Ctrl+X Ctrl+W	Save and rename buffer

Ctrl+F7	Write buffer to file

Ctrl+F2, Ctrl+X 'C'	Compare windows

Ctrl+X Ctrl+B, Ctrl+X Alt+B

List buffers

Ctrl+X Ctrl+V	Replace buffer with a file on disk

Ctrl+X 'I'	Insert file

Ctrl+X 'W'	Write selection to file

Ctrl+X 'D'	Directory edit mode

Ctrl+F10	Resync after compare mismatch


GNU Emacs Windowing

Ctrl+X '2'	Split window horizontally

Ctrl+X '1'	One window

Ctrl+X 'O'	Next window

Ctrl+X 'P'	Prev window

Ctrl+PgDn	Shrink window

Ctrl+PgUp	Expand window


GNU Emacs Compiling and Programming Support

Alt+.	List symbols.  Ctrl+PgUp/Ctrl+PgDn for next/previous definition. Shift+PgUp/Ctrl+PgDn to page up/down in comment.

Alt+,	Function argument help.  Ctrl+PgUp/Ctrl+PgDn for next/previous definition. Shift+PgUp/Ctrl+PgDn to page up/down in comment.

Ctrl+Space	Complete symbol

Ctrl+X 'M', Ctrl+F5	Build project

Ctrl+X Ctrl+N, Alt+F10	Next error

Alt+F6	Compile current buffer

Ctrl+C 'C'	Stop concurrent process

Ctrl+X Ctrl+M	Start concurrent process

Ctrl+X ',', Ctrl+.	Push a bookmark and go to the definition of the symbol at cursor

Ctrl+X Ctrl+H, Ctrl+,	Pop bookmark

Ctrl+X '.'	Go to tag

Ctrl+X Alt+.	Make tag file

Ctrl+X Alt+,	Select tag file

F3	Make and load current macro buffer

Ctrl+Shift+P	Expand extension specific alias

Ctrl+Shift+O	Expand global alias


GNU Emacs Macros

Ctrl+X 'E'	Run last recorded macro

F3	Make and load current buffer

Ctrl+X Alt+N	Save last recorded macro

Ctrl+X '('	Start/end macro recording

Ctrl+X ')'	End macro recording

Ctrl+Break	Halt Slick-C macro that is prompting for a key with get_event()

Ctrl+Alt+Shift+F2	Halt Slick-C macro that is executing.  Halt Slick-C macro that is executing.  Use this to terminate infinite loops.

Ctrl+Shift+Space	If running a dialog box, edits current dialog box.

Use this to close a dialog box that won't close.

If editing dialog box or macro, load and run dialog box/macro.


GNU Emacs Command Line and Text Box Editing

The following keys are different in all Text Boxes except the command line if the CUA Text Box check box is checked ("Tools", "Configuration", "Redefine Common Keys"):

Ctrl+X	Cut selection

Ctrl+C	Copy selection to clipboard

Ctrl+V	Paste

Alt+A..Alt+Z	Taken over by dialog manager for selecting controls

Command Line Keys

F2, Alt+X	Cursor to command line toggle

Ctrl+D	Delete character

Backspace	Delete previous character

Tab, Ctrl+I	Insert tab character

Ctrl+J, Enter Ctrl+M	ENTER argument

Space	Complete argument

'?'	List arguments

Ins	Insert toggle

Alt+\	Delete horizontal space

Ctrl+Q	Quote next character

Ctrl+Space	Expand alias at cursor.  Use ALIAS command to define aliases.

Ctrl+K	Cut to end of line

Ctrl+Alt+H	Cut previous word

Alt+D	Cut word

Ctrl+W, Shift+Del	Cut selection

Ctrl+Y, Shift+Ins	Paste

Alt+Y	Paste recent clipboard

Ctrl+Alt+W	Append next clipboard

Alt+C	Capitalize word

Alt+L	Lowcase word

Alt+U	Upcase word

Ctrl+T	Transpose characters

Alt+T	Transpose words

Ctrl+N, Down	Retrieve previous argument

Ctrl+P, Up	Retrieve next argument

ESC, Ctrl+[	Complete and enter argument

Shift+<Cursor keys>	Start or extend char/stream selection

Click & Drag	Start char/stream selection

Shift+Click	Extend selection

Double-Click	Select word

Triple-Click	Select line


GNU Emacs Miscellaneous

F1, Alt+?, Ctrl+-	Help for mode or context

Ctrl+H	GNU Emacs help

Alt+P	Configuration menu

F10	Main menu for mode

Ctrl+X Ctrl+C	Safe exit

Ctrl+Shift+,	Select from cursor to beginning of buffer

Ctrl+Shift+.	Select from cursor to end of buffer

Ctrl+Shift+Space	Complete more

Ctrl+G	Cancel

Ctrl+/, F9,Ctrl+X 'U'	Undo

Shift+F9	Redo

Ctrl+F9	Undo w/cursor grouping

Ctrl+Shift+H	Hex display toggle

Ctrl+T	Transpose characters

Alt+T	Transpose words

Ctrl+X Ctrl+T	Transpose lines

Alt+U	Upcase word

Alt+L	Lowcase selection

Alt+C	Capitalize word

Ctrl+X 'F'	Set margins

Alt+Q	Reflow paragraph

Alt+S, Pad-5	Center line within margins

Alt+)	Find matching start paren

Ctrl+L	Center line within window

Ctrl+Shift+O	Expand alias at cursor

Ctrl+X '/'	Alias change directory

F8, Ctrl+F8	Set macro variable

F4	Bind to key

F5	Where is command

F6	What is key

F7	Change directory

Ctrl+X Ctrl+E	Shell

Ctrl+X Ctrl+Z	Minimize editor

Ctrl+X '='	Display information on cursor position

Ctrl+X 'L'	Count lines

Alt+~	Modify toggle

Alt+Z	Zap to char

Ctrl+Z	Iconize MDI window

Argument/Repeating a key

Ctrl+U	Select number of times to invoke a command. Sets argument-count

Ctrl+X Ctrl+O	Change number of blank lines at or before cursor to argument-count

Ctrl+X Ctrl+I, Ctrl+X Tab	Indent or unindent selected lines by argument-count characters

Alt+0..Alt+9	Select argument-count 0..9

Ctrl+0..Ctrl+9	Select argument-count 0..9


ISPF Keys

Cursor Movement

Inserting Text

Deleting Text

Searching

Selection

Clipboard

Command Line and Text Box Editing

Files and Buffers

Windowing

Compiling and Programming Support

Macros

Selective Display

Miscellaneous

Refer to the following sections for more information about the ISPF emulation:

ISPF Options dialog box

ISPF Primary Commands

ISPF Line Commands

XEDIT Line Commands

ISPF Unsupported Primary Commands

ISPF Emulation Commands


ISPF Cursor Movement

Left arrow	Cursor left, if in first column, cursor moves into prefix area

Right arrow	Cursor right, if at end of prefix area, moves to first column of line

Up arrow	Cursor up

Down arrow	Cursor down

Ctrl+Home	Top of buffer

Ctrl+End	Bottom of buffer

Home	Begin line

End	End line

PgUp	Page up

PgDn	Page down

F7	Page up

F8	Page down

F10	Page left

F11	Page right

Ctrl+Left	Previous word

Ctrl+Right	Next word

Ctrl+PgUp	Top of window

Ctrl+PgDn	Bottom of window

Tab	Indent or move to next tab stop

Shift+Tab	Move to previous tab stop, or if in first column, move to prefix area

Ctrl+J	Go to line

Line Prefix Commands

.label	Define line prefix label

bnds	Insert left and right boundary ruler line

tabs	Insert tabs ruler line

cols	Insert column ruler line


ISPF Inserting Text

Ins	Insert/overwrite toggle

Ctrl+Q	Quote next character typed

Line Prefix Commands

i [n]	Insert n lines after this line

te [n]	Insert n lines for word-wrap text entry

tj	Join line

ts	Split line

mask	Insert new line mask


ISPF Deleting Text

Del	Delete char under cursor

Backspace	Delete char before cursor

Ctrl+Backspace	Cut line

Ctrl+E	Cut to end of line

Ctrl+Shift+K	Cut word

Line Prefix Commands

d [n]	Delete n lines

dd	Delete a block of lines


ISPF Searching

Ctrl+F	Find

Ctrl+R	Replace

Ctrl+G	Find next occurrence

Ctrl+Shift+G	Find previous occurrence

F5	Find next occurrence

F6	Repeat last change

Ctrl+I	Incremental search

Ctrl+Shift+I	Reverse incremental search

Ctrl+Alt+Shift+F2	Stop search or search & replace


ISPF Selection

Ctrl+A	Select all

Ctrl+B	Select block/column

Ctrl+L	Select line

Ctrl+U	Deselect

Ctrl+X, Shift+F1	Cut selection

Backspace, Del, Shift+F4	Delete selection

Tab	Indent selection

Shift+Tab	Unindent selection

Shift+F7	Shift selection left

Shift+F8	Shift selection right

Alt+=	Execute commands in selection

Shift+<Cursor keys>	Start or extend char/stream selection

Click & Drag	Start char/stream selection

Right-Click & Drag	Start block/column selection

Shift+Click	Extend selection

Ctrl+Right-Click	Move selection to cursor

Ctrl+Shift+Right-Click	Copy selection to cursor

Double-Click	Select word

Triple-Click	Select line

Line Prefix Commands

( [n], (( [n]	Shift block n columns left

) [n], )) [n]	Shift block n columns right

< [n], << [n]	Shift data n columns right

> [n], >> [n]	Shift data n columns right

c [n]	Copy n lines

cc	Copy a block of lines

m [n]	Move n lines

mm	Move a block of lines

z [n]	Select n lines

zz	Select a block of lines


ISPF Clipboard

Ctrl+C, Ctrl+Ins, Shift+F2	Copy selection to clipboard

Ctrl+Shift+C	Append selection to clipboard

Ctrl+K	Copy word to clipboard

Ctrl+Shift+V	List clipboards and optionally paste one

Ctrl+V, Shift+Ins, Shift+F3	Paste

Ctrl+Backspace	Cut line

Ctrl+E	Cut to end of line

Ctrl+Shift+K	Cut word

Ctrl+X, Shift+Del, Shift+F1	Cut selection

Ctrl+Shift+X	Append cut selection

Line Prefix Commands

a [n]	Insert block after, repeat n times

b [n]	Insert block before, repeat n times

o [n]	Overlay n lines

oo	Overlay a block of lines

r [n]	Repeat a line n times

rr [n]	Repeat a block n times

z [n]	Select n lines

zz	Select a block of lines


ISPF Command Line and Text Box Editing

Ctrl+X	Cut selection

Ctrl+C	Copy selection to clipboard

Ctrl+V	Paste

Ctrl+Shift+C	Append selection to clipboard

Ctrl+Shift+X	Append cut selection

Ctrl+Shift+V	List clipboards and optionally paste one

Esc	Cursor to command line toggle

Space	Complete argument

'?'	List arguments

Ctrl+Left 	Previous word

Ctrl+Right	Next word

Ctrl+Shift+U	Upcase word

Ctrl+Shift+L	Lowcase word

Ctrl+Shift+K	Cut word

Ctrl+E	Cut to end of line

Ctrl+Backspace	Cut line

Ins	Insert/overwrite toggle

Ctrl+Q	Quote next character

Ctrl+K	Copy word to clipboard

Up arrow	Retrieve previous command

Down arrow	Retrieve next command

Shift+<Cursor keys>	Start or extend char/stream selection

Click & Drag	Start char/stream selection

Shift+Click	Extend selection

Double-Click	Select word

Triple-Click	Select line

F12	Retrieve previous command from command line

Shift+F12	Retrieve next command from command line


ISPF Files and Buffers

F2, Ctrl+O	Edit a file or find buffer

F3, F4	Save (if autosave is on) and quit current buffer

F3, Ctrl+S	Save current buffer

Ctrl+N	Next buffer

Ctrl+P	Previous buffer

F9	Next buffer or window

Shift+F9	Previous buffer or window

Ctrl+Shift+B	List buffers


ISPF Windowing

Ctrl+H	Split window horizontally

Ctrl+Tab, Ctrl+F6	Next window

Ctrl+Shift+Tab, Ctrl+Shift+F6	Previous window

Ctrl+Shift+Z	Zoom window toggle

Ctrl+F4	Close window

Alt+F1	API Apprentice on current word

Alt+F2	Move window edge

Alt+F3	Create window edge

Ctrl+F5	Restore

Ctrl+F7	Move

Ctrl+F8	Size

Ctrl+F9	Minimize

Ctrl+F10	Maximize


ISPF Compiling and Programming Support

Alt+.	List symbols.  Ctrl+PgUp/Ctrl+PgDn for next/previous definition. Shift+PgUp/Ctrl+PgDn to page up/down in comment.

Alt+,	Function argument help.  Ctrl+PgUp/Ctrl+PgDn for next/previous definition. Shift+PgUp/Ctrl+PgDn to page up/down in comment.

Ctrl+Space	Complete symbol

Ctrl+.	Push a bookmark and go to the definition of the symbol at cursor

Ctrl+/	Push a bookmark and go to the first reference to the symbol at cursor

Ctrl+,	Pop bookmark

Ctrl+G	Find next reference

Ctrl+Shift+G	Find previous reference

Ctrl+M	Build project

Ctrl+Shift+Down	Next error

Ctrl+Shift+Up	Previous error

Ctrl+Shift+S	Set next error

Ctrl+Shift+E	List errors

Shift+F10	Compile current buffer

Alt+1	Cursor to error/include file

Ctrl+Shift+M	Start concurrent process

Ctrl+Shift+P	Expand extension specific alias

Ctrl+Shift+O	Expand global alias


ISPF Macros

Ctrl+F11	Start/end macro recording

Ctrl+F12	Terminate recording & run last recorded macro

Ctrl+Break	Halt Slick-C macro that is prompting for a key with get_event()

Ctrl+Alt+Shift+F2	Halt Slick-C macro that is executing.  Use this to terminate infinite loops.

Ctrl+Shift+Space	If running a dialog box, edits current dialog box.

Use this to close a dialog box that won't close.

If editing dialog box or macro, load and run dialog box/macro.


ISPF Selective Display

Line Prefix Commands

x [n]	Exclude n lines

xx	Exclude a block of lines

f [n]	Expose first n lines of excluded block

l [n]	Expose last n lines of excluded block

s [n]	Expose n lines at first indentation level


ISPF Miscellaneous

F1	Help for mode or context

Ctrl+F1	SDK help on word at cursor

Alt+F4	Safe exit

Ctrl+Shift+,	Complete previous word/variable

Ctrl+Shift+.	Complete next word/variable

Ctrl+Shift+Space	Complete more

Esc	Cancel or command line toggle

Ctrl+Z, Alt+Backspace	Undo

Ctrl+Y	Redo

Ctrl+Shift+H	Hex display toggle

Ctrl+Shift+U	Upcase word

Ctrl+Shift+L	Lowcase word

Ctrl+Shift+J	Go to bookmark

Ctrl+1..Ctrl+0	Set bookmark 1..0

Ctrl+]	Match parenthesis

Ctrl+Shift+O	Expand alias at cursor

Ctrl+D	Change directory

Alt+F5	Restore MDI window

Alt+F7	Move MDI window

Alt+F8	Size MDI window

Alt+F9	Minimize MDI window

Alt+F10	Maximize MDI window

Enter	Execute line prefix commands or, if there are none, go to the next line.

Ctrl+Enter	Execute line prefix commands

Right-Ctrl	Alternate key for executing line prefix commands

Line Prefix Commands

lc [n]	Lowcase n lines

lclc, lcc	Lowcase block of lines

md [n]	Make n data lines

mdmd, mdd	Make data lines

uc [n]	Upcase n lines

uclc, ucc	Upcase block of lines

tf	Reflow paragraph


License Manager

Adding More Users

Contact MicroEdge Inc. to get a new license code.   Then you need to run the license manager utility program.

Windows:  Run "vssetlnw.exe" (under the Windows Start menu  "Programs", "Visual SlickEdit", "Set License").  This program will guide you through setting the new license which will enable your new license code.

UNIX:  Run "vssetln".  This program is located in the same directory as the "vs" executable (/usr/lib/vslick/bin or /usr/lpp/vslick/bin for OS/390 by default).

./vssetln vs <licensecode>

Licensing a Fixed Set of Users

Windows: Edit the license manager file "license.slk" (located in c:\vslick\win\vslicklm by default).   Delete the contents of this file and enter a list of userid's.  Each user needs to defined their userid by setting a VSUSER environment variable to their userid.  There should be only one userid per line with no leading or trailing spaces.  After you are satisified with the license manager file, you should set the "license.slk" file to read only ("attrib +R license.slk").

UNIX: Edit the license manager file ".license.slk" (located in /usr/vslick/bin/vslicklm/ or /usr/lpp/vslick/bin/vslicklm for OS/390 by default).   Delete the contents of this file and enter a list of userid's.  There should be only one userid per line with no leading or trailing spaces.  After you are satisified with the license manager file, you should set the .license.slk file to read only ("chmod w .license.slk").

UNIX: "Why can't I start the editor as both root and user?"

Set the VSLICKLICENSEONDISPLAY environment variable to 1.  This will configure the license manager to store your DISPLAY location instead of your userid.

"User XXX is not authorized to run Visual SlickEdit?"

This means that this user has not be added to the fixed set of users licensed to run Visual SlickEdit.  See "Licensing a Fixed Set of Users".


Miscellaneous dialog boxes


Check In Dialog Box

("Tools...", "Version Control...", "Check In" or vccheckin command)

Select the files in the list that you wish to check in.  You can select multiple files by using Ctrl+Click, or Shift+Click.

Workspace

When checked, all the files that are in the current workspace are listed.

Project

When checked, all the files that in the current project are listed.

Buffers

When checked, all the files that in the currently open in the editor are listed.

Available

When checked, all the files that are available for checkin are listed.  This option is only available for SCC version control systems.

Save if modified

When checked, any files that are modified are saved before check in operation.

Advanced...

Shows the version control system's checkin options dialog.  This option is only available for SCC version control systems that support it.


Check Out Dialog Box

("Tools...", "Version Control...", "Check Out" or vccheckout command)

Select the files in the list that you wish to check out.  You can select multiple files by using Ctrl+Click, or Shift+Click.

Workspace

When checked, all the files that are in the current workspace are listed.

Project

When checked, all the files that in the current project are listed.

Buffers

When checked, all the files that in the currently open in the editor are listed.

Available

When checked, all the files that are available for checkout are listed. This option is available only for SCC version control systems.

Advanced...

Shows the version control system's checkout options dialog.  This option is only available for SCC version control systems that support it.


Get Dialog Box

("Tools...", "Version Control...", "Get" or vcgetcommand)

Select the files in the list that you wish to get.  You can select multiple files by using Ctrl+Click, or Shift+Click.

Workspace

When checked, all the files that are in the current workspace are listed.

Project

When checked, all the files that in the current project are listed.

Buffers

When checked, all the files that in the currently open in the editor are listed.

Available

When checked, all the files that are available for get are listed. This option is available only for SCC version control systems.

Advanced...

Shows the version control system's get options dialog.  This option is only available for SCC version control systems that support it.


Unlock Dialog Box

("Tools...", "Version Control...", "Unlock" or vcunlock command)

Select the files in the list that you wish to unlock.  You can select multiple files by using Ctrl+Click, or Shift+Click.

Workspace

When checked, all the files that are in the current workspace are listed.

Project

When checked, all the files that are in the current project are listed.

Buffers

When checked, all the files that are in the currently open in the editor are listed.

Available

When checked, all the files that are available to be unlocked are listed. This option is available only for SCC version control systems.

Advanced...

Shows the version control system's unlock options dialog.  This option is only available for SCC version control systems that support it.


Add Dialog Box

("Tools...", "Version Control...", "Add" or vcadd command)

Select the files in the list that you wish to add.  You can select multiple files by using Ctrl+Click, or Shift+Click.

Workspace

When checked, all the files that are in the current workspace are listed.

Project

When checked, all the files that are in the current project are listed.

Buffers

When checked, all the files that are in the currently open in the editor are listed.

Save if modified

When checked, any files that are modified are saved before add in operation.

Browse...

Brings up an open file dialog box, and allows you to add other files to the list so you may select them, and then add them to version control.

Advanced...

Shows the version control system's add options dialog.  This option is only available for SCC version control systems that support it.


Remove Dialog Box

("Tools...", "Version Control...", "Remove" or vcremove command)

Select the files in the list that you wish to remove.  You can select multiple files by using Ctrl+Click, or Shift+Click.

Workspace

When checked, all the files that are in the current workspace are listed.

Project

When checked, all the files that are in the current project are listed.

Buffers

When checked, all the files that are in the currently open in the editor are listed.

Available

When checked, all the files that are available to be removed are listed. This option is available only for SCC version control systems.

Advanced...

Shows the version control system's remove options dialog.  This option is only available for SCC version control systems that support it.


Tagging Options dialog box

("Tools", "Configuration", "Tagging Options...")

Note: The Virtual Memory Tab ("Tools", "Configuration", "General...", select Virtual Memory Tab) allows you to specify a tag file cache size.  If you have a lot of memory and you have large tag files, you can improve tagging performance by increasing the tag file cache size.

Tag file on save

When on, files are retagged when you save a modified file.

Background tag buffers

When on, buffers are retagged in the background if they have been modified.

Start tagging after seconds idle

Retagging of buffers (opened files) starts after the user has not touched the keyboard or the mouse for this number of idle seconds.

Find references incrementally (faster)

When off, all files with potential references are searched and analyzed so that the files which do not any references are removed.  When on, querying references will appear to be faster since analysis stops when a file is found containing a valid occurrence.  However, you may see files which do not have any references to the symbol you are looking for listed in the References tab of the output toolbar.

Update references and call tree on single click

When on and a you single click on a new symbol in the Class Browser or the Procs tab, the References tab or Call Tree is updated.  This is off by default because it can cause problems with double click.

Background tag files

Turn on this option if you want your tag files updated when another application modifies a file.  This option is off by default because it requires Visual SlickEdit to constantly perform disk I/O to check dates of files on disk.  You must turn off the "Project tag files only" check box if you want global tag files updated.

Start tagging after minutes idle

Retagging of files on disk starts after the user has not touched the keyboard or the mouse for this number of idle minutes.

Maximum number of files to retag

Maximum number of files to consider

When background retagging of files starts, you can not use the editor until it is done with amount of processing specified by the "Maximum number of files to consider" or the "Maximum number of files to retag".  The "Maximum number of files to consider" specifies the number of files dates to compare.  Specifying smaller maximum values means you will be able to regain access to the editor quicker and retagging will be slower.  Specifying larger maximum values means it will take longer to regain access to the editor and retagging will be quicker.

IMPORTANT:  We do not recommend you run a second copy of the editor to perform tag file updating because it will cause tag file access problems.  Under UNIX the editor will crash if multiple editors are updating the same tag files.

Project tag files only

When on, only project tag files are retagged.  If you want global tag files updated, turn this option off.

C Preprocessing

Displays C/C++ Preprocessing dialog box.  Use this dialog to modify preprocessing so that our tagging can better analyze your code.


Version Control Setup Dialog Box

("Tools", "Version Control", "Setup...")

This dialog box allows you to modify the command strings for a specific version control system.  Command strings are stored in the file "vcsystem.slk" (UNIX: "uvcsys.slk"), and "uservc.slk" and are the same for all Visual SlickEdit projects which use the version control system selected.

Command line systems

This is a list of command line version control systems that Visual SlickEdit has built-in support for.  To select a version control system, first check the "Command line systems" checkbox, and select the system.  To change the individual commands that will be run, click on the "Setup..." button to bring up the Version Control Command Setup Dialog Box.  You may need to fill in the VCS Project textbox depending on your advanced version control setup.

To add a new command line version control system, click the "Add" button, and fill in a name for the new version control system when prompted.  The Version Control Command Setup Dialog Box will be launched.

'

SCC Providers

This is a list of SCC version control systems that are registered.

What is SCC?

SCC is the Source Code Control interface specification, originally designed by Microsoft.  This interface allows for direct communication between a version control system, and another application(in this case, Visual SlickEdit).  If you are using a system that supports SCC, we suggest you use the SCC support, as it provides tighter integration.  If your system does not have an SCC interface installed, we suggest you contact the manufacturer to be sure that an SCC interface is not available.  If your version control system has an SCC interface, but does not seem to behave properly, please contact our techincal support.  Because many providers implemented their SCC support differently, we occasionally run into a system that does not work.  We will do our best to support all version control systems.

Note: We are currently removing SourceOffsite from our SCC Provider list, with permission of the vendor.  This is because they are currently focusing their efforts on supporting Visual Studio products, and the support that is there could potentially crash Visual SlickEdit.

Opening an SCC Version Control System Project

To open an SCC version control project, go to the Version Control Setup dialog ("Tools", "Version Control", "Setup..").  Be sure that "SCC providers" is checked.  Select the desired system, and click "Initialize Provider".  Next, click "Open Project".  This will show an Open Project dialog that will vary from system to system.  Here are some pointers for the systems where the desired items are not obvious:

•	Source Integrity: For "SI Project Filename", give the whole path to the "project.pj" file, for "Sandbox Path", give the path where the files are located on the local machine.

•	Perforce: For "Client Name", give the name of the Perforce depot(for example, "//depot").  For "Local Path", give the path where the files are located on the local machine.

•	StarTeam: For "StarTeam Project Name", type the name of the StarTeam project. For "Local Path", give the path where the files are located on the local machine.  You will then be prompted for more information by StarTeam.

Once you have opened an SCC version control project, it will be bound to the currently active Visual SlickEdit project.  When you restart Visual SlickEdit, or switch to this project from another project, this  version control project will automatically be activated.

Auto check-out on edit

When checked, Visual SlickEdit will automatically prompt you to check out a file when you open a file that does not exist or is read only.  This option is global and not local to the current project.

Set files to read only on check In

When checked, after a file is checked in, the buffer in memory is set to read only mode if the file is read only.  This option is global and not local to the current project.


Version Control Command Setup Dialog Box

The Version Control Command Setup dialog box is accessed by pressing the "Setup..." button on the Version Control Setup dialog box.

VC Command

This is a list of commands that can be run from the editor.

Command

This is the command that is run by the operating system when the corresponding version control command is run from Visual SlickEdit.  Click on the arrow to the right of the textbox for a list of variable to be parsed in.


Version Control Advanced Setup Dialog Box

The Version Control Advanced Setup dialog box is accessed by pressing the "Advanced..." button on the Version Control Command Setup dialog box.

Capture errors from stdout and stderr

What you want for most command line version control systems. Displays output from version control system if the return code from the version control executable is non-zero.

Capture errors from stdout

Capture errors from stdout only.  The only system we are sure this works for is TLIB.  Displays output from version control system if the return code from the version control executable is non-zero.

Retrieve errors from file

This option is for the command line verison of Source Safe.  Opens the error file, and searches for "exit code:".  The error filename used is the default filename we use to direct errors into, and can be specified in the command line as %t.  Displays output from version control system if the value after the colon is non-zero.

Simulate return code

Searches for "Error: " or "Warning:. ". Displays output from version control system if either are found.

Write comment file

Write comment to the a temp file, the name of which can be parsed into the command line by putting in a %c.  If this is off, and a %c is in the command line, the comment can only be one line, and %c will be replace with the comment itself.

UNIX comment file

Write comment file with UNIX end of line characters.

Run 'dosrc' to get error code

This should usually be on for Windows.

Add *.??v to File Type List

Turn this option on for PVCS.

Require VCS Project box to be filled in

Requires the "VCS Project" text box on the Version Control Setup dialog to be filled in.

Always show output

Show output from version control system regardless of return code.

CD to file's directory before running VCS command

Temporarily change the current directory to the path of the file being operated on while running the VCS command.  The directory is changed back after the command is run.

CD to this directory before running VCS command

Temporarily change the current directory to the path spedified in the "VCS Project" textbox on the Version Control Setup dialog while running the VCS command.  The directory is changed back after the command is run.

This directory contains the archive files

For command line versions of RCS, specify the directory that has the archive files for the "VCS Project" textbox on the Version Control Setup dialog.

Source Safe Tree Style

Use this style to map Source Safe projects to your actual disk hierarchy.

In the "VCS Project" textbox on the Version Control Setup dialog, enter the Source Safe project name in square brackets followed by the root directory for files in the project.  For example,

[ $/vslick15 ] c:\vslick15

When using the this style, Visual SlickEdit will attempt to make the Source Project tree look like your directory tree.  If the name of the file you check in/out is "c:\vslick15\clib\test.c", this file will placed in the project "$/vslick15/clib/test.c".  Only files at or below c:\vslick15 directory may be check in/out.

Source Safe One Dir

When using this style, all source files are checked into or out of the Source Safe project directory specified in square brackets.  Enter the project name in square brackets in the "VCS Project" textbox on the Version Control Setup dialog.  For example:

[ $/vslick15 ]

Source Safe Locate File

When using this file, the "VCS Project" textbox may be blank. (even if the vcp_required style is present).  However, a Source Safe base project directory may be specified in square brackets.  When using this style, the Source Safe project is dynamically determined by using Source Safe's "locate" command.  If the file exists in the base project (VCS Project not blank), only projects at or below this project are used. This mode of operation is slower than sstree and ssonedir because it requires the locate command to execute for each file.

Note:  If  you are using Source Safe for Windows, please use the SCC interface.


Terminology

Throughout this manual, we show you how to get to a command like this ("Search", "Find").  This means you activate the menu bar (Alt), select the "Search" menu bar word, and select the "Find" menu item.   Here are the definitions of some words that you may not be familiar with:

buffer	We use the term buffer to mean a file that has been loaded into Visual SlickEdit.  Once a file has been loaded, you can safely perform modifications to the buffer without modifying the file on disk until you save the buffer.

edit window	A rectangular viewing area used to display and edit buffers.

window	A rectangular viewing area.  We also use this term in the more advanced sections of this manual to refer to the operating system resource known as a window.  Do not confuse this term with the Microsoft Windows operating system.

selection	A highlighted region of text which is typically operated by a command which affects only the region.  In the Dialog editor, your selection is indicated by 8 square handles which surround the control.

clipboard	A temporary storage area we use to transfer text or dialog box controls from one place to another.  Since the Microsoft Windows operating system does not have adequate multiple clipboard support, Visual SlickEdit stores multiple text clipboards internally.


Spell Check Files dialog box

("Tools", "Spell Check", "Check Files...")

This dialog always does a language sensitive spell check.  For HTML, markup that is not literal text is ignored.  For source languages where color coding is provided, only comments and strings are spell checked.

Files

Enter one or more files separated by spaces.  Wildcards like *.html or *.c may be given.

Recurse subdirectories

When on, wildcard file specifications in the Files text box will process subdirectories recursively.

Include project files

When on, all project files are spell checked.


Base Classes dialog box

Click on a class in the class tree to see the members of the class.

Double click or press space bar on an item in either tree list to go to an item.   Double click and space bar are the same except then when the item is a prototype and the prototype has a corresponding code section.  Double clicking will go to the code section when the item is a prototype which has a corresponding code section.


Symbol Uses/Calling tree dialog box

Right-click in the uses tree to display/modify the symbol filters.

Items in the tree can be expanded to view uses recursively.

Double click or press space bar on an item in either tree list to go to an item.


Class Browser Filter Options dialog box

Public

When on, public members are displayed.

Protected

When on, protected members are displayed.

Private

When on, private members are displayed.

Package

When on, package members are displayed.  Java members have package scope if they do not specify public, protected, or private.  This features effects Java source only.

Inherited

When on, only inherited members that this class can access are displayed.  When off, only members of this class are displayed.  When set to don't care, both members of this class and all members that this class can access are displayed.

Preprocessed

When on, only members expanded by preprocessing displayed.  This is specifically useful for MFC classes.  When off, only non-preprocess members displayed.  When set to don't care, all members displayed.

Template

When on, only template classes are displayed.  When off, only non-template classes are displayed.  This feature effects C++ source only.

Const

When on, only methods which don't modify members ("method1() const") are displayed..  When off, only methods which modify members are displayed.  This feature effects C++ source only.  Use the "Arguments..." menu item (right click in Class Browser window) to view other const information for declarations like "int const * const *pcpcvariable";

Final

When on, only final members are displayed. When off, only non-final members are displayed.  This feature effects Java source only.

Volatile

When on, only volatile method members ("method1() volatile") are displayed.  When off, only non-volatile members are displayed.

Synchronized

When on, only synchronized members are displayed.  When off, only synchronized members are displayed. This feature effects Java source only.

Inline

When on, only inline member functions or member functions which have code in the class definition are displayed.  When off only non-inline member functions or member functions which only have a prototype in the class definition are displayed.  Use don't care for languages other than C++.

Extern

When on, only identifiers defined explicitely using the extern keyword are displayed.  When off only identifiers defined which do not explicitely use the extern keyword are displayed.  Use don't care for languages other than C++.

Anonymous

When on, only class names which we automatically generated by our tagging system are displayed.  When off only explicitely named classes are displayed.  Use don't care for languages other than C++.

Inline

When on, inline functions or methods are displayed. Use don't care for languages other than C++.

Constructors

When on, constructors are displayed.

Operators

When on, methods which are operators are displayed.

Abstract

When on, only abstract methods are displayed.  When off, only non-abstract methods are displayed.  For C++ we consider an method to be abstract if it is virtual and has "=0" at the end of the prototype.

Virtual

When on, only virtual methods are displayed.  When off, only non-virtual methods are displayed.  We do not mark Java methods as "Virtual" event though all Java methods are implicitely virtual.  For delphi, dynamic and virtual methods are marked as "Virtual".

Static (class methods)

When on, only static methods are displayed.  When off, only non-static methods are displayed.

Native

When on, only methods explicitely defined with the native keyword displayed.  When off, only non-native methods are displayed.  Use don't care for languages other than Java.

Show data only

When on, only data members are displayed.  When off, only methods are displayed.

Static (class data)

When on, only static data members are displayed.  When off, only non-static data members are displayed.

Transient

When on, only transient data members are displayed.  When off, only non-transient data members are displayed. This feature effects Java source only.

Class

When on, the class filter is displayed on the Class Browser Tab.

Member

When on, the member filter is displayed on the Class Browser Tab.


Comment Setup dialog box

("Document", "Comment Setup...")

Comment with border

These characters specify the sides and corners used to draw a comment box.

First line is top

When checked, the top side character is ignored and the first line of the selection is used as the top side.

Last line is bottom

When checked, the bottom side character is ignored and the first line of the selection is used as the bottom side.

Comment without border

These characters specify the text to insert at the left and right to create a line comment.

Start in column

Specifies which column to start the comment in for a line selection..  This is useful for column oriented languages like COBOL.


Select Mode dialog box

("Document", "Select Mode...", "Check Files...")

This list all editing modes you have and lets you choose one.  Typically the editing mode is automatically chosen by the extension.  However, you may have a file with a non-standard extension or no extension at all and want to force the editor into a mode.

Making a New Extension Refer to the Same Support as Another

If you have an extension which you want to always use the same mode and support as another extension, perform the following steps:

•	Bring up the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...).

•	Click the "New..." button and type the new extension and press Enter.

•	Click the "Refer to..." button and enter the extension you want you new extension to refer to.

To change or create modes, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").


Add FTP Profile General Tab

Profile name

Name displayed in connection combo box.

Host name

Host name of FTP server.

Host type

If your file listing is blank after connecting, then you should choose the host type from the list.  Otherwise, leave it set to Auto.

User ID

Logon user ID.

Password

Logon password

Anonymous login

Specifies whether your FTP login uses the "anonymous" user ID.

Save password

Specifies whether to save your password, so you don't have to type it in each time you login

Transfer type

Specifies how files should be transferred by default.  Specify ASCII if you want line breaks translated.  Otherwise, specify binary.  We default to binary because Visual SlickEdit supports all ASCII formats without translation.

Initial directory

Specifies the initial remote and local directories after login. The local directory only applies to the FTP Client toolbar.

Filters

Specifies the initial remote and local file filters after login. The local file filter only applies to the FTP Client toolbar.


Add FTP Profile Advanced Tab

Timeout

Specifies how long Visual SlickEdit waits for a reply from the FTP server.

Port

FTP port.  By default, this is 21.

Keep alive

Keeps a connection alive even when idle.

Resolve links

Resolves symbolic links on the remote host.

Auto refresh

Determines whether the host directory listing is updated after an operation.  Turn this off if your host is slow.  Use the context menu (right mouse button) to temporarily turn "Auto refresh" on/off or force the directory list to be updated.

Use firewall/proxy

This is disabled until you use the FTP Options dialog ("File", "FTP", "Options...") to setup and enable a firewall.

Upload filename case

Indicates what file case should be used for the remote filename based on the local filename.

Remote to local directory mapping

This specifies how a remote path maps to a local path and vice versa.  For example, if "Remote root" is "/usr/ftp/www-slickedit " and "local root" is "c:\web\slickedit\", then the remote path "/usr/ftp/www-slickedit/products/index.html" is mapped to the local path "c:\web\slickedit\products\index.html".  This option only affects the FTP open tab on the Project toolbar.


FTP Options General Tab

Anonymous email address

Default password used for anonymous logins.

Default local directory

Default used when adding a new connection profile.  Specifies the initial local directory after login. The local directory only applies to the FTP Client toolbar.

Do not upload

When on, saving an FTP file will not upload the file.  You can explicitly upload a file from the ("File", "FTP", "Upload") menu item at any time.

Prompt

When on, you are always prompted to upload when an FTP file is saved.  This allows you to specify ASCII or Binary transfer type.

Upload without prompting

When on, saving an FTP file will always upload the file.  The same transfer type you used to open the file is used to upload the file.

Resolve links

Default used when adding a new connection profile. Resolves symbolic links on the remote host.


FTP Options Advanced Tab

Timeout (sec)

Default used when adding a new connection profile.  Specifies how long Visual SlickEdit waits for a reply from the FTP server.

Port

Default used when adding a new connection profile.  FTP port.  By default, this is 21.

Keep alive

Default used when adding a new connection profile.  Keeps a connection alive even when idle.

Upload filename case

Default used when adding a new connection profile.  Indicates what file case should be used for the remote filename based on the local filename.


FTP Options Firewall/Proxy Tab

Enable firwall/proxy

When on, indicates you have a firewall or proxy.  You need to turn this on in order to add a connection profile which uses a firewall.

Host name

Host name of your firewall.

Port

Port number of your firewall.

User ID

User ID used when logging into your firewall.

Password

Password used when logging into your firewall.

USER user@site

When on, host and port are required.  User id and password are ignored.  USER @remote_host is sent to the firewall when connecting.

USER user@site after logon

When on, host, port, user id, and password are required.  USER remote_userid@remote_host is sent to the firewall after logon.

OPEN site

When on, host and port are required.  User id and password are ignored.  OPEN remote_host is sent to the firewall when connecting.

Router

When on, host, port, user id, and password are ignored.  Router based firewalls are transparent with the exception that connections can only be established one way (out through the firewall).  Because incoming connections are not allowed, PASV is turned on automatically.

Passive transfers (PASV)

When on, transfers are initiated by Visual SlickEdit.


Project Toolbar

This toolbar is docked on the left by default.  To make this toolbar visible, invoke the menu item ("View", "Toolbars..."), select the Project toolbar, and turn on the "Visible" check box.

Files Tab

Views your workspace projects and files.  Allows you to build any project, compile a project file, and open files from your project.  Right click in the Tree control to display a menu of options.

Procs Tab

Lists the symbols in the current edit window.  Double click on a symbol to go to the definition of the symbol.  You can get help on a bitmap by moving the mouse over the bitmap.  Right click in the Tree control to display a menu of options.

Classes Tab

This tab is our class brower.  The class browser views symbols for all files in your current workspace and other tag files.  It allows you to search for symbols, view references to a symbol, view base classes and more.  You can get help on a bitmap by moving the mouse over the bitmap.  See help on Class Browser for more information.

Open Tab

Allows you to open local files and perform a few other operation on your local files.  Right click in the Files list box to display a menu of options.

FTP Tab

Allows you to open FTP files and perform a few other operations on your FTP files.  Right click in the list box to display a menu of options.


Output Toolbar

This toolbar is docked on the bottom by default.  To make this toolbar visible, invoke the menu item ("View", "Toolbars..."), select the Output toolbar, and turn on the "Visible" check box.

Search Tab

When the Find dialog box is used to perform a multi-file search or "List all occurrences" is checked, the occurrences are listed in the Search Tab.

Symbols Tab

Displays symbol definitions for the word at the cursor in the current file.  Enter a symbol in the combo box to see definitions for a specific symbol.

References Tab

Lists references for a symbol.  Select a reference to see the source for the reference in the editor control to the right of the Tree control.  There a three ways to query references for symbol.  You can use the class browser located on the Classes Tab of the Project toolbar (docked on the left by default), right click with the mouse on a symbol, and select "References".  You can right click with the mouse on a symbol in an editor window and select "References".  You can also fill in the combo box and press ENTER to view references.  This last method requires a workspace to be open.

Build Tab

Displays output from a build, compile, or any other Build menu command which sends output to the concurrent process buffer.  Double click on an error message to navigate to the error.

Output Tab

Displays output from some version control systems.  In the future, we plan to use this tab for other miscellaneous output.


Project Files Tab

("Project", "Project Properties...", select Files Tab)

Use this dialog to add files to a project or click on the "Edit Settings..." button to access compile/build commands and other project settings.

The top portion of the project Files Tab operates very similarly to the Standard Open dialog box.  Use Ctrl+Click to select more than one file in the File List box and the press the Add button to add the selected files into the Source Files for Project list box.  See Projects for more information.

Add All

Adds all files listed in the File List box to the project.

Add

Adds selected files in the File List box to the project.

Add Tree...

Prompts for one or more wildcard file specifications and searches though a directory tree adding the files found to the project.

Invert

(below the line separator) Inverts the selected items in the Source Files for Project list box.

Remove

Removes selected items in the Source Files for Project list box.

Remove All

Removes all files listed in the Source Files for Project list box.

Makefile...

Windows only:  Allows you to associate a makefile or VC 5.0 project file to a Visual SlickEdit project.  Once the association is made, updating the files in the makefile or VC 5.0 project file also update the files in your Visual SlickEdit project.   Alternately, you can have Visual SlickEdit copy (import) the files from a makefile.


Makefile Association dialog box

("Project", "Project Properties...", Files Tab)

Currently this dialog box only supports Microsoft VC++ 4.x makefiles, Microsoft VC++ 5.0 project files (*.dsp), and Borland C++ makefiles.

Associate...

Allows you to associate a makefile or VC++ 5.0 project file to a Visual SlickEdit project.  Once the association is made, updating the files in the makefile or VC++ 5.0 project file also updates the files in your Visual SlickEdit project.

Note:  For VC++ you need to close the workspace either by using the "Close Workspace..." menu item on the File menu or by closing VC++ in order to see your new project file changes in Visual SlickEdit.

For Borland C++ you need to use the "Generate Makefile" menu item in order to see your new project file changes in Visual SlickEdit.

Add Files...

Copies (imports) files from a VC++ 4.x makefile, VC 5.0 project file (*.dsp), or Borland C++ makefile you specify into your Visual SlickEdit project.


Project Filters Tab

("Project", "Project Properties...", select Filters Tab)

The Project Toolbar displays your project source files in categories.  This tab lets you create your file groupings.

To add a new grouping, click on the New button, enter the new filter name, and press the OK button.  Then fill in the patterns you want in the "Pattern:" box.  Separate multiple patterns with a semicolon.  Currently each "Pattern" must be of the form "[prefix]*[suffix].<extension>" (prefix and suffix may be blank) or must be "*.*".

Example patterns

bt*.c

*.pic

bt*file.c

Double click on an existing filter or pattern to copy out the current value.  This allows you to easily change an existing list of patterns.

Application

Specifies the macro or external program and any arguments used to open/edit the file.  When no program is specified, Visual SlickEdit edits the file.  Place double quotes around executable filenames with spaces.  For example, "pbrush %f" runs the Paint Brush with the filename as an argument.

Use file association

Windows only:  When checked, double clicking on files matching this filter in the Project Files Tab runs the associated application.  For example, "*.bmp" usually runs Paint Brush.


Quick Open dialog box

("File", "Open..." or gui_open command)

Opens a file for editing.  Enter the file name in the text box displayed below the retrieval list box.  One or more file names may be entered separated by spaces.  Places file names which contain spaces in double quotes.  The completion keys '?' and space bar may be used to assist in enter in each file name.  Press up or down arrow when your cursor is in the file name text box to switch to the retrieval list box.

Start with file list

Check this box and press the OK button if you want the advanced Open dialog box to be displayed when you invoke the gui_open command ("File", "Open...").

Filelist

Press this button to display the advanced Open dialog box.


Explorer Open dialog box

("File", "Open..." or gui_open command)

The Open dialog box is always used instead of this dialog for non-windows platforms.  This dialog box is displayed to open existing files or open new files

The Open dialog box is faster than this dialog box.   To configure Visual SlickEdit to use the fast open dialog box, turn on the "Use Fast Open Dialog" check box ("Configuration", "General...", select General Tab).

Select multiple files with Ctrl+Click.  Press Ctrl+A to select all files.

File name

The name of the file you wish to edit is typed into the File name text box.   Press the OK button to open the selected files. This text box has the following additional feature:

•	Alias expansion.  Type the alias name and press Ctrl+Space to expand an alias (see ALIAS Facility).   Aliases save time typing in long path names and wasting time clicking through the Directories list box.

Files of type

This combo box lets you display files of particular extensions.   Select a different file filter from this combo's list box to change the file list.  The File Filters Tab ("Tools", "Configuration", "File Options...", Select Filters Tab) allows you to change the file specifications that appear in the "List Files of Type" combo box at the bottom left of the File Open and File Save As dialog boxes.  The first wildcard pattern(s) specified in the File Filters Tab is used to initialize the File Open dialog box.  Our default is to list all files.  You may want an initially smaller list which displays the source files you typically edit.

Open as read-only

When opening a file, check this box if you wish to open a file but do not want to accidentally modify the file.  Visual SlickEdit will automatically open files with the read only attribute set as read only, regardless of the settings of this check box.

Expand tabs

When this option is checked, tabs found in opened files are expanded to spaces in increments of 8.

Preload file

This check box is used to force Visual SlickEdit to read the entire contents of opened files into memory (may spill to disk), count the number of lines in the file, and truncate the file when an EOF character is found.

Binary

When on, makes it "safe" to edit binary files by overriding some file load and save options.   If you are using the default load and save options, you do not need to turn on this check box before editing a binary file.   WARNING: If you transferred your 1.x configuration to this version you need to turn on this check box.  See section Hex Editing for more information.

Change dir

(Not always present) Check this box if you want to allow the current directory to changed to the directory containing the files listed after you exit this dialog.  Use the General Configuration dialog box ("Tools", "Configuration", "General...", select General Tab) to set the default value of this check box.

ASCII file format

Visual SlickEdit, will automatically attempt to detect DOS, Macintosh, and UNIX ASCII file formats by checking the first 8096 bytes of the file.  If this logic is not working for a particular file you have, you will want to force Visual SlickEdit to read the file in a specific format.  Select DOS, MAC, or UNIX radio button to force a particular ASCII file format.

Line separator char

This text box allows you to specify a decimal character which the editor will use as a single line separator character.

Record width

This text box allows you to specify a decimal line width.  Use this feature to open ASCII record files or binary files.


Open dialog box

("File", "Open..." or gui_open command)

Opens a file for editing.

Select multiple files with Ctrl+Click.

File name

The name of the file you wish to edit is typed into the File name combo box.   Press the OK button to open the file.  Use the Open button to open several files at once with a wildcard file specification such as "*.c".

The File name combo box as well as many other Visual SlickEdit combo boxes have the following powerful features:

•	Combo box retrieval.  Press Down arrow to retrieve the previous filename you entered here.  The combo box list (Alt+Down) displays all the previous filenames entered.  This retrieval information is saved across edit sessions.

•	Completion.  Press space bar to have Visual SlickEdit type the rest or more of the partial filename for you.  For example, type "c:\aut" and press space bar.  Visual SlickEdit will attempt to expand this to "c:\autoexec.bat" (or to "c:\autoexec." if you have a file like "c:\autoexec.bak").  Press '?' to list possible matches for what you have typed so far.  For example, if you type "a" and press '?', a list will be displayed of all files which start with the letter 'a'.

•	Alias expansion.  Type the alias name and press Ctrl+Space to expand an alias (see ALIAS Facility).   Aliases save time typing in long path names and wasting time clicking through the Directories list box.

•	Many keys from your emulation are supported here such as copy word to clipboard (Ctrl+K), cut line (Ctrl+Backspace), and cut word (Ctrl+Shift+K).

•	Multiple clipboards.  Press Ctrl+Shift+V to view a list of all your clipboards.

UNIX: You may embed "~" ,"~login name", or "$envvar" in your "File Name" specification just like you would at a UNIX shell prompt.

File list

The File List is located below the File Name combo box.  Click in this list box to change the file name displayed in the combo box.  Multiple files may be selected with Ctrl+Click.

List files of type

This combo box lets you display files of particular extensions.   Select a different file filter from this combo's list box to change the file list.  The File Filters Tab ("Tools", "Configuration", "File Options...", Select Filters Tab) allows you to change the file specifications that appear in the "List Files of Type" combo box at the bottom left of the File Open and File Save As dialog boxes.  The first wildcard pattern(s) specified in the File Filters Tab is used to initialize the File Open dialog box.  Our default is to list all files.  You may want an initially smaller list which displays the source files you typically edit.

Directories

Double click on files in this list box to change the directory.  The File List is updated.

Find file

This button displays the Find File dialog box used to scan subdirectories for wildcard filenames.  Files found may be opened.

Read only

When opening a file, check this box if you wish to open a file but do not want to accidentally modify the file.  Visual SlickEdit will automatically open files with the read only attribute set (UNIX: read only permissions) as read only, regardless of the settings of this check box.

UNIX: This check box is also present when saving a file.  It allows you to save a read only file as read only.

Change dir

(Not always present) Check this box if you want to allow the current directory to changed to the directory containing the files listed after you exit this dialog.  Use the General Configuration dialog box ("Tools", "Configuration", "General...", select General Tab) to set the default value of this check box.

Open

To open a wildcard file specification such as "*.c".  Type "*.c" in the File Name text box, and click on the Open button.

Invert

Click on the Invert button to select all files in the File List that are currently not selected and deselect all files which are selected.  The Invert button appears on other dialog boxes which have list boxes which support selection of multiple files with Ctrl+Click.  Since there are no files selected when the File Open dialog box initial appears, you can click on the Invert button followed by the OK button to open all files displayed in the File List.

Advanced >>

Expands the File Open dialog box to display additional less often used options.

You will notice that several check boxes initially appear grayed.  A grayed check box indicates that a default action will be performed.  Visual SlickEdit allows many load options to be based on the drive from which the file you open resides.  For more information, see Load Tab.

Expand tabs

When this option is checked, tabs found in opened files are expanded to spaces in increments of 8.

Preload

This check box is used to force Visual SlickEdit to read the entire contents of opened files into memory (may spill to disk), count the number of lines in the file, and truncate the file when an EOF character is found.

Binary

When on, makes it "safe" to edit binary files by overriding some file load and save options.   If you are using the default load and save options, you do not need to turn on this check box before editing a binary file.   WARNING: If you transferred your 1.x configuration to this version you need to turn on this check box.  See section Hex Editing for more information.

ASCII file format

Visual SlickEdit, will automatically attempt to detect DOS, Macintosh, and UNIX ASCII file formats by checking the first 8096 bytes of the file.  If this logic is not working for a particular file you have, you will want to force Visual SlickEdit to read the file in a specific format.  Select DOS, MAC, or UNIX radio button to force a particular ASCII file format.

Line separator char

This text box allows you to specify a decimal character which the editor will use as a single line separator character.

Record width

This text box allows you to specify a decimal line width.  Use this feature to open ASCII record files or binary files.


QBasic Options dialog box

("Tools", "Configuration", "File Extension Setup", select bas extension, press Options button)

Changes smart indenting and template editing style for the QBasic language.

Keyword case

Specifies the case of keywords used by template editing.

Minimum expandable keyword length

When template editing is on and you press space bar after a word, a template may be inserted.  If you typically type in a space after variable names, you may want this value to be greater than 1.  Alternately, you can bind the qbasic_space command to a key other than space bar.

Indent amount for first level of code

Specifies the amount of indenting that should be used after delarations such as functions.


Enumerate dialog box

("Edit", "Tools", "Enumerate..." or gui_enumerate command)

Also see enumerate command.

Start

C syntax expression which evaluates to the number used for first line of selection.  However, when the "Hexadecimal flags" output style is selected, the start must be an integer bit position or the first hexadecimal number to start with.

Increment

C syntax expression which evaluates to the amount to increment for each line in the selection.  However, when the "Hexadecimal flags" output style is selected, this specifies the number of bit positions to increment by.

Pad to number of digits

Specifies the digit width for each number.  Number is padded to at least this number of digits by adding leading 0's.

Output

Both the "Hexadecimal" and "Hexadecimal flags" option specify hexadecimal syntax output based on the buffers extension.  We determine the hexadecimal syntax based on the color coding which supports 0xhhhh (C syntax), &Hdddd (Basic), hhhhH (Intel assembler), and $hhhh (Motorola assembler).   If the buffer's extension, has no color coding, the hex numbers are prefixed with "0x".


HTML Beautify dialog box

("Tools", "Beautify Source..." or gui_beautify command)

Also see h_beautify or h_beautify_selection command.

Call or Email us about enhancements or changes you would like to see in our beautifier.  We want to hear your comments.

General Tab

Tags Tab

Attributes/Values Tab

Special Tab

Schemes Tab

Restrict to selection

When on, only lines in the selection are beautified.

Sync extension options

When on, the extension options are updated to reflect any changes that these dialogs have in common.

Beautify

Beautifies current selection or buffer and closes the dialog box.

Reset

Restores the dialog box settings to the values that appeared when you invoked the dialog.

Save Settings

Saves beautify options in "uformat.ini" file.  These settings are used by the h_beautify command.


HTML General Tab

Indent with tabs

When on, tab characters are used for leading indent of lines.  This value defaults to the "Indent with Tabs" text box in the Extension Options dialog box.

Indent for each level (Syntax indent)

The amount to indent for each new nesting level of tags.  We have put the words "Syntax Indent" in parenthesis to help indicate that this field has the same meaning as the "Syntax Indent" text box in the Extension Options

dialog box.  By default, we initialize this text box with your current Extension Setup setting.

Tab size

Specifies output tab size.  The output tab size is only used if the "Indent with Tabs" check box is on.  This value defaults to the "Syntax Indent" text box in the Extension Options dialog box.

Original tab size

Specifies what the original file's tab expansion size was.  We need to know the tab expansion size of your original file to handle reusing indent amounts from your original file.  Currently the beautifier only reuses the original

source files indenting for comments.  This option has no effect if the original file has no tab characters.

Max line length

Specifies the maximum length a line can be before it is wrapped to a new line. This max line length is relative to the current indent level.  For example, if you were inside a <TD> block which was at an indent level of 30, and your

max line length was set to 80, then that line would not be wrapped until it reached a total length of 30+80=110 characters.  Set this value to 0 if you want your line breaks preserved.

Indent stand alone comments

When on, indicates whether comments which appear on lines by themselves with no content to the left are indented to the current content indent level.

Example of stand alone comments

<!-- stand alone

     comment

-->

Indent column 1 comments

Normally comments that start in column 1 are left alone.  Turn this on if you want the indent for these comments to be adjusted as well.

Specific column

This text box specifies the column that "trailing comments" should be placed at.  By trailing comments we mean comments which appear at the end of lines which contain tags.

Example of trailing comments

<TD>   <!-- trailing comment -->

Original absolute column

When on, "trailing comments" are placed at the same column as the original source file.  By trailing comments we mean comments which appear at the end of lines which contain tags.

Original relative column

When on, "trailing comments" are indented by reusing the indent after the last character of the end of the statement or declaration of the original source file.  By trailing comments we mean comments which appear at the end

of lines which contain tags

Original content

<TR>

<TD><four characters><!-- trailing comment -->

</TD>

</TR>

Resulting content

<TR>

  <TD><four characters><!-- trailing comment -->

  </TD>

</TR>

Define Comments

Display the "HTML Comments" dialog.  This dialog allows you to define what the beautifier recognizes as a comment.  The sequence "<!--","-->" is defined as the HTML comment by default.  If you delete all comment definitions then

all comments will be parsed as content and possibly word wrapped!


HTML Tags Tab

Tag case

Specifies how you want your tag names cased.  For example, if you choose UPPER, then <td> would be beautified to <TD>.

Content: Reformat

When off, all white space and line breaks are preserved.  However, tags are formatted (tag case, attribute case, etc.).

Content: Indent

When on, the selected tag's content, bounded by the opening and closing tag, will be indented 1 syntax indent level.

Content: Literal

When on, all white space and line breaks are preserved.  In addition, tags within the content are treated as literal text.  If Reformat is on, then leading indent is adjusted.

Examples

XMP	Literal

PRE	<all Content check boxes off>

BLOCKQUOTE	Reformat, Indent

STYLE	Reformat, Literal

End tag

When on, the selected tag has an end tag.  For example, the tag <TD> has a ending tag tag that is </TD>, so "End tag" would be checked in this case.

End tag required

When on, the selected tag's ending tag is required.  This means that the ending tag is not optional.  An example of a tag whose ending tag is optional is <P>.

Preserve tag body

When on, all properties of the body of the tag selected will be preserved.  This is especially useful for JSP/ASP tags where you do not want the embedded Java or VBScript inside the <% ... %> to be beautified.

Preserve tag position

When on, the position of the tag within the document is preserved.  This is especially useful with JSP/ASP tags where reindenting the tag would interupt the flow of the script code.

Line breaks:  Before open tag

Specify the number of line breaks before the opening tag.  For example, if you were to set the number of linebreaks before the opening tag to 3 for the <TD> tag, then the resulting content would look like:

Original content:

<TR>

<TD>

</TD>

</TR>

Resulting content:

<TR>

<TD>

</TD>

</TR>

Please note that the number of line breaks is not the same as the number of blank lines.  If you wanted 3 blank lines, then you would set the number of line breaks to 4.

Line breaks:  After close tag

Specify the number of line breaks after the closing tag.  For example, if you were to set the number of line breaks after the closing tag to 3 for the <TD> tag, then the resulting content would look like:

Original content:

<TR>

<TD>

</TD>

</TR>

Resulting content:

<TR>

<TD>

</TD>

</TR>

Please note that the number of line breaks is not the same as the number of blank lines.  If you wanted 3 blank lines, then you would set the number of line breaks to 4.

Stand-alone

When on, the selected tag will always have atleast 1 preceding and trailing line break on both its opening and ending tag when beautified.  You can specify that there be more than 1 line break by setting "Line breaks" for

the opening and closing tags.

Add

Display the "Add Tag" dialog.  This dialog allows you to add a tag definition to the list and specify how it will be beautified.

Remove

Used to remove the currently selected tag.


HTML Attributes/Values Tab

Attribute case

Specifies how you want attributes cased inside the body of a tag.  For example, if you choose UPPER, then <td align="right"> would be beautified to <td ALIGN="right">.

Word value case

Specifies how you want word values cased after the = of an attribute inside the body of a tag.  For example, if you choose UPPER, then <td align="right"> would be beautified to <td align=RIGHT>.

Hex value case

Specifies how you want hex values cased after the = of an attribute inside the body of a tag.  For example, if you choose UPPER, then <body bgcolor="#ffffff"> would be beautified to <body bgcolor="#FFFFFF">.

Quote word values

When on, word values are enclosed in double quotes after the = of an attribute inside the body of a tag.  For example, <td align=right> would be beautified to <td align="right">.

Quote number values

When on, number values are enclosed in double quotes after the = of an attribute inside the body of a tag.  For example, <td width=590> would be beautified to <td width="590">.


HTML Special Tab

End previous <P> tag when:  Hitting another <P> tag

When on, the beautifier will interpret a <P> tag as a signal of the end of any previous paragraphs.

End previous <P> tag when:  Hitting a standalone tag

When on, the beautifier will interpret a standalone tag as a signal of the end of any previous paragraphs.  For example, in the following content, the <TABLE> tag (assuming that the <TABLE> tag is a standalone tag) signals the

end of the previous <P> paragraph.  This has the benefit of cleaning up unwanted (and unexpected) indenting:

<P>

This is a paragraph of content.  The paragraph will be ended by the

start of the table below it.

<TABLE>

  <TR>

    <TD>a table cell</TD>

  </TR>

</TABLE>

Remove blank lines

When on, blank lines are deleted.

Beautify JavaScript

When on, embedded JavaScript is beautified according to your JavaScript beautifier settings.

Edit JavaScript Settings

Click on this button to configure JavaScript beautifier settings.


HTML Schemes Tab

To define a new scheme, set the various beautify options and press the "Save Scheme..."button.  User defined schemes are stored in "uformat.ini".


C/C++/Java Beautify dialog box

("Tools", "Beautify Source..." or gui_beautify command)

Also see c_beautify or c_beautify_selection command.

Thank you for your beautifier comments.  We have implemented several of them. Call or Email us about enhancements or changes you would like to see in our beautifier.  We want to hear your comments.

Currently, this beautifier supports beautifying Slick-C source IF THE STATEMENTS ARE TERMINATED WITH SEMICOLONS like C.  In the future it is likely Slick-C will require semicolons and have a converter or a backward compatibility pragma.

Begin-End Style Tab

Indenting Tab

Comments Tab

Other Tab

Schemes Tab

Restrict to selection

When on, only lines in the selection are beautified.

Sync extension options

When on, the extension options are updated to reflect any changes that these dialogs have in common.  For example, changing the Begin-End Style to "Style 2" will update your brace style for syntax expansion.

Beautify

Beautifies current selection or buffer and closes the dialog box.

Reset

Restores the dialog box settings to the values that appeared when you invoked the dialog.

Save Settings

Saves beautify options in "uformat.ini" file.  These settings are used by the c_beautify command.


Begin-End Style Tab

Do not change brace style

Turn this check box on, if you don't want your brace style changed.  This is useful if you are using a brace

style we don't currently support.

No space before paren

Determines whether a space is placed between a keyword such as if, for, or while and the open paren.

"else on same line as "}"

When on, the beautifier will place "} else" on the same line.  This is typical when using brace style 1.

Example (Style 1 with else clause)

if (i<j) {

} else {

}

Apply to function braces

When on, the beautifier will apply your begin/end style to braces for function definition.


Indenting Tab

Indent with tabs

When on, tab characters are used for leading indent of lines.  This value defaults to the "Indent with Tabs" text box in the Extension Options dialog box.

Indent first level of code

We don't recommend you turn this off.  When on, the first level of code inside a function or method definition will not be indented.

Indent CASE from SWITCH

When on, case and default statements found inside switch statements are indented from the switch.

Indent for each level (Syntax indent)

The amount to indent for each new nesting level of code.  We have put the words "Syntax Indent" in parenthesis to help indicate that this field has the same meaning as the "Syntax Indent" text box in the Extension Options dialog box.  By default, we initialize this text box with your current Extension Setup setting.

Tab size

Specifies output tab size.  The output tab size is only used if the "Indent with Tabs" check box is on.  This value defaults to the "Syntax Indent" text box in the Extension Options dialog box.

Original tab size

Specifies what the original file's tab expansion size was.  We need to know the tab expansion size of your original file to handle reusing indent amounts from your original file.  Currently the beautifier only reuses the original source files indenting for comments.  This option has no effect if the original file has no tab characters.

Continuation indent

Specifies how much to indent lines of statements which continue to the next line.  This has no effect on assignment statements or parenthesized expressions.  Lines which are a continuation of an assignment statement are indented after the first equal sign.  Lines which are a continuation of a parenthesized expression are indented after the open paren.

Example

unsigned

int i;

you would get

unsigned

<Continuation Indent>int i;

Align on parens

When on, the text for parenthesized expressions that spans multiple lines is aligned on the first non-blank after the paren or on the paren itself.

Align on equal

When on, the text for multi-line assignment is aligned on the first non-blank after the equals sign (=) or on the equal sign itself.


Comments Tab

Indent stand alone comments

Indicates whether comments which appear on lines by themselves with no statement text to the left are indented to the current statement indent level.

Example of stand alone comments

/* stand alone

   comment

*/

// another stand alone comment

i=1;   // trailing comment

Indent column 1 comments

Normally comments that start in column 1 are left alone.  Turn this on if you want the indent for these comments

to be adjusted as well.

Specific column

This text box specifies the column that "trailing comments" should be placed at.  By trailing comments we mean comments which appear at the end of lines which contain statements or declarations.

Example of trailing comments

/* stand alone

   comment

*/

// another stand alone comment

i=1;   // trailing comment

if (x) {    /*  trailing

                comment.

            */

}

Original absolute column

When on, "trailing comments" are placed at the same column as the original source file.  By trailing comments we mean comments which appear at the end of lines which contain statements or declarations.

Original relative column

When on, "trailing comments" are indented by reusing the indent after the last character of the end of the statement or declaration of the original source file.  By trailing comments we mean comments which appear at the end of lines which contain statements or declarations.

Original code

if () {

i=1;<four characters>//trailing comment

i=4;<four characters>/* trailing

                        comment.

                     */

}

Resulting code

if () {

   i=1;<four characters>//trailing comment

   i=4;<four characters>/* trailing

       <four characters>   comment.

       <four characters>*/

}


Other Tab

Indent preprocessing

When on,  the indent before the "#" character of preprocessing is set to indicate the preprocessing nesting level.

Indent inside block

When on, preprocessing inside brace block is indented when inside preprocessing.  Otherwise, preprocessing within a brace block start in column 1.

Indent inside special #ifndef

Many C/C++ header files start with the lines:

#ifndef myheader_h

#define myheader_h

...

#endif

When on, preprocessing inside this special #ifndef case is indented.

Eat spaces after #

When on, the spaces after a preprocessor "#", but before the keyword (if, ifdef, else, elif, endif, etc.), are removed.  This is useful for fixing old C code where the "#" character had to start in column 1 and spaces were used after the "#" to indicate the nesting level.

Force parens on return

When on, paretheses are added to returns statements which do not have parentheses.

Pad condition

Indicates whether parethesized conditional expressions should have their spacing adjusted.


Schemes Tab

To define a new scheme, set the various beautify options and press the "Save Scheme..."button.  User defined schemes are stored in "uformat.ini".


Color Coding Search Options dialog box

This dialog allows you to check the syntax element type of the first character of the search string. For example, if you use printf or some other function to help debug your programs, then select "not Comment" and "not String".  Note that only the color coding for the first character is checked.  You need to combine word searching with "Keyword" color coding to search for the keyword "if". This feature is only supported for languages for which Visual SlickEdit has color coding elements defined.

Note:  Not all languages have all color coding elements defined.  For example, dBase and Pascal do not have preprocessing.  Only C++ and Java have function color defined.  Only HTML has Attributes (i.e.  <img src="..">).


Visual C++ Setup dialog box

("Tools", "Visual C++ Setup...")

Bring up Visual C++ on startup

When on, Visual SlickEdit will start Visual C++ when you invoke the editor.

Close Visual C++ on exit

When on, Visual SlickEdit will close Visual C++ when you exit the editor.

Put VSE! shortcut on Visual C++ menu

When on, Visual SlickEdit places a VSE! menu item on the Visual C++ menu bar.  When you click on the VSE! button, the current file is loaded into the editor.  The cursor location is transferred as well.

Save current file in Visual C++

When checked, the current file in Visual C++ is saved when Visual C++ loses focus.

Save all files in Visual C++

When checked, all files in Visual C++ is saved when Visual C++ loses focus.

Save nofiles in Visual C++

When checked, no files in Visual C++ is saved when Visual C++ loses focus.

Suppress Visual C++ reload prompt

When checked, the Visual C++ reload file prompt is not displayed when Visual C++ gets focus.

Save all files on loss focus

When checked, all files in Visual SlickEdit are saved when Visual SlickEdit loses focus.


API Apprentice Database Editor dialog box

("Help", "API Database Editor...")

Add

Adds a new function or method to the "Function Names" list box.

Delete

Deletes the selected function or method in the "Function Names" list box.

Edit Name

Changes the name of the selected function or method in the "Function Names" list box.

Test...

Displays API Apprentice Help for the selected function or method.

Type

Enter type name of current parameter (ex.  BOOL).  You may want to also include the parameter name here.  Our data bases don't currently show the parameter name here but it likely that we will add them.

Comment

Parameter declaration and comment text which is displayed in function/method header.  Use a "\t" in this string to separate parameter declaration from the comment (ex  BOOL bool;\t// When TRUE ...).

Initial value

The first line of this editor control is the default initial value when API Apprentice Help is displayed.  Only the first line in this editor control is used if the parameter control type is Text Box.

Parameter control type

Text Box.  Choose this control if there is only one default setting and you want the user to be able to create there own setting.

Combo Box.  Choose this control if there are several typical settings and you want the user to be able to create their own setting.

Check Boxes.  Choose this if there are predefined constants which must be ORed together.

Radio Buttons.  Choose this if the parameter can only be one of a predefined set of constants.

NOTE:  There are some cases where you may want to support flags (check boxes) but you still need to allow an optional user setting.  If there are only a few flags you can use a combo box to list all possible combinations of the flags.


3 Way Merge Setup dialog box

(Ctrl+= or "Tools", "File Merge...")

What do you need 3 Way Merge for?

Our 3 Way Merge is typically used after two people make a local copy of the same source file and make some modifications to their local copy.   The 3 Way Merge very cleverly takes both sets of changes and creates a new source file.   If there are any conflicts (because they edited the same area of code), a dialog box is displayed which lets you select whose change you want in the output file.  The output can be viewed side by side or interleaved.  The side by side output is more powerful because you can pick the change you want by clicking on a button.

Base file

Enter the file/buffer name of the original source file before either person made any changes here.

Revision 1

Enter the file/buffer name of one of the modified version of the "Base File".

Revision 2

Enter the file/buffer name of the other modified version of the "Base File".

Ouput file

Enter the output file name here.

Merge style

Auto merge	If a change does not cause a conflict, the change is automatically applied to the output file and no indication is made that the change was already applied. This option has the advantage that you don't have to use the next conflict button as much as the "Show Changes" option.

Force conflicts	Forces any change to be a conflict.  Use this option if you want carefully merge changes yourself.

Show changes	If a change does not cause a conflict, the change is automatically applied to the output file and the change is indicated so that the next conflict button will show you the change.

Output style

This has no effect if there are no conflicts.  The "Interactive" style provides a friendly dialog box which lets you pick the change you want in the output file.  It also lets you edit.  The "Interleaved Buffer" style creates an editor buffer which you must edit to resolve conflicts.

Use smart merge

Turn this check box on, if you want to reduce the number of conflicts found.

Ignore spaces

When on, leading and trailing spaces are ignored.


Save Multi-File Diff Ouput dialog box

Use this dialog to save a diff state file (.dif) which you can load later with the "Load..." button on the DIFFzilla(TM) dialog box.  This is especially useful when you have not completed merging files and you want to continue at a later time.  Alternately, you can use this dialog to generate a file list which optionally include different files, matching files, and files which don't exist in the other tree.  For example, suppose you wanted to email someone updated source code and/or binaries, but you didn't want to send all of it because it might be 10 megabytes of compressed data.  If you knew what files were changed you could just compress and send those files.  This is a job for DIFFzilla(TM).

•	Use the DIFFzilla(TM) dialog box to difference the new source tree with the original source tree.

•	Press the "Save..." button.

•	When the Multi-File Diff Output dialog box appears, turn on "Save Path 1 Filelist, "Include different files", and "Include files not in Path2".  All other check boxes should be off.

•	Click on the OK button and select an output file for your list.  Don't enter an extension on your output file.  ".lst" will be appended to your output filename.

•	Now you can use a program like PKZIP25 to zip up your files (ex. pkzip25 -path -add file.zip @file.lst).


Javadoc Beautify dialog box

Align parameter comments to longest parameter name

When checked, the parameters are aligned to the length of the longest parameter name.  If the parameter name length is less than the minimum length, the minimum length is used.  If the parameter length is longer than the maximum parameter length, the description for the parameter will start on the next line.

Align execption comments to longest exception name

When checked, the exceptions are aligned to the length of the longest exception name.  If the exception name length is less than the minimum length, the minimum length is used.  If the exception length is longer than the maximum exception length, the descript of the parameter will start on the next line.

Align return comments

Indicates whether @return comments should be aligned to the first line of comment text.  No alignment is performed if tags which are indent sensitive such as the <pre> tag are used.

Align deprecated comments

Indicates whether @return comments should be aligned to the first line of comment text.  No alignment is performed if tags which are indent sensitive such as the <pre> tag are used.

Add blank line after parameter comment

When checked, a blank line is added if a tag follows an @param tag.

Add blank line after return comment

When checked, a blank line is added if a tag follows the @return tag.

Add blank line after description

When checked, a blank line is added between the description and the first @ tag.  This option is ignored if the description contains a custome or unsupported @ tag.


Javadoc Editor dialog box

(right-click in edit window and select "Edit Javadoc Comments")

Use the Javadoc Editor to generate Javadoc syntax comments for Java, C, C++, JavaScript, and Slick-C.

To add a custom or unsupported tag, append the tag (with an @ prefix) and its description into the "Description text" editor control.  You can add @serial, @serialField, and @serialData fields this way.

Documentation for Javadoc Tags follows.  This information comes from SUN's Javadoc documentation.

@author

@deprecated

@exception

{@link}

@param

@return

@see

@serial

@serialData

@serialField

@since

@exception

@version

@author  name-text

Adds an "Author" entry with the specified name-text to the generated docs when the -author option is used. A doc comment may contain multiple @author tags. You can specify one name per @author tag or multiple names per tag. In the former case, Javadoc inserts a comma (,) and space between names. In the latter case, the entire text is simply copied to the generated document without being parsed. Therefore, use multiple names per line if you want a localized name separator other than comma.

Java Software additional guidelines:  If the author is unknown, use "unascribed" as the argument to @author

@deprecated  deprecated-text

Adds a comment indicating that this API should no longer be used (even though it may continue to work). Javadoc moves the deprecated-text ahead of the description, placing it in italics and preceding it with a bold warning: "Deprecated".

The first sentence of deprecated-text should at least tell the user when the API was deprecated and what to use as a replacement. Javadoc copies just the first sentence to the summary section and index. Subsequent sentences can also explain why it has been deprecated. You should include a {@link} tag (for Javadoc 1.2 or later) that points to the replacement API:

•	For Javadoc 1.2, use a {@link} tag. This creates the link in-line, where you want it. For example:

/**

 * @deprecated  As of JDK 1.1, replaced by {@link #setBounds(int,int,int,int)}

 */

•	For Javadoc 1.1, the standard format is to create a @see tag (which cannot be in-line) for each @deprecated tag.

{@link  name  label}

Inserts an in-line link that points to the specified name. This tag accepts exactly the same syntax for name and label as the @see tag, described below, but generates an in-line link rather than placing the link in the "See Also" section. This tag begins and ends with curly braces to separate it from the rest of the in-line text. If you need to use "}" inside the label, use the HTML entity notation &#125;

There is no limit to the number of {@link} tags allowed in a sentence. You can use this tag in the description part of a documentation comment or in the text portion of any tag (such as @deprecated, @return or @param).

For example, here is a comment that refers to the getComponentAt(int, int) method:

Use the {@link #getComponentAt(int, int) getComponentAt} method.

From this, the standard doclet would generate the following HTML (assuming it refers to another class in the same package):

Use the <a href="Component.html#getComponentAt(int, int)">getComponentAt</a> method.

Which appears on the web page as:

Use the getComponentAt method.

@param  parameter-name description

Adds a parameter to the "Parameters" section. The description may be continued on the next line.

@return  description

Adds a "Returns" section with the description text. This text should describe the return type and permissible range of values.

@see  reference

Adds a "See Also" heading with a link or text entry that points to reference. A doc comment may contain any number of @see tags, which are all grouped under the same heading. The @see tag has three variations; the third form below is the most common.

@see "string"     Note - This form is broken in JDK 1.2. It prints none of the quoted text.

Adds a text entry for string. No link is generated. The string is a book or other reference to information not available by URL. Javadoc distinguishes this from the previous cases by looking for a double-quote (") as the first character. For example:

@see "The Java Programming Language"

This generates text such as:

See Also:

"The Java Programming Language"

@see <a href="URL#value">label</a>

Adds a link as defined by URL#value. The URL#value is a relative or absolute URL. Javadoc distinguishes this from other cases by looking for a less-than symbol (<) as the first character. For example:

@see <a href="spec.html#section">Java Spec</a>

This generates a link such as:

See Also:

Java Spec

@see  package.class#member  label

Note:  When Visual SlickEdit displays a link this type of link, the name is not shorted like it is with the javadoc compiler.

Adds a link, with visible text label, that points to the documentation for the specified name in the Java Language. The label is optional; if omitted, the name appears instead as the visible text, embedded within <code> HTML tags. Use the label when you want the visible text to be abbreviated or different from the name.

•	package.class#member is any valid name in the Java Language -- the name of a package, class, interface, constructor, method or field -- except that you replace the dot ahead of the member name with a hash character (#). If this name is in the documented classes, Javadoc will automatically create a link to it. To create links to external referenced classes, use the -link option. Use either of the other two @see forms for referring to documentation of a name that does not belong to a referenced class.

•	label is optional text that is visible as the link's label. The label can contain whitespace. If label is omitted, then package.class.member will appear, suitably shortened relative to the current class and package

•	A space is the delimiter between package.class#member and label. A space inside parentheses does not indicate the start of a label, so spaces may be used between parameters in a method.

Example - In this example, the @see tag in the Character class refers to the equals method in the String class. The tag includes both arguments: the name "String#equals(Object)" and the label "equals".

 /**

  * @see String#equals(Object) equals

  */

The standard doclet produces HTML something like this:

<dl>

<dt><b>See Also:</b>

<dd><a href="../../java/lang/String#equals(java.lang.Object)">equals</a>

</dl>

Which looks something like this in a browser, where the label is the visible link text:

See Also:

equals

Specifying a name - This package.class#member name can be either fully-qualified, such as java.lang.String#toUpperCase() or not, such as String#toUpperCase() or #toUpperCase(). If less than fully-qualified, Javadoc uses the normal Java compiler search order to find it, further described below in Search order for @see. The name can contain whitespace within parentheses, such as between method arguments.

Of course the advantage to providing shorter, "partially-qualified" names is that they are less to type and less clutter in the source code. The following table shows the different forms of the name, where Class can be a class or interface, Type can be a class, interface, array, or primitive, and method can be a method or constructor.

Typical forms for @see package.class#member

Referencing a member of the current class

@see  #field

@see  #method(Type, Type,...)

@see  #method(Type argname, Type argname,...)

Referencing another class in the current or imported packages

@see  Class#field

@see  Class#method(Type, Type,...)

@see  Class#method(Type argname, Type argname,...)

@see  Class

Referencing another package (fully qualified)

@see  package.Class#field

@see  package.Class#method(Type, Type,...)

@see  package.Class#method(Type argname, Type argname,...)

@see  package.Class

@see  package

The following notes apply to the above table:

•	The first set of forms (with no class or package) will cause Javadoc to search only through the current class's hierarchy. It will find a member of the current class or interface, one of its superclasses or superinterfaces, or one of its enclosing classes or interfaces (search steps 1-3). It will not search the rest of the current package or other packages (search steps 4-5).

•	If any method or constructor is entered as a name with no parentheses, such as getValue, and if there is no field with the same name, Javadoc will correctly create a link to it, but will print a warning message reminding you to add the parentheses and arguments. If this method is overloaded, Javadoc will link to the first method its search encounters, which is unspecified.

•	Inner classes must be specified as outer.inner, not simply inner, for all forms.

•	As stated, the hash character (#), rather than a dot (.) separates a member from its class. This enables Javadoc to resolve ambiguities, since the dot also separates classes, inner classes, packages, and subpackages. The hash character is absolutely necessary in the forms above where it is the first character. However, in other forms, Javadoc is generally lenient and will allow a dot if it does not produce an ambiguity, though it will print a warning.

Search order for @see - Javadoc will process a @see tag that appears in a source file (.java), package file (package.html) or overview file (overview.html). In the latter two files, you must fully-qualify the name you supply with @see. In a source file, you can specify a name that is fully-qualified or partially-qualified.

When Javadoc encounters a @see tag in a .java file that is not fully qualified, it searches for the specified name in the same order as the Java compiler would.  Javadoc searches for that name through all related and imported classes and packages. In particular, it searches in this order:

1.	the current class or interface

2.	any enclosing classes and interfaces, searching closest first

3.	any superclasses and superinterfaces, searching closest first

4.	the current package

5.	any imported packages, classes and interfaces, searching in the order of the import statement

Javadoc continues to search recursively through steps 1-3 for each class it encounters until it finds a match. That is, after it searches through the current class and its enclosing class E, it will search through E's superclasses before E's enclosing classes. In steps 4 and 5, Javadoc does not search classes or interfaces within a package in any specified order (that order depends on the particular compiler). In step 5, Javadoc will look in java.lang, since that is automatically imported by all programs.

Javadoc won't necessarily look in subclasses, nor will it look in other packages even if their documentation is being generated in the same run. For example, if the @see tag is in java.awt.event.KeyEvent class and refers to a name in the java.awt package, javadoc will not look in that package unless that class imports it.

@since  since-text

Adds a "Since" heading with the specified since-text to the generated documentation. The text has no special internal structure. This tag means that this change or feature has existed since the software release specified by the since-text. For example:

@since JDK1.1

@serial  field-description

Used in the doc comment for a default serializable field.

An optional field-description augments the doc comment for the field. The combined description must explain the meaning of the field and list the acceptable values. If needed, the description can span multiple lines.

The @since tag should be added to each serializable field that has been added since the initial version of a Serializable class.

To get a serialized form for a private class, use the -private option. Therefore, to generate the serialized form for all public and private classes, run javadoc with this -private option.

@serialField  field-name  field-type  field-description

Documents an ObjectStreamField component of a Serializable class' serialPersistentFields member. One @serialField tag should be used for each ObjectStreamField component.

@serialData  data-description

A data-description documents the sequences and types of data, specifically the optional data written by the writeObject method and all data written by the Externalizable.writeExternal method.

The @serialData tag can be used in the doc comment for the writeObject, readObject, writeExternal, and readExternal methods.

@exception  description

The @throws and @exception tags are synonyms. The @throws tag was introduced in JDK 1.2.  Adds a "Throws" subheading to the generated documentation, with the class-name and description text. The class-name is the name of the exception that may be thrown by the method. If this class is not fully-specified, Javadoc uses the search order to look up this class.

@version  version-text

Adds a "Version" subheading with the specified version-text to the generated docs when the -version option is used. The text has no special internal structure. A doc comment may contain at most one @version tag. Version normally refers to the version of the software (such as the JDK) that contains this class or member.

Java Software additional guidelines:  The Java Software convention for the argument to the @version tag is the SCCS string "%I%, %G%", which converts to something like "1.39, 02/28/97" when the file is checked out of SCCS.


DIFFzilla(TM) dialog box

(Ctrl+= or "Tools", "File Difference...")

Press F7/F8 to restore the previous/next dialog settings respectively.  See DIFFzilla(TM) for more information.

To diff two source files:  Enter the first file in the "File 1" text box and the second file in the "File 2" text box.  If the filenames only differ by path, you only need to specify the path for "File 2".  Click on the "Interleaved output" check box if you want interleaved output instead of side by side difference editing.

To diff two source trees:   Enter the two directories in the "File 1" and "File 2" text boxes.  In addition, you need to fill in the "Filespecs" text box with the files you want processed.  Turn on the "Recursive" check box to compare subdirectories.

Note:  You can differences two source trees to determine what files have been added or removed and generate a list of filenames.  When the source tree difference is complete, click on the "Save..." button to generate a list file.

Files...

Lets you browse for a file on disk.  Fills in the filename text box with the file you select.

Directories...

Lets you browse for a directory on disk.  Fills in the filename text box with the directory you select.

Buffer

Indicates that the buffer in memory should be used.

File

Indicates that the file on disk should be used and not the buffer that may already be in memory.

Record file width

Optionally specifies the record width to use when reading a file.

Interleaved output

When checked, a new buffer is created which contains color coded difference output.  You may edit the output buffer.  When not checked, the Diff dialog box is displayed which displays the two files side by side with differences color coded.   The side by side output is much more powerful because you can transfer changes from one file to the other just by clicking on a button.  You can even edit the files without exiting the Diff dialog box.  Undo, syntax expansion/indenting , SmartPaste, and much of your emulation key mappings work when editing in the Diff dialog box.

Recursive

When checked,  Filespecs are searched recursively.

Compare directories in separate process

When checked, source trees are diffed in a separate process so you can continue working.   Note that this check box is enabled because it also effects the "Load..." button (see below).  This checks has no effect when diffing two files.

Filespecs

Space delimited list of wildcard file specifications (ex.  *.c *.cpp *.h) to difference.

Exclude filespecs

Space delimited list of wildcard file specifications (ex.  junk* test*) to exclude from the difference.

Options...

Lets you set default difference options.   Displays Diff Options dialog box.

Load...

Loads a diff state file (.dif).   Restores the saved state of a multi-file diff session.


Diff Options dialog box

Expand tabs

When checked, tabs are expanded to the appropriate number of spaces before lines from each file are compared.

Ignore leading spaces

When checked, differences in leading spaces of lines are ignored.

Ignore trailing spaces

When checked, differences in trailing spaces at the end of lines are ignored.

Ignore all spaces

When checked, differences in spacing between characters in lines are ignored.

Ignore case

When checked, differences in character casing is ignored.

Do not compare EOL chars

When checked, differences in end of line characters are ignored.  This is useful when comparing UNIX format files with DOS format files.

Skip leading comments

When checked, leading comments are ignored.  This is useful if you are using a Version Control System which automatically inserts comment file headers.

Starting position

Determines whether to place the cursor at the top or first difference when the Diff dialog box is displayed. This option has no effect on interleaved output.

Dialog initialization

Determines whether the DIFFzilla(TM) dialog box restores previous dialog settings (History) or just places current buffer name into the "File 1" text box.   Note that you can press F7/ F8 to restore the previous/ next dialog settings respectively.

Show gauge during diff

When on, a gauge control will show various processing statics while you wait for the differences output to complete.  This gauge control does not significantly slow down the difference processing so we recommend you keep it on.

Jump to next diff after copy

When on, the cursor is moved to the next difference when you apply changes from one file to the other.  For example, after pressing the "Copy>>" button on the Diff dialog box you will be placed on the next difference.  This option has no effect on interleaved output.

Automatic directory mapping

When on, the "File 2" text is box is automatically updated as you enter a directory in the "File 1" text box.  For example, if you enter "f:\vslick40\bitmaps\" into the "File 1" text box and "\\server\dan\vslick40\bitmaps\" into the "File 2" text box, then "f:\vslick40\" is mapped to "\\server\dan\vslick40\".  The next time you enter "f:\vslick40\macros\" into the "File 1" text box, "\\server\dan\vslick40\macros\" is automatically entered into the "File 2" text box.


Selective Display dialog box

The Selective Display dialog lets you select which lines are visible based on the contents of the lines.  A plus or minus icon is placed before hidden or expanded lines.  Double-click on the plus or minus icon to view or not view hidden lines.

To redisplay all lines and remove the plus/minus outline markers, invoke the "Show All" menu item from the View menu.

Choose one of the following methods for selecting lines:

Search Text	Allows you to specify a search string and display lines containg the search string specified or lines not containing the search string specified.

Function definitions	Display only function headings and optional function heading comments.

Preprocessor directives	Displays source file as if preprocessed according to the define values you specify.

Multi-level	Set multiple levels of selective display based on braces or indent.

Paragraphs	Display the first line of each paragraph.  A paragraph is defined by a group of lines followed by one or more blank lines.

Hide selection	Hides the lines in the current selection.

Expand sub-levels

When on, expanding hidden lines expands all nested hidden lines.

Collapse sub-levels

When on, expanding hidden lines collapses all nesting hidden lines.

Remember sub-levels

When on, expanding hidden lines displays nested hidden lines the way you last displayed them.


Selective Display Search Text

Allows you to specify a search string and display lines containg the search string specified or lines not containing the search string specified.

Match case

When checked, a case sensitive search is performed.

Match whole word

When checked, a word search is performed.  Before a search is considered successful, the characters to the left and right of the occurrence of the search string found are checked to be non-word characters.    The default word characters are [A-Za-z0-9_$] and may be changed by the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").

Regular expression

When checked, a regular expression search is performed.  See section Regular Expressions for more information.

Reset selective display

When checked, all lines are made visible and plus/minus icons are removed before search is performed.

Hide matched lines

When checked, lines containing search pattern are hidden.


Selective Display Function definitions

Display only function headings.  The "Show comments" and "Collapse comments" check boxes effect how comments before function definitions are handled.

Show comments

When checked, comments above function definitions are displayed as if they were part of the function definition.

Collapse comments

When check, comments above function definitions are visible but multi-line comments will require that you expand them to see all comments.

NOTE:  When both the "Show comments" and "Collapse comments" check boxes are off, comments will not be visible at all.  We don't recomment you use this mode because you can't easily copy/move your function and its comments.


Selective Display Preprocessor directives

Displays source file as if preprocessed according to the define values you specify.  If you don't remember your defines, use the "Scan For Defines" button.

Defines

Specifies defines and optional values used when select "Preprocessor Directives" and press the OK button.  The syntax is:

name1[=value1] name2[=value2] ...

Example

WIN32S  VERSION=4

Warning if Not Defined

If on when you preprocess your source, a message box is displayed for each define found in an expression which does not have a value.

Scan For Defines

Searches for define variables in the current source file and lets you specify values.  Resulting values are placed in the "Defines" combo box.


Selective Display Multi-level

Set multiple levels of selective display based on braces or indent.

Braces

When on, multiple levels of selective display are set to correspond to curley brace nesting.  This very useful for languages like C/C++ and Java.

Indentation

When on, multiple levels of selective display are set to correspond to curley brace nesting.  This very useful for languages like C/C++ and Java.

Limit levels

When too many nested levels of selective display confuse you, place a limit on the maximum number of nested levels.  Nesting deeper than this specified level is ignored.


Variable Editor dialog box

("Macro", "Set Variable...", "Edit...")

Currently the variable editor does not have enough symbolic information to give you member names of structures or unions.  Structures will appear as an array.

Expand Curr

Expands current item which has a plus bitmap.

Delete

Deletes current item.

Format

Allows you to change the type of the current item.

Insert

Inserts a new hash table or array element.

Expand All

Expands all items so you can see the entire data structure.

Collapse All

Display first level of variable with nothing expanded.

Update

Sets the contents of the variable to what is currently displayed in the variable editor.

Refresh

Cancels changes and displays current value of variable which is not necessaryily the same as when this dialog box was originally displayed.

Squish

Deletes array items which have the value _notinit.


Context Tagging(TM) Limitations

Context Tagging(TM) Limitations

Limitations for Java Context Tagging(TM)

Limitations for C/C++ Context Tagging(TM)

Limitations for COBOL Context Tagging(TM)

Limitations for Perl Context Tagging(TM)

Limitations for JavaScript Context Tagging(TM)

Limitations for PV-WAVE Context Tagging(TM)

Limitations for Slick-C Context Tagging(TM)

Limitations for PHP Context Tagging(TM)


Limitations for Java Context Tagging(TM)

Complex function overloading

Auto List Members can resolve overloading only when the number of required arguments differ or the return types are the same.

The following example illustrates a case where Auto List Members cannot resolve overloading:

   return_type1 method(class1 a)

   {

   }

   return_type2 method(class2 a)

   {

   }

   method(a).data   <--  '.' will not list members

classname.this expressions not yet supported

   class test {

      JButton btnToggle=new JButton("Toggle Enabled");

      btnToggle.addActionListener(

        new ActionListener() {

           public void actionPerformed(ActionEvent ae) {

              Action actQuit=test.this.m_actQuit;  <-- '.' will not list members

              actQuit.setEnabled(!actQuit.isEnabled());

           }

        }

      );

   }

Pointers to methods not supported (Visual J++ delegate/invoke)

See http://www.microsoft.com/visualj/techmat/feature/delegates/default.htm


Limitations for C/C++ Context Tagging(TM)

Multiple definitions of the same class, struct, union, or typedef

Old C style (K&R) function definitions

Complex function overloading

Preprocessing can cause problems

Find-tag on template argument won't go to template argument list

"friend" relationships not supported

Complex instance access not yet supported

Template partial specialization not yet supported

Template classes where types come from template class argument resolution


Multiple definitions of the same class, struct, union, or typedef

If there are multiple definitions of the same struct or class and the current source file does not have a definition,  Auto List Members will list members from all definitions.

file1.h

    struct MYSTRUCT {

       int file1_field;

    };

file2.h

    struct MYSTRUCT {

       int file2_field;

    };

Currently editing file1.cpp and have

    MYSTRUCT mc;

    mc.     <-- will list file1_field and file2_field

Mutiple typedefs are a bigger problem.

file1.h

    typedef struct {

       int file1_field;

    } MYSTRUCT;

file2.h

    typedef struct {

       int file2_field;

    } MYSTRUCT;

Currently editing file1.cpp and have

    MYSTRUCT mc;

    mc.     <-- Won't work at all

The work around for this problem is either to correct your tag files so there is only one definition or give the structs names that are different from the typedef name.


Old C style (K&R) function definitions

The following is tagged properly:

   void myproc(a,b)

      int a;

      char b;

   {

   }

The following does not get tagged properly:

    void myproc(a,b)

       MYTYPE a;  // MYTYPE is not a built-in type

       char b;

    {

    }

To correct this problem, set the macro variable def_ctags_flags to 3 ("Macro", "Set Macro Variable").

The following does not get tagged:

    myproc(a,b);

The above illustrates a prototype which has no return type.

To correct this problem, set the macro variable def_ctags_flags to 7 ("Macro", "Set Macro Variable").

This following does not get tagged properly:

    void myproc(a,b)

       char b;    // Arguments listed in wrong order

       MYTYPE a;

    {

    }

In this, you can navigate to your source, but we store the argument names and types in the wrong order. To fix this problem, you must change your source code so that the arguments are declared in order.


Complex function overloading

Auto List Members can resolve overloading only when the number of required arguments differ or the return types are the same.

The following example illustrates a case where Auto List Members cannot resolve overloading:

  return_type1 funcA(class1 a)

  {

  }

  return_type2 funcA(class2 a)

  {

  }

  void funcB()

  {

      funcA(a).data   <--  '.' will not list members

  }


Preprocessing can cause problems

Many preprocessing problems can be fixed by defining global preprocessing and retagging your source files.  Use our C/C++ Preprocessing Editor dialog box ("Tag Files...", "Options...", "C Preprocessing...") to define global preprocessing.  After defining preprocessing, you need to rebuild any tag files that reference your preprocessing ("Search", "Tag Files...", "Rebuild Tag File", uncheck "Retag modified files only").

The following works without defining global preprocessing:

     void MyProcExA(int x,int y);

     #define MyProcEx  MyProcExA

     MyProcEx(      <-- This works!

The following will cause a problem unless you define global preprocessing:

     COMMON unsigned char gapp_has_focus INIT_TO(1);

  Just add

     #define COMMON

     #define INIT_TO(e) =e

to your global preprocessing.

The following will  a problem unless you define global preprocessing:

    #define proto(x,y) x y

    void proto(myproc,(int arg1,int arg2));

The following will cause a problem unless  you define global preprocessing:

     #define POINTER *

     MYCLASS POINTER p;

The following won't work even if you define global preprocessing:

     #define strcpy  lstrcpy

     char *strcpy(char *dest,const char *src);

When you type

       strcpy(<Cursor Here>

Here we will give you help on strcpy and not lstrcpy which may be prototyped elsewhere.

The following won't work even if you define global preprocessing:

     #define FooledYou   ((MYTYPE *)ThisIsReallyTheVariable.plist)

     FooledYou.   <-- Won't get a list here

Believe it or not this type of code exists due to the fact that C programmers did some strange stuff before C++ came along.


Find-tag on template argument won't go to template argument list

   template <class TemplateArgument>

   class {

      TemplateArgument  a;  // <-- find-tag on TemplateArgument

                            // won't go to template argument list.

   };


Some incomplete syntax fragments confuse context tagging

This does not work

      class MYBASE {

      public:

         MYBASE(int x);

      };

      class MYBASE2:public MYBASE {

         // This does not work

         MYBASE2(int x):MYBASE(<Alt+Comma Here>

      };

This works

      class MYBASE {

      public:

         MYBASE(int x);

      };

      class MYBASE2:public MYBASE {

         MYBASE2(int x):MYBASE(<Alt+Comma Here>) {

         }

      };

Initializer lists need more complete syntax.


"friend" relationships not supported

  class foo2{

  private:

    int x;

    friend class foo1;

  };

  class foo1{

     void method() {

        foo2 *pfoo2;

        pfoo2->x=1;  // Not supported.

     }

  }


Complex instance access not yet supported

The following is not supported:

   variable.MYCLASS::method (


Template partial specialization not yet supported

If you don't  know what this is, look up ANSI C++ standard on the Web.  This one is not supported by many C++ compilers yet.   We do plan to support this in the future.


Template classes where types come from template class argument resolution

The following works:

     template <class T>

     class MYCLASS {

     public:

         T & operator[]( int index );

     };

     struct S {

        int field1;

     };

     MYCLASS<S> s;

     s[1].    <-- Get field1 listed here

The following does not work:

     template <class T>

     class MYCLASS {

     public:

         typedef T T2;

         T2 & operator[]( int index );

     };

     struct S {

        int field1;

     };

     MYCLASS<S> s;

     s[1].    <-- Won't get field1 listed here

We will support this in the future.


Limitations for COBOL Context Tagging(TM)

Note that we plan to support typed object reference and pointer variables in the future.

Object reference variables not yet supported

Pointer variables not yet supported

Program pointer variables not yet supported

Call "as" clause not yet supported

Copy file limitations

The replace statement not yet supported

Preprocessing limitations


Object reference variables not yet supported

The following is not supported:

invoke objrefvar     <-- Does not list class members

The following works:

invoke self      <-- This lists members of the current class

The following works because classname is the name of the class and not a variable defined as an object reference.

invoke classname      <-- This lists members of the class classname

The following works:

invoke       <-- This lists classes and object rererence variables


Pointer variables not yet supported

The following are not yet supported:

03 pstring usage is pointer to string.

03 cur-time pic 9(6) with pointer pcur-time.


Program pointer variables not yet supported

The following is not yet supported:

03 psubprog usage is program-pointer to subprog


Call "as" clause not yet supported

The following is not yet supported:

call subprog as prog-proto using    <-- Do not get function help.

The following works:

call subprog using    <-- Get function help.


Copy file limitations

The following works provided that the copy include path is set up properly or "filename" is found in the current directory:

copy "filename".

To set the include path, you must first create/open a project (see Projects) and then use the Project Properties Directories Tab ("Project", "Project Properties...", select the Directories Tab) and set the "Include directories".

The following is not supported:

copy "filename" replacing "this" by "that".

The following is not supported:

copy "filename" in "libraryname"

The following are not supported:

-INC filename

++INCLUDE filename


The replace statement not yet supported

The following is not supported:

replace ==this== by ==that==


Preprocessing limitations

The following is not supported:

>>evaluate expression

>>when x ...

source1

>>when other

source2

>>end-evaluate

The following is not supported:

>>if expression

source1

>>else

source2

>>end-if

The following is not supported:

$if expression

source1

$else

source2

$end

Note that lines starting with a dollar sign in column 7 are ignored.

The following IS supported:

>>constant myconstant is 4

The above constant defininition is picked up by tagging.


Limitations for HTML Context Tagging(TM)

We don't provide comments for HTML tags and attributes.  In the future, we will add this.

Note:  Our current implementation gathers HTML tag and attribute information from "vslick.vlx".  Modifying color coding for HTML will not change the HTML tags or attributes used by our HTML Context Tagging.


Limitations for Perl Context Tagging(TM)

Function Help does not evaluate context

expression.method1(  <-- Get function help.

                     --- expression not evaluated here.

Package/member access not supported

id.     <-- Does not list structure members

id::    <-- Does not list package members

Local variables are not listed by Auto List Members

We will support local variables in the future.


Limitations for JavaScript Context Tagging(TM)

Function Help does not evaluate context

expression.method1(  <-- Get function help.

                     --- expression not evaluated here.

Member access not supported

id.     <-- Does not list members

Implicit local variables are not listed by Auto List Members

We will support this in the future.

var a;

b=4;

<Alt+Dot Here>     <-- b not listed in locals


Limitations for PV-WAVE Context Tagging(TM)

Structure access not supported

          id.     <-- Does not list structure members

Local variables are not listed by Auto List Members


Limitations for Delphi Context Tagging(TM)

With statement is not supported

with myrecord begin

   <Alt+Dot Here>     <-- Members of myrecord not listed

end;


Limitations for Ada Context Tagging(TM)

Our Ada Context Tagging is still in development.  If there is a capability you would like us to add, email our technical support.


Limitations for Slick-C Context Tagging(TM)

Function Help does not evaluate context

This actually does not cause a problem with Auto Function Help because all methods in Slick-C are more like global functions.  However, Auto List Members lists more methods/functions than are really valid.

expression.myfunc(  <-- expression. not evaluated here

Member access support limited

Auto List Members lists more methods/functions than are really valid.  For example, it will list the edit command as a valid function to call for a command button control.

These prefix expressions work:

     struct MYSTRUCT {

        int field;

     };

     MYSTRUCT s;

     s.       <-- Just like C++, this lists structure members

     ctlok.   <-- If this is a control on the current dialog,

              --- this lists properties and methods for button and all functions

     wid.     <-- If this is a valid variable, this lists all properties, methods

              --- and functions

Other prefix expressions where a control name cannot be found or where a local variable

cannot be found will list nothing.

Implicit local variables are not listed by Auto List Members

We will support this in the future.

var a;

b=4;

<Alt+Dot Here>     <-- b not listed in locals


Limitations for PHP Context Tagging(TM)

Implicit and local variables are not listed by Auto List Members

$a=4;

         $b=7;

Function Sum () {

    global $a, $b;

    $c = $a + $b;

    <Alt+Dot Here>     <-- $a, $b, and $c not listed in locals

}


New File Tab

("File", "New...")

Use this tab to create a new file and specify language support.

Add to Project

When checked, the new file is added to the active project.

Filename

Name without path of file to create.

Location

Specifies the directory location for the file.


New Project Tab

("Project", "New...")

Use this tab to create a new project.

Project name

Name of the project without path.  A ".vpj" extension is always added to this name.

Location

Specifies the directory location for the project.

Executable name

Specifies the executable name for the project.  This parameter is typically used to set up execute and debug command lines for the project.

Create new workspace

When on, a new workspace is created with the same name and location of the project.  Workspace files have a ".vpw" extension.

Add to current workspace

When on, the new project is added to the currently open workspace.

Customize

Allows you to add to or modify the compiler packages listed.


New Workspace Tab

("Project", "New...")

Use this tab to create a workspace with no projects.

Workspace name

Name of the workspace without path.  A ".vpw" extension is always added to this name.

Location

Specifies the directory location for the workspace.


History dialog box

("Tools", "Configuration", "History...")

History type

Allows you to select the history items displayed in the "Items" list box.

Items

List box which contains history items that may be deleted.

<<Delete

Deletes the items selected in the "Items" list box.


Web Browser Setup dialog box

("Tools", "Configuration", "Web Browser Setup...")

Browser

These radio buttons are here automatically enter correct values in the other parts of this dialog box.  Under Windows 95/98 and Windows NT we can usually automatically detect which Web browser you are using so you don't need to configure a browser.

Windows 3.x:  You need to tell us whether you are using Netscape or Internet Explorer.  In addition, you need to give us the full path to the program executable.

UNIX:  You need to tell us whether you are using Netscape or Mosaic.  In addition, you need to give us the full path to the program executable.

Program

Indicates the program to run.  You may specify a "%F" in this text or any of the other text boxes on this dialog box to have the HTML filename inserted into the command that is executed.

DDE

The "Application", "Topic", and "Item" text boxes specify DDE XTYP_REQUEST parameters and are used only if the "Use DDE" check box is turned on.


Default Help dialog box

("Help", "Configure Index File...", "Default...")

This dialog box is typically used to interface with Microsoft VC++ MVB files.  However, you could turn the "Use DDE" off and configure the "Program" text box to run a program like Micrsoft Quick Help ("qh") and pass the word at the cursor ("%k").  However, you may prefer to bind the qh command to a key to separate Quick Help word help access.

Program

Indicates the program and arguments to run.  The help program is only executed if no other help file contains information on the word at the cursor or if using DDE requires a program to be started before the DDE request can be made.

DDE

The "Application", "Topic", and "Item" text boxes specify DDE XTYP_REQUEST parameters and are used only if the "Use DDE" check box is turned on.


Alias Editor dialog box

 ("Tools", "Configuration", "Alias Files...", you may be prompted to pick an alias file)

The top left list box contains alias names.  The editor control to the right contains the value of the selected alias name.  The alias value may contain one or more of the following escape sequences:

%<EnvVar>%	Insert the value of the environment variable specified

%\d	Insert the date

%\t	Insert the time

%\i	Indent

%\b	Unindent

%\c	Place cursor

%\l	Place this at the beginning of the first alias line to preserve leading spaces.

%\s	Place this at the end of a line to preserve trailing spaces

%\n	Current function name

%(ParamName)	Argument replacement.

New...

Prompts you for a new alias name and then adds to the top left list box.

Delete

Deletes the selected alias name and value.

Parameters

When you specify parameters, you are prompted with a dialog box to give values for the parameters when the alias is expanded.

Add...

Prompts you for parameter fields and adds a new parameter.

Remove

Removes the selected parameter

Edit...

Allows you to modify the selected parameter fields.

Up

Moves the selected parameter up.  Affects the order parameters appear in the dialog box which prompts you for parameter values.

Down

Moves the selected parameter down.  Affects the order parameters appear in the dialog box which prompts you for parameter values.


Modified Buffers dialog box

The buffer names in the list box are buffers which have not been saved.

Save All

Saves all buffers.  If a buffer does not have a name, you are promted to give a filename.

Save Selected

Saves only the buffers that are selected.  Use Ctrl+Click to select more than one buffer.

Invert

Reverses the selection status for all buffer.  When no buffers are selected, this selects all buffers.

Save None

Selects to save no buffers.  Beware, if you are exiting the editor you will not be given another chance to save your files.


C/C++ Preprocessing dialog box

("Search", "Tag Files...", "Options...", "C Preprocessing")

This dialog lets you customized global preprocessing used when tagging C or C++ files.  After modifying preprocessing, you need to rebuild any effected tag files.  You must turn off "Retag modified files only" so that all files are retagged.

The file "syscpp.h" (UNIX: "usyscpp.h") contains default preprocessing information.  You should not edit this file.  All customized preprocessing is stored in "usercpp.h" (UNIX: "unxcpp.h").

To add a new define with arguments, click on the "New..." button, enter the name with arguments (ex.  "mymacro(a,b,c)" ), and press ENTER.

Because our tagging does not require that all preprocessing symbols be known like a compiler, it was necessary for us to differentiate "#undef" from "#delete" which is a new preprocessing primitive only used in "usercpp.h" (UNIX: "unxcpp.h").   The example below shows the differences:

#ifndef MYMACRO

     // Get here if MYMACRO is deleted (not listed)

     // Get here if have #undef for MYMACRO

#else

     // Get here if MYMACRO is deleted (not listed)

     // Get here if have #define for MYMACRO

#endif

#ifdef MYMACRO

     // Get here if MYMACRO is deleted (not listed)

     // Get here if have #define for MYMACRO

#else

     // Get here if MYMACRO is deleted (not listed)

     // Get here if have #undef for MYMACRO

#endif

Not all code paths are processed if a macro has a "#define" or a "#undef" for it.

Note: Our preprocessing of conditional preprocessing supports C/C++ expressions (ex  #if   A || B<C  ).  However, only defines with simple numeric values are currently supported.  For example, if you have define C which has the value "4+5", it won't get evalaluated propertly when used in conditional preprocessing like "#if   C".  In this case, all code paths will get tagged.


Merge dialog box

Besides providing buttons to transfer changes from the revision 1 or revision 2 file to the output file.   You can also edit the output file as you would any edit buffer.  Undo, syntax expansion/indenting , SmartPaste (TM), and much of your emulation work when you edit.

Imaginary buffer lines are inserted when the other file has inserted lines so that each file has the same number of lines.  This makes simultaneous scrolling work much better.  These lines are removed when you close the dialog box.

Read only

Each file has a read only check box.  Turn this check box on if you don't want to accidentally make any modifications to one of the files.  This check box will be disabled if you diff a buffer that is read only or a file that you do not have write permissions to.

Copy 1>>

Copies revision 1 change to output file.

Copy 2>>

Copies revision 2 change to output file.

Save

Saves the file.  Don't wory, the imaginary filler lines are not saved.

Next Conflict

Moves the cursor in both files to the next conflict.

Prev Conflict

Moves the cursor in both files to the previous conflict.

Find...

Performs a search in the file with the cursor.  Displays the Find dialog box.

Undo

Undoes the last change you made in both files.


Diff dialog box

Besides providing buttons to transfer changes from one file to the other, you can also edit the files as you would any edit buffer.  Undo, Context Tagging(TM), syntax expansion/indenting , SmartPaste(TM), and much of your emulation work when you edit.

Imaginary buffer lines are inserted when the other file has inserted lines so that each file has the same number of lines.  This makes simultaneous scrolling work much better.  These lines are removed when you close the dialog box.

Read only

Each file has a read only check box.  Turn this check box on if you don't want to accidentally make any modifications to one of the files.  This check box will be disabled if you diff a buffer that is read only or a file that you do not have write permissions to.

Block

Replaces the other files changes with inserted or modified lines of this file.

Line

Replaces the other files current line with inserted or modified line of this file.

Del Block

Deletes the inserted lines from the other file.  This button only appears when the other file has inserted lines which don't exist in this file.

Merge All

Copies all the changes from this file to the other file.

Save

Saves the file.  Don't wory, the imaginary filler lines are not saved.

Next Diff

Moves the cursor in both files to the next difference.

Prev Diff

Moves the cursor in both files to the previous difference.

Find...

Performs a search in the file with the cursor.  Displays the Find dialog box.

Undo

Undoes the last change you made in both files.


Color Coding Setup dialog box

("Tools", "Configuration", "Color Coding...")

See Color Coding for more information.

Lexer name

Specifies which language specific color coding is being displayed/modified..  This name is usually the same name as the language.

Keywords

When on, the list box to the right displays the words that have keyword color.

CS keywords

When on, the list box to the right displays case sensitive words that have keyword color.  These words are always case sensitive even if the "Case Sensitive" check box is turned off.

Preprocessor

When on, the list box to the right displays preprocessor keywords in preprocessor color.  All preprocessor keywords must start with the same character.

Symbol 1 ... Symbol 4

When on, the list box to the right displays the words that have Symbol 1... Symbol 4 color respectively.

Case sensitive

Indicates whether identifiers are case sensitive.

New... (on left)

Allows you to add one or more words.  Separate each word with a spaces.

Delete (on left)

Deletes selected items in list box.

Get...

Add words by specifying a file which contains the words.

ID start characters

Specifies characters which are valid for the start of an identifier or any part of an identifier.

ID follow characters

Specifies additional characters which are valid after the first character of an identifier.

New... (on right)

Prompts you for a lexer name to start a new language specific color coding definition.

Delete (on right)

Deletes the current color coding definition.

Comments

Allows you to edit line or multi-line comments.

Styles

Allows you specify numeric constant syntax, string literal syntax, and some other miscellanious styles.

Colors

Displays Color Settings dialog box which allows you to specify the color for color coding elements and other editor elements.


Line Comment dialog box

Column

Place an integer in text box to specify that all text at or after this column is a comment.

Use Delimiter

Delimiter

Characters that indicate there is a line comment.

Only if first non-blank character in line

Indicates the delimiter must be the first non-blank character in the line in order to be considered a valid comment.

Check columns first

When on, the lexer will check for the delimiter in the columns specified before looking for other items.

End column is end of line

Indicates that delimiter may occur between the start column specified and end of line.

Delimiter column

The two text boxes here indicate the start and end column where the delimiter must occur.


Multi-Line Comment dialog box

If these options are not enough to support your language, call us.

Currently the advanced options are only used by the HTML and ATLAS languages.

Delimiter 1

Delimiter which starts the multi-line comment.  Currently, the first character of thiis string can not be a valid identifer character.

Delimiter 2

Delimiter which ends the multi-line comment.  Currently, the first character of thiis string can not be a valid identifer character.

Nesting allowed

When on, this multi-line comment may have this multi-line comment inside it.

Only if first non-blank character in line

Indicates the "Delimiter 1" must be the first non-blank character in the line in order to be considered the start of a comment.  This check box is only enabled when the "Only when Delimiter  1 is in column" text box is filled in.

Check for Delimiter 1 first

When on, the lexer checks for Delimiter 1 before looking for other items.  When this option is specified, Delimiter 1 is limited to 1 character in length.

Delimiter 2 must be the last character on the line

When on, the "Delimiter 2" text must occur at the end of a line to terminate the comment.

Only when Delimiter 1 is in column

Indicates that the "Delimiter 1" text starts a comment only when found in the column specified.

Color as

Specifies color used for this comment.  This color is not used when Delimiter 1 is immediately followed by one of the "Comment Keywords".  When Delimiter 1 is immediatly followed by one of the "Comment Keywords", keyword color is used.   See HTML lexer for an example.

Comment keywords

When Delimiter 1 is immediatly followed by one of the keywords listed here, keyword color is used for this comment.

See HTML lexer for an example.

New...

Allows you to specify space delimited words to add to the "Comment Keywords" list box.

Delete

Deletes the selected keywords in the "Comment Keywords" list box.


Styles dialog box

("Tools", "Configuration", "Color Coding...", "Styles...")

If these options are not enough to support your language, call us.

Note that the parenthesized language references (i.e. like (C) ) are there to give you an idea of what the option does.  It does not indicate that the option is only supported by that language.

Two consecutive quotes represent one

"""" for REXX represents a string of length one which is a double quote character.

\" represents a double quote

"\"" for C represents a string of length one which is a double quote character.

Double quoted strings are always 1 char long

When on, this means that a double quote character is followed by an additional character and then the terminating double quote character.  There is never more than one character between the start and end double quote.

Trailing backslash continues string across lines

When on, indicates that searching for the terminating quote continues to the next line if the lines end with a backslash character.

Search for end quote across multiple lines

When on, indicates that the string does not have to be terminated on the same line as the start quote character.

Delay color coding until end quote

When on, a string is not color coded unless and end quote is seen on the same line.  This does not support mult-line strings.

Two consecutive quotes represent one

'''' (4 consecutive single quote characters) for Pascal represents a string of length one which is a single quote character.

\' represents a double quote

'\'' represents a string of length one which is a single quote character.

Single quoted strings are always 1 char long

When on, this means that a single quote character is followed by an additional character and then the terminating single quote character.  There is never more than one character between the start and end single quote.

Trailing backslash continues string across lines

When on, indicates that searching for the terminating quote continues to the next line if the lines end with a backslash character.

Search for end quote across multiple lines

When on, indicates that the string does not have to be terminated on the same line as the start quote character.

Delay color coding until end quote

When on, a string is not color coded unless and end quote is seen on the same line.  This does not support mult-line strings.

Color code line numbers (Basic)

When on, indicates that leading line numbers should be color coded in line number color.

Do not color code numbers (HTML)

Indicates that integer or floating numbers should not be color coded.

Allow underscores in integers (Ada)

When on, integer constants may have underscore characters embedded in them. For example "1_2".

Support #base#number#exponent format (Ada)

When on, indicates that a floating point numbers have the syntax #base#number#exponent.

Color identifiers folowed by '(' as a function

For language such as C++, Java, and Slick-C, an identifier followed by a parenthesis always indicates a function.

Special coloring for 'package' and 'import' statements (Java)

When on, the java syntax package an import statements are supported.

Allow HTML style embedded languages

When on, embedded language text between the <script language="xxx"> and </script> tags is color coded based on the new language and tag attributes are color coded.  This style is very HTML specific.  Embedded language colors are user-definable.

Backslash escapes next character (Bourne Shell)

Backslash escapes the character that follows.  This is useful for UNIX shell scripts which use \" to indicate that the double quote is not the start a string.

Here Document (UNIX Shells/Perl)

Enables support for Here Documents.   Note that if you prefix your terminator with one of our lexer names you will get embedded language color coding.

Example of a Here Document in Perl, where 'HTMLEOF' is used as the terminator so we get HTML embedded language color coding:

        print <<HTMLEOF;

        <HTML><HEAD><TITLE>...</TITLE></HEAD>

        <BODY>

        ...

        </BODY>

        </HTML>

        HTMLEOF

Cool huh?! Unknown languages are color coded in string color.  Embedded language colors are user-definable.


Toolbar Customization Toolbars Tab

("View", "Toolbars...", select Toolbars Tab)

Visible

When on, the selected toolbar is displayed if it is not already displayed.  When off, the selected toolbar is closed.

Always on top

When on, a non-docked toolbar will remain on top of the MDI window.

Allow docking

When off, non-docked toolbars can not accidentally be docked.

Show Tool Tips

Indicates whether toolbars should display tool tips.  This option is global to all toolbars.

Hide when application is inactive

When on, non-docked toolbars are hidden which you switch to another application.  When you switch back to Visual SlickEdit the toolbar is made visible again.  This option is global to all toolbars.

New...

Create a new empty toolbar.

Delete

Deletes the selected toolbar.

Rename

Renames the selected toolbar.

Reset

Restores the selected system toolbar (toolbar you did not create) to its original configuration.  It does not perform any docking, undocking, or make toolbars visible.  This is strictly for restoring buttons to a toolbar.


Toolbar Customization Categories Tab

("View", "Toolbars...", select Categories Tab)

This tab categories our toolbar controls and allows you to to drag drop the controls onto an existing control.  Click on the control in the Custom Button Controls window and drag it to one of the customizable toolbars such as our Standard toolbar displayed below the menu bar.

Changing a Button Command Binding

Click on a toolbar control (on the toolbar and not the Toolbar Customization dialog box) with the right mouse button and select the "Project Properties..." menu item.  The current command and other properties for the control will be displayed.  Change the command and press the OK button.


C Options dialog box

("Tools", "Configuration", "File Extension Setup", select c extension, press Options button)

Changes smart indenting and template editing style for the C/C++ language.

Begin-end Style

Specifies the brace style used by template editing and smart indenting.

Insert braces immediately

Specifies whether template should be inserted with braces.

Insert blank line between braces

Specifies whether a blank line should be inserted between braces when a template expands with braces.

Minimum expandable keyword length

When template editing is on and you press space bar after a word, a template may be inserted.  If you typically type in a space after variable names, you may want this value to be greater than 1.  Alternately, you can bind the c_space command to a key other than space bar.

Indent first level of code

Specifies whether smart indenting should indent the cursor after delarations such as functions.

Use SmartPaste™

Specifies whether copied or pasted text should be reindented according to what the editor thinks is the corrent indent level.  See SmartPaste(TM) for more information.

Main style

Specifies the main function declartion template inserted.  Select ANSI if you want an old ANSI C main declaration inserted.  If you don't like our styles, you can define a template with our ALIAS facility or you write a replacement function for c_insert_main.  The command "find-proc c_insert_main" will locate the macro source for this function.

Indent CASE from SWITCH

When checked, template editing places the case statement indented from the switch statement column.

No space before paren

Determines whether a space is placed between a keyword such as if, for, or while and the open paren when syntax expansion occurs.  ("if("  or "if (").

Always use continuation indent on function parameters

Determines whether function parameters should always use the contination indent.

By default, we format multi-line function parameters as follows:

myLongMethodName(firstarg,

                 secondarg,

                 thirdarg

                );

myLongMethodName(

    firstarg,

    secondarg,

    thirdarg

    );

When you turn on "Always use continuation indent on function parameters", you get the following:

myLongMethodName(firstarg,

    secondarg,

    thirdarg

    );

myLongMethodName(

    firstarg,

    secondarg,

    thirdarg,

    );


JavaScript Options dialog box

("Tools", "Configuration", "File Extension Setup", select c extension, press Options button)

Changes smart indenting and template editing style for the C/C++ language.

Begin-end Style

Specifies the brace style used by template editing and smart indenting.

Insert braces immediately

Specifies whether template should be inserted with braces.

Insert blank line between braces

Specifies whether a blank line should be inserted between braces when a template expands with braces.

Minimum expandable keyword length

When template editing is on and you press space bar after a word, a template may be inserted.  If you typically type in a space after variable names, you may want this value to be greater than 1.  Alternately, you can bind the c_space command to a key other than space bar.

Use SmartPaste™

Specifies whether copied or pasted text should be reindented according to what the editor thinks is the corrent indent level.  See SmartPaste(TM) for more information.

Indent CASE from SWITCH

When checked, template editing places the case statement indented from the switch statement column.

No space before paren

Determines whether a space is placed between a keyword such as if, for, or while and the open paren when syntax expansion occurs.  ("if("  or "if (").

Always use continuation indent on function parameters

Determines whether function parameters should always use the contination indent.

By default, we format multi-line function parameters as follows:

myLongMethodName(firstarg,

                 secondarg,

                 thirdarg

                );

myLongMethodName(

    firstarg,

    secondarg,

    thirdarg

    );

When you turn on "Always use continuation indent on function parameters", you get the following:

myLongMethodName(firstarg,

    secondarg,

    thirdarg

    );

myLongMethodName(

    firstarg,

    secondarg,

    thirdarg,

    );


PHP Options dialog box

("Tools", "Configuration", "File Extension Setup", select php extension, press Options button)

Changes smart indenting and template editing style for the PHP language.

Begin-end Style

Specifies the brace style used by template editing and smart indenting.

Insert braces immediately

Specifies whether template should be inserted with braces.

Insert blank line between braces

Specifies whether a blank line should be inserted between braces when a template expands with braces.

Minimum expandable keyword length

When template editing is on and you press space bar after a word, a template may be inserted.  If you typically type in a space after variable names, you may want this value to be greater than 1.  Alternately, you can bind the c_space command to a key other than space bar.

Use SmartPaste™

Specifies whether copied or pasted text should be reindented according to what the editor thinks is the corrent indent level.  See SmartPaste(TM) for more information.

Indent CASE from SWITCH

When checked, template editing places the case statement indented from the switch statement column.

No space before paren

Determines whether a space is placed between a keyword such as if, for, or while and the open paren when syntax expansion occurs.  ("if("  or "if (").

Always use continuation indent on function parameters

Determines whether function parameters should always use the contination indent.

By default, we format multi-line function parameters as follows:

myLongMethodName(firstarg,

                 secondarg,

                 thirdarg

                );

myLongMethodName(

    firstarg,

    secondarg,

    thirdarg

    );

When you turn on "Always use continuation indent on function parameters", you get the following:

myLongMethodName(firstarg,

    secondarg,

    thirdarg

    );

myLongMethodName(

    firstarg,

    secondarg,

    thirdarg,

    );


Perl Options dialog box

("Tools", "Configuration", "File Extension Setup", select pl extension, press Options button)

Changes smart indenting and template editing style for the Perl language.

Begin-end style

Specifies the brace style used by template editing and smart indenting.

Insert braces immediately

Specifies whether template should be inserted with braces.

Insert blank line between braces

Specifies whether a blank line should be inserted between braces when a template expands with braces.

Minimum expandable keyword length

When template editing is on and you press space bar after a word, a template may be inserted.  If you typically type in a space after variable names, you may want this value to be greater than 1.  Alternately, you can bind the c_space command to a key other than space bar.

Indent first level of code

Specifies whether smart indenting should indent the cursor after delarations such as functions.

Use SmartPaste™

Specifies whether copied or pasted text should be reindented according to what the editor thinks is the corrent indent level.  See SmartPaste(TM) for more information.

No space before paren

Determines whether a space is placed between a keyword such as if, for, or while and the open paren when syntax expansion occurs.  ("if("  or "if (").


Tcl Options dialog box

("Tools", "Configuration", "File Extension Setup", select tcl extension, press Options button)

Changes smart indenting and template editing style for the Tcl language.

Insert braces immediately

Specifies whether template should be inserted with braces.

Insert blank line between braces

Specifies whether a blank line should be inserted between braces when a template expands with braces.

Minimum expandable keyword length

When template editing is on and you press space bar after a word, a template may be inserted.  If you typically type in a space after variable names, you may want this value to be greater than 1.  Alternately, you can bind the tcl_space command to a key other than space bar.

Indent first level of code

Specifies whether smart indenting should indent the cursor after delarations such as functions.

SmartPaste™

Specifies whether copied or pasted text should be reindented according to what the editor thinks is the corrent indent level.  See SmartPaste(TM) for more information.

No space before open brace

Determines whether a space is placed between a keyword such as if, for, or while and the open brace when syntax expansion occurs.  ("if{"  or "if {").


AWK Options dialog box

("Tools", "Configuration", "File Extension Setup", select awk extension, press Options button)

Changes smart indenting and template editing style for the AWK language.

Begin-end style

Specifies the brace style used by template editing and smart indenting.

Insert braces immediately

Specifies whether template should be inserted with braces.

Minimum expandable keyword length

When template editing is on and you press space bar after a word, a template may be inserted.  If you typically type in a space after variable names, you may want this value to be greater than 1.  Alternately, you can bind the awk_space command to a key other than space bar.

SmartPaste™

Specifies whether copied or pasted text should be reindented according to what the editor thinks is the corrent indent level.  See SmartPaste(TM) for more information.

No space before paren

Determines whether a space is placed between a keyword such as if, for, or while and the open paren when syntax expansion occurs.  ("if("  or "if (").


IDL Options dialog box

("Tools", "Configuration", "File Extension Setup", select omg extension, press Options button)

Changes smart indenting and template editing style for IDL (Interface Definition Language).

Begin-end Style

Specifies the brace style used by template editing and smart indenting.

Insert braces immediately

Specifies whether template should be inserted with braces.

Insert blank line between braces

Specifies whether a blank line should be inserted between braces when a template expands with braces.

Minimum expandable keyword length

When template editing is on and you press space bar after a word, a template may be inserted.  If you typically type in a space after variable names, you may want this value to be greater than 1.  Alternately, you can bind the c_space command to a key other than space bar.

Use SmartPaste™

Specifies whether copied or pasted text should be reindented according to what the editor thinks is the corrent indent level.  See SmartPaste(TM) for more information.

Always use continuation indent on function parameters

Determines whether function parameters should always use the contination indent.

By default, we format multi-line function parameters as follows:

myLongMethodName(firstarg,

                 secondarg,

                 thirdarg

                );

myLongMethodName(

    firstarg,

    secondarg,

    thirdarg

    );

When you turn on "Always use continuation indent on function parameters", you get the following:

myLongMethodName(firstarg,

    secondarg,

    thirdarg

    );

myLongMethodName(

    firstarg,

    secondarg,

    thirdarg,

    );


Change Directory dialog box

(Ctrl+D or "File", "Change Directory..." or gui_cd command)

This dialog box changes the current working directory and optionally the current directory in the concurrent process buffer.

Directory name

Name of directory to change to make active.

Expand alias

Check this box if you want alias you want to specify directory aliases in the Directory Name text box.  See ALIAS facility for more information.

Process chdir

Check this box if you want the current directory in the concurrent process buffer to be changed in addition to the editor's current directory.

Save Settings

Save the settings of the Expand Alias and Process Chdir check box values.  The next time this dialog box appears, these check boxes are set to the values last saved.  In addition, these check box settings effect the cd command which is used to change directory using the command line.


Add Tree dialog box

Files

One or more wildcard file specifications separated with semicolons (i.e.  *.c;*.cpp;*.h).

Recursive

When checked, directories are search recursively.


Cobol Options dialog box

("Tools", "Configuration", "File Extension Setup", select cob extension, press Options button)

Changes smart indenting and template editing style for the COBOL language.

Keyword case

Specifies the case of keywords used by template editing.

Auto case keywords

When on, the case of keywords are changed to the keyword case specified when you type them.  For example, when you type "procedure" and the Keyword case is "Upper case" , the editor changes "procedure" to "PROCEDURE".

Minimum expandable keyword length

When template editing is on and you press space bar after a word, a template may be inserted.  If you typically type in a space after variable names, you may want this value to be greater than 1.  Alternately, you can bind the cobol_space command to a key other than space bar.

Use COBOL 74 Syntax

Indicates whether the COBOL 74 syntax should be used by syntax expansion.

Use COBOL 2000 Syntax

Indicates whether the COBOL 2000 (Object Oriented COBOL) syntax should be used by syntax expansion.  COBOL 74 and COBOL 2000 Syntax are mutually exclusive options.

Embedded SQL Dailect

Specifies the specific type of SQL that is embedded in your COBOL source.  This effects embedded SQL language color coding.

COBOL style line numbering

When on, expect line numbers in columns 1-6 when renumbering lines.

SPF style line numbering

When on, expect line numbers in columns 73-80 when renumbering lines.


Compare Options dialog box

("Tools", "File Compare...", "Options..." or compare_options command)

Changes the file compare options used by the compare command.  See Comparing Files for more information.

Binary compare

When checked a stream compare (byte by byte) compare is performed.  Typically a line by line compare is performed.

Expand tabs before compare

When checked, tabs are expanded to the appriate number of spaces before lines from each file are compared.

Ignore leading spaces

When checked, differences in leading spaces of lines are ignored.

Ignore trailing spaces

When checked, differences in trailing spaces at the end of lines are ignored.

Ignore all spaces

When checked, differences in spacing between characters in lines are ignored.

Ignore case

When Checked, differences in character casing is ignored.


Slick-C Options dialog box

("Tools", "Configuration", "File Extension Setup", select e extension, press Options button)

Changes smart indenting and template editing style for the Slick-C language.

Begin-end Style

Specifies the brace style used by template editing and smart indenting.

Insert braces immediately

Specifies whether template should be inserted with braces.

Minimum expandable keyword length

When template editing is on and you press space bar after a word, a template may be inserted.  If you typically type in a space after variable names, you may want this value to be greater than 1.  Alternately, you can bind the slick_space command to a key other than space bar.

Indent CASE from SWITCH

When checked, template editing places the case statement indented from the switch statement column.

Smart Paste™

Specifies whether copied or pasted text should be reindented according to what the editor thinks is the corrent indent level.  See SmartPaste(TM) for more information.

No space before paren

Determines whether a space is placed between a keyword such as if, for, or while and the open paren when syntax expansion occurs.  ("if("  or "if (").

Always use continuation indent on function parameters

Determines whether function parameters should always use the contination indent.

By default, we format multi-line function parameters as follows:

myLongMethodName(firstarg,

                 secondarg,

                 thirdarg

                );

myLongMethodName(

    firstarg,

    secondarg,

    thirdarg

    );

When you turn on "Always use continuation indent on function parameters", you get the following:

myLongMethodName(firstarg,

    secondarg,

    thirdarg

    );

myLongMethodName(

    firstarg,

    secondarg,

    thirdarg,

    );


Java Options dialog box

("Tools", "Configuration", "File Extension Setup", select java extension, press Options button)

Changes smart indenting and template editing style for the Java language.

Begin-end Style

Specifies the brace style used by template editing and smart indenting.

Insert braces immediately

Specifies whether template should be inserted with braces.

Insert blank line between braces

Specifies whether a blank line should be inserted between braces when a template expands with braces.

Minimum expandable keyword length

When template editing is on and you press space bar after a word, a template may be inserted.  If you typically type in a space after variable names, you may want this value to be greater than 1.  Alternately, you can bind the slick_space command to a key other than space bar.

Indent CASE from SWITCH

When checked, template editing places the case statement indented from the switch statement column.

Smart Paste™

Specifies whether copied or pasted text should be reindented according to what the editor thinks is the corrent indent level.  See SmartPaste(TM) for more information.

No space before paren

Determines whether a space is placed between a keyword such as if, for, or while and the open paren when syntax expansion occurs.  ("if("  or "if (").

Always use continuation indent on function parameters

Determines whether function parameters should always use the contination indent.

By default, we format multi-line function parameters as follows:

myLongMethodName(firstarg,

                 secondarg,

                 thirdarg

                );

myLongMethodName(

    firstarg,

    new ActionListener() {

        public void actionPerformed(ActionEvent e) {

            createdButtonFired(buttonIndex);

        }

    },

    thirdarg

    );

myLongMethodName(new ActionListener() {   // special case anonymous class first argument

        public void actionPerformed(ActionEvent e) {

            createdButtonFired(buttonIndex);

        }

    },

    secondarg,

    thirdarg

    );

myLongMethodName(

    secondarg,

    new ActionListener() {

        public void actionPerformed(ActionEvent e) {

            createdButtonFired(buttonIndex);

        }

    },

    thirdarg

    );

When you turn on "Always use continuation indent on function parameters", you get the following:

myLongMethodName(firstarg,

    secondarg,

    thirdarg

    );

myLongMethodName(

    firstarg,

    new ActionListener() {

        public void actionPerformed(ActionEvent e) {

            createdButtonFired(buttonIndex);

        }

    },

    thirdarg

    );

myLongMethodName(new ActionListener() {   // special case anonymous class first argument

        public void actionPerformed(ActionEvent e) {

            createdButtonFired(buttonIndex);

        }

    },

    secondarg,

    thirdarg

    );


Find File dialog box

("File", "Open", press Find File button)

Searches for files and allows you to open one or more files.

File pattern

File or file pattern to search for.  Subdirectories are always scanned.  Press the Search button to start the search.

Search

Starts searching for the file pattern specified.

Files found

List the files that match the last search.  Use Ctrl+Click to select more than one file.

Read only

When check, the selected files are opened read only.

Open

Opens the selected files in the Files Found list box.

Advanced >>

See Open dialog box for information on advanced open options.


Global Replace dialog box

(Alt+Shift+G or "File", "File Manager...", "Global Replace..." or fileman_replace command)

Performs a search and replace on the selected files the file manager.  See The Visual SlickEdit File Manager for more information.

Search for

Enter the string you want to search for here.

Replace with

Search string is replaced with this string.

Match case

When checked, a case sensitive search is performed.

Match whole word

When checked, a word search is performed.  Before a search is considered successful, the characters to the left and right of the occurrence of the search string found are checked to be non-word characters.  To change the word characters for a specific extension, use the Extension Options dialog box (F5 or "Tools", "Configuration", "File Extension Setup..." ).

Regular expression

When checked, a regular expression is performed.  See Regular Expressions for more information.

Place cursor at end

When checked, the cursor is placed at the end of the occurrence found.


Unlist Search dialog box

("File", "File Manager...", "Files...", "Unlist Search..." or unlist_search command)

Deletes lines in the file manager list which contain a search pattern you specify.  See The Visual SlickEdit File Manager for more information.

Search for

Enter the string you want to search for here.

Match case

When checked, a case sensitive search is performed.

Match whole word

When checked, a word search is performed.  Before a search is considered successful, the characters to the left and right of the occurrence of the search string found are checked to be non-word characters.  To change the word characters for a specific extension, use the Extension Options dialog box (F5 or "Tools", "Configuration", "File Extension Setup..." ).

Regular expression

When checked, a regular expression is performed.  See Regular Expressions for more information.


Font dialog box

Some font names are "portable" font names which are translated into other fonts.  This allows Slick-C macros and dialog boxes to be portable across UNIX and Windows.

OEM Fixed Font	A fixed font which looks good for an editor control.  OEM was intended to indicate that the DOS graphic box drawing characters are available.  However, we have not found a standard OEM font on UNIX.

Courier	Another fixed font which looks good for an editor control or selection list box which needs a fixed font.

MS Sans Serif	A dialog box font.

System	A alternate text box font.  Usually MS Sans Serif is used as the Text Box font.

Font

The name of the font.

Size

Point size of font.

Style

Specifies bold, italic, strike through, or underline font attributes.


Fortran Options dialog box

("Tools", "Configuration", "File Extension Setup", select for extension, press Options button)

Changes smart indenting and template editing style for the Fortran language.

Keyword case

Specifies the case of keywords used by template editing.

Minimum expandable keyword length

When template editing is on and you press space bar after a word, a template may be inserted.  If you typically type in a space after variable names, you may want this value to be greater than 1.  Alternately, you can bind the cobol_space command to a key other than space bar.

Multi-line IF expansion

Indicates whether an the IF template should include and ENDIF.

COBOL style line numbering

When on, expect line numbers in columns 1-6 when renumbering lines.

SPF style line numbering

When on, expect line numbers in columns 73-80 when renumbering lines.


OS/390 Assembler Options dialog box

("Tools", "Configuration", "File Extension Setup", select asm390 extension, press Options button)

Changes line numbering and template editing style for the OS/390 Assembler language.

Minimum expandable keyword length

When template editing is on and you press space bar after a word, a template may be inserted.  If you typically type in a space after variable names, you may want this value to be greater than 1.  Alternately, you can bind the cobol_space command to a key other than space bar.

COBOL style line numbering

When on, expect line numbers in columns 1-6 when renumbering lines.

SPF style line numbering

When on, expect line numbers in columns 73-80 when renumbering lines.


File Sort dialog box

("File", "File Manager...", "Sort..." or fsort command)

Sorts the files listed in the Visual SlickEdit file manager on a primary and optionally a secondary key.  Check the Secondary Sort check box if you want to sort on a secondary key.


Inherited Code Found dialog box

This dialog box is displayed when there is no code for the event you have chosen and the control is using an inherited event table.   You will see this dialog box if you copy a control with existing code and paste else where and then double click on the new instance of the control.

Inherit code

When this option is selected, a statement which links a new event event table to an inherited event table (event table not belonging to the control and possible copied through the clipboard).  Effects user level 1 inheritance code (p_eventtab) only.

Go to inherited code

When this option is selected, no code is inserted.   The cursor is placed on the existing inherited event handling code.

Don't inherit code

Select this option when you do not want to inherit the existing user level 1 inheritance code (p_eventtab).  Sometimes when you copy a control with existing code to the clipboard, you will not want to inherit the existing event handlers.


Insert Literal dialog box

("Edit", "Insert Literal..." or insert_literal command)

Inserts a character you choose at the cursor location in the current buffer.  The text box to the right of the Character Code label displays the character.  The second text box displays the decimal character code, hex character code, or ASCII character depending on the option selected.


Modula-2 Options dialog box

("Tools", "Configuration", "File Extension Setup", select mod extension, press Options button)

Changes smart indenting and template editing style for the Modula-2 language.

Minimum expandable keyword length

When template editing is on and you press space bar after a word, a template may be inserted.  If you typically type in a space after variable names, you may want this value to be greater than 1.  Alternately, you can bind the modula_space command to a key other than space bar.


Standard Open dialog box

The dialog box is displayed to open existing files, open new files, and to save files.

File name

The name of the file you wish to open or save is typed into the File Name combo box.  Use the Open button (if present) to open several files at once with a wildcard file specification such as "*.c".  This combo box as well as many other Visual SlickEdit combo boxes have the following powerful features:

•	Completion.  Press space bar to have Visual SlickEdit type the rest or more of the partial filename for you.  For example, type "c:\aut" and press space bar.  Visual SlickEdit will attempt to expand this to "c:\autoexec.bat" (or to "c:\autoexec." if you have a file like "c:\autoexec.bak").  Press '?' to list possible matches for what you have typed so far.  For example, if you type "a" and press '?', a list will be displayed of all files which start with the letter 'a'.

•	Alias expansion.  Type the alias name and press Ctrl+Space to expand an alias (see ALIAS Facility).   Aliases save time typing in long path names and wasting time clicking through the Directories list box.

•	Combo box retrieval.  Press Down arrow to retrieve the previous filename you entered here.  The combo box list (Alt+Down) displays all the previous filenames entered.  This retrieval information is saved across edit sessions.

•	Multiple clipboards.  Press Ctrl+Shift+V to view a list of all your clipboards.

•	Many keys from your emulation are supported here such as copy word to clipboard (Ctrl+K), cut line (Ctrl+Backspace), and cut word (Ctrl+Shift+K).

File list

The File List is located below the File Name combo box.  Click in this list box to change the file name displayed in the combo box.  Multiple files may be selected with Ctrl+Click.

List files of type

This combo box lets you display files of particular extensions.   Select a different file filter from this combo's list box to change the file list.

Directories

Double click on files in this list box to change the directory.  The File List is updated.

Read only

(Not always present) Check this box if you wish to open a file but do not want to accidentally modify the file.  Visual SlickEdit will automatically open files with the read only attribute set as read only, regardless of the settings of this check box.

Change dir

(Not always present) Check this box if you want to allow the current directory to changed to the directory containing the files listed after you exit this dialog.  Use the General Configuration dialog box ("Tools", "Configuration", "General...", select General Tab) to set the default value of this check box.

Keep old file

(Not always present) When performing a Save As operation, this check box may be present.  When checked, the file is saved under the name you specify but the buffer name is not changed.

Open

(Not always present) To open a wildcard file specification such as "*.c".  Type "*.c" in the File Name text box, and click on the Open button.

Invert

(Not always present) Click on the Invert button to select all files in the File List that are currently not selected and deselect all files which are selected.  The Invert button appears on other dialog boxes which have list boxes which support selection of multiple files with Ctrl+Click.  Since there are no file selected when the File Open dialog box initial appears, you can click on the Invert button followed by the OK button to open all files displayed in the File List.


Explorer Standard Open dialog box

The Standard Open dialog box is always used instead of this dialog for non-windows platforms.  This dialog box is displayed to open existing files, open new files, and to save files.

The Standard Open dialog box is faster than this dialog box.   To configure Visual SlickEdit to use the fast open dialog box, turn on the "Use Fast Open Dialog" check box ("Configuration", "General...", select General Tab).

File name

The name of the file you wish to open or save is typed into the File name text box.  This text box has the following additional feature:

•	Alias expansion.  Type the alias name and press Ctrl+Space to expand an alias (see ALIAS Facility).   Aliases save time typing in long path names and wasting time clicking through the Directories list box.

File List

The File List is located above the File name text box.  Click in this list box to change the file name displayed in the text box.  Multiple files may be selected with Ctrl+Click.  Press Ctrl+A to select all files in the list.

Files of type

This combo box lets you display files of particular extensions.   Select a different file filter from this combo's list box to change the file list.

Open as read-only

(Not always present) Check this box if you wish to open a file but do not want to accidentally modify the file.  Visual SlickEdit will automatically open files with the read only attribute set as read only, regardless of the settings of this check box.

Change dir

(Not always present) Check this box if you want to allow the current directory to changed to the directory containing the files listed after you exit this dialog.  Use the General Configuration dialog box ("Tools", "Configuration", "General...", select General Tab) to set the default value of this check box.

Keep old file

(Not always present) When performing a Save As operation, this check box may be present.  When checked, the file is saved under the name you specify but the buffer name is not changed.


PL/I Options dialog box

 ("Tools", "Configuration", "File Extension Setup", select pl1 extension, press Options button)

Changes smart indenting and template editing style for the PL/I language.

DO/END style

Specifies whether syntax expansion should place the DO on a separate line.

Insert DO/END immediately

Indicates whether syntax expansion should automatically add a DO/END block.

Insert blank line between DO/END

Indicates whether syntax expansion should insert a blank line when a DO/END block is inserted.

Minimum expandable keyword length

When template editing is on and you press space bar after a word, a template may be inserted.  If you typically type in a space after variable names, you may want this value to be greater than 1.  Alternately, you can bind the pl1_space

command to a key other than space bar.

Keyword case

Specifies the case of keywords used by built-in aliases.  This also determines the case used by the Auto case keywords check box.

Auto case keywords

When on, the case of keywords are changed to the keyword case specified when you type them.  For example, when you type "procedure" and the Keyword case is "Upper case" , the editor changes "procedure" to "PROCEDURE".

Use SmartPaste

Specifies whether copied or pasted text should be reindented according to what the editor thinks is the corrent indent level.  See SmartPaste(TM) for more information.

Indent WHEN from SELECT

Indicates whether the WHEN clause inside a SELECT statement should be indented.

SPF style line numbering

When on, expect line numbers in columns 73-80 when renumbering lines.


Progress 4GL Options dialog box

("Tools", "Configuration", "File Extension Setup", select p4gl extension, press Options button)

DO/END style

Specifies whether syntax expansion should place the DO on a separate line.

Insert DO/END immediately

Indicates whether syntax expansion should automatically add a DO/END block.

Insert blank line between DO/END

Indicates whether syntax expansion should insert a blank line when a DO/END block is inserted.

Minimum expandable keyword length

When template editing is on and you press space bar after a word, a template may be inserted.  If you typically type in a space after variable names, you may want this value to be greater than 1.  Alternately, you can bind the p4gl_space command to a key other than space bar.

Use SmartPaste

Specifies whether copied or pasted text should be reindented according to what the editor thinks is the corrent indent level.  See SmartPaste(TM) for more information.

Indent WHEN from CASE

Indicates whether the WHEN clause inside a CASE statement should be indented.

Keyword case

Specifies the case of keywords used by built-in aliases.  This also determines the case used by the Auto case keywords check box.

Auto case keywords

When on, the case of keywords are changed to the keyword case specified when you type them.  For example, when you type "procedure" and the Keyword case is "Upper case" , the editor changes "procedure" to "PROCEDURE".


PL/SQL Options dialog box

("Tools", "Configuration", "File Extension Setup", select plsql extension, press Options button)

Minimum expandable keyword length

When template editing is on and you press space bar after a word, a template may be inserted.  If you typically type in a space after variable names, you may want this value to be greater than 1.  Alternately, you can bind the plsql_space command to a key other than space bar.

Keyword case

Specifies the case of keywords used by built-in aliases.  This also determines the case used by the Auto case keywords check box.

Auto case keywords

When on, the case of keywords are changed to the keyword case specified when you type them.  For example, when you type "create" and the Keyword case is "Upper case" , the editor changes "create" to "CREATE".

Use SmartPaste™

Specifies whether copied or pasted text should be reindented according to what the editor thinks is the corrent indent level.  See SmartPaste(TM) for more information.


SQL Server Options dialog box

("Tools", "Configuration", "File Extension Setup", select sqlserver extension, press Options button)

Minimum expandable keyword length

When template editing is on and you press space bar after a word, a template may be inserted.  If you typically type in a space after variable names, you may want this value to be greater than 1.  Alternately, you can bind the sqlserver_space command to a key other than space bar.

Keyword case

Specifies the case of keywords used by built-in aliases.  This also determines the case used by the Auto case keywords check box.

Auto case keywords

When on, the case of keywords are changed to the keyword case specified when you type them.  For example, when you type "create" and the Keyword case is "Upper case" , the editor changes "create" to "CREATE".


DB2 Options dialog box

("Tools", "Configuration", "File Extension Setup", select db2 extension, press Options button)

Minimum expandable keyword length

When template editing is on and you press space bar after a word, a template may be inserted.  If you typically type in a space after variable names, you may want this value to be greater than 1.  Alternately, you can bind the plsql_space command to a key other than space bar.

Keyword case

Specifies the case of keywords used by built-in aliases.  This also determines the case used by the Auto case keywords check box.

Auto case keywords

When on, the case of keywords are changed to the keyword case specified when you type them.  For example, when you type "create" and the Keyword case is "Upper case" , the editor changes "create" to "CREATE".

SPF style line numbering

When on, expect line numbers in columns 73-80 when renumbering lines.

Use SmartPaste™

Specifies whether copied or pasted text should be reindented according to what the editor thinks is the corrent indent level.  See SmartPaste(TM) for more information.


Pascal Options dialog box

("Tools", "Configuration", "File Extension Setup", select pas extension, press Options button)

Changes smart indenting and template editing style for the Pascal language.

Begin-end style

Specifies the begin-End style used by template editing and smart indenting.

Insert begin/end pair

Specifies whether template should be inserted with begin and end.

Begin/end comments

Specifies whether a comment is appended after the end keyword to indicate the type of loop or case it terminates.  In addition the begin and end for procedures and functions are commented.  No comment is appended to begin/end pair of an if statement.

Keyword case

Specifies the case of keywords used by template editing.

Indent constant from case

Specifies whether constants of a case statement are indented or aligned to the case keyword.

Use SmartPaste™

Specifies whether copied or pasted text should be reindented according to what the editor thinks is the corrent indent level.  See SmartPaste(TM) for more information.

Minimum expandable keyword length

When template editing is on and you press space bar after a word, a template may be inserted.  If you typically type in a space after variable names, you may want this value to be greater than 1.  Alternately, you can bind the pascal_space command to a key other than space bar.


REXX Options dialog box

 ("Tools", "Configuration", "File Extension Setup", select rexx extension, press Options button)

Changes smart indenting and template editing style for the REXX language.

Keyword case

Specifies the case of keywords used by template editing.

SPF style line numbering

When on, expect line numbers in columns 73-80 when renumbering lines.

Minimum expandable keyword length

When template editing is on and you press space bar after a word, a template may be inserted.  If you typically type in a space after variable names, you may want this value to be greater than 1.  Alternately, you can bind the rexx_space command to a key other than space bar.


JCL Options dialog box

("Tools", "Configuration", "File Extension Setup", select jcl extension, press Options button)

Changes smart indenting and template editing style for the JCL language.

Minimum expandable keyword length

When template editing is on and you press space bar after a word, a template may be inserted.  If you typically type in a space after variable names, you may want this value to be greater than 1.  Alternately, you can bind the rexx_space command to a key other than space bar.

SPF style line numbering

When on, expect line numbers in columns 73-80 when renumbering lines.


dBASE Options dialog box

("Tools", "Configuration", "File Extension Setup", select prg extension, press Options button)

Changes smart indenting and template editing style for the dBASE language.

Minimum expandable keyword length

When template editing is on and you press space bar after a word, a template may be inserted.  If you typically type in a space after variable names, you may want this value to be greater than 1.  Alternately, you can bind the dbase_space command to a key other than space bar.

Keyword case

Specifies the case of keywords used by template editing.

Indent CASE from DO CASE

When checked, template editing places the case statement indented from the DO CASE statement column.

Indent first level of code

Specifies whether smart indenting should indent the cursor after delarations such as functions.


Go To Definition dialog box

("Search", "Go To Definition..." or gui_push_tag command)

See Dynamic Tagging and Class Browser for more information about tagging.

Type the tag you wish to go to.  You may use Space bar and '?' (see completion) to help enter the tag name.  A bookmark is placed at the current cursor location before the cursor is placed on the tag definition.  Use the pop_bookmark command (Ctrl+,) to return to the previous bookmark.  To create or modify a tag file, use the Tag Files dialog box ("Search", "Tag Files...").  Your tag files will automatically be updated when you make edits.  Currently the C, C++, Pascal, Modula-2, dBASE, COBOL, FORTRAN, Ada, and Assembly languages are supported.  Use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...") to install support for Modula-2, dBASE, COBOL, FORTRAN.  See "tags.e" for information on adding support for other languages.

The combo box list displays history for previous tags you have entered into the combo text box.


Prompt Replace dialog box

This dialog box appears after a search and replace is initiated with the Replace dialog box.

Button	Action

Yes	Make change and continue searching.

No	No change and continue searching.

Last	Make change and stop searching.

Go	Make change and change the rest without prompting.

Quit	Exits command.  By default, the cursor is NOT restored to its original position.  If you want the cursor restored to its original position, invoke the command "set-var def-restore-cursor 1" and save the configuration.


Refer to dialog box

When an one extension refers to another extension, both extension operate exactly the same.  That is, all tagging, template editing, word processing options, and all other extension options are the same.  In addition, modifying the extension option information for either extension updates both extensions.


Draw Lines dialog box

Runs the external draw batch macro to draw lines using graphic characters.  You will want to set the window font to OEM Fixed Font (default) in order to view the graphic characters.


Seek dialog box

("Search", "Seek..." or gui_seek command)

Seeks to a byte offset in the current buffer.  This function is the same as the C  lseek function.  However, if you have opened the file with tab expansion, the seek position on disk may be different.

You may specify a C syntax expression.  In addition, you may prefix the expression with a + or - to specify a relative seek position.

Example

0x10+10	Seek to offset 26

+8+4	Seek to current offset + 12

-8+4	Seek to current offset - 12

Decimal

Allows you to enter the seek position in decimal

Hex

Allows you to enter the seek position in hexadecimal.  You can type an 'x' as the first character in the Position to Seek for text box and this option will automatically be selected.


Set Variable dialog box

("Macro", "Set Macro Variable..." or gui_set_var command)

Sets a Slick-C macro variable to a value you specify.

Variable

Name of Slick-C global variable.  You may use space bar and '?' (completion) to assist you in entering the name.

Value

Enter the new value of the variable here.

Edit...

Complex variables (arrays, hash tables, structures, unions) can only be edited by pressing this button.


Error File dialog box

Displayed by list_errors command.

Move the cursor in the editor control to the error message you want to got to and press the Go To Cursor Error button to view the source code.


Window Font dialog box

("Window", "Font..." or wfont command)

Some font names are "portable" font names which are translated into other fonts.  This allows Slick-C macros and dialog boxes to be portable across UNIX and Windows.

OEM Fixed Font	A fixed font which looks good for an editor control.  OEM was intended to indicate that the DOS graphic box drawing characters are available.  However, we have not found a standard OEM font on UNIX.

Courier	Another fixed font which looks good for an editor control or selection list box which needs a fixed font.

MS Sans Serif	A dialog box font.

System	A alternate text box font.  Usually MS Sans Serif is used as the Text Box font.

Scope

Select current window if you only want to effect the current window font.   The All Windows and Default option sets the font for all windows and the font for newly created windows.

Font

The name of the font.

Size

Point size of font.

Style

Specifies bold, italic, strikethrough, or underline font attributes.


Backup dialog box

("File", "File Manager...", "Backup..." or fileman_backup command)

Copies the selected files (lines with '>' character as first character of line) to a directory you choose.  The directory structure on the source file is preserved.  Typically only a drive letter is specified for the destination directory.  However, you may specify a path if you wish to further nest the directory structure.  See Selecting files and Operating on Files for information on selecting files in the Visual SlickEdit file manager.


Move dialog box

("File", "File Manager...", "Move..." or fileman_move command)

Moves the selected files (lines with '>' character as first character of line) to a directory you choose.  The destination drive does not have to be the same as the source drive.  See Selecting files and Operating on Files for information on selecting files in the Visual SlickEdit file manager.


Copy dialog box

("File", "File Manager...", "Copy..." or fileman_copy command)

Copies the selected files (lines with '>' character as first character of line) to a directory you choose.  See Selecting files and Operating on Files for information on selecting files in the Visual SlickEdit file manager.


Insert File dialog box

("File", "Insert a File..." or gui_insert_file command)

Inserts a file you choose at the cursor location in the current buffer.  The Explorer Standard Open dialog box or Standard Open dialog box is displayed to prompted you for a file.


Write Selection dialog box

("File", "Write Selection..." or gui_write_selection command)

Writes the selected text to a file you choose.  The Explorer Standard Open dialog box or Standard Open dialog box is displayed to prompted you for a file.


Append Selection dialog box

("File", "Append Selection..." or gui_append_selection command)

Writes the selected text to a file you choose.  The Explorer Standard Open dialog box or Standard Open dialog box is displayed to prompted you for a file.


Load Module dialog box

("Macro", "Load Module..." or gui_load command)

Loads a Slick-C macro file you choose.  The Explorer Standard Open dialog box or Standard Open dialog box is displayed to prompted you for a file.


Read List dialog box

("File", "File Manager...", "Files", "Read List..." or read_list command)

This dialog box is similar to the Append List dialog box which adds files to the current list.  The difference is that the Read List dialog box prompts you for a filename which contains the names of files to append to the current list.  The file may be a list of filenames or may be a file in the same format a file manager list.  You may use the Write List dialog box to write  list containing the selected filenames.


Write List dialog box

("File", "File Manager...", "Files", "Write List..." or write_list command)

Writes a list of the currently selected filenames to a file you choose.   The Explorer Standard Open dialog box or Standard Open dialog box is displayed to prompted you for a file.  See Selecting files and Operating on Files for information on selecting files in the Visual SlickEdit file manager.


Load Files dialog box

("Project", "List Files..." or project_load command)

This dialog box is used open one or more files from the current project.  Use Ctrl+Click to select more than one file.

Edit

Switches to the selected buffer in the list box.

Save

Saves the selected buffer in the list box.

Close

Deletes the selected buffer in the list box.  If One File per window is on, all windows displaying the buffer are deleted as well.  You are prompted whether you wish to save a modified buffer before the buffer is deleted.

Order

This button toggles the display order between sorted and next/prev link order.


Select a Buffer dialog box

("Document", "List Buffers..." or list_buffers command)

This dialog box is typically used to switch to a specific buffer.  If the One file per window option is on, the active window will change when you switch to a specific buffer unless the active window is already displaying the buffer you select  (See Link Window dialog box).    Modified buffers have a '*' displayed in front of the buffer name.

Edit

Switches to the selected buffer in the list box.

Save

Saves the selected buffer in the list box.

Close

Deletes the selected buffer in the list box.  If One file per window is on, all windows displaying the buffer are deleted as well.  You are prompted whether you wish to save a modified buffer before the buffer is deleted.

Order

This button toggles the display order between sorted and next/prev link order.


Link Window dialog box

("Window", "Link Window..." or link_window command)

This dialog box is typically used when the One file per window option is on, to change the buffer displayed in the current window (possibly for comparing files).  Modified buffers have a '*' displayed in front of the buffer name.

Link to Window

Changes the buffer displayed in the current window to the selected buffer in the list box.  Modifications made to the buffer previously displayed will not be lost.

Open File

Open a file and displays it in the current window.  No additional window is created.

Process

Starts concurrent process buffer and displays it in the current window.  If concurrent process buffer has already been started, it is linked to the current window.


Ada Options dialog box

("Tools", "Configuration", "File Extension Setup", select ada extension, press Options button)

Changes smart indenting and template editing style for the Ada language

Minimum expandable keyword length

When template editing is on and you press space bar after a word, a template may be inserted.  If you typically type in a space after variable names, you may want this value to be greater than 1.  Alternately, you can bind the ada_space command to a key other than space bar.

Keyword case

Specifies the case of keywords used by template editing.


Data Set Utilities dialog box

 ("File", "Data Sets Utilities...")

This dialog box is used to perform various data set file management tasks.  In the future many more operations will be provided by this dialog.  If you have a request for a particular feature, call our technical support and they will forward the information to the developers.

Search

When this dialog first comes up, use this combo box to search for data sets or search for a data set and a member.

The following characters have special meaning when searching for data sets or members:

*	Matches 0 or more characters

?	Matches any character

[char-set]	Matches any one of the characters specified by {\i char-set}.  A '-' character may be used to specify ASCII (not EBCIDIC) ranges.  The expression [A-Z] matches any upper case letter.  '\\' may be used inside the square brackets to define literal characters or define ASCII characters.  For example "\\-" specifies a literal dash character.

Examples

//sys1.*	Search for all data sets starting with "sys1."

//sys1.maclib/open	Search for data set "sys1.maclib" and show info for member "open"

//*	Search for all data sets

//sys?.*lib	Search for data sets starting with "sys", followed by any character, followed by "." follow by 0 or more characters, and then followed by "lib".

When this combo box is viewing a list of members, use this combo box to search for members.

Examples

ady*	Search for all members starting with "ady".

*.cob	List all members that are recognized as a COBOL source file.

*.s	List all members that are recognized as an Assembly source file.

*.rexx	List all members that are recognized as a REXX source file.

*.jcl	List all members that are recognized as a JCL source file.

*.c	List all members that are recognized as a C source file.

Allocate

Displays a dialog which allows you to create a new data set.

Open

Lists members of a partioned data set or opens a sequential data set or PDS member for editing.

Browse

Opens a sequential data set or PDS member for read only viewing.

Delete

Deletes the selected data sets or members.

Rename

Renames a member or data set.

Copy

Copy supports the following variations:

Sequential data set to sequential data set

Sequential data set to a PDS member

Entire PDS

PDS member to PDS member

PDS member to sequential data set

Info

Displays information on a data set.

Submit

Submits the selected JCL data sets.

Catalog

Catalogs the selected data sets.

Uncatalog

Uncatalogs the selected data sets.

Compress

Compresses the selected partitioned data sets.

Free

Deletes the selected data sets and immediately free the space used by the data sets.

Refresh

Updates the current listing.


Open Menu dialog box

("Macro", "Open/New Menu...")

Open

Opens the menu specified in the combo box for editting with the Menu Editor (See Menu Editor dialog box).  If the menu specified does not already exist, it is created.

New

Creates a new menu with a unique name for editting with the Menu Editor (See Menu Editor dialog box).  The Menu Editor allows you to change the name of menu.

Delete

Deletes the specified in the combo box.

Show

Runs the menu by displaying it as a pop-up.  Use this button during macro recording to create a command which runs a menu by displaying it as a pop-up.  If you bind the command to a left or right button mouse event, the menu will be displayed at the cursor position.


Menu Editor dialog box

("Macro", "Menus...", Open menu or create New menu)

The menu editor is used for editting menu resources.   Use the menu editor to modify the Visual SlickEdit MDI menu bar or an existing menu resource which can be displayed as a popup or menu bar.    The New button on the Open Menu dialog box creates a new menu resource and places you in the Menu Editor so you can add menu items.  After creating a menu you can use the Show button on the Open Menu dialog box while macro recording to create a command which runs a menu by displaying it as a pop-up.  If you bind the recorded command to a left or right button mouse event, the menu will be displayed at the cursor position.  You DO NOT need to specify key bindings for menu items because our menu editor automatically determines the key bindings for you.  Use the General Configuration dialog box ("Tools", "Configuration", "General...", select More Tab) to choose between short and long key names.

See Menu Macro Programming for information on creating forms with menu bars or advanced information.

Menu name

Renames the current menu resource to the name specified.  You can define your own menu resource which is used instead of our menu bar WITHOUT changing the name of our default menu bar "_mdi_menu".  Use the -m invocation option (ex. -m mymenu) or set the def_mdi_menu macro variable to your menu name ("Macro", "Set Macro Variable...").

Caption

Title displayed for menu item.  For menu items, set the caption to "-" if you want a line separating menu items which follow.

Command

Macro command executed when the menu item is selected.  This may be an internal macro command or a command line for running an external program.

Alias...

Displays Menu Item Alias dialog box

Help Cmd

Macro command executed when the user presses F1 when the menu item is selected.  Usually it is a help or popup_imessage command.  For example, if you specified gui_open as the menu item command, specify "help open dialog box" as the help item.  If you don't know the name of the dialog box displayed, search for help on the command.  The help for each command should indicate the name of the dialog box displayed.  Some commands do not display dialog boxes.  For these commands specify "help command" where command is name of the command this menu item executes or "help xxxx menu" where xxxx is the name of the drop-down menu this command is on.

Message

Message text to be displayed when selection cursor is on this menu item.  This message is currently only used when the menu is used as the Visual SlickEdit menu bar.  In the future, we will supply a callback to allow other forms to display menu messages.  Let us know if you need this feature.

Submenu

Check this box if you want to create a menu which contains other menu items.

Auto Enable...

Displays Auto Enable Properties dialog box

Up

Moves the selected menu item above the previous menu item.

Down

Moves the selected menu item below the next menu item.

Next

Selects the menu item after the currently selected menu for editing.  Use this button to insert a blank menu item after the last menu item in the list.

Insert

Inserts a blank menu item before the selected menu item.

Delete

Deletes the selected menu item.


Menu Item Alias dialog box

This dialog box allows you to define aliases (similar commands) for the command that is being executed.  Enter each alias command on a separate line.  If one of the alias commands are bound to a key, that key name will be displayed to the right of the menu item.  For example, the e and edit commands are absolutely identically in function except that the e command requires fewer characters to type.  The gui_open command is indentical to the edit command except that it prompts the user with a dialog box where as the edit command prompts for files on the command line.  These two examples illustrate the best reasons for using aliases.


Auto Enable Properties dialog box

For convenience, Visual SlickEdit has some predefines enable/disable attributes which you can specify for any command.  When these predefined auto-enabling attributes are not enough, then you need to implement a callback which determines the enable/disable state of the command.  See section Menu Macro Programming for information on enabling and disabling menu items with your own callback.

Requires editor control

Indicates that this command should be enabled only if operating on an editor control.

Allow in read only mode

Indicates that this command should be enabled if the editor control is in strict read only mode.

Allow when window is iconized

Indicates that this command should be enabled if the editor control is an MDI child which is iconized.

Requires selection in active buffer

Indicates that this command should be disabled if there is no selection in the active buffer.

Requires tagging

Indicates that this command should be disabled if the current buffer language type does not support tag navigation.

Requires fileman mode

Indates that this command should be disabled if the current buffer is not in Fileman mode.

Allow in non-MDI editor control

Indicates that this command should be allowed in a non-MDI editor control.

Requires block selection

Indicates that this command should be disabled if there is no selection or the current selection is not of type block/column.

Requires a clipboard

Indicates that this command should be disabled if there is no editor control clipboard available.

Requires a selection

Indicates that this command should be disabled if there is no selection.


Save Failed dialog box

Save as read only

UNIX only:  This check box is enabled if your file does not have any write permissions (no "w" letter).  Turn this check box on to have Visual SlickEdit temporarily change the permissions on the file to read/write.  The resulting file will not have any write permissions (no "w" letter).

Save without creating a backup

This check box is enabled if Visual SlickEdit was unable to create a backup file when trying to save your file.  This can happens when you don't have permissions to create the backup directory or when you are out of disk space.  If you are editing files on a network drive, you may not have access writes for creating a backup directory on that drive.

Configure local backup directory

Non-UNIX platforms only:  If you are editing files on a network drive, you may not have access writes for creating a backup directory on that drive.  Configuring a local backup directory  guarantees that you always have write access.  If the directory you specify does not exist, Visual SlickEdit will create one for you.


Save As dialog box

Saves current buffer under a file name you choose.  Check the keep old file if you do not want the buffer name to be changed.  See Explorer Standard Open dialog box or Standard Open dialog box for information on other controls in the dialog box.

Save as type

This lets you save a file in DOS, UNIX, or Macintosh ASCII format.  If the output filename is the same as the current buffer name, the format of the current buffer is set as well.  The "Current Format" specifies that no changes be made to the end of line characters.

Change dir

Check this box if you want the current directory to be changed to the path of the first opened file.  Use the General Configuration dialog box ("Tools", "Configuration", "General...", select General Tab) to set the default value of this check box.

Keep old file

When checked, the file is saved under the name you specify but the buffer name is not changed.  This check box is not always displayed.


Extension Menu dialog box

("Tools", "Configuration", "Extension Options..." or setupext command, "Menu...")

This dialog box allows you to specify extension specific menus.  Extension specific menus are displayed when the right mouse button is pressed by default.  Use the Open Menu dialog box to create or modify a menu.  The mouse commands which display extension menus are mou_click_menu_block, mou_click_menu_line, and mou_click_menu.

Menu if no selection

Menu displayed when there is no selection.

Menu if selection

Menu displayed when there is a selection.

Select first

When checked (default), a selection can be made instead of displaying the extension menu.  When this is not checked, menu items may be selected by clicking and dragging the mouse.  This option is effects all extension menus.


Configure API Index File dialog box

("Help", "Configure API Index File...")

This dialog box creates a ".idx" file which is used for providing API Apprentice (TM) help on multiple API data base files which may have duplicate API function entries.  After building "api.idx" (UNIX: uapi.idx), press Alt+F1 for API Apprentice (TM) help for the function name at the cursor.

Add

Prompts you for a filename to add to the list of API data base files.

Remove

Removes the selected API data base file.

Edit...

Allows you to modify description for selected API data base file.

Export...

Writes list of keywords for the selected API data base file to a file you choose.

Up

Moves the selected API data base file up in the list.

Down

Moves the selected API data base file down in the list.

Load...

Prompts you for the file name of a new or existing ".idx" file.

API file path

List of directories separated with semicolons.  These directories are used when searching for ".api" files.  These directories are required because idx files contain the ".api" file names without path information.


Configure Index File dialog box

("Help", "Configure Index File...")

This dialog box creates a ".idx" file which is typically used for providing word help on multiple help files which may have duplicate help index entries.  If you want your idx file to be used when you press Ctrl+F1 (wh command), make sure the Word Help Filename(s) on the General Configuration dialog box ("Tools", "Configuration", "General...", select General Tab) specifies this filename.

Add

Prompts you for a filename to add to the list of help files.

Remove

Removes the selected help file.

Edit...

Allows you to modify description for selected help file.

Export...

Writes list of keywords for the selected help file to a file you choose.

Up

Moves the selected help file up.

Down

Moves the selected help file down.

Load...

Prompts you for the file name of a new or existing idx file.

Help file path

List of directories separated with semicolons.  These directories are used when searching for help files.  These directories are required because idx files contain the help file names without path information.


API Apprentice Index dialog box

("Help", "API Apprentice On...")

What is API Apprentice (TM)?

API Apprentice (TM) is a features which helps you type in the parameters to a function or method by providing a dialog box for each function or method.    Besides helping with the parameters it also provides you with help on the function or method.  Just type in part of a function name or method and press Alt+F1 ("Help", "API Apprentice On...") to get API Apprentice (TM) help on the word at the cursor.

This dialog box scans the API index file "api.idx" (UNIX: uapi.idx) for functions or methods which are a prefix match or exact match of the API Entry specified.  Use the Configure API Index File dialog box ("Help", "Configure API Index File...") to create the "api.idx" (UNIX: uapi.idx) file.

Exact match

When checked, only help files which contain an exact match of the keyword specified are displayed.

OK

Displays help on Keyword specified for specified help file.


Help Index dialog box

("Help", "Index Help On...")

This dialog box scans a help ".idx" file for help files which contain a prefix match or exact match of the Help Keyword specified.  Use the Configure Index File dialog box ("Help", "Configure Index File...") to create an idx file.

Close on choose

When checked, this dialog box is closed when the OK button is pressed.

Exact match

When checked, only help files which contain an exact match of the keyword specified are displayed.

Use default

When checked, no search is peformed for a valid help item.  A DDE or shell command is peformed to get help on the "Help Keyword" specified.  The exact action performed here depends on the Default Help dialog box ("Help", "Configure Index File...", "Default...").  Visual C++ help usually works without using this check box.

OK

Displays help on Keyword specified for specified help file.


Workspace Properties dialog box

("Project", "Workspace Properites...")

Lists projects in the current workspace and allows you to add or remove projects from the current workspace.

Properties

Displays project properties for the selected project.

New...

Allows you to add a new project to the current workspace.

Add...

Allows you to add an existing project to the current workspace.

Remove

Removes the selected project from the workspace.

Set Active

Sets the selected project active.


MDI Menu


File Menu

New	Creates an empty file to edit. (new command)

Open...	Opens a file for editing.  (gui_open command)

Close	Closes the current file. (quit command)

Close All	Closes all files. (close_all command)

Save	Saves the current file. (save command)

Save As...	Saves the current file under a different name.  (gui_save_as command)

Save All	Saves all modified files.  (save_all command)

Change Directory...	Changes the current working directory.  (gui_cd command)

FTP...	Displays menu of FTP commands

Print...	Prints current file or selection. (gui_print command)

Printer Setup...	Sets/views printer options.  (printer_setup command)

Insert a File...	Inserts a file you choose at the cursor.  (gui_insert_file command)

Write Selection...	Writes or appends selected text to a file you choose.  (gui_write_selection command)

File Manager...	Displays File Manager menu.

Exit	Prompts you to save files if necessary and exits the editor.


FTP Menu

Open	Activate FTP tab for openning FTP files.

Upload	Upload current FTP file.

Client	Activate FTP Client toolbar.

Profile Manager...	Display FTP Profile Manager dialog box

Options...	Display FTP Profile Manager dialog box.


File Manager Menu

See also The Visual SlickEdit File Manager

New File List...	Displays a directory of files you choose.  (fileman command)

Append Files...	Appends files to current list.  (fileman command)

Sort...	Sorts file list. (fsort command)

Backup...	Copies selected files and preserves directory structure.  (fileman_backup command)

Copy...	Copies selected files to a directory you choose.  (fileman_copy command)

Move...	Moves selected files to a directory you choose. (fileman_move command)

Delete...	Prompts whether to delete selected files.  (fileman_delete command)

Edit...	Edits selected files.  (fileman_edit command)

Select...	Displays menu of select commands.

Files...	Displays Files Menu.

Attribute...	Sets the Read Only, Hidden, System, and Archive attributes of the selected files. (fileman_attr command)

Repeat Command...	Runs internal or external command on selected files.  (for_select command)

Global Replace...	Performs search and replace on selected files.  (for_select command)


Fileman Select Menu

All	Selects all files in the list.  (select_all command)

Deselect All	Selects all files in the list.  (deselect_all command)

Reverse Select	Selects files which are not selected and deselects files which are selected (select_reverse command)

Attribute...	Selects files in the list with Read Only, Hidden, System, and Archive attributes which match the attributes specified. (select_attr command)

Extension...	Selects files based on a file extension you choose. (gui_select_ext command)

Highlight	Selects files which are highlighted. (select_mark command)

Deselect Highlight	Deselects files which are highlighted (deselect_mark command)


Files Menu

Commands in this menu DO NOT delete files on disk.

Unlist All	Removes all files from the list. (unlist_all command)

Unlist Select	Removes selected files from the list. (unlist_select command)

Unlist Extension...	Removes files with a specific extension from the list.  (gui_unlist_ext command)

Unlist Attribute...	Removes files with a specify attribute from the list.  (unlist_attr command)

Unlist Search...	Removes lines which contain a particular search string.

Read List...	Appends a list of files contained in a file.  (read_list command)

Write List...	Writes a file containing the currently selected files.  (write_list command)


Edit Menu

Undo	Undoes the last edit operation.  (undo command)

Redo	Undoes an undo operation.  (redo command)

Cut	Deletes the selected text and copies it to the clipboard (cut command)

Copy	Copies the selected text to the clipboard. (copy_to_clipboard command)

Paste	Inserts the clipboard into the current file. (paste command)

List Clipboards...	Inserts a clipboard selected from a list of your recently created clipboards. (list_clipboards command)

Copy Word	Copies the current word to the clipboard. (copy_word command)

Append to Clipbd	Appends the selected text to the clipboard. (append_to_clipboard command)

Append Cut	Deletes the selected text and appends it to the clipboard. (append_cut command)

Insert Literal...	Inserts a character code you specify

Select...	Displays menu of commands for selecting and deselecting text

Delete...	Displays menu of commands for deleting text.

Fill...	Fills the selected text with a character you choose.  (gui_fill_selection command)

Indent	Indents the selected text based on the tabs or indent for each level.  (indent_selection command)

Unindent	Indents the selected text based on the tabs or indent for each level.  (unindent_selection command)

Other...	Displays menu containing more edit related commands.


Edit Select Menu

Char	Starts or ends a character/stream selection. (select_char command)

Block	Starts or ends a block/column selection. (select_block command)

Line	Starts or ends a block/column selection. (select_line command)

Code Block	Selects text in current code block  (if/loop/switch block etc.) (select_code_block command)

Procedure	Selects text in current function including function heading.  (select_proc command)

Deselect	Unhighlights selected text. (deselect command)

All	Selects all text in current buffer. (select_all command)


Delete Menu

Word	Deletes text from the cursor to the end of the current word and copies it to the clipboard. (cut_word command)

Line	Deletes the current line and copies it to the clipboard. (cut_line command)

To End of Line	Deletes the current line and copies it to the clipboard. (cut_end_line command)

Selection	Deletes the selected text. (delete_selection command)

All	Deletes all text in current buffer. (delete_all command)


Edit Other Menu

Lowcase	Translates the characters in the selected text to lower case.  (lowcase_selection command)

Upcase	Translates the characters in the selected text to upper case.  (upcase_selection command)

Shift Left	Deletes the first character of text in each line of the selected text.  (shift_selection_left command)

Shift Right	Inserts a space at the first character of each line of the selected text.  (shift_selection_right command)

Overlay Block	Overwrites selected block/column of text at the cursor.  (overlay_block_selection command)

Adjust Block	Overlays the selected text at the cursor and fills the original selected text with spaces.  (adjust_block_selection command)

Enumerate...	Adds incrementing numbers to a selection. (gui_enumerate command)

Tabs to Spaces	Converts tabs to appropriate number of spaces.  If there is no selection the entire buffer is converted. (convert_tabs2spaces command)

Spaces to Tabs	Converts leading spaces to tabs.  If there is no selection the entire buffer is converted. (convert_spaces2tabs command)


Search Menu

Find...	Searches for a string you specify. (gui_find command)

Next Occurrence	Searches for the next occurrence of the last string you searched for. (find_next command)

Previous Occurrence	Searches for the previous occurrence of the last string you searched for. (find_prev command)

Replace...	Searches for a string and replaces it with another string. (gui_replace command)

Go to Line...	Places the cursor on a line you specify.  (gui_goto_line command)

Seek...	Places the cursor on a byte/character offset in the current file.  (gui_seek command)

Go To Definition...	Pushes a bookmark at the cursor and places your cursor on a tag definition.  (gui_push_tag command)

Tag Files...	Pushes a bookmark at the cursor and places your cursor on a tag definition.  (gui_make_tags command)

Push Bookmark	Pushes a bookmark at the cursor.  (push_bookmark command)

Pop Bookmark	Pops the last pushed bookmark.  (pop_bookmark command)

Bookmarks...	Lists bookmarks and allows you to go to a mark or add a new bookmark.  (set_bookmark command)

Last Find/Grep List...	Displays list of Files/Buffers and occurrences generated by last multi-file/buffer search performed with the Find dialog box.  (mflast command)


View Menu

Hex	Toggles hex/ASCII display. (hex command)

Special Chars	Toggles display of all special characters such as tabs, spaces, newline characters and more. (view_special_chars_toggle command)

New Line Chars	Toggles display of end of line characters. (view_nlchars_toggle command)

Tab Chars	Toggles display of tab characters. (view_nlchars_toggle command)

Spaces	Toggles display of spaces characters. (view_spaces_toggle command)

Line Numbers	Toggles display of line numbers. (view_line_numbers_toggle command)

Toolbars	Displays Toolbar Customization dialog box which lets modify or create new toolbars. (toolbars command)

Selective Display...	Allows you to hide lines and create an outline. (selective_display command)

Hide All Comments	Hides all lines containing just comments. (hide_all_comments command)

Hide Code Block	Hides the current code block. Invoke multiple times to hide larger code blocks. (hide_code_block command)

Hide Selection	Hides lines in a selection. (hide_selection command)

Function Headings	Displays only function heading lines.

Show All	Exits selective display.  Displays all lines. (show_all command)


Project Menu

See Also Projects, Compiling From Within the Editor

New...	Creates a new workspace or project. (workspace_new command)

Workspace Open...	Opens a workspace. (workspace_open command)

Workspace Close	Closes the current workspace. (workspace_close command)

Workspace Properties...	Allows you to add/remove projects from the current workspace. (workspace_properties command)

Load Files...	Displays list of project files and allows you to open one or more files.

Insert Project into Workspace

Adds an existing project to the current workspace (workspace_insert command).  Use the Workspace Properties dialog box to remove a project from the current workspace.

Dependencies...	Allows you to modify the dependencies for the current project. (workspace_dependencies command)

Set Active Project	List projects in the current workspace and allows you to select the active project. (workspace_set_active command)

Project Properties...	Allows you to add files to project and edit other settings for project. (project_edit command)


Build Menu

Compile	Runs the compile command for the current project. (project_compile command)

Build	Runs the build command for the current project.  (project_build command)

Rebuild	Runs the rebuild command for the current project.  (project_rebuild command)

Debug	Runs the debug command for the current project. (project_debug command)

Execute	Runs the execute command for the current project.  (project_execute command)

Next Error	Processes the next compile or build error message. (next_error command)

Previous Error	Processes the next compile or build error message. (prev_error command)

Go to Cursor Error/Include

Parses the error message or filename at the cursor and places cursor in file.  (cursor_error command).

Stop Build	Sends break signal to concurrent process buffer. (stop_process command)

Activate Build	Starts or activates the concurrent process buffer.  (start_process command)


Document Menu

See Also Word Processing Features

Next Buffer	Switches to the next buffer. (next_buffer command)

Previous Buffer	Switches to the previous buffer. (prev_buffer command)

Close Buffer	Closes the current buffer. (close_buffer command)

List Buffers......	Lists all buffers and allows you to activate one. (list_buffers command)

Select Mode......	Lets you chose an editing mode such as C, Java, or Delphi.

Tabs......	Sets tab stops.  (gui_tabs command)

Margins......	Sets margins.  (gui_margins command)

Format Paragraph	Reflows the text in the current paragraph according to the margins.  (reflow_paragraph command)

Format Selection	Reflows the selected text according to the margins.  (reflow_selection command)

Format Columns	Formats columns in a selection according to words.  (format_columns command)

Comment Box	Converts selected text into box comment using comment setup.  (box command)

Comment Lines	Converts selected lines into line comments using comment setup.  (comment command)

Comment Setup...	Displays comment setup dialog box.

Indent with Tabs	Toggles indenting with tabs on/off. (indent_with_tabs_toggle command)

Word Wrap	Toggles word wrap on/off. (word_wrap_toggle command)

Justify......	Sets/displays paragraph justification style.  (gui_justify command)

Read Only Mode	Toggles Read only mode on/off. (read_only_mode_toggle command).


Macro Menu

See Also Slick-C Language, Recording Macros, Creating Dialog Boxes With the Dialog Editor

Load Module...	Loads a macro source module.  (gui_load command)

Unload Module...	Unloads a macro module.  (gui_unload command)

Record Macro	Starts building a Slick-C language macro based on the editor features you use. (record_macro_toggle command)

Execute last-macro	Runs last recorded macro. (last_macro command)

Save last-macro...	Saves the last recorded macro under a name you specify.  (gui_save_macro command)

List Macros...	Lists saved recorded macros. (list_macros command)

Set Macro Variable...	Sets global macro variable. (gui_set_var command)

Find Slick-C Proc...	Opens a macro source file and places your cursor on the definition of a macro tag. (gui_find_proc command)

Find Slick-C Error...	Places your cursor on the macro source line which caused the last interpreter run-time error. (find_error command)

New Form	Opens a new form for editing with the Dialog editor.  (new_form command)

Open Form...	Opens an existing or new form for editing with the Dialog editor. (open_form command)

Load and Run Form	Loads form, loads Slick-C code, and runs the currently selected/edited form. (run_selected command)

Grid...	Sets form grid settings. This affects the distance displayed between the dots displayed on a form that is being edited. (gui_grid command)

Menus...	Lists all menus and allows you to edit, create, delete, or show menus  (open_menu command).  Provides access to the Menu Editor dialog box.

Insert Form/Object Src...

Inserts source code into current file for a form or menu you specify. (insert_object command)


Tools Menu

See Also Configuring Visual SlickEdit, Changing Key Bindings, Calculating Mathematical Expressions, Spell Checking

Configuration...	Displays menu of configuration commands (config command).

OS Shell	Runs operating system command shell (DOS).  (dos command)

Evaluate Expr...	Evaluates mathematical expressions you specify. (calculator command)

Add Selected Expr	Adds the result of evaluating each line in a selected area of text. (add command)

Ascii Table	Opens ASCII table file. (ascii_table command)

Draw Lines	Invokes line drawing macro. (draw external command)

Match Paren	Finds the matching parenthesis or begin/end structure pair. (find_matching_paren command)

Complete Previous Word	Retrieves previous word or variable matching word prefix at cursor. (complete_prev command)

Complete Next Word	Retrieves next word or variable matching word prefix at cursor. (complete_next command)

Version Control...	Displays menu of version control commands

Sort...	Sorts current buffer or selected text. (gui_sort command)

Beautify Source...	Displays C/C++/Java Beautify dialog box used for setting options and beautifying source. (gui_beautify command)

File Merge...	Prompts for base file and two revision files and merges changes into an output file. (merge command)

File Difference...	Prompts for files and buffers to difference. (diff command)

File Compare...	Displays menu of file compare commands

Spell Check...	Displays menu of spell checking commands.


Configuration Menu

Gereral Configuration......	Displays general configuration dialog box which lets you modify some common configuration items such as: search, select styles, and special character display.

Emulation...	Lets you choose an editor emulation such as Brief, Epsilon, VI, or GNU Emacs.

File Extension......	Allows you to change tabs, margins, and other file extension specific options as well as add support for new extensions.  (setupext command)

File Options......	Allows you to change load, save, backup, file filters, and AutoSave options.

Key Bindings......	Allows you to change your key bindings.  (gui_bind_to_key command)

Redefine Common Keys......	Allows you to reconfigure common keys such as ENTER, Tab, and Backspace.

Aliases......	Allows you to edit your global or extension specific aliases.

Color Coding......	Allows you to modify color coding or create color coding for a new language.

Color......	Allows you to modify the color of various editor elements.  In addition, you can choose bold, italic, and underline for color coding elements.

Font......	Allows you to modify the font of various editor elements.

History......	Allows you to delete menu history items.  ("show _history_form" command)

Associate File Types...	(Windows, Windows 95/98, and Windows NT only) Allows you to setup file extensions which run Visual SlickEdit when you open them in Windows Explorer and File manager.  (assocft batch macro)

 Web Browser Setup...	Allows you to configure a Web browser so you can use the Web button on the button bar to view HTML files or just bring up a Web browser.


Version Control Menu

Update	Checks in current file.

Get	Checks out current file read only.

Checkout	Checks out current file.

Lock	Locks the current file without checking out the file.

Unlock	Unlocks the current file without checking in the file.

Add	Adds current file to version control.

Remove	Removes current file from version control.

History...	Views history for current file.

Difference...	Views differrences of current file.

Properties...	Views properties of current file.

Manager...	Executes Version Control Manager.

Setup......	Allows you to choose and configure a version control system interface.


Compare Menu

See Also Comparing Files

Compare	Compares files in two windows. You must zoom window and then the split window first.  (compare command)

Resync	Adjusts the cursor positions are a compare mismatch.

Options...	Sets/displays the compare options.


Spell Check Menu

See Also Spell Checking

Check from Cursor...	Spell check starting from cursor. (spell_check command)

Check Comments and Strings...	Spell check comments and strings starting from cursor. (spell_check_source command)

Check Selecting	Spell check selected text.. (spell_check command)

Check Word at Cursor	Spell check word at cursor. (spell_check_word command)

Check Files	Spell check multiple files. (spell_check_files command)

Spell Options...	Sets/views spell checker options. (spell_options command)


Window Menu

See Also Windowing

Cascade	Cascades edit windows. (cascade_windows command)

Tile	Tiles edit windows. (tile_windows command)

Tile Horizontal	Tiles edit windows horizontally when there are 3 or less windows. (tile_windows command)

Arrange Icons	Rearranges iconized windows. (arrange_icons command)

Next	Switches to next window. (next_window command)

Previous	Switches to previous window. (prev_window command)

Close	Closes the current window

Properties	Displays Dialog editor properties window for editing forms. (show_properties command)

Selected Form	Displays edited form window current selected. (show_selected command)

Font...	Sets/views font for current window or all windows. (wfont command)

Hsplit	Splits the current window horrizontally in half. (hsplit_window command)

Vsplit	Splits the current window vertically in half. (vsplit_window command)

Zoom Toggle	Zooms or unzooms the current window. (zoom_window command)

One Window	Zooms the current window and deletes all other windows. (one_window command)

Duplicate	Creates another window linked to the current buffer. (duplicate_window command)

Link Window...	Selects buffer to display in current window.


Help Menu

Contents	Displays help on table of contents. (help command)

Search...	Displays help index and allows you to enter a help item. (help command)

Keys Help	Displays summary of key bindings for current emulation. (help command)

Man...	(UNIX only) Displays man page(s) for help item you specify (man command).

Frequently Asked Questions	Displays list of frequently asked user questions for which you can get answers for.

Index Help On...	(Windows,Windows 95/98, and Windows NT only) Accesses help on the word at the cursor or displays Help Index dialog box.  If the word at the cursor is a prefix match for several help items, a selection list is displayed.  (help_index command)

Configure Index File...	(Windows,Windows 95/98, and Windows NT only) Allows you to editor or create an IDX file.  An IDX file is an index for multiple help files. (configure_index_file command)

API Apprentice On...	Provides API Apprentice help on the word at the cursor or displays the API Apprentice Index dialog box. If the word at the cursor is a prefix match for several functions or methods, a selection list is displayed.  (api_index command)

Configure API Index File...	Allows you to editor or create an API IDX file which is used to index multi API Apprentice (TM) data bases.

API Database Editor	Allows you to modify our API Apprentice databases or create new data bases.

Macro Fcts by Category	Allows you to choose help on macro functions by category. (help command)

What is Key...	Displays help on a command invoked by a key you specify. (what_is command)

New Features Demo	(Windows 95/98, and Windows NT only) Runs demonstration of a some new features.

MicroEdge Home Page	Displays MicroEdge Inc. home page in your Web browser.

Program Information...	Displays version and serial number information.


Help Menu Bar


HTHELP Services Menu

Search	Allows you to perform word and phrase searches on help file.

Print	Prints current topic..

Printer Setup...	Sets/views printer options.  (printer_setup command)

Copy	Copies current selection or current help item to clipboard.

Exit	Exits the hypeertext help system and closes the help window.


HTHELP Options Menu

Single Click on Hypertext	Turn this menu item on if you want to go to hypertext help items with a single click.

Contents	Displays help on table of contents. (help command)

Previous	Displays help topic you were looking at before this one.


HTHELP Help Menu

Help	Displays help on using our hypertext help system.


HTHelp Help Find dialog box

This dialog box is used to search the entire help file for words you enter in the combo box.  The exact words which are found are displayed in the top list box.  The lower list box displays the help topics which have a match for the words you enter.

You may find that too many topics have the words you are looking for.  If this is the case, try using "Options" button to choose different searching criteria or selecting some words to reduce the number of hits.  The "Options" button allows you to choose whether to search for multiple words that appear in the same topic, in at least one topic, or in the exact order you enter them.  In addition you can chose whether the words you enter must match the beginning of the word, match the end of the word, contain the word, or exactly match the words you enter.

Note that if you choose exact order, the search allows one symbol word to appear between non-symbol words you are searching for.  For example, exact order searching for "Clipboard Inheritance" will match "Clipboard // Inheritance".


HTHelp Help Find Options dialog box

This dialog box allows you to choose whether to search for multiple words that appear in the same topic, in at least one topic, or in the exact order you enter them.  In addition you can chose whether the words you enter must match the beginning of the word, match the end of the word, contain the word, or exactly match the words you enter.

Note that if you choose exact order, the search allows one symbol word to appear between non-symbol words you are searching for.  For example, exact order searching for "Clipboard Inheritance" will match "Clipboard // Inheritance".


Macro Functions by Category

See Also Slick-C Language

See Also C++ API Functions by Category

The list below mixes Slick-C and C++ API functions.  Note that you can use the vsExecute C++ API function to execute Slick-C commands.  For example, the "sb" (set bookmark) command under "Bookmark Functions" can be executed with vsExecute(editorctl_wid,"sb").

Bookmark Functions

Buffer Functions

Check Box Events, Methods, Properties

Clipboard Functions

Combo Box Events, Methods, Properties

Command Button Events, Methods, Properties

Command Line Functions, Methods

Completion Functions

Cursor Functions

Directory List Box Events, Methods, Properties

Display Functions

Drive List Events, Methods, Properties

Edit Window Functions, Events, Methods, Properties

Editor Control Functions, Events, Methods, Properties

File Functions

File List Box Events, Methods, Properties

Form Functions, Events, Methods, Properties

Forms

Frame Events, Methods, Properties

Gauge Events, Methods, Properties

Hscroll Bar Events, Methods, Properties

Image Events, Methods, Properties

Keyboard Functions

Label Methods, Properties

List Box Events, Methods, Properties

Macro Programming Functions

MDI Window Methods, Properties

Menu Functions

Miscellaneous Functions

Mouse Functions

Names Table Functions

Picture Box Events, Methods, Properties

Project Functions

Radio Button Events, Methods, Properties

Retrieve Functions

Search Functions

Selection Functions

Selective Display

Spin Events, Methods, Properties

SSTab Events, Methods, Properties

String Functions

Text Box Events, Methods, Properties

Tree View Events, Methods, Properties

Vscroll Bar Events, Methods, Properties

Window Functions


Bookmark Functions

alt_bookmark

alt_gtbookmark

_BookmarkAdd

_BookmarkFind

_BookmarkGetInfo

_BookmarkQCount

_BookmarkRemove

_BookmarkRestore

delete_bookmark

gb

goto_bookmark

gui_push_tag

nb

next_bookmark

pb

pop_bookmark

prev_bookmark

push_bookmark

sb

vsBookmarkAdd

vsBookmarkFind

vsBookmarkGetInfo

vsBookmarkQCount

vsBookmarkRemove

vsBookmarkRestore


Buffer Functions

_buf_transfer

_delete_buffer

_isno_name

_keepquit_id

_need_to_save

_negative2dec

_next_buffer

_Nofbuffers

_prev_buffer

_print

_print_cancel

_printer_setup

_setext

_tprint

_tprint_format

_update_buffers

activate_view

b_match

buf_match

close_all

close_buffer

color_modified_toggle

color_toggle

compare

compare_bottom

compare_down

compare_left

compare_options

compare_page_down

compare_page_up

compare_right

compare_top

compare_up

convert_spaces2tabs

convert_tabs2spaces

diff

find_buffer

find_view

for_each_buffer

get_view_id

last_buffer

list_buffers

list_modified

load_files

make_buf_match

merge

name

name_file

new

next_buffer

next_doc

prev_buffer

prev_doc

print

printer_setup

project_compile

project_rebuild

q

quit

quit_error_file

resync

sort_buffer

switch_buffer

tprint

vsActivateView

vsBufCreateTempView

vsBufDeleteTempView

vsBufEdit

vsBufGetDocumentName

vsBufGetName

vsBufMatch

vsBufName2Caption

vsBufQData

vsBufRefresh

vsBufRestoreHiddenWindow

vsBufSetData

vsBufSetHiddenWindow

vsCallbackAdd

vsCallbackRemove

vsCallbackSet

vsCommandName

vsCommandSave

vsCreateTempView

vsDeleteBuffer

vsDeleteTempView

vsLoadFiles

vsNextBuffer

vsOpenTempView

vsPrevBuffer


Check Box Events

lbutton_up

on_create

on_create2

on_destroy

on_destroy2

on_got_focus

on_lost_focus

on_resize


Check Box Methods

_center_window

_delete_window

_draw_rect

_enabled

_font_flags2props

_font_props2flags

_get_window

_GetFontCharSet

_move_window

_next_button_state

_restore_draw_setup

_save_draw_setup

_set_focus

_ShowWindow

_ShrinkFilename

_text_height

_text_width

_unique_name

_unique_tab_index

call_event

refresh

vsMoveWindow

vsQTextWidth

vsRefresh

vsSetFocus

vsSetFocus2


Check Box Properties

p_active_form

p_alignment

p_backcolor

p_caption

p_child

p_client_height

p_client_width

p_draw_mode

p_draw_style

p_draw_width

p_edit

p_enabled

p_eventtab

p_eventtab2

p_fill_style

p_font_bold

p_font_italic

p_font_name

p_font_printer

p_font_size

p_font_strike_thru

p_font_underline

p_forecolor

p_height

p_help

p_isbutton_bar

p_mdi_child

p_mouse_pointer

p_name

p_next

p_object

p_object_modify

p_parent

p_prev

p_redraw

p_scale_mode

p_selected

p_style

p_tab_index

p_tab_stop

p_undo_visible

p_user

p_user2

p_value

p_view_id

p_visible

p_width

p_window_id

p_x

p_xyparent

p_xyscale_mode

p_y


Clipboard Functions

_clipboard_empty

_clipboard_format

_copy_from_clipboard

_copy_objects_to_clipboard

_copy_to_clipboard

append_clipboard_text

append_cut

append_next_cut

append_to_clipboard

clipboard_iNoflines

clipboard_itype

clipboards

copy_to_clipboard

copy_word

cut

cut_end_line

cut_line

cut_prev_word

cut_word

cut_word2

goto_clipboard

list_clipboards

push_clipboard_itype

vsClipboardQNofInternal

vsHaveClipboard


Combo Box Events

lbutton_down

mouse_move

on_change

on_change2

on_create

on_create2

on_destroy

on_destroy2

on_drop_down

on_got_focus

on_lost_focus

on_resize


Combo Box Methods

_begin_line

_cbi_search

_center_window

_delete_char

_delete_window

_draw_rect

_enabled

_end_line

_font_flags2props

_font_props2flags

_get_sel

_get_window

_GetFontCharSet

_insert_state

_insert_toggle

_move_window

_restore_draw_setup

_retrieve_list

_retrieve_value

_rubout

_save_draw_setup

_set_focus

_set_sel

_ShowWindow

_ShrinkFilename

_text_height

_text_width

_unique_name

_unique_tab_index

append_to_clipboard

begin_line

begin_line_text_toggle

brief_delete

brief_end

brief_home

brief_paste

call_event

cap_word

cbacktab

command_state

copy_to_clipboard

copy_word

ctab

cua_select

cursor_left

cursor_right

cut

cut_end_line

cut_line

cut_prev_word

cut_word

delete_char

delete_end_line

delete_line

delete_prev_word

delete_word

end_line

expand_alias

get_command

insert_toggle

keyin

keyin_buf_name

keyin_dir_name

left

linewrap_delete_char

linewrap_rubout

lowcase_word

move_text_backtab

move_text_tab

next_word

paste

refresh

right

rubout

set_command

transpose_chars

transpose_lines

transpose_words

vsBeginLine

vsDeleteChar

vsEndLine

vsKeyin

vsMoveWindow

vsQInsertState

vsQTextWidth

vsRefresh

vsRubout

vsSetFocus

vsSetFocus2

vsSetInsertState


Combo Box Properties

p_active_form

p_after_pic_indent_x

p_auto_select

p_backcolor

p_case_sensitive

p_cb

p_cb_active

p_cb_extendedui

p_cb_list_box

p_cb_picture

p_cb_text_box

p_child

p_client_height

p_client_width

p_completion

p_draw_mode

p_draw_style

p_draw_width

p_edit

p_enabled

p_eventtab

p_eventtab2

p_fill_style

p_font_bold

p_font_italic

p_font_name

p_font_printer

p_font_size

p_font_strike_thru

p_font_underline

p_forecolor

p_height

p_help

p_isbutton_bar

p_mdi_child

p_mouse_pointer

p_name

p_next

p_object

p_object_modify

p_parent

p_pic_indent_x

p_pic_point_scale

p_pic_space_y

p_picture

p_prev

p_redraw

p_scale_mode

p_sel_length

p_sel_start

p_selected

p_style

p_tab_index

p_tab_stop

p_text

p_undo_visible

p_user

p_user2

p_view_id

p_visible

p_width

p_window_id

p_x

p_xyparent

p_xyscale_mode

p_y


Command Button Events

lbutton_up

on_create

on_create2

on_destroy

on_destroy2

on_got_focus

on_lost_focus

on_resize


Command Button Methods

_center_window

_delete_window

_dmless

_dmmore

_draw_rect

_enabled

_font_flags2props

_font_props2flags

_get_window

_GetFontCharSet

_move_window

_restore_draw_setup

_save_draw_setup

_set_focus

_ShowWindow

_ShrinkFilename

_text_height

_text_width

_unique_name

_unique_tab_index

call_event

refresh

vsMoveWindow

vsQTextWidth

vsRefresh

vsSetFocus

vsSetFocus2


Command Button Properties

p_active_form

p_adefault

p_cancel

p_caption

p_child

p_client_height

p_client_width

p_default

p_draw_mode

p_draw_style

p_draw_width

p_edit

p_enabled

p_eventtab

p_eventtab2

p_fill_style

p_font_bold

p_font_italic

p_font_name

p_font_printer

p_font_size

p_font_strike_thru

p_font_underline

p_height

p_help

p_isbutton_bar

p_mdi_child

p_mouse_pointer

p_name

p_next

p_object

p_object_modify

p_parent

p_prev

p_redraw

p_scale_mode

p_selected

p_tab_index

p_tab_stop

p_undo_visible

p_user

p_user2

p_view_id

p_visible

p_width

p_window_id

p_x

p_xyparent

p_xyscale_mode

p_y


Command Line Functions

_executed_from_key_or_cmdline

cmdline_toggle

command_execute

command_put

command_state

command_toggle

get_string

init_command_op


Command Line Methods

_retrieve_next

_retrieve_prev

cursor_down

cursor_up

nosplit_insert_line


Completion Functions

_dll_match

_menu_destroy

_menu_match

_pic_match

alias_match

b_match

c_match

complete

complete_list

complete_more

complete_next

complete_next_match

complete_prev

complete_prev_match

e_match

f_match

get_completion_info

k_match

list_matches

m_match

maybe_complete

maybe_list_matches

mt_match

pc_match

pcb_match

tag_match

v_match


Cursor Functions

-

_begin_line

_end_line

_lineflags

_page_down

_page_up

_restore_pos2

_save_pos2

_scroll_style

0

backtab

begin_line

begin_line_text_toggle

begin_window

bottom

bottom_of_buffer

bottom_of_window

cbacktab

center_line

ctab

cursor_command

cursor_data

cursor_down

cursor_left

cursor_right

cursor_up

down

emacs_scroll_down

emacs_scroll_up

end_line

end_window

exchange_point_and_mark

find_delimiter

first_non_blank

goto_line

goto_point

goto_read_point

gui_goto_col

gui_goto_line

left

left_side_of_window

line_to_bottom

line_to_top

linewrap_rubout

move_text_backtab

move_text_tab

next_level

next_paragraph

next_sentence

next_word

page_down

page_left

page_right

page_up

prev_level

prev_paragraph

prev_sentence

prev_word

ptab

restore_pos

right

right_side_of_window

save_pos

scroll_down

scroll_left

scroll_right

scroll_style

scroll_up

set_bookmark

set_scroll_pos

tab

top

top_of_buffer

top_of_window

up

vsBeginLine

vsBottom

vsDown

vsEndLine

vsGoToPoint

vsGoToROffset

vsRestorePos

vsSavePos

vsSavePos2

vsTop

vsUp


Directory List Box Events

on_change

on_create

on_create2

on_destroy

on_destroy2

on_got_focus

on_lost_focus

on_resize


Directory List Box Methods

_center_window

_delete_window

_dlpath

_draw_rect

_enabled

_font_flags2props

_font_props2flags

_get_window

_GetFontCharSet

_move_window

_restore_draw_setup

_save_draw_setup

_set_focus

_ShowWindow

_ShrinkFilename

_text_height

_text_width

_unique_name

_unique_tab_index

call_event

refresh

vsMoveWindow

vsQTextWidth

vsRefresh

vsSetFocus

vsSetFocus2


Directory List Box Properties

p_active_form

p_auto_size

p_backcolor

p_border_style

p_buf_flags

p_buf_id

p_buf_name

p_buf_width

p_char_height

p_char_width

p_child

p_client_height

p_client_width

p_draw_mode

p_draw_style

p_draw_width

p_edit

p_enabled

p_eventtab

p_eventtab2

p_fill_style

p_fixed_font

p_font_bold

p_font_height

p_font_italic

p_font_name

p_font_printer

p_font_size

p_font_strike_thru

p_font_underline

p_font_width

p_forecolor

p_height

p_help

p_isbutton_bar

p_mdi_child

p_mouse_pointer

p_name

p_next

p_object

p_object_modify

p_parent

p_prev

p_redraw

p_scale_mode

p_scroll_bars

p_selected

p_tab_index

p_tab_stop

p_undo_visible

p_user

p_user2

p_view_id

p_visible

p_width

p_window_id

p_x

p_xyparent

p_xyscale_mode

p_y


Display Functions

_pixels_per_inch_x

_screen_height

_screen_width

_twips_per_pixel_x

_twips_per_pixel_y


Drive List Events

on_change

on_create

on_create2

on_destroy

on_destroy2

on_got_focus

on_lost_focus

on_resize


Drive List Methods

_center_window

_delete_window

_draw_rect

_dvldrive

_enabled

_font_flags2props

_font_props2flags

_get_window

_GetFontCharSet

_move_window

_restore_draw_setup

_save_draw_setup

_set_focus

_ShowWindow

_ShrinkFilename

_text_height

_text_width

_unique_name

_unique_tab_index

call_event

refresh

vsMoveWindow

vsQTextWidth

vsRefresh

vsSetFocus

vsSetFocus2


Drive List Properties

p_active_form

p_cb

p_cb_active

p_cb_extendedui

p_cb_list_box

p_cb_picture

p_cb_text_box

p_child

p_client_height

p_client_width

p_draw_mode

p_draw_style

p_draw_width

p_edit

p_enabled

p_eventtab

p_eventtab2

p_fill_style

p_font_bold

p_font_italic

p_font_name

p_font_printer

p_font_size

p_font_strike_thru

p_font_underline

p_forecolor

p_height

p_help

p_isbutton_bar

p_mdi_child

p_mouse_pointer

p_name

p_next

p_object

p_object_modify

p_parent

p_prev

p_redraw

p_scale_mode

p_selected

p_tab_index

p_tab_stop

p_undo_visible

p_user

p_user2

p_view_id

p_visible

p_width

p_window_id

p_x

p_xyparent

p_xyscale_mode

p_y


Edit Window Events

lbutton_down

mouse_move

on_hsb_bottom

on_hsb_line_down

on_hsb_line_up

on_hsb_page_down

on_hsb_page_up

on_hsb_thumb_pos

on_hsb_thumb_track

on_hsb_top

on_scroll_lock

on_select

on_vsb_bottom

on_vsb_line_down

on_vsb_line_up

on_vsb_page_down

on_vsb_page_up

on_vsb_thumb_pos

on_vsb_thumb_track

on_vsb_top


Edit Window Functions

_delete_edit_windows

case_toggle

re_search

re_toggle

vsBufEdit

vsDeleteExtensionOptions

vsGetDefaultColor

vsGetDefaultExtensionOptions

vsGetDefaultFont

vsGetDefaultOptionZ

vsGetTextColor

vsPrintGetConfig

vsPrintSetConfig

vsRestoreSearch

vsSaveSearch

vsSetDefaultColor

vsSetDefaultExtensionOptions

vsSetDefaultExtensionReferTo

vsSetDefaultFont

vsSetDefaultOption

vsSetDefaultOptionZ

vsUpdateExistingBufferExtensionOptions

wleft_margin


Edit Window Methods

_adjust_block_selection

_autoclipboard

_begin_line

_begin_select

_begin_select_compare

_buf_transfer

_CheckLineLengths

_clex_find

_clex_skip_blanks

_copy_from_clipboard

_copy_to_clipboard

_copy_to_cursor

_cursor_move_deselects

_cursor_move_extendssel

_dbcsStartOfDBCSCol

_delete_buffer

_delete_char

_delete_line

_delete_text

_delete_window

_draw_rect

_enabled

_end_line

_end_select_compare

_expand_tabsc

_find_longest_line

_font_flags2props

_font_props2flags

_fselect_line

_get_window

_GetFontCharSet

_GoToOldLineNumber

_GoToROffset

_hex_begin_line

_hex_down

_hex_end_line

_hex_keyin

_hex_left

_hex_pagedown

_hex_pageup

_hex_right

_hex_up

_in_comment

_insert_drive_list

_insert_font_list

_insert_name_list

_insert_state

_insert_text

_insert_toggle

_join_line

_JoinLineToCursor

_line_length

_lineflags

_move_to_cursor

_move_window

_need_to_save

_next_buffer

_nrseek

_overlay_block_selection

_page_down

_page_up

_post_paint

_prev_buffer

_print

_QReadOnly

_QROffset

_quit_view

_refresh_scroll

_remove_duplicates

_restore_draw_setup

_restore_pos2

_rubout

_save_draw_setup

_save_pos2

_select_block

_select_char

_select_line

_select_match

_set_focus

_SetAllOldLineNumbers

_ShowWindow

_ShrinkFilename

_spell_check

_spell_check_area

_split_line

_text_colc

_text_height

_text_width

_tprint

_tprint_format

_undo

_use_edit_font

adjust_block_selection

append_cut

append_cut2

append_to_clipboard

backtab

begin_line

begin_line_text_toggle

begin_select

begin_window

block_was_read

bottom

bottom_of_buffer

bottom_of_window

brief_delete

brief_end

brief_home

brief_iselect_char

brief_paste

brief_select_block

brief_select_char

brief_select_line

c_beautify

c_beautify_selection

c_begin

c_endbrace

c_enter

c_mode

c_proc_search

c_tab

call_event

cap_word

cbacktab

center_line

center_within_margins

column_process_list

complete_list

complete_more

complete_next

complete_next_match

complete_prev

complete_prev_match

convert_spaces2tabs

convert_tabs2spaces

copy_region

copy_to_clipboard

copy_to_cursor

copy_word

count_lines

ctab

cua_select

cur_word

current_proc

cursor_down

cursor_left

cursor_right

cursor_up

cut

cut_end_line

cut_level

cut_line

cut_prev_level

cut_prev_word

cut_region

cut_sentence

cut_word

cut_word2

delete_all

delete_blank_lines

delete_char

delete_end_line

delete_line

delete_prev_word

delete_space

delete_word

down

duplicate_window

e_proc_search

edit_file

emacs_paste

emacs_quit

emacs_scroll_down

emacs_scroll_up

emacs_select_block

emacs_select_char

end_line

end_select

end_window

enter_on_bl

enumerate

exchange_point_and_mark

expand_alias

expand_tabs

file

find

find_delimiter

find_matching_paren

find_next

find_prev

first_non_blank

format_columns

full_justify

fundamental_mode

get

get_line

get_text

goto_line

goto_point

goto_tag

gui_beautify

gui_find

gui_find_backward

gui_find_backward_regex

gui_find_regex

gui_goto_col

gui_goto_line

gui_replace

gui_replace_backward

gui_replace_regex

gui_replace2

gui_visit_file

hex

hex_backspace

hex_bottom

hex_del

hex_keyin

hex_tab

html_mode

html_preview

indent_on_enter

indent_previous

indent_region

indent_rigidly

indent_selection

indent_with_tabs

indent_with_tabs_toggle

insert_file_list

insert_line

insert_literal

insert_object

insert_toggle

insert_var

java_mode

java_proc_search

join_line

justify

keyin

keyin_buf_name

keyin_dir_name

kill_window

left

left_justify

left_side_of_window

line_to_bottom

line_to_top

linewrap_delete_char

linewrap_rubout

load_files

lock_selection

lowcase_word

ma

maybe_split_insert_line

modify_toggle

move_text_backtab

move_text_tab

move_to_cursor

next_level

next_paragraph

next_sentence

next_word

nosplit_insert_line

overlay_block_selection

page_down

page_left

page_right

page_up

pas_proc_search

pascal_mode

paste

point

prepeat_search

prev_buffer

prev_level

prev_paragraph

prev_sentence

prev_word

process_list

psearch

pselect_word

ptab

push_bookmark

quit_view

read_format_line

read_only_mode

read_only_mode_toggle

reflow_paragraph

reflow_region

refresh

regex_replace

regex_search

reindent_line

repeat_search

replace

replace_line

replace_string

restore_pos

reverse_regex_search

rexx_mode

right

right_side_of_window

rubout

save_pos

scroll_down

scroll_left

scroll_right

scroll_up

search

search_again

search_backward

search_forward

search_replace

seek

select_block

select_buffer

select_char

select_code_block

select_edit_mode

select_line

select_mode

select_paragraph

select_proc

select_tag_file

select_whole_word

select_word

set_next_error

set_scroll_pos

show_point

slick_enter

slickc_mode

sort_buffer

spell_check

spell_check_files

spell_check_source

spell_check_word

split_insert_line

split_line

tab

tabify_region

tabs

text_col

top

top_of_buffer

top_of_window

translate_again

translate_backward

translate_forward

transpose_chars

transpose_lines

transpose_words

trunc

undo

undo_cursor

undo_steps

untabify_region

up

upcase_word

update_format_line

view_line_numbers_toggle

view_nlchars_toggle

view_spaces_toggle

view_special_chars_toggle

view_tabs_toggle

visit_file

vsAllocColor

vsBeginLine

vsBeginSelect

vsBeginSelectCompare

vsBottom

vsBufName2Caption

vsCallbackActivate

vsCallbackAdd

vsCallbackRemove

vsCallbackSet

vsCallKey

vsCommandFind

vsCommandName

vsCommandReplace

vsCommandSave

vsCopyToCursor

vsCurWord

vsDeleteAll

vsDeleteBuffer

vsDeleteChar

vsDeleteLine

vsDeselect

vsDestroyEditorCtl

vsDown

vsDuplicateSelection

vsEndLine

vsEndSelect

vsEndSelectCompare

vsExpandTabs

vsExpandTabsC

vsFillSelection

vsFreeColor

vsGetLine

vsGetRText

vsGetSelectedText

vsGetSelInfo

vsGetText

vsGoToOldLineNumber

vsGoToPoint

vsGoToROffset

vsHaveSelection

vsInsertLine

vsInsertText

vsJoinLine

vsJoinLineToCursor

vsKeyin

vsLoadFiles

vsMoveWindow

vsNextBuffer

vsPrevBuffer

vsPropGetB

vsQInsertState

vsQLineFlags

vsQLineLength

vsQMaxTabCol

vsQOffset

vsQPoint

vsQReadOnly

vsQROffset

vsQSelectedTextLength

vsQSelectType

vsQTextWidth

vsQuitView

vsQUndoStatus

vsRefresh

vsRepeatSearch

vsReplaceLine

vsResetModifiedLineFlags

vsRubout

vsSaveFile

vsSavePos

vsSavePos2

vsSearch

vsSearchPromptReplace

vsSearchReplace

vsSelectBlock

vsSelectChar

vsSelectEditMode

vsSelectLine

vsSelectMatch

vsSetAllOldLineNumbers

vsSetFocus

vsSetFocus2

vsSetInsertState

vsSetLineFlags

vsSetSelectType

vsSetTextColor

vsShiftSelectionLeft

vsShiftSelectionRight

vsShowSelection

vsSortSelection

vsSplitLine

vsTestEvent

vsTextColC

vsTop

vsUp

vsWinQData

vsWinSetData

wfont

word_wrap

word_wrap_toggle

wordwrap_delete_char

wordwrap_left

wordwrap_right

wordwrap_rubout

zap_line


Edit Window Properties

p_active_form

p_AutoSelectExtension

p_binary

p_buf_flags

p_buf_id

p_buf_name

p_buf_size

p_buf_width

p_buser

p_char_height

p_char_width

p_child

p_client_height

p_client_width

p_col

p_color_flags

p_cursor_x

p_cursor_y

p_display_xlat

p_draw_mode

p_draw_style

p_draw_width

p_edit

p_enabled

p_eventtab

p_eventtab2

p_extension

p_file_date

p_fill_style

p_fixed_font

p_font_bold

p_font_height

p_font_italic

p_font_name

p_font_printer

p_font_size

p_font_strike_thru

p_font_underline

p_font_width

p_height

p_hex_field

p_hex_mode

p_hex_nibble

p_hex_Nofcols

p_hex_toppage

p_indent_style

p_indent_with_tabs

p_index

p_isbutton_bar

p_LangCaseSensitive

p_left_edge

p_lexer_name

p_line

p_line_numbers_len

p_margins

p_MaxLineLength

p_mdi_child

p_mode_eventtab

p_mode_name

p_modify

p_ModifyFlags

p_mouse_pointer

p_name

p_newline

p_next

p_Nofhidden

p_Noflines

p_NofNoSave

p_NofSelDispBitmaps

p_object

p_object_modify

p_old_height

p_old_width

p_old_x

p_old_y

p_OldLineNumber

p_on_event

p_parent

p_prev

p_ProtectReadOnlyMode

p_RBufSize

p_ReadOnly

p_readonly_mode

p_readonly_set_by_user

p_redraw

p_RLine

p_RNoflines

p_scale_mode

p_scroll_left_edge

p_show_tabs

p_showeof

p_ShowSpecialChars

p_SourceRecording

p_tabs

p_tile_id

p_TruncateLength

p_undo_steps

p_user

p_user2

p_view_id

p_visible

p_width

p_windent_x

p_window_flags

p_window_id

p_window_state

p_word_chars

p_word_wrap_style

p_x

p_xyparent

p_xyscale_mode

p_y


Editor Control Events

lbutton_down

mouse_move

on_hsb_bottom

on_hsb_line_down

on_hsb_line_up

on_hsb_page_down

on_hsb_page_up

on_hsb_thumb_pos

on_hsb_thumb_track

on_hsb_top

on_scroll_lock

on_select

on_vsb_bottom

on_vsb_line_down

on_vsb_line_up

on_vsb_page_down

on_vsb_page_up

on_vsb_thumb_pos

on_vsb_thumb_track

on_vsb_top


Editor Control Functions

case_toggle

re_search

re_toggle

vsBufEdit

vsCreateEditorCtl

vsDeleteExtensionOptions

vsGetDefaultColor

vsGetDefaultExtensionOptions

vsGetDefaultFont

vsGetDefaultOptionZ

vsGetTextColor

vsPrintGetConfig

vsPrintSetConfig

vsRestoreSearch

vsSaveSearch

vsSetDefaultColor

vsSetDefaultExtensionOptions

vsSetDefaultExtensionReferTo

vsSetDefaultFont

vsSetDefaultOption

vsSetDefaultOptionZ

vsUpdateExistingBufferExtensionOptions

wleft_margin


Editor Control Methods

_adjust_block_selection

_autoclipboard

_begin_line

_begin_select

_begin_select_compare

_buf_transfer

_center_window

_CheckLineLengths

_clex_find

_clex_skip_blanks

_copy_from_clipboard

_copy_to_clipboard

_copy_to_cursor

_cursor_move_deselects

_cursor_move_extendssel

_dbcsStartOfDBCSCol

_delete_char

_delete_line

_delete_text

_delete_window

_draw_rect

_enabled

_end_line

_end_select_compare

_expand_tabsc

_find_longest_line

_font_flags2props

_font_props2flags

_fselect_line

_get_window

_GetFontCharSet

_GoToOldLineNumber

_GoToROffset

_hex_begin_line

_hex_down

_hex_end_line

_hex_keyin

_hex_left

_hex_pagedown

_hex_pageup

_hex_right

_hex_up

_in_comment

_insert_drive_list

_insert_font_list

_insert_name_list

_insert_state

_insert_text

_insert_toggle

_join_line

_JoinLineToCursor

_line_length

_lineflags

_move_to_cursor

_move_window

_need_to_save

_next_buffer

_nrseek

_overlay_block_selection

_page_down

_page_up

_post_paint

_prev_buffer

_QROffset

_QReadOnly

_quit_view

_refresh_scroll

_remove_duplicates

_restore_draw_setup

_restore_pos2

_rubout

_save_draw_setup

_save_pos2

_SearchInitSkipped

_SearchQNofSkipped

_SearchQSkipped

_select_block

_select_char

_select_line

_select_match

_set_focus

_SetAllOldLineNumbers

_ShowWindow

_ShrinkFilename

_spell_check

_spell_check_area

_split_line

_text_colc

_text_height

_text_width

_undo

_unique_name

_unique_tab_index

_use_edit_font

adjust_block_selection

append_cut

append_to_clipboard

backtab

begin_line

begin_line_text_toggle

begin_window

block_was_read

bottom

bottom_of_buffer

bottom_of_window

brief_delete

brief_end

brief_home

brief_iselect_char

brief_paste

brief_save

brief_select_block

brief_select_char

brief_select_line

c_beautify

c_begin

c_endbrace

c_enter

c_mode

c_proc_search

c_tab

call_event

cap_word

cbacktab

center_line

center_within_margins

column_process_list

complete_list

complete_more

complete_next

complete_next_match

complete_prev

complete_prev_match

convert_spaces2tabs

convert_tabs2spaces

copy_region

copy_to_clipboard

copy_to_cursor

copy_to_file

copy_word

count_lines

ctab

cua_select

cur_word

current_proc

cursor_down

cursor_left

cursor_right

cursor_up

cut

cut_end_line

cut_level

cut_line

cut_prev_level

cut_prev_word

cut_region

cut_sentence

cut_word

cut_word2

delete_all

delete_blank_lines

delete_char

delete_end_line

delete_line

delete_prev_word

delete_space

delete_word

down

e_proc_search

edit_file

emacs_paste

emacs_quit

emacs_scroll_down

emacs_scroll_up

emacs_select_block

emacs_select_char

end_line

end_select

end_window

enter_on_bl

enumerate

exchange_point_and_mark

expand_alias

expand_tabs

find

find_delimiter

find_matching_paren

find_next

find_prev

first_non_blank

format_columns

full_justify

fundamental_mode

get

get_line

get_text

goto_line

goto_point

goto_tag

gui_beautify

gui_copy_to_file

gui_find

gui_goto_col

gui_goto_line

gui_replace

gui_replace2

hex

hex_backspace

hex_bottom

hex_del

hex_keyin

hex_tab

html_mode

html_preview

indent_on_enter

indent_previous

indent_region

indent_rigidly

indent_selection

indent_with_tabs

indent_with_tabs_toggle

insert_file_list

insert_line

insert_literal

insert_object

insert_toggle

insert_var

java_mode

java_proc_search

join_line

justify

keyin

keyin_buf_name

keyin_dir_name

left

left_justify

left_side_of_window

line_to_bottom

line_to_top

linewrap_delete_char

linewrap_rubout

load_files

lock_selection

lowcase_word

ma

maybe_split_insert_line

modify_toggle

move_text_backtab

move_text_tab

move_to_cursor

next_level

next_paragraph

next_sentence

next_word

nosplit_insert_line

overlay_block_selection

page_down

page_left

page_right

page_up

pas_proc_search

pascal_mode

paste

point

prepeat_search

prev_buffer

prev_level

prev_paragraph

prev_sentence

prev_word

process_list

psearch

pselect_word

ptab

push_bookmark

quit_view

read_format_line

read_only_mode

read_only_mode_toggle

reflow_paragraph

reflow_region

refresh

reindent_line

repeat_search

replace

replace_line

restore_pos

rexx_mode

right

right_side_of_window

rubout

save_pos

scroll_down

scroll_left

scroll_right

scroll_up

search

search_again

search_replace

seek

select_block

select_char

select_code_block

select_edit_mode

select_line

select_mode

select_paragraph

select_proc

select_tag_file

select_whole_word

select_word

set_next_error

set_scroll_pos

slick_enter

slickc_mode

sort_buffer

spell_check

spell_check_files

spell_check_source

spell_check_word

split_insert_line

split_line

tab

tabify_region

tabs

text_col

top

top_of_buffer

top_of_window

transpose_chars

transpose_lines

transpose_words

trunc

undo

undo_cursor

undo_steps

untabify_region

up

upcase_word

update_format_line

view_line_numbers_toggle

view_nlchars_toggle

view_spaces_toggle

view_special_chars_toggle

view_tabs_toggle

vsAllocColor

vsBeginLine

vsBeginSelect

vsBeginSelectCompare

vsBottom

vsBufName2Caption

vsCallbackActivate

vsCallbackAdd

vsCallbackRemove

vsCallbackSet

vsCallKey

vsCommandFind

vsCommandName

vsCommandReplace

vsCommandSave

vsCopyToCursor

vsCurWord

vsDeleteAll

vsDeleteBuffer

vsDeleteChar

vsDeleteLine

vsDeselect

vsDestroyEditorCtl

vsDown

vsDuplicateSelection

vsEndLine

vsEndSelect

vsEndSelectCompare

vsExpandTabs

vsExpandTabsC

vsFillSelection

vsFreeColor

vsGetLine

vsGetRText

vsGetSelectedText

vsGetSelInfo

vsGetText

vsGoToOldLineNumber

vsGoToPoint

vsGoToROffset

vsHaveSelection

vsInsertLine

vsInsertText

vsJoinLine

vsJoinLineToCursor

vsKeyin

vsLoadFiles

vsMoveWindow

vsNextBuffer

vsPrevBuffer

vsPropGetB

vsQInsertState

vsQLineFlags

vsQLineLength

vsQMaxTabCol

vsQOffset

vsQPoint

vsQReadOnly

vsQROffset

vsQSelectedTextLength

vsQSelectType

vsQTextWidth

vsQuitView

vsQUndoStatus

vsRefresh

vsRepeatSearch

vsReplaceLine

vsResetModifiedLineFlags

vsRubout

vsSaveFile

vsSavePos

vsSavePos2

vsSearch

vsSearchPromptReplace

vsSearchReplace

vsSelectBlock

vsSelectChar

vsSelectEditMode

vsSelectLine

vsSelectMatch

vsSetAllOldLineNumbers

vsSetFocus

vsSetFocus2

vsSetInsertState

vsSetLineFlags

vsSetSelectType

vsSetTextColor

vsShiftSelectionLeft

vsShiftSelectionRight

vsShowSelection

vsSortSelection

vsSplitLine

vsTestEvent

vsTextColC

vsTop

vsUp

vsWinQData

vsWinSetData

wfont

word_wrap

word_wrap_toggle

wordwrap_delete_char

wordwrap_left

wordwrap_right

wordwrap_rubout

zap_line


Editor Control Properties

p_active_form

p_AllowSave

p_auto_size

p_AutoSelectExtension

p_backcolor

p_binary

p_border_style

p_buf_flags

p_buf_id

p_buf_name

p_buf_size

p_buf_width

p_buser

p_char_height

p_char_width

p_child

p_client_height

p_client_width

p_col

p_color_flags

p_cursor_x

p_cursor_y

p_display_xlat

p_draw_mode

p_draw_style

p_draw_width

p_edit

p_enabled

p_extension

p_file_date

p_fill_style

p_fixed_font

p_font_bold

p_font_height

p_font_italic

p_font_name

p_font_printer

p_font_size

p_font_strike_thru

p_font_underline

p_font_width

p_forecolor

p_height

p_help

p_hex_field

p_hex_mode

p_hex_nibble

p_hex_Nofcols

p_hex_toppage

p_indent_style

p_indent_with_tabs

p_index

p_isbutton_bar

p_LangCaseSensitive

p_left_edge

p_lexer_name

p_line

p_line_numbers_len

p_margins

p_MaxLineLength

p_mode_eventtab

p_mode_name

p_modify

p_ModifyFlags

p_mouse_pointer

p_newline

p_next

p_Nofhidden

p_Noflines

p_NofNoSave

p_NofSelDispBitmaps

p_object

p_object_modify

p_OldLineNumber

p_on_event

p_parent

p_prev

p_ProtectReadOnlyMode

p_RBufSize

p_ReadOnly

p_readonly_mode

p_readonly_set_by_user

p_redraw

p_RLine

p_RNoflines

p_scale_mode

p_scroll_bars

p_scroll_left_edge

p_selected

p_show_tabs

p_showeof

p_ShowSpecialChars

p_SourceRecording

p_tab_index

p_tab_stop

p_tabs

p_TruncateLength

p_undo_steps

p_undo_visible

p_user

p_user2

p_view_id

p_visible

p_width

p_windent_x

p_window_flags

p_window_id

p_word_chars

p_word_wrap_style

p_x

p_xyparent

p_xyscale_mode

p_y


File Functions

_cache_size

_chmod

_clex_load

_config_path

_create_config_path

_drive_type

_file_date

_fm_copy

_fm_erase

_fm_move

_fm_subcopy

_get_windows_directory

_insert_drive_list

_macro_path

_save_file

_spell_save

_spill_file_path

_write_state

absolute

alias_cd

append

append_dir

append_list

attr_case

block_was_read

build_load_options

build_save_options

cache_size

cd

cdd

change_drive

chdir

checkin

checkout

chmod

cload

compare

concur_command

concur_shell

copy

copy_file

copy_to_file

del

delete_file

diff

dir

e

edit

edit_file

external_cmd

f_match

file

file_date

file_eq

file_list_field

file_match

file_time

fileman

fileman_attr

fileman_backup

fileman_command

fileman_copy

fileman_delete

fileman_deselect_down

fileman_deselect_up

fileman_edit

fileman_enter

fileman_keyin_name

fileman_mode

fileman_move

fileman_replace

fileman_select_down

fileman_select_up

fileman_sort

fileman_space

find_file

fmsay

for_dir

for_select

fsort

get

get_extension

gui_cd

gui_copy_to_file

gui_enumerate

gui_find

gui_insert_file

gui_open

gui_replace

gui_replace2

gui_save_as

gui_select_ext

gui_unlist_ext

include_search

insert_file_list

isdirectory

isdrive

isunc_root

iswildcard

list

load_files

load_options

make_path

makeNload

maybe_find_file

maybe_quote_filename

merge

mkdir

mktemp

parse_file

path_search

pathlen

pcextension

pcfile

pcfilename

pcname

pcpath

prompt_cd

prompt_dir

quit_file

read_list

relative

restore_path

rmdir

save

save_all

save_all_forms

save_as

save_exit

save_file

save_options

save_window_config

select_all

select_attr

select_ext

select_mark

select_reverse

shell

slick_path_search

spill_file_path

strip_filename

tab_ext

unlist_all

unlist_attr

unlist_ext

unlist_search

unlist_select

vsBufEdit

vsCommandName

vsCommandSave

vsCreateTempView

vsDeleteTempView

vsDropFiles

vsFileAbsolute

vsFileAbsoluteTo

vsFileClose

vsFileFlush

vsFileMove

vsFileOpen

vsFileRead

vsFileRelative

vsFileSeek

vsFileWrite

vsLoadFiles

vsOpenTempView

vsUpdatePicture

which

write_list

write_state


File List Box Events

on_change

on_create

on_create2

on_destroy

on_destroy2

on_got_focus

on_lost_focus

on_resize


File List Box Methods

_center_window

_delete_window

_draw_rect

_enabled

_flfilename

_font_flags2props

_font_props2flags

_get_window

_GetFontCharSet

_move_window

_restore_draw_setup

_save_draw_setup

_set_focus

_ShowWindow

_ShrinkFilename

_text_height

_text_width

_unique_name

_unique_tab_index

call_event

refresh

vsMoveWindow

vsQTextWidth

vsRefresh

vsSetFocus

vsSetFocus2


File List Box Properties

p_active_form

p_auto_size

p_backcolor

p_border_style

p_buf_flags

p_buf_id

p_buf_name

p_buf_width

p_char_height

p_char_width

p_child

p_client_height

p_client_width

p_draw_mode

p_draw_style

p_draw_width

p_edit

p_enabled

p_eventtab

p_eventtab2

p_fill_style

p_fixed_font

p_font_bold

p_font_height

p_font_italic

p_font_name

p_font_printer

p_font_size

p_font_strike_thru

p_font_underline

p_font_width

p_forecolor

p_height

p_help

p_isbutton_bar

p_mdi_child

p_mouse_pointer

p_name

p_next

p_object

p_object_modify

p_parent

p_prev

p_redraw

p_scale_mode

p_scroll_bars

p_selected

p_tab_index

p_tab_stop

p_undo_visible

p_user

p_user2

p_view_id

p_visible

p_width

p_window_id

p_x

p_xyparent

p_xyscale_mode

p_y


Form Events

lbutton_down

mouse_move

on_close

on_create

on_create2

on_destroy

on_destroy2

on_got_focus

on_init_menu

on_load

on_lost_focus

on_resize


Form Functions

_enable_non_modal_forms

_find_formobj

_form_match

_form_parent

_isloaded

_load_template

_modal_wait

_move_selected

_save_form

_search_form_xy

list_objects

open_form

show


Form Methods

_bottom_height

_center_window

_copy_objects_to_clipboard

_delete_window

_draw_rect

_enabled

_find_control

_get_window

_menu_set

_move_window

_restore_draw_setup

_restore_form_xy

_retrieve_next_form

_retrieve_prev_form

_save_draw_setup

_save_form_response

_save_form_xy

_set_focus

_set_foreground_window

_show_entire_form

_ShowWindow

_ShrinkFilename

_text_height

_text_width

_top_height

_update_template

call_event

refresh

vsMenuSet

vsMoveWindow

vsQTextWidth

vsRefresh

vsSetFocus

vsSetFocus2


Form Properties

p_active_form

p_border_style

p_caption

p_CaptionClick

p_child

p_client_height

p_client_width

p_clip_controls

p_draw_mode

p_draw_style

p_draw_width

p_edit

p_enabled

p_eventtab

p_eventtab2

p_fill_style

p_height

p_help

p_init_style

p_isbutton_bar

p_mdi_child

p_menu_handle

p_modal

p_mouse_pointer

p_name

p_next

p_object

p_object_modify

p_parent

p_prev

p_scale_mode

p_selected

p_template

p_tool_window

p_user

p_user2

p_view_id

p_visible

p_width

p_window_id

p_x

p_xyparent

p_xyscale_mode

p_y


Forms

_b2k_form

_bas_extform

_c_extform

_calc_form

_cd_form

_cob_extform

_color_form

_config_form

_dlge_form

_e_extform

_edit_form

_ext_form

_find_file_form

_font_form

_for_extform

_inslit_form

_justify_form

_mdibutton_bar_form

_menu_editor_form

_mod_extform

_open_form

_pas_extform

_prg_extform

_print_form

_project_properties_form

_push_tag_form

_rc_keys_form

_replace_form

_seek_form

_sellist_form

_set_var_form

_spell_options_form

_tag_form

_textbox_form

_wfont_form


Frame Events

on_create

on_create2

on_destroy

on_destroy2

on_got_focus

on_lost_focus

on_resize


Frame Methods

_center_window

_delete_window

_draw_rect

_enabled

_font_flags2props

_font_props2flags

_get_window

_GetFontCharSet

_move_window

_restore_draw_setup

_save_draw_setup

_set_focus

_ShowWindow

_ShrinkFilename

_text_height

_text_width

_unique_name

_unique_tab_index

call_event

refresh

vsMoveWindow

vsQTextWidth

vsRefresh

vsSetFocus

vsSetFocus2


Frame Properties

p_active_form

p_backcolor

p_caption

p_child

p_client_height

p_client_width

p_clip_controls

p_draw_mode

p_draw_style

p_draw_width

p_edit

p_enabled

p_eventtab

p_eventtab2

p_fill_style

p_font_bold

p_font_italic

p_font_name

p_font_printer

p_font_size

p_font_strike_thru

p_font_underline

p_forecolor

p_height

p_help

p_isbutton_bar

p_mdi_child

p_mouse_pointer

p_name

p_next

p_object

p_object_modify

p_parent

p_prev

p_redraw

p_scale_mode

p_selected

p_tab_index

p_undo_visible

p_user

p_user2

p_view_id

p_visible

p_width

p_window_id

p_x

p_xyparent

p_xyscale_mode

p_y


Gauge Events

on_create

on_create2

on_destroy

on_destroy2

on_got_focus

on_lost_focus

on_resize


Gauge Methods

_center_window

_delete_window

_draw_rect

_enabled

_get_window

_move_window

_restore_draw_setup

_save_draw_setup

_set_focus

_ShowWindow

_ShrinkFilename

_text_height

_text_width

_unique_name

_unique_tab_index

call_event

refresh

vsMoveWindow

vsQTextWidth

vsRefresh

vsSetFocus

vsSetFocus2


Gauge Properties

p_active_form

p_child

p_client_height

p_client_width

p_draw_mode

p_draw_style

p_draw_width

p_edit

p_enabled

p_eventtab

p_eventtab2

p_fill_style

p_forecolor

p_height

p_help

p_isbutton_bar

p_mdi_child

p_mouse_pointer

p_name

p_next

p_object

p_object_modify

p_parent

p_prev

p_scale_mode

p_selected

p_style

p_tab_index

p_tab_stop

p_undo_visible

p_user

p_user2

p_value

p_view_id

p_visible

p_width

p_window_id

p_x

p_xyparent

p_xyscale_mode

p_y


Hscroll Bar Events

on_change

on_create

on_create2

on_destroy

on_destroy2

on_got_focus

on_lost_focus

on_resize

on_scroll


Hscroll Bar Methods

_center_window

_delete_window

_draw_rect

_enabled

_font_flags2props

_font_props2flags

_get_window

_move_window

_restore_draw_setup

_save_draw_setup

_set_focus

_ShowWindow

_ShrinkFilename

_text_height

_text_width

_unique_name

_unique_tab_index

call_event

refresh

vsMoveWindow

vsQTextWidth

vsRefresh

vsSetFocus

vsSetFocus2


Hscroll Bar Properties

p_active_form

p_auto_size

p_child

p_client_height

p_client_width

p_draw_mode

p_draw_style

p_draw_width

p_edit

p_enabled

p_eventtab

p_eventtab2

p_fill_style

p_height

p_help

p_isbutton_bar

p_large_change

p_max

p_mdi_child

p_min

p_mouse_pointer

p_name

p_next

p_object

p_object_modify

p_parent

p_prev

p_scale_mode

p_selected

p_small_change

p_SpaceY

p_tab_index

p_tab_stop

p_undo_visible

p_user

p_user2

p_value

p_view_id

p_visible

p_width

p_window_id

p_x

p_xyparent

p_xyscale_mode

p_y


Image Events

lbutton_down

lbutton_up

mouse_move

on_create

on_create2

on_destroy

on_destroy2


Image Methods

_center_window

_delete_window

_draw_rect

_enabled

_get_window

_move_window

_push_button

_ShrinkFilename

_text_height

_text_width

_unique_name

_unique_tab_index

call_event

refresh

vsMoveWindow

vsQTextWidth

vsRefresh


Image Properties

p_active_form

p_auto_size

p_backcolor

p_border_style

p_child

p_command

p_edit

p_eventtab

p_eventtab2

p_height

p_help

p_isbutton_bar

p_mdi_child

p_message

p_mouse_pointer

p_name

p_next

p_Nofstates

p_object

p_object_modify

p_parent

p_picture

p_prev

p_redraw

p_scale_mode

p_selected

p_stretch

p_style

p_tab_index

p_undo_visible

p_user

p_user2

p_value

p_view_id

p_visible

p_width

p_window_id

p_x

p_xyparent

p_xyscale_mode

p_y


Keyboard Functions

_b2k_bind

_b2k_form

_executed_from_key_or_cmdline

_IsKeyDown

_key_for_display

alt_argument

alt_prefix

append_key_bindings

argument

bind_to_key

call_key

call_root_key

cancel_key_index

case_indirect

create_prefix_key

ctrl_prefix

esc_alt_prefix

event2index

event2name

eventtab_index

eventtab_inherit

flush_keyboard

flush_repeats

get_event

get_string

gui_bind_to_key

index2event

insert_keydef

iscancel

islist_cancel

isnormal_char

key_not_defined

key2ascii

keymsg_delay

last_event

letter_prompt

list_bindings

list_keydefs

messageNwait

name_on_key

name2event

normal_character

pgetkey

process_events

prompt

prompt_for_key

quote_key

read_ahead_flush_repeats

read_behind_flush_repeats

root_keydef

set_eventtab_index

shift_prefix

signal_handler

test_event

unbind_key

vsCallKey

vsEvent2Index

vsEvent2Name

vsEventTabIndex

vsGetEmulation

vsIndex2Event

vsQDefaultEventTab

vsQIdle

vsQLastEvent

vsQLastIndex

vsQPrevIndex

vsResetIdle

vsSetEventTabIndex

vsSetLastIndex

vsSetPrevIndex

vsTestEvent

what_is

where_is


Label Methods

_center_window

_delete_window

_draw_rect

_enabled

_font_flags2props

_font_props2flags

_get_window

_GetFontCharSet

_GetListColCaption

_GetListColInfo

_move_window

_restore_draw_setup

_save_draw_setup

_set_focus

_SetListColCaption

_SetListColInfo

_SetMultiLabelProp

_ShowWindow

_ShrinkFilename

_text_height

_text_width

_unique_name

_unique_tab_index

call_event

refresh

vsMoveWindow

vsQTextWidth

vsRefresh

vsSetFocus

vsSetFocus2


Label Properties

p_active_form

p_alignment

p_auto_size

p_backcolor

p_border_style

p_caption

p_child

p_client_height

p_client_width

p_draw_mode

p_draw_style

p_draw_width

p_edit

p_enabled

p_eventtab

p_eventtab2

p_fill_style

p_font_bold

p_font_italic

p_font_name

p_font_printer

p_font_size

p_font_strike_thru

p_font_underline

p_forecolor

p_height

p_help

p_isbutton_bar

p_mdi_child

p_mouse_pointer

p_name

p_next

p_object

p_object_modify

p_parent

p_prev

p_redraw

p_scale_mode

p_selected

p_tab_index

p_undo_visible

p_user

p_user2

p_view_id

p_visible

p_width

p_window_id

p_word_wrap

p_x

p_xyparent

p_xyscale_mode

p_y


List Box Events

lbutton_down

mouse_move

on_change

on_create

on_create2

on_destroy

on_destroy2

on_got_focus

on_lost_focus

on_resize


List Box Methods

_center_window

_col_width

_delete_window

_draw_rect

_enabled

_find_longest_line

_font_flags2props

_font_props2flags

_get_window

_GetFontCharSet

_insert_drive_list

_insert_font_list

_insert_name_list

_lbadd_item

_lbbottom

_lbclear

_lbdelete_item

_lbdeselect_all

_lbdeselect_line

_lbdown

_lbfind_selected

_lbget_item

_lbget_seltext

_lbget_text

_lbi_search

_lbinvert

_lbisline_selected

_lbmulti_select_result

_lbsearch

_lbselect_all

_lbselect_line

_lbset_item

_lbsort

_lbtop

_lbup

_move_window

_post_paint

_restore_draw_setup

_retrieve_list

_save_draw_setup

_set_focus

_ShowWindow

_ShrinkFilename

_spell_insert_suglist

_text_height

_text_width

_unique_name

_unique_tab_index

call_event

insert_file_list

refresh

vsColWidthClear

vsColWidthGet

vsColWidthSet

vsMoveWindow

vsQTextWidth

vsRefresh

vsSetFocus

vsSetFocus2


List Box Properties

p_active_form

p_after_pic_indent_x

p_auto_size

p_backcolor

p_border_style

p_buf_flags

p_buf_id

p_buf_name

p_buf_width

p_char_height

p_char_width

p_child

p_client_height

p_client_width

p_draw_mode

p_draw_style

p_draw_width

p_edit

p_enabled

p_eventtab

p_eventtab2

p_fill_style

p_fixed_font

p_font_bold

p_font_height

p_font_italic

p_font_name

p_font_printer

p_font_size

p_font_strike_thru

p_font_underline

p_font_width

p_forecolor

p_height

p_help

p_isbutton_bar

p_left_edge

p_line

p_mdi_child

p_mouse_pointer

p_multi_select

p_name

p_next

p_no_select_color

p_Noflines

p_Nofselected

p_object

p_object_modify

p_parent

p_pic_point_scale

p_pic_space_y

p_picture

p_prev

p_redraw

p_RLine

p_RNoflines

p_scale_mode

p_scroll_bars

p_scroll_left_edge

p_selected

p_tab_index

p_tab_stop

p_undo_visible

p_user

p_user2

p_value

p_view_id

p_visible

p_width

p_windent_x

p_windent_y

p_window_flags

p_window_id

p_x

p_xyparent

p_xyscale_mode

p_y


Macro Programming Functions

_delete_macro

_dllload

_load

_macro

_macro_append

_macro_call

_macro_delete_line

_macro_get_line

_macro_path

_macro_repeat

_macro_replace_line

_make

cancel_key_index

cancel_recording

dload

dunload

end_recording

gui_load

gui_save_macro

gui_set_var

gui_unload

k_match

last_macro

list_macros

load

load_all

pause_recording

record_macro_end_execute

record_macro_toggle

save_macro

set_var

st

start_recording

unload

vsDllExport

vsLibExport

vsMacroEndRecording

vsMacroGetFilename

vsMacroQDefined

vsMacroQDefining

vsMacroQRecording

vsMacroQRecordSource

vsMacroQRunning

vsMacroSetRecordSource

vsMacroSetRunning

vsMacroStartRecording

vstw


MDI Window Methods

_arrange_icons

_cascade_windows

_draw_rect

_enabled

_get_window

_GetButtonBar

_LoadButtonBar

_menu_set

_move_window

_restore_draw_setup

_save_draw_setup

_set_focus

_set_foreground_window

_ShowWindow

_ShrinkFilename

_text_height

_text_width

_tile_windows

call_event

refresh

vsMenuSet

vsMoveWindow

vsQButtonBar

vsQTextWidth

vsRefresh

vsSetFocus

vsSetFocus2


MDI Window Properties

p_active_form

p_button_bar

p_child

p_client_height

p_client_width

p_edit

p_enabled

p_fill_style

p_height

p_isbutton_bar

p_mdi_child

p_menu_handle

p_name

p_next

p_object

p_object_modify

p_parent

p_prev

p_scale_mode

p_user

p_user2

p_view_id

p_visible

p_width

p_window_id

p_window_state

p_x

p_xyparent

p_xyscale_mode

p_y


Menu Events

on_init_menu


Menu Functions

_menu_add_filehist

_menu_add_hist

_menu_add_prjhist

_menu_bind

_menu_delete

_menu_destroy

_menu_find

_menu_get_state

_menu_info

_menu_insert

_menu_load

_menu_match

_menu_move

_menu_set

_menu_set_state

_menu_show

_set_menu_state

alt_menu

menu_mdi_bind_all

mou_show_menu

open_menu

show

vsMenuDelete

vsMenuDestroy

vsMenuFind

vsMenuGetState

vsMenuInsert

vsMenuLoad

vsMenuQInfo

vsMenuSet

vsMenuSetState

vsMenuShow


Menu Properties

p_caption

p_categories

p_child

p_help

p_message

p_next

p_object


Menu Item Functions

_get_menu_state

_menu_get_state

_menu_insert

_menu_move

_menu_set_state

_set_menu_state

vsMenuGetState

vsMenuInsert

vsMenuSetState


Menu Item Properties

p_caption

p_categories

p_child

p_command

p_help

p_message

p_next

p_object


Miscellaneous Functions

_bbhelp

_beep

_bottom_height

_choose_font

_ConfigEnvVar

_create_temp_view

_cursor_shape

_date

_dbcs

_ddecommand

_dderequest

_deblink_selected

_decreate_mode

_default_color

_default_font

_default_option

_default_state_filename

_deleteel

_dllexport

_dx2lx

_dxy2lxy

_dy2ly

_el

_font_param

_font_type

_for_each_control

_get_cmdname

_get_focus

_get_var

_gethostname

_GetSystemMetrics

_grid_height

_grid_width

_hsb_thumb_pos

_idle_time_elapsed

_indexin

_isempty

_isfunptr

_isscalable_font

_kill_timer

_length

_lx2dx

_lx2lx

_lxy2dxy

_lxy2lxy

_ly2dy

_ly2ly

_makeempty

_map_xy

_message_box

_next_control

_nextel

_parse_project_command

_post_call

_prev_control

_process_cd

_process_info

_resume

_rgb

_safe_hidden_window

_set_foreground_syswindow

_set_foreground_window

_set_timer

_showbuf

_sort

_source_event_name

_spell_add

_spell_add_hist

_spell_clear

_spell_delete

_spell_option

_stdform

_stop_process

_suspend

_syshelp

_time

_top_height

_varformat

_win32s

abort

abs

alias

alias_cd

alt_argument

api_index

arg

ascii_table

auto_restore

box

calculator

call

call_list

cancel

chr

clear_message

clear_pbuffer

cmdclear_message

color

comment

config

create_ext

cursor_error

cursor_shape

dde

dderefresh

delay

deselect_all

display_hscroll

display_top

dos

draw

edit_with

editor_name

env_match

error_pos

eval_exp

execute

exit

exit_list

exit_process

extern

fexit

fileman_help

find_error

for_all

for_list

format_columns

get_env

get_message

getcwd

getpid

grid

gui_draw

gui_grid

gui_justify

gui_margins

gui_print

gui_save_config

gui_seek

gui_sort

gui_tabs

help

help_index

init_error

isid_valid

keyin_match_paren

list_config

list_errors

list_source

list_sys_objects

list_tags

list_usersys_objects

machine

man

margins

math

mathb

matho

mathx

maybe_normal_character

mdibutton_bar

message

min_abbrev

min_abbrev2

msg_ro

new_form

next_error

nls

nothing

overwrite_existing

parse_error

parsecommand

pascal_space

popup_imessage

popup_message

prev_error

prev_index

process_begin_line

process_down

process_enter

process_make_rc

process_rubout

process_up

project_build

project_debug

project_execute

project_make

project_user1

project_user2

prompt_load

read_ahead

read_behind

redo

refer_ext

reset_next_error

restore

return

run_selected

safe_exit

save_config

save_view

search_for_error

set

set_env

set_select

setupext

show_properties

show_selected

spell_options

st

st_position_on_error

start

start_process

sticky_message

stop

stop_process

toolbars

trace

try_calling

undo_msg

version

vsAlloc

vsArg

vsCallbackActivate

vsCallbackAdd

vsCallbackRemove

vsCallbackSet

vsCallIndex

vsConcurProcessIsThisBuffer

vsConcurProcessQCol

vsConcurProcessQReadRunning

vsConcurProcessQRunning

vsExecute

vsExit

vsFontIsScalable

vsFontList

vsFontQDefaultCharSet

vsFontQType

vsFree

vsGetDefaultFont

vsGetEditorName

vsGetEnv

vsGetMessage

vsGetMessageLine

vsGetVar

vsHvarAlloc

vsHvarArrayEl

vsHvarArrayLength

vsHvarFree

vsHvarGetI

vsHvarGetLstr

vsHvarGetZ

vsHvarHashtabEl

vsHvarIsEmpty

vsHvarMakeEmpty

vsHvarNextEl

vsHvarSetB

vsHvarSetI

vsHvarSetZ

vsMDICreate

vsMDIRegisterStatusWindow

vsMDISetActiveChild

vsMessage

vsMessageBox

vsPropGetI

vsPropGetL

vsPropGetZ

vsPropSetB

vsPropSetI

vsPropSetL

vsPropSetZ

vsQhide_all_comments_enabled

vsQhide_code_block_enabled

vsQTaggingSupported

vsRealloc

vsSetEnv

vsSetHelpFilename

vsStickyMessage

vsZLstrcpy

wh

word_chars

write_state_message

xcom

xnext_error2


Mouse Functions

fast_scroll

hide_mouse

mou_capture

mou_click

mou_click_block

mou_click_line

mou_click_menu

mou_click_menu_block

mou_click_menu_line

mou_col

mou_copy_to_cursor

mou_extend_selection

mou_get_xy

mou_in_window

mou_last_x

mou_last_y

mou_limit

mou_mode

mou_move_to_cursor

mou_paste

mou_release

mou_select_line

mou_select_word

mou_set_xy

mou_show_menu

p_mouse_pointer

vsMouCurWord

vsMouQLastX

vsMouQLastY


Names Table Functions

_delete_unused

_insert_name_list

_update_picture

_update_template

call_index

delete_name

find_index

index_callable

insert_name

last_index

name_index2funptr

name_info

name_info_arg2

name_match

name_name

name_type

oi2type

replace_name

set_name_info

type2oi

vsFindIndex

vsNameCallable

vsNameDelete

vsNameInfo

vsNameInfoArg2

vsNameInsert

vsNameMatch

vsNameName

vsNameReplace

vsNameSetInfo

vsNameType


Picture Box Events

lbutton_down

lbutton_up

mouse_move


Picture Box Methods

_center_window

_delete_window

_draw_rect

_enabled

_get_window

_move_window

_push_button

_restore_draw_setup

_save_draw_setup

_set_focus

_ShowWindow

_ShrinkFilename

_text_height

_text_width

_unique_name

_unique_tab_index

call_event

refresh

vsMoveWindow

vsQTextWidth

vsRefresh

vsSetFocus

vsSetFocus2


Picture Box Properties

p_active_form

p_auto_size

p_backcolor

p_border_style

p_child

p_client_height

p_client_width

p_clip_controls

p_command

p_draw_mode

p_draw_style

p_draw_width

p_edit

p_enabled

p_eventtab

p_eventtab2

p_fill_style

p_height

p_help

p_isbutton_bar

p_mdi_child

p_message

p_mouse_pointer

p_name

p_next

p_Nofstates

p_object

p_object_modify

p_parent

p_picture

p_prev

p_redraw

p_scale_mode

p_selected

p_stretch

p_style

p_tab_index

p_undo_visible

p_user

p_user2

p_value

p_view_id

p_visible

p_width

p_window_id

p_x

p_xyparent

p_xyscale_mode

p_y


Project Functions

project_add_file

project_build

project_compile

project_edit

project_execute

project_load

project_rebuild

project_usertool

vsProjectQName

vsProjectListConfigs


Radio Button Events

lbutton_up

on_create

on_create2

on_destroy

on_destroy2

on_got_focus

on_lost_focus

on_resize


Radio Button Methods

_center_window

_delete_window

_draw_rect

_enabled

_font_flags2props

_font_props2flags

_get_window

_GetFontCharSet

_move_window

_restore_draw_setup

_save_draw_setup

_set_focus

_ShowWindow

_ShrinkFilename

_text_height

_text_width

_unique_name

_unique_tab_index

call_event

refresh

vsMoveWindow

vsQTextWidth

vsRefresh

vsSetFocus

vsSetFocus2


Radio Button Properties

p_active_form

p_alignment

p_backcolor

p_caption

p_child

p_client_height

p_client_width

p_draw_mode

p_draw_style

p_draw_width

p_edit

p_enabled

p_eventtab

p_eventtab2

p_fill_style

p_font_bold

p_font_italic

p_font_name

p_font_printer

p_font_size

p_font_strike_thru

p_font_underline

p_forecolor

p_height

p_help

p_isbutton_bar

p_mdi_child

p_mouse_pointer

p_name

p_next

p_object

p_object_modify

p_parent

p_prev

p_redraw

p_scale_mode

p_selected

p_tab_index

p_tab_stop

p_undo_visible

p_user

p_user2

p_value

p_view_id

p_visible

p_width

p_window_id

p_x

p_xyparent

p_xyscale_mode

p_y


Retrieve Functions

_append_retrieve

_reset_retrieve

_retrieve_next

_retrieve_next_form

_retrieve_prev

append_retrieve_command

insert_retrieve

pretrieve_next

pretrieve_prev

retrieve_command_results

retrieve_next

retrieve_prev


Search Functions

/

_clex_find

_clex_skip_blanks

_escape_re_chars

_find_form_eventtab

_find_formobj

_find_object

_find_tile

_GoToOldLineNumber

_GoToROffset

_istagging_supported

_mffind

_mfreplace

_nrseek

_QROffset

_search_case

_SearchInitSkipped

_SearchQNofSkipped

_SearchQSkipped

_select_match

_SetAllOldLineNumbers

all

allnot

asm_proc_search

c

c_proc_search

case_toggle

column_process_list

e_proc_search

f

fileman_replace

find

find_matching_paren

find_next

find_prev

find_proc

find_tag

goto_line

goto_tag

gui_find_proc

gui_goto_col

gui_goto_line

gui_make_tags

gui_push_tag

gui_replace

gui_replace2

hide_all_comments

hide_code_block

hide_selection

i_search

java_proc_search

L

make_tags

match_length

mflast

next_proc

or_re

pas_proc_search

prepeat_search

preprocess

prev_proc

process_list

psearch

push_tag

qreplace

qsearch

query_replace

quick_search

re_search

re_toggle

reflow_region

regex_replace

regex_search

repeat_search

replace

replace_string

restore_search

resume

reverse_i_search

reverse_regex_search

save_search

search

search_again

search_backward

search_case

search_for_proc

search_forward

search_replace

seek

selective_display

show_all

show_braces

show_col1

show_indent

show_paragraphs

show_procs

tags_filename

translate_again

translate_backward

translate_forward

vsCommandFind

vsCommandReplace

vsCommandReplaceQNofChanges

vsGoToROffset

vsMatchCursorLength

vsMatchLength

vsMatchStart

vsQRefNextOccurrenceEnabled

vsQROffset

vsRepeatSearch

vsRestoreSearch

vsSaveSearch

vsSearchPromptReplace

vsSearchReplace

vsSelectMatch


Selection Functions

_adjust_block_selection

_alloc_selection

_begin_select

_begin_select_compare

_copy_to_cursor

_cursor_move_deselects

_cursor_move_extendssel

_delete_selection

_delete_temp_view

_deselect

_duplicate_selection

_end_select_compare

_fill_selection

_free_selection

_get_reflow_pos

_get_selinfo

_isnull_selection

_move_selected

_move_to_cursor

_overlay_block_selection

_reflow_selection

_select_block

_select_char

_select_line

_select_type

_shift_selection_left

_shift_selection_right

_show_selection

_sort_selection

add

adjust_block_selection

append

append_clipboard_text

append_cut

append_cut2

append_next_cut

append_to_clipboard

arg_shift_selection

backward_cut

begin_select

brief_iselect_char

brief_select_block

brief_select_char

brief_select_line

column_math

convert_spaces2tabs

convert_tabs2spaces

copy_to_cursor

count_lines_in_selection

cua_select

delete_selection

deselect

deselect_mark

emacs_select_block

emacs_select_char

end_select

execute_selection

fill_selection

filter_get_string

filter_init

filter_put_string

filter_restore_pos

filter_selection

for_mark

gui_append_selection

gui_fill_selection

gui_shift_selection

gui_write_selection

indent_region

indent_rigidly

indent_selection

lock_selection

lowcase_selection

maybe_delete_selection

move_to_cursor

overlay_block_selection

paste

print

print_selection

pselect_word

put

reflow_selection

restore_selection

save_selection

select_active

select_block

select_buffer

select_char

select_code_block

select_it

select_line

select_paragraph

select_proc

select_tag_file

select_whole_word

select_word

set_mark_select

shift_selection_left

shift_selection_right

sort_on_selection

sort_within_selection

tprint

tprint_selection

unindent_selection

upcase_selection

vsAllocSelection

vsBeginSelectCompare

vsCopyToCursor

vsDeleteSelection

vsDeselect

vsDuplicateSelection

vsEndSelectCompare

vsFillSelection

vsFreeSelection

vsGetSelInfo

vsHaveSelection

vsQSelectType

vsSelectBlock

vsSelectChar

vsSelectLine

vsSetSelectType

vsShiftSelectionLeft

vsShiftSelectionRight

vsShowSelection

vsSortSelection


Selective Display

all

allnot

hide_all_comments

hide_code_block

hide_selection

preprocess

selective_display

show_all

show_braces

show_col1

show_indent

show_paragraphs

show_procs


Spin Events

on_change

on_create

on_create2

on_destroy

on_destroy2

on_got_focus

on_lost_focus

on_resize

on_spin_down

on_spin_up


Spin Methods

_center_window

_delete_window

_draw_rect

_enabled

_get_window

_move_window

_restore_draw_setup

_save_draw_setup

_set_focus

_ShowWindow

_ShrinkFilename

_text_height

_text_width

_unique_name

_unique_tab_index

call_event

refresh

vsMoveWindow

vsQTextWidth

vsRefresh

vsSetFocus

vsSetFocus2


Spin Properties

p_active_form

p_backcolor

p_child

p_client_height

p_client_width

p_delay

p_draw_mode

p_draw_style

p_draw_width

p_edit

p_enabled

p_eventtab

p_eventtab2

p_fill_style

p_height

p_help

p_increment

p_isbutton_bar

p_mdi_child

p_mouse_pointer

p_name

p_next

p_object

p_object_modify

p_parent

p_prev

p_scale_mode

p_selected

p_tab_index

p_undo_visible

p_user

p_user2

p_view_id

p_visible

p_width

p_window_id

p_x

p_xyparent

p_xyscale_mode

p_y


SSTab Events

on_change

on_create

on_create2

on_destroy

on_destroy2

on_got_focus

on_lost_focus

on_resize


SSTab Methods

_deleteActive

_setEnabled

activate_view

get_view_id

vsActivateView


SSTab Properties

p_ActiveCaption

p_ActiveEnabled

p_active_form

p_ActiveHelp

p_ActiveOrder

p_ActivePicture

p_ActiveTab

p_backcolor

p_border_style

p_child

p_client_height

p_client_width

p_draw_mode

p_draw_style

p_draw_width

p_edit

p_enabled

p_eventtab

p_eventtab2

p_fill_style

p_height

p_help

p_isbutton_bar

p_mdi_child

p_mouse_pointer

p_MultiRow

p_name

p_next

p_NofTabs

p_object

p_object_modify

p_Orientation

p_parent

p_prev

p_scale_mode

p_selected

p_tab_index

p_TabsPerRow

p_tab_stop

p_undo_visible

p_user

p_user2

p_view_id

p_visible

p_width

p_window_id

p_x

p_xyparent

p_xyscale_mode

p_y


String Functions

_asc

_chr

_dbcsIsLeadByte

_dbcsStartOfDBCS

_dbcsStartOfDBCSCol

_dbcsSubstr

_escape_re_chars

_expand_tabsc

_parse_line

_quote

_text_colc

asc

center

dec2hex

env_case

eq_name2value

eq_value2name

expand_tabs

field

hex2dec

indent_string

isalnum

isalpha

isdigit

isinteger

isnumber

isprint

last_char

lastpos

length

lowcase

number2onoff

number2yesno

parse

parse_file

parseoption

pos

setonoff

setyesno

stranslate

strappend

strip

strip_filename

strip_last_word

strip_options

substr

text_col

translate

upcase

verify

vsExpandTabs

vsExpandTabsC

vsStrLastPos

vsStrPos

vsStrPosMatchLength

vsStrPosMatchStart

vsTextColC

word


Text Box Events

lbutton_down

mouse_move

on_change

on_create

on_create2

on_destroy

on_destroy2

on_got_focus

on_lost_focus

on_resize


Text Box Methods

_begin_line

_center_window

_delete_char

_delete_window

_draw_rect

_enabled

_end_line

_font_flags2props

_font_props2flags

_get_sel

_get_window

_GetFontCharSet

_insert_state

_insert_toggle

_move_window

_restore_draw_setup

_retrieve_value

_rubout

_save_draw_setup

_set_focus

_set_sel

_ShowWindow

_ShrinkFilename

_text_height

_text_width

_unique_name

_unique_tab_index

append_cut

append_to_clipboard

begin_line

begin_line_text_toggle

brief_delete

brief_end

brief_home

brief_paste

call_event

cap_word

cbacktab

command_state

copy_to_clipboard

copy_word

ctab

cua_select

cursor_left

cursor_right

cut

cut_end_line

cut_line

cut_prev_word

cut_word

delete_char

delete_end_line

delete_line

delete_prev_word

delete_word

end_line

expand_alias

get_command

insert_toggle

keyin

keyin_buf_name

keyin_dir_name

left

linewrap_delete_char

linewrap_rubout

lowcase_word

maybe_split_insert_line

move_text_backtab

move_text_tab

next_word

paste

refresh

right

rubout

set_command

transpose_chars

transpose_lines

transpose_words

vsBeginLine

vsDeleteChar

vsEndLine

vsKeyin

vsMoveWindow

vsQInsertState

vsQTextWidth

vsRefresh

vsRubout

vsSetFocus

vsSetFocus2

vsSetInsertState


Text Box Properties

p_active_form

p_after_pic_indent_x

p_auto_select

p_auto_size

p_backcolor

p_border_style

p_child

p_client_height

p_client_width

p_completion

p_draw_mode

p_draw_style

p_draw_width

p_edit

p_enabled

p_eventtab

p_eventtab2

p_fill_style

p_font_bold

p_font_italic

p_font_name

p_font_printer

p_font_size

p_font_strike_thru

p_font_underline

p_forecolor

p_height

p_help

p_isbutton_bar

p_mdi_child

p_mouse_pointer

p_name

p_next

p_object

p_object_modify

p_parent

p_pic_indent_x

p_pic_point_scale

p_pic_space_y

p_picture

p_prev

p_ReadOnly

p_redraw

p_scale_mode

p_sel_length

p_sel_start

p_selected

p_tab_index

p_tab_stop

p_text

p_undo_visible

p_user

p_user2

p_view_id

p_visible

p_width

p_window_id

p_x

p_xyparent

p_xyscale_mode

p_y


Tree View Events

on_change

on_create

on_create2

on_destroy

on_destroy2

on_got_focus

on_lost_focus

on_resize


Tree View Methods

_col_width

_TreeAddItem

_TreeBottom

_TreeCurIndex

_TreeDelete

_TreeDown

_TreeGetCaption

_TreeGetDepth

_TreeGetFirstChildIndex

_TreeGetIndexFromLineNumber

_TreeGetIndexFromPoint

_TreeGetInfo

_TreeGetNextSiblingIndex

_TreeGetParentIndex

_TreeGetPrevSiblingIndex

_TreeGetSelInfo

_TreeGetUserInfo

_TreePageDown

_TreePageUp

_TreeSetAllFlags

_TreeSetCaption

_TreeSetCurIndex

_TreeSetInfo

_TreeSetUserInfo

_TreeSortCaption

_TreeSortUserInfo

_TreeTop

_TreeUp

vsColWidthClear

vsColWidthGet

vsColWidthSet

vsTreeAddItem

vsTreeSetUserInfo


Tree View Properties

p_active_form

p_backcolor

p_border_style

p_child

p_client_height

p_client_width

p_CollapsePicture

p_ExpandPicture

p_LevelIndent

p_LineStyle

p_mdi_child

p_mouse_pointer

p_name

p_next

p_object

p_object_modify

p_parent

p_scale_mode

p_selected

p_ShowRoot

p_tab_index

p_undo_visible

p_user

p_user2

p_view_id

p_visible

p_width

p_window_id

p_x

p_xyparent

p_xyscale_mode

p_y


Vscroll Bar Events

on_change

on_create

on_create2

on_destroy

on_destroy2

on_got_focus

on_lost_focus

on_resize

on_scroll


Vscroll Bar Methods

_center_window

_delete_window

_draw_rect

_enabled

_font_flags2props

_font_props2flags

_get_window

_move_window

_restore_draw_setup

_save_draw_setup

_set_focus

_ShowWindow

_ShrinkFilename

_text_height

_text_width

_unique_name

_unique_tab_index

call_event

refresh

vsMoveWindow

vsQTextWidth

vsRefresh

vsSetFocus

vsSetFocus2


Vscroll Bar Properties

p_active_form

p_auto_size

p_child

p_client_height

p_client_width

p_draw_mode

p_draw_style

p_draw_width

p_edit

p_enabled

p_eventtab

p_eventtab2

p_fill_style

p_height

p_help

p_isbutton_bar

p_large_change

p_max

p_mdi_child

p_min

p_mouse_pointer

p_name

p_next

p_object

p_object_modify

p_parent

p_prev

p_scale_mode

p_selected

p_small_change

p_SpaceY

p_tab_index

p_tab_stop

p_undo_visible

p_user

p_user2

p_value

p_view_id

p_visible

p_width

p_window_id

p_x

p_xyparent

p_xyscale_mode

p_y


Window Functions

_arrange_icons

_change_all_wfonts

_create_tile_id

_create_window

_delete_edit_windows

_delete_tile_id

_delete_window

_edit_window

_find_tile

_iswindow_valid

_last_window_id

_move_selected

_move_window

_next_view

_next_window

_no_child_windows

_prev_view

_prev_window

_quit_view

_tile_windows

activate_view

arrange_icons

cascade_windows

change_window

close_window

create_tile

delete_tile

duplicate_window

expand_window

find_window_with_edge

find_window_with_point

for_each_mdi_child

get_view_id

hsplit_window

iconize_mdi

iconize_window

link_window

list_modified

load_files

maximize_mdi

maximize_window

move_edge

move_mdi

move_window

next_doc

next_window

Nofwindows

one_tile

one_window

point_on_edge

prev_doc

prev_window

quit_view

restore_mdi

restore_window

shrink_window

size_mdi

size_window

tile_windows

vsActivateView

vsCreateEditorCtl

vsDestroyEditorCtl

vsLoadFiles

vsMoveWindow

vsplit_window

vsQuitView

window_above

window_below

window_edit

window_left

window_match

window_right

wleft_margin

zoom_window


C++ API Functions by Category

See Also Macro Functions by Category

We use the term method to indicate a function which takes a Visual SlickEdit object instance handle as the first argument.

We use the term property to indicate one of the VSP_??? constants defined in "vs.h".  The following functions are used to get and set properties:

vsPropSetB	Set buffer (array of bytes) property.

vsPropGetB	Get buffer (array of bytes) property.

vsPropSetI	Set integer or boolean property.

vsPropGetI	Get integer or boolean property.

vsPropSetL	Set long integer property.

vsPropGetL	Get long integer property.

vsPropSetZ	Set null terminated string property.

vsPropGetZ	Get property as null terminated string.

These property functions automatically do conversions from one type to another where possible.  For example, you can use the vsPropGetZ function to get an integer property such as the line number (VSP_LINE) in string format.  An error will occur if the property can not be converted to the actual type.

Note:  To reduce the on-line help, we show the Slick-C names for properties.  The Slick-C name for a property can be converted to one of the VSP_??? constants by changing the leading "p" to VSP, uppercasing all characters, and removing all underscores except the first underscore.   For example, the Slick-C property name p_buf_name corresponds to VSP_BUFNAME.

C++ Bookmark Functions

C++ Break Point Manager Functions

C++ Buffer Functions

C++ Clipboard Functions

C++ Cursor Functions

C++ Editor Control Functions, Methods, Properties

C++ File Functions

C++ Keyboard Functions

C++ Macro Programming Functions

C++ MDI Window Methods, Properties

C++ Menu Functions

C++ Miscellaneous Functions

C++ Mouse Functions

C++ Names Table Functions

C++ Project Functions

C++ Search Functions

C++ Selection Functions

C++ String Functions

C++ Text Box Methods, Properties

C++ Window Functions


C++ Bookmark Functions

vsBookmarkAdd

vsBookmarkFind

vsBookmarkGetInfo

vsBookmarkQCount

vsBookmarkRemove

vsBookmarkRestore


C++ Buffer Functions

vsActivateView

vsBufCreateTempView

vsBufDeleteTempView

vsBufEdit

vsBufGetDocumentName

vsBufGetName

vsBufMatch

vsBufName2Caption

vsBufQData

vsBufRefresh

vsBufRestoreHiddenWindow

vsBufSetData

vsBufSetHiddenWindow

vsCallbackAdd

vsCallbackRemove

vsCallbackSet

vsCommandName

vsCommandSave

vsCreateTempView

vsDeleteBuffer

vsDeleteTempView

vsLoadFiles

vsNextBuffer

vsOpenTempView

vsPrevBuffer


C++ Clipboard Functions

vsClipboardQNofInternal

vsHaveClipboard


C++ Cursor Functions

vsBeginLine

vsBottom

vsDown

vsEndLine

vsGoToPoint

vsGoToROffset

vsQLineFlags

vsRestorePos

vsSavePos

vsSavePos2

vsSetLineFlags

vsTop

vsUp


C++ Editor Control Functions

vsBufEdit

vsCreateEditorCtl

vsDeleteExtensionOptions

vsGetDefaultColor

vsGetDefaultExtensionOptions

vsGetDefaultFont

vsGetDefaultOptionZ

vsGetTextColor

vsPrintGetConfig

vsPrintSetConfig

vsRestoreSearch

vsSaveSearch

vsSetDefaultColor

vsSetDefaultExtensionOptions

vsSetDefaultExtensionReferTo

vsSetDefaultFont

vsSetDefaultOption

vsSetDefaultOptionZ


C++ Editor Control Methods

vsAllocColor

vsBeginLine

vsBeginSelect

vsBeginSelectCompare

vsBottom

vsBufName2Caption

vsCallbackActivate

vsCallbackAdd

vsCallbackRemove

vsCallbackSet

vsCallKey

vsCheckLineLengths

vsCommandFind

vsCommandName

vsCommandReplace

vsCommandSave

vsCopyToCursor

vsCurWord

vsDeleteAll

vsDeleteBuffer

vsDeleteChar

vsDeleteLine

vsDeselect

vsDestroyEditorCtl

vsDown

vsDuplicateSelection

vsEndLine

vsEndSelect

vsEndSelectCompare

vsExpandTabs

vsExpandTabsC

vsFillSelection

vsFreeColor

vsGetLine

vsGetRText

vsGetSelectedText

vsGetSelInfo

vsGetText

vsGoToOldLineNumber

vsGoToPoint

vsGoToROffset

vsHaveSelection

vsInsertLine

vsInsertText

vsJoinLine

vsJoinLineToCursor

vsKeyin

vsLoadFiles

vsMoveWindow

vsNextBuffer

vsPrevBuffer

vsPropGetB

vsQInsertState

vsQLineFlags

vsQLineLength

vsQMaxTabCol

vsQOffset

vsQPoint

vsQReadOnly

vsQROffset

vsQSelectedTextLength

vsQSelectType

vsQTextWidth

vsQuitView

vsQUndoStatus

vsRefresh

vsRepeatSearch

vsReplaceLine

vsResetModifiedLineFlags

vsRubout

vsSaveFile

vsSavePos

vsSavePos2

vsSearch

vsSearchInitSkipped

vsSearchPromptReplace

vsSearchQNofSkipped

vsSearchQSkipped

vsSearchReplace

vsSelectBlock

vsSelectChar

vsSelectEditMode

vsSelectLine

vsSelectMatch

vsSetAllOldLineNumbers

vsSetFocus

vsSetFocus2

vsSetInsertState

vsSetLineFlags

vsSetSelectType

vsSetTextColor

vsShiftSelectionLeft

vsShiftSelectionRight

vsShowSelection

vsSortSelection

vsSplitLine

vsTestEvent

vsTextColC

vsTop

vsUp

vsWinQData

vsWinSetData


C++ Editor Control Properties

p_active_form

p_AllowSave

p_auto_size

p_AutoSelectExtension

p_backcolor

p_binary

p_border_style

p_buf_flags

p_buf_id

p_buf_name

p_buf_size

p_buf_width

p_buser

p_char_height

p_char_width

p_child

p_client_height

p_client_width

p_col

p_color_flags

p_cursor_x

p_cursor_y

p_display_xlat

p_draw_mode

p_draw_style

p_draw_width

p_edit

p_enabled

p_extension

p_file_date

p_fill_style

p_fixed_font

p_font_bold

p_font_height

p_font_italic

p_font_name

p_font_printer

p_font_size

p_font_strike_thru

p_font_underline

p_font_width

p_forecolor

p_height

p_help

p_hex_field

p_hex_mode

p_hex_nibble

p_hex_Nofcols

p_hex_toppage

p_indent_style

p_indent_with_tabs

p_index

p_isbutton_bar

p_LangCaseSensitive

p_left_edge

p_lexer_name

p_line

p_line_numbers_len

p_margins

p_MaxLineLength

p_mode_eventtab

p_mode_name

p_modify

p_ModifyFlags

p_mouse_pointer

p_newline

p_next

p_Nofhidden

p_Noflines

p_NofNoSave

p_NofSelDispBitmaps

p_object

p_object_modify

p_OldLineNumber

p_on_event

p_parent

p_prev

p_ProtectReadOnlyMode

p_RBufSize

p_ReadOnly

p_readonly_mode

p_readonly_set_by_user

p_redraw

p_RLine

p_RNoflines

p_scale_mode

p_scroll_bars

p_scroll_left_edge

p_selected

p_show_tabs

p_showeof

p_ShowSpecialChars

p_SourceRecording

p_tab_index

p_tab_stop

p_tabs

p_TruncateLength

p_undo_steps

p_undo_visible

p_user

p_user2

p_view_id

p_visible

p_width

p_windent_x

p_window_flags

p_window_id

p_word_chars

p_word_wrap_style

p_x

p_xyparent

p_xyscale_mode

p_y


C++ File Functions

vsBufEdit

vsCommandName

vsCommandSave

vsCreateTempView

vsDeleteTempView

vsDropFiles

vsFileAbsolute

vsFileAbsoluteTo

vsFileClose

vsFileFlush

vsFileMove

vsFileOpen

vsFileRead

vsFileRelative

vsFileSeek

vsFileWrite

vsLoadFiles

vsOpenTempView

vsUpdatePicture


C++ File List Box Methods

vsMoveWindow

vsQTextWidth

vsRefresh

vsSetFocus

vsSetFocus2


C++ Keyboard Functions

vsCallKey

vsEvent2Index

vsEvent2Name

vsEventTabIndex

vsGetEmulation

vsIndex2Event

vsQDefaultEventTab

vsQIdle

vsQLastEvent

vsQLastIndex

vsQPrevIndex

vsResetIdle

vsSetEventTabIndex

vsSetLastIndex

vsSetPrevIndex

vsTestEvent


C++ Macro Programming Functions

vsDllExport

vsLibExport

vsMacroEndRecording

vsMacroGetFilename

vsMacroQDefined

vsMacroQDefining

vsMacroQRecording

vsMacroQRecordSource

vsMacroQRunning

vsMacroSetRecordSource

vsMacroSetRunning

vsMacroStartRecording


C++ MDI Window Methods

vsMenuSet

vsMoveWindow

vsQButtonBar

vsQTextWidth

vsRefresh

vsSetFocus

vsSetFocus2


C++ MDI Window Properties

p_active_form

p_button_bar

p_child

p_client_height

p_client_width

p_edit

p_enabled

p_fill_style

p_height

p_isbutton_bar

p_mdi_child

p_menu_handle

p_name

p_next

p_object

p_object_modify

p_parent

p_prev

p_scale_mode

p_user

p_user2

p_view_id

p_visible

p_width

p_window_id

p_window_state

p_x

p_xyparent

p_xyscale_mode

p_y


C++ Menu Events

on_init_menu


C++ Menu Functions

vsMenuDelete

vsMenuDestroy

vsMenuFind

vsMenuGetState

vsMenuInsert

vsMenuLoad

vsMenuQInfo

vsMenuSet

vsMenuSetState

vsMenuShow


C++ Menu Properties

p_caption

p_categories

p_child

p_help

p_message

p_next

p_object


C++ Menu Item Functions

vsMenuGetState

vsMenuInsert

vsMenuSetState


C++ Menu Item Properties

p_caption

p_categories

p_child

p_command

p_help

p_message

p_next

p_object


C++ Miscellaneous Functions

dfprintf

mprintf

vsAlloc

vsArg

vsCallbackActivate

vsCallbackAdd

vsCallbackRemove

vsCallbackSet

vsCallIndex

vsConcurProcessIsThisBuffer

vsConcurProcessQCol

vsConcurProcessQReadRunning

vsConcurProcessQRunning

vsExecute

vsExit

vsFontIsScalable

vsFontList

vsFontQDefaultCharSet

vsFontQType

vsFree

vsGetDefaultFont

vsGetEditorName

vsGetEnv

vsGetMessage

vsGetMessageLine

vsGetVar

vsHvarAlloc

vsHvarArrayEl

vsHvarArrayLength

vsHvarFree

vsHvarGetI

vsHvarGetLstr

vsHvarGetZ

vsHvarHashtabEl

vsHvarIsEmpty

vsHvarMakeEmpty

vsHvarNextEl

vsHvarSetB

vsHvarSetI

vsHvarSetZ

vsMDICreate

vsMDIRegisterStatusWindow

vsMDISetActiveChild

vsMessage

vsMessageBox

vsprint

vsprintln

vsPropGetI

vsPropGetL

vsPropGetZ

vsPropSetB

vsPropSetI

vsPropSetL

vsPropSetZ

vsQhide_all_comments_enabled

vsQhide_code_block_enabled

vsQTaggingSupported

vsRealloc

vsSetEnv

vsSetHelpFilename

vsStickyMessage

vsZLstrcpy

xprintf


C++ Mouse Functions

vsMouCurWord

vsMouQLastX

vsMouQLastY


C++ Names Table Functions

vsFindIndex

vsNameCallable

vsNameDelete

vsNameInfo

vsNameInfoArg2

vsNameInsert

vsNameMatch

vsNameName

vsNameReplace

vsNameSetInfo

vsNameType


C++ Project Functions

vsProjectQName

vsProjectListConfigs


C++ Search Functions

vsCommandFind

vsCommandReplace

vsCommandReplaceQNofChanges

vsGoToROffset

vsMatchCursorLength

vsMatchLength

vsMatchStart

vsQRefNextOccurrenceEnabled

vsQROffset

vsRepeatSearch

vsRestoreSearch

vsSaveSearch

vsSearchPromptReplace

vsSearchReplace

vsSelectMatch


C++ Selection Functions

vsAllocSelection

vsBeginSelectCompare

vsCopyToCursor

vsDeleteSelection

vsDeselect

vsDuplicateSelection

vsEndSelect

vsEndSelectCompare

vsFillSelection

vsFreeSelection

vsGetSelInfo

vsHaveSelection

vsQSelectType

vsSelectBlock

vsSelectChar

vsSelectLine

vsSetSelectType

vsShiftSelectionLeft

vsShiftSelectionRight

vsShowSelection

vsSortSelection


C++ String Functions

vsExpandTabs

vsExpandTabsC

vsStrLastPos

vsStrPos

vsStrPosMatchLength

vsStrPosMatchStart

vsTextColC

word


C++ Text Box Methods

vsBeginLine

vsDeleteChar

vsEndLine

vsKeyin

vsMoveWindow

vsQInsertState

vsQTextWidth

vsRefresh

vsRubout

vsSetFocus

vsSetFocus2

vsSetInsertState


C++ Text Box Properties

p_active_form

p_after_pic_indent_x

p_auto_select

p_auto_size

p_backcolor

p_border_style

p_child

p_client_height

p_client_width

p_completion

p_draw_mode

p_draw_style

p_draw_width

p_edit

p_enabled

p_eventtab

p_eventtab2

p_fill_style

p_font_bold

p_font_italic

p_font_name

p_font_printer

p_font_size

p_font_strike_thru

p_font_underline

p_forecolor

p_height

p_help

p_isbutton_bar

p_mdi_child

p_mouse_pointer

p_name

p_next

p_object

p_object_modify

p_parent

p_pic_indent_x

p_pic_point_scale

p_pic_space_y

p_picture

p_prev

p_ReadOnly

p_redraw

p_scale_mode

p_sel_length

p_sel_start

p_selected

p_tab_index

p_tab_stop

p_text

p_undo_visible

p_user

p_user2

p_view_id

p_visible

p_width

p_window_id

p_x

p_xyparent

p_xyscale_mode

p_y


C++ Window Functions

vsActivateView

vsCreateEditorCtl

vsDestroyEditorCtl

vsLoadFiles

vsMoveWindow

vsplit_window

vsQuitView


C++ Break Point Manager Functions

vsBPMClearAllBreakPoints

vsBPMDisableBreakPoint

vsBPMDisableBreakPointBL

vsBPMEndDebugMode

vsBPMEndDebugModeFor

vsBPMEndDebugModeForB

vsBPMEnumerate

vsBPMEnumerateB

vsBPMQDefaultPicture

vsBPMQFlags

vsBPMQPicture

vsBPMRemoveBreakPoint

vsBPMRemoveBreakPointBL

vsBPMRemoveDisableBreakPoint

vsBPMRemoveDisableBreakPointBL

vsBPMRemoveExecLine

vsBPMRemoveExecLineBL

vsBPMRemoveStackExecLine

vsBPMRemoveStackExecLineBL

vsBPMSet

vsBPMSetAll

vsBPMSetAllFor

vsBPMSetAllForB

vsBPMSetBL

vsBPMSetBreakPoint

vsBPMSetBreakPointBL

vsBPMSetExecLine

vsBPMSetExecLineBL

vsBPMSetPicture

vsBPMSetStackExecLine

vsBPMSetStackExecLineBL

vsBPMStartDebugMode

vsBPMStartDebugModeFor

vsBPMToggleBreakPoint


+

_command void + number

Applies To	Edit Window

Remarks	Moves the cursor the specified number of lines down.


-

_command void - number

Applies To	Edit Window

Remarks	Moves the cursor the specified number of lines up.


0

_command void 0 number

Applies To	Edit Window

Remarks	The 0 command is called if the first character of a command is a digit.  The first parameter to this special function is the entire command line including the first digit. This command moves the cursor to the specified line number.  The leading digit 0 zero is not required.  Any line number may be typed on the command line and the (_command) for '0' will be called.

Command Line Example

     100              Move cursor to line 100

See Also	goto_line, p_RLine, p_line, gui_goto_line


abort

void abort()

Remarks	Cancels the command currently executing.  If you write macros which use the get_event procedure, be sure to call the procedure iscancel, or islist_cancel to check whether the user has selected to abort.


abs

typeless abs(typeless number)

Remarks	Returns the absolute value of number.  If number is negative, -number is returned.  Otherwise number is returned unmodified.


absolute

_str absolute(_str filename, _str toDir=null)

Return	Returns filename with exact path specification as if the current directory was toDir.  If toDir is null, the current directory is used.

Example

/* Assuming current working directory is 'c:\vslick' */

absolute('..\autoexec.bat')	:== 'c:\autoexec.bat'

absolute('vs.exe')	:== 'c:\vslick\vs.exe'

absolute('vs.exe','d:\vslick\')	:== 'd:\vslick\vs.exe'

See Also	relative


activate_view

void activate_view(int view_id)

Applies To	All Objects

Remarks	For an explanation of how windows, views, and buffers are related, see Windows Structure.

A view cannot exist without being attached to a window and a buffer.    activate_view makes the window, view, and buffer corresponding to view_id active.  A view holds the information necessary for the editor to remember your location in a buffer.  The view properties you can access are p_cursor_x, p_cursor_y, p_line, p_col, p_left_edge, p_buf_id, p_view_id, and p_window_id.  When you have more than one window looking at the same buffer,  the windows have different views of that buffer.  Usually all view variables are different except for 'p_buf_id'.

Example

get_view_id(view_id);	// Remember current window, view,

// and buffer.

_next_view();	// Switch to next view in current

// window.  BY CONVENTION,

// only the hidden window has more

// than one view.

activate_view(view_id);    	// Go back to orig. window, view,

// and buffer.

// This code does the same as the above

view_id=p_view_id;_next_view();p_view_id=view_id;

See Also	p_view_id, get_view_id, _next_view, _prev_view, _quit_view, load_files, _next_window,  _prev_window


add

_command void add()

"Tools", "Add Selected Expression"

Applies To	Edit Window, Editor Control

Remarks	Adds selected text and inserts result below the last line of the selection.  If no operator exists between two adjacent numbers, addition is assumed.  '$' and ',' characters are stripped from the line before the expression is evaluated.  The result of each line is added.  Accepts expressions supported by the math commands.  See math command for information on expression.  Select text first with one of the commands select_char, select_line, or select_block.

See Also	select_char, select_line, select_block, math, mathx, matho, mathb


_adjust_block_selection

int [wid_expression.]_adjust_block_selection(_str mark_id="")

Applies To	Edit Window, Editor Control

Remarks	Overlays the selected block of text specified at the cursor position and fills in the source block with spaces.  This command handles all source and destination conflicts.  A useful function for this command is to move a large column of numbers up or down.    mark_id is a handle to a selection returned by one of the built-ins _alloc_selection or _duplicate_selection.  A mark_id of '' or no mark_id parameter identifies the active selection.

Return	Returns 0 if successful.  Common return codes are TEXT_NOT_SELECTED_RC, BLOCK_SELECTION_REQUIRED_RC.  On error, message is displayed.


adjust_block_selection

_command int [wid_expression.]adjust_block_selection()

"Edit", "Other...", "Adjust Block"

Applies To	Edit Window, Editor Control

Remarks	Overlays the selected block of text at the cursor position and fills in the source block with spaces.  This command handles all source and destination conflicts.  A useful function for this command is to move a large column of numbers up or down.  A block of text may be selected with the select_block command (Ctrl+B).  Execute the select_block a second time to lock the selection so you may move the cursor without the selection area changing.  Then execute this command.

Return	Returns 0 if successful.  Common return codes are TEXT_NOT_SELECTED_RC, BLOCK_SELECTION_REQUIRED_RC.  On error, message is displayed.


alias

_command int alias( [_str cmdline] )

"Tools", "Configuration", "Alias Files..."

cmdline is a  string in the format: [-d] name [ value ]

Remarks	The alias command displays, creates, or modifies aliases.  To expand an alias, execute the expand_alias command (Ctrl+Space bar).

If no arguments are given or cmdline is "", you will prompted to pick an alias file and the Alias Editor dialog box will be displayed.  We recommend you use the alias editor for creating, deleting, viewing, or modifying aliases because it is easier to use than this command.

Aliases are stored by default in a file called "alias.slk".  Use the VSLICKALIAS environment variable to define one or more alias files.  Separate each alias filename with a ';' (UNIX: ':').  New aliases created with the alias command are placed in the first file defined by  the VSLICKALIAS environment variable.

The value of the alias may have any of the following escape sequences  embedded in it.

%<EnvVar>%	Insert the value of the environment variable specified

%\d	Insert the date

%\t	Insert the time

%\i	Indent

%\b	Unindent

%\c	Place cursor

%\n	Current function name

%(ParamName)	Argument replacement.

Prefix the name of the alias with "-d" to delete an alias.

See alias_cd command for information on using an alias to change directory.

Return	Returns 0 if successful.

See Also	alias_cd, expand_alias


alias_cd

_command int alias_cd( [_str alias | directory] )

Remarks	Changes the current directory to the alias or directory given.  If an alias is given, it must evaluate to a directory.  If no parameter is given, you will be prompted for a parameter.  The current directory in the concurrent process buffer is set as well if the concurrent process buffer is started.

Return	Returns 0 if successful.

See Also	alias, expand_alias, gui_cd, alias_cd, cd, cdd


alias_match

_str alias_match(_str name_prefix, int find_first)

Return	Returns the name of the alias matching the prefix name_prefix.  If a match is not found, '' is returned.  Specify find_first == 1, to start from the first alias and 0 to find the next match.  You must call this function with find_first==2, to terminate matching after no match is found.

See Also	alias, expand_alias


all

_command void [wid_expression.]all(_str string, _str options)

Applies To	Edit window, Editor control

Syntax	Alternate command line syntax:  all [~]/string[/options]

Remarks	Searches entire buffer for lines containing the string specified.  Lines not containing the search string are hidden.  If a tilde (~) is given in the command line syntax, then lines containing the search string are hidden like the allnot command.  See find command for information on options argument.

See Also	hide_all_comments, hide_selection, hide_code_block, show_all, preprocess, allnot, show_procs, show_col1, _lineflags, selective_display, show_braces, show_indent, show_paragraphs


allnot

_command void [wid_expression.]allnot(_str string, _str options)

Applies To	Edit window, Editor control

Syntax	Alternate command line syntax:  allnot /string[/options]

Remarks	Hides lines containing the search string specified.  The entire buffer is processed.  See find command for information on options argument.

See Also	hide_all_comments, hide_selection, hide_code_block, show_all, preprocess, all, show_procs, show_col1, _lineflags, selective_display, show_braces, show_indent, show_paragraphs


_AllocColor

int [wid_expression.]_AllocColor()

Applies To	Edit window, Editor control

Return	Returns an index to a color.  Use the _default_color function to set the color attributes.  Color indexes are passed to the _SetTextColor function to set color.  There is a limit of 255 colors so make sure to free the color when you are done.

Example

int gColorIndex;

definit()

{

     if (arg(1)=='L' && gColorIndex) return;

     gColorIndex=_AllocColor();

     _default_color(gColorIndex,0xffffff,0xFF0000);

}

defmain()

{

     // Change the color of 5 bytes of text starting from cursor

     _SetTextColor(gColorIndex,5);

}

See Also	_FreeColor, _SetTextColor, _GetTextColor, _default_color


_alloc_selection

int _alloc_selection(_str options=['B'])

Return	Returns a handle to a selection or bookmark.  A selection requires 2 marks and a bookmark requires one. If no more marks are available, a negative number (TOO_MANY_SELECTIONS_RC) is returned.  This handle may be passed as a parameter to other selection functions such as _select_line and _copy_to_cursor.  The 'B' option is used for allocating a book mark.  Bookmarks can not be deleted.

IMPORTANT: The active selection or selection showing may not be freed by the _free_selection function.  Use the _show_selection function to make another mark active before freeing the mark you have allocated.

Example

      /* Allocate a selection for copying the current line. */

      mark_id= _alloc_selection();

      if (mark_id<0){

          message(get_message(mark_id));

          return(mark_id);

      }

      _select_line(mark_id);

      _copy_to_cursor(mark_id);

      // This selection can be freed because it is not the active selection.

      _free_selection(mark_id);

See Also	_free_selection, _show_selection


alt_argument

_command void alt_argument()

Applies To	Edit Window, Editor Control

Remarks	This command may only be bound to the keys Alt+0..Alt+9.  This command calls the argument command with a default count of 0 for Alt+0, 1 for Alt+1 ..., 9 for Alt+9.


alt_bookmark

_command void alt_bookmark()

Ctrl+1...Ctrl+0

Applies To	Edit Window

Remarks	Sets a bookmark identified by a letter or number corresponding to the key pressed which invoked this command.  This command may only be bound to the keys Alt+0..Alt+9, Alt+A..Alt+Z, Ctrl+1..Ctrl+9, and Ctrl+A..Ctrl+Z.

See Also	set_bookmark, goto_bookmark, next_bookmark, prev_bookmark, alt_gtbookmark


alt_gtbookmark

_command void alt_gtbookmark()

Applies To	Edit Window

Remarks	Goes to bookmark identified by a letter or number corresponding to the key pressed which invoked this command.  This command may only be bound to the keys Alt+0..Alt+9, Alt+A..Alt+Z, Ctrl+1..Ctrl+9, and Ctrl+A..Ctrl+Z.

See Also	set_bookmark, goto_bookmark, next_bookmark, prev_bookmark, alt_bookmark


alt_menu

_command void alt_menu( [ 'Y'| 'N'] )

Remarks	Determines whether pressing and releasing the Alt key activates the menu bar.  If no argument is specified, you are prompted for one.


alt_prefix

_command void alt_prefix()

Remarks	Defines an Alt prefix key.  For example, after binding this command to the F1 key, pressing F1 'x' is identical to Alt+X.

See Also	shift_prefix, ctrl_prefix, esc_alt_prefix


api_index

_command void api_index()

"Help",  "API Apprentice On"

Remarks	Provides API Apprentice help on the word at the cursor.  If there is no word at the cursor, the API Apprentice Index dialog box is displayed.  API Apprentice helps you remember and type function and method names and arguments.


append

_command int append(_str filename )

Remarks	Appends selected text to filename specified.  This command has no effect on files already in memory.  Select text first with one of the commands select_char, select_line, or select_block.

Returns	Returns 0 if successful.  Common return codes are TEXT_NOT_SELECTED_RC, BLOCK_SELECTION_REQUIRED_RC, and TOO_MANY_SELECTIONS_RC.  On error, message is displayed.

 See Also	select_char, select_line, select_block, get, put, gui_write_selection, gui_append_selection


append_clipboard_text

int append_clipboard_text(_str text)

Remarks	Appends text to clipboard in buffer.

Return	Returns 0 to indicate successful.  No errors possible yet.

See Also	append_cut2, push_clipboard_itype


append_cut

_command void [wid_expression.]append_cut()

Ctrl+Shift+X or "Edit", "Append Cut"

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Remarks	Appends selected text to clipboard and deletes selected text.

See Also	append_next_cut, append_to_clipboard, cut, paste, copy_word, cut_word, cut_line, cut_end_line, cut_prev_word


append_cut2

int append_cut2([_str mark_id [,'C']])

Applies To	Edit Window, Editor Control

Remarks	Appends selected text to the clipboard and optionally deletes selected text.  Specify 'C' as the second argument if you do not want the selected text deleted.  mark_id is a handle to a selection returned by one of the built-ins _alloc_selection or _duplicate_selection.  A mark_id of '' or no mark_id parameter identifies the active selection.

Return	Returns 0 if successful.  Common return codes are TEXT_NOT_SELECTED_RC, SOURCE_DEST_CONFLICT_RC, and INVALID_SELECTION_HANDLE_RC.  On error, message is displayed.

See Also	append_clipboard_text, push_clipboard_itype


append_dir

_command append_dir( [_str cmdline] )

cmdline is a string in the format: [@]filespec  [ [@]filespec ... ]

Remarks	Appends a directory list of the files specified to the current buffer.  If filespec is not specified, files in the current directory are listed.  This command is useful when in fileman mode.  An '@' sign prefix to filespec indicates that filespec is a file or buffer which contains a list of file names to be used as arguments to this command.  Use the dir or list command to change the mode to fileman mode.

See Also	dir, list, append_list


append_key_bindings

void append_key_bindings(int index, _str &key_binding_list, _str prefix_keys, int root_keys, int mode_keys)

Remarks	Sets variable key_binding_list to key sequence separated by commas which are bound to the command index specified.  prefix_keys and the variable key_binding_list should be initialized to ''.  root_keys and mode_keys are name table indexes to event tables.


append_list

_command int append_list( [_str cmdline] )

cmdline is a string in the format: [@]filespec [[@]filespec ... ]

Remarks	Appends a tree directory list of the files specified to the current buffer.  If filespec is not specified, the current directory list is used.  This command is useful when in fileman mode.  An '@' sign prefix to filespec indicates that filespec is a file or buffer which contains a list of file names to be used as arguments to this command.  Use the dir or list command to change the mode to fileman mode.

Return	Returns 0 if successful.  Common return codes are TOO_MANY_SELECTIONS_RC, TOO_MANY_FILES_RC, TOO_MANY_OPEN_FILES_RC (OS limit).  On error, message is displayed.

See Also	dir, list, append_dir, append_list, fileman


append_next_cut

_command void append_next_cut()

Remarks	Allows you to append the next clipboard command to the clipboard.  Used by EMACS emulation.

See Also	append_cut, append_to_clipboard, cut, paste


_append_retrieve

void _append_retrieve(int ctl_wid, _str value[,_str object_name])

Remarks	This command is typically called to add retrieve information for a combo box control.  After adding combo box retrieve information, the _retrieve_list method can be called to fill the combo box list.     Dialog box retrieval functions call this function to store retrieve data of radio button, command button, check box, text box, and combo box controls.  ctl_wid is the window id (p_window_id) of the control.  value is the text of a combo box or text box.  For a button control, value is 0 or 1.   object_name is an override name for the combo box.  The default object_name is form_name.ctl_name.

Example

defeventtab form1

ok.lbutton_up()

{

    // When OK button is pressed, you will want to save combo box

    // retrieve information.

    _append_retrieve(_control combo1,combo1.p_text);

}

ok.on_create()

{

     // Fill in the combo box list

     combo1._retrieve_list();

}


append_retrieve_command

void append_retrieve_command(_str command [,_str force_insert])

Remarks	Appends command at the end of the ".command" retrieve buffer if command is different from the last line.   Specify a force_insert that is not "", if you always want command appended.


append_to_clipboard

_command void  [wid_expression.]append_to_clipboard()

Ctrl+Shift+C or "Edit", "Append to Clipbd"

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Remarks	Appends the selected text to the clipboard.

See Also	append_next_cut, append_cut, cut, paste


appmenu

_command int appmenu( [_str cmdline] )

This command is only supported under Windows, Windows 95/98, and Windows NT.

cmdline is a  string in the format: [-a] [-c[p] "ClassName"] [-t[p] "WindowTitle"] MenuSpec

Where MenuSpec is a list of menu items separated by a vertical bar character '|' which indicate how to traverse the menu to find the final menu item.  The optional 'p' which follows the -c or -t options indicates that the name specified is a prefix match of the class or window title respectively.  Use the -a option to make the other application active.  Sometimes, the other application becomes active anyway (depending on the Version of the OS, whether you are creating a dialog box, and the other application).

Remarks	This command is used to execute a menu item of another application.

Example

appmenu -a -cp Afx -tp "Microsoft Developer Studio" File|Open...

appmenu -a -t "Borland C++" File|Open...

Return	Returns 0 the menu item was found and executed.


arg

typeless arg( [int number] )

Return	If the number parameter is not given, the number of parameters passed to the procedure is returned.  Otherwise the value of parameter corresponding to number is returned.  The first parameter is 1.  The arg function may be used on the left side of an assignment statement to modify a callers variable if the parameter is not declared as a call by value parameter.

Example

      defmain() {

            x="third";

            p("first","second",x);

       }

       p() {

            messageNwait("Called with "arg()" arguments");

            for (i=1;i<=arg();++i) {

                 messageNwait("arg("i")="arg(i));

            }

            arg(3)="modify callers variable x here";

       }


argument

_command void argument()

Applies To	Edit Window

Remarks	Prompts you for a repeat count and executes the next key you press the number of times specified.  The following keys have special meaning while being prompted for the repeat count:

0..9	Appends one of the digits 0..9 to the counter.

Alt+0..Alt+9	EMACS emulation only.  Appends one of the digits 0..9 to the counter.

-, Alt+Minus	Toggles the repeat count from positive to negative.

Pressing the key bound to the argument command while being prompted for the repeat count multiplies the repeat count by 4.

The global variable "_argument" is set to the repeat count given before the command is executed.  The command invoked may test the value of this variable and set it to '' when finished processing the argument to do some special processing when executed with a repeat count.


arg_shift_selection

void arg_shift_selection(['L' [, int count]])

Applies To	Edit Window, Editor Control

Remarks	Shifts selection right the number of characters specified.  Character selections are treated the same as line selections.  If the 'L' option is given the selection is shifted left.  If the count is not specified, you a prompted to enter a shift count.


_arrange_icons

void _arrange_icons()

Applies To	MDI Window

Remarks	Arranges the iconized MDI edit windows.

Example

     _mdi._arrange_icons();


arrange_icons

_command void arrange_icons()

"Window", "Arrange Icons"

Remarks	Arranges the iconized MDI edit windows.


asc

_command asc([_str character] )

Remarks	Displays the ASCII code corresponding to the character given on the command line.  If character is not specified, the character at the cursor position in the buffer is used.

See Also	chr


_asc

int _asc(_str character)

Return	Returns the ASCII code corresponding to the ASCII character given.

Example

       _asc('A') :== 65

See Also	_chr


ascii_table

_command int ascii_table()

"Tools", "Ascii Table"

Remarks	Opens the file "asciitab" which contains a table of the ASCII characters with the corresponding hex and decimal character codes.

Return	Returns 0 if successful.


asm_proc_search

int asm_proc_search(_str &proc_name,int find_first)

Remarks	If proc_name is '', then this function searches for the first or next occurrence of an identifier defined by PROC, MACRO, : (label), EQU, DB, DW, DD, or STRUC in the current buffer.  Search always starts from cursor position.  The find_first parameter indicates whether this is the first or next call.  proc_name is set to the identifier with the identifier type concatenated in parentheses.  For example, for a PROC or label with name xxx, proc_name would be set to "xxx(proc)" or "xxx(label)" respectively.

If proc_name is not '', then proc_name specifies the identifier name and type to be found and is the format "name(type)".  Searching begins at the cursor position.  find_first must be non-zero if proc_name is not ''.  The cursor is placed on the definition found, if one is found.

Return	Returns 0 if successful.  Otherwise a non-zero value is returned.


attr_case

_str attr_case(_str file_attrs)

Return	Returns file_attrs in operating system specific case.  For DOS and Windows NT, attributes are displayed in upper case.  For UNIX, file_attrs is returned as the result and is not changed.


auto_restore

_command void auto_restore( ['on'|'off'] )

Remarks	The General Tab ("Tools", "Configuration", "General...", select General Tab) provides better support for auto restore.

When auto_restore is on, the safe_exit command (Alt+F4 or "File", "Exit") will save the window configuration, buffer positions, command retrieve buffer, clipboards, bookmarks, and other miscellaneous data in the directory specified by the environment variable VSLICKRESTORE before exiting the editor.  The next time the editor is invoked, Visual SlickEdit will automatically resume your last edit session by restoring the window configuration, buffer positions, command retrieve buffer, clipboards, bookmarks, and other miscellaneous data.

If Visual SlickEdit is invoked with a file specification, the window and buffer positions are not restored.

If the environment variable VSLICKRESTORE does not exist, the auto_restore data is saved in the users configuration directory.  The user's configuration defaults to the directory of the editor executable or the VSLICKCONFIG environment variable.


_auto_size

void [wid_expression.]_auto_size()

Applies To	All objects except Edit Window, MDI Window, Command Line, Application Window

Remarks	This function has no effect.  It is present only for backward compatibility with Visual SlickEdit 1.0x.


_autoclipboard

void [wid_expression.]_autoclipboard()

Applies To	Edit Window, Editor Control

Remarks	If the def_autoclipboard variable is true and the current buffer has a selection, it is copied to the clipboard.


b_match

_str b_match(_str name, int find_first)

Return	Returns next buffer name which is a prefix match of name.  find_first must be non-zero to initialize matching.  Returns '' when no more matches are found.


_b2k_bind

int _b2k_bind(_str command, _str key_sequence, boolean effect_all_modes [,_str unbind_option ] )

Applies To	Edit Window, Editor Control

Remarks	We recommend you use the set_eventtab_index function to bind keys instead of this function.  This function is likely to be changed in the future.  This function binds command to the binary key_sequence specified.  If effect_all_modes is false, the command is bound to the mode event table (p_mode_eventtab).   Specify an unbind_option of "U" to unbind the key.  You may prefix the unbind_option string with a "C" to effect command mode for VI emulation.  The command parameter is ignored when unbinding a key.

Return	Returns 0 if successful.  Can fail if incorrect parameters given.


_b2k_form

_form _b2k_form

Syntax	_str show('-modal _b2k_form' [, allow_editrun [ ,title [, initial_command [, completion]]]] )

allow_editrun defaults to ''

title defaults to "Bind Command to Key"

initial_command defaults to ''

completion defaults to all commands

Remarks	Displays Bind Command to Key dialog box.  If allow_editrun is 0, the Edit and Run buttons of this dialog box are disabled.   title specifies the title of the dialog box.  If initial_command is not '', the command combo box text is initialized to this value.   The completion argument may be MACRO_ARG (defined in "slick.sh") to list user defined macros.

Return	If the return value is not '', it should be executed.  This occurs when the user presses the edit or run buttons of this dialog box.


backtab

void [wid_expression.]backtab()

Applies To	Edit Window, Editor Control

Remarks	Places cursor at previous tab stop if any.  To set the tab stops see help on tabs command.  Each buffer has its own tab stops.  The default tabs for the current buffer may be set with the p_tabs property.

See Also	tab


backward_cut

void backward_cut(boolean push, [_str markid])

Applies To	Edit Window, Editor Control

Remarks	Appends selection specified by markid in front of the current clipboard.  If push is true a new clipboard is created containing the selection specified.


_bbhelp

void _bbhelp('M'| 'C', [int parent_wid [,int x [,int y [,_str msg [,_str FontName [,int FontSizex10 [,int FontFlags [,int rgbfg [int rgbbg]]]]]]]])

Applies To	Edit Window, Editor Control

Remarks	Displays tool tip message at (x, y) position specified.  The (x, y) position is relative to parent_wid.  Use the 'C' option to close the tool tip window.

FontFlags is a combination of the following flag constants defined in "slick.sh":

F_BOLD

F_ITALIC

F_STRIKE_THRU

F_UNDERLINE

FontSizex10 is the size of the font in points multiple by 10 (ex. 100 specifies a 10 point font).


_bas_extform

_form _bas_extform

Syntax	void show('_bas_extform')

Remarks	Displays QBasic Options dialog box which is used for modifying the extension specific options for the Microsoft Quick Basic language.


_beep

void _beep( int frequency=1, int duration=-1 )

Remarks	Plays standard system beep if no parameters are specified or beeps for frequency and duration specified.  frequency is specified in hertz.  duration is in milliseconds.  Under UNIX or Windows 3.x the frequency and duration parameters are ignored.


begin_line

command void [wid_expression.]begin_line()

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Remarks	Places cursor at column 1 of current line.  For an edit window or editor control, this  command attempts to reset the left edge scroll position to 0.

See Also	end_line


_begin_line

void [wid_expression.]_begin_line()

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Remarks	Places cursor at column 1 of current line.

See Also	_end_line


begin_line_text_toggle

_command void [wid_expression.]begin_line_text_toggle()

HOME

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Remarks	For a text box, the cursor is moved to column one.  For an edit window or editor control, if the cursor is not in column one, the cursor is placed on the first non blank character of the current line.  Otherwise the cursor is moved to column one.


begin_select

_command int [wid_expression.]begin_select()

Applies To	Edit Window

Remarks	Places cursor on first character of active selection.  If the selection type is LINE, the cursor is moved to the first line of the selection and the column position is unchanged.

Return	Returns 0 if successful.  Otherwise TEXT_NOT_SELECTED_RC is returned.  On error, message is displayed.


_begin_select

int [wid_expression.]_begin_select( _str mark_id="" )

Applies To	Edit Window, Editor Control

Remarks	Places cursor on first character of selection specified.  mark_id is a handle to a selection or bookmark returned by one of the built-ins _alloc_selection or _duplicate_selection.  A mark_id of '' or no mark_id parameter identifies the active selection.  If the selection type is LINE, the cursor is moved to the first line of the selection and the column position is unchanged.

Return	Returns 0 if successful.  Possible return values are TEXT_NOT_SELECTED_RC or INVALID_SELECTION_HANDLE_RC.  On error, message is displayed.


_begin_select_compare

int _begin_select_compare( _str mark_id="")

Applies To	Edit Window, Editor Control

Remarks	Compares current line position to first line of mark specified.  mark_id is a handle to a selection returned by one of the built-ins _alloc_selection or _duplicate_selection.  A mark_id of '' or no mark_id parameter identifies the active selection.

Return

Return Value	Meaning

     0	Current line is on first line of mark

     > 0	Current line is after first line of mark

     < 0	Current line is before first line of mark

     - 1	Text is not marked or mark is not in current buffer

See Also	_end_select_compare


begin_window

command void [wid_expression.]begin_window()

Applies To	Edit Window, Editor Control

Remarks	Places cursor at top left of window.

See Also	end_window


bind_to_key

_command int bind_to_key( [_str cmdline] )

cmdline is a string in the format: [-max_keystrokes] [-r | -m] command

Applies To	Edit Window

Remarks	Binds command specified to key(s) you type.

Prefix and cancel keys may only be bound by specifying the max_keystrokes parameter.  max_keystrokes is a positive number representing the maximum number of keystrokes that will be pressed.  The max_keystrokes parameter allows prefix keys to be rebound.

Use the create_prefix_key command to create a new prefix key for a multiple key sequence key binding.  The -r and -m options may be used to select key bindings to the root or mode key table.  If you don't quite understand what root and mode key tables are, you should not specify the -r or -m option.

Hear are the reasons for selecting each option:

-r	You want this key binding to be active in all modes.

-m	You want this key binding to be active only in the current mode.

If the current mode is fundamental, the -r and -m options have no effect.  Keys bound while in fundamental mode will be active in all modes unless there is a mode key binding.

In VI emulation, the -r option effects all modes and the -m option effects the current mode only which can be insert or command mode.

Return	Returns 0 if successful.  Possible return values are 1 (command not found) and COMMAND_CANCELLED_RC.  On error, message is displayed.

See Also	unbind_key, list_keydefs, create_prefix_key


block_was_read

int [wid_expression.]block_was_read(int number=-1)

Applies To	Edit Window, Editor Control

Return	Returns a non-zero number if the editor has read a block from a file.  Otherwise zero is returned.  To set the current value, specify the number argument.  The purpose of this function is to allow macros to flush the keyboard buffer when the editor is not keeping up with the key strokes.

Example

     // This macro allows the user to hold a key down which

     // invokes this macro repeatedly to scroll down a file which is

     // only partially loaded.  No sudden screen jumps will occur.

     if (block_was_read() ) {

         block_was_read(0);

         flush_keyboard();

     }

     down();


_BookmarkAdd

void VSAPI _BookmarkAdd( _str  BookmarkName, int markid, int vsbmflags=VSBMFLAG_SHOWNAME|VSBMFLAG_STANDARD, int RealLineNumber=-1, int col=0, long BeginLineROffset=0, _str LineData="", _str Filename="", _str DocumentName="")

Parameters	Description

BookmarkName	Name of bookmark to add.

markid	Selection id returned from vsAllocSelection or vsDuplicateSelection.

vsbmflags	Combination of VSBMFLAGS_??? ORed together.

RealLineNumber	Real line number of bookmark.  Specify -1 if markid is an active bookmark.

col	Column of bookmark.  Specify 0 if markid is an active bookmark.

BeginLineROffset	Real offset to beginning of line.  Imaginary line data not counted.  Specify 0 if markid is an active bookmark.

LineData	Text on the line of the bookmark.  Specify 0 if markid is an active bookmark.

Filename	Filename the bookmark is in.  Specify 0 if markid is an active bookmark.

DocumentName	Document name the bookmark is in.  Specify 0 if markid is an active bookmark.

Remarks	Adds a new bookmark.

See Also	_BookmarkAdd, _BookmarkRemove, _BookmarkRestore, _BookmarkGetInfo, _BookmarkFind, _BookmarkQCount


_BookmarkGetInfo

int VSAPI _BookmarkGetInfo( int i, _str BookmarkName="", int &markid=0, int &vsbmflags=0, int &buf_id=0, int &determineLineNumber=1, int &RealLineNumber=0, int &Col=0, long &BeginLineROffset=0, _str &LineData=0, _str &Filename=0, _str &DocumentName=0)

Parameters	Description

i	Bookmark index where 0<=i<_BookmarkQCount().

BookmarkName	Set to name of bookmark.

markid	Set to selection id previous given to _BookmarkAdd.  Specify NULL if you don't need this value.

vsbmflags	Set to combination of VSBMFLAGS_??? ORed together. Specify NULL if you don't need this value.

buf_id	Set to buffer id of bookmark. Specify NULL if you don't need this value.

RealLineNumber	Set to real line number of bookmark. Specify NULL if you don't need this value.

col	Set to column of bookmark. Specify NULL if you don't need this value.

BeginLineROffset	Set to real offset to beginning of line.  Imaginary line data not counted. Specify NULL if you don't need this value.

LineData	Set to text on the line of the bookmark.

Filename	Set to filename the bookmark is in.

DocumentName	Set to document name the bookmark is in.

Remarks	Retrieves information for a bookmark.

Return	Returns 0 or TEXT_NOT_SELECTED_RC if successful.  TEXT_NOT_SELECT_RC indicates that the bookmark is not active.  This occurs when a buffer with bookmarks is closed.

See Also	_BookmarkAdd, _BookmarkRemove, _BookmarkRestore, _BookmarkGetInfo, _BookmarkFind, _BookmarkQCount


_BookmarkFind

int VSAPI _BookmarkFind( _str BookmarkName, int vsbmflags=VSBMFLAG_STANDARD)

Parameters	Description

BookmarkName	Name of bookmark to find.

vsbmflags	One or more of these flags must be in the bookmark found.

Remarks	Finds bookmark index.

Return	Returns index of boomark 0.._BookmarkQCount() or -1 to indicate the bookmark was not found.

See Also	_BookmarkAdd, _BookmarkRemove, _BookmarkRestore, _BookmarkGetInfo, _BookmarkFind, _BookmarkQCount


_BookmarkQCount

int VSAPI _BookmarkQCount()

Return	Returns the number of bookmarks.

See Also	_BookmarkAdd, _BookmarkRemove, _BookmarkRestore, _BookmarkGetInfo, _BookmarkFind, _BookmarkQCount


_BookmarkRemove

void VSAPI _BookmarkRemove( int i, int free_markid)

Parameters	Description

i	Index of bookmark where 0<=i<_BookmarkQCount().

free_markid	When non-zero, _free_selection is called for the markid belonging to this bookmark.

Remarks	Deletes a bookmark.

See Also	_BookmarkAdd, _BookmarkRemove, _BookmarkRestore, _BookmarkGetInfo, _BookmarkFind, _BookmarkQCount


_BookmarkRestore

void VSAPI  [wid_expression.]_BookmarkRestore( int vsbmflags)

Parameters	Description

vsbmflags	One or more of these flags must be in the bookmark for the bookmark to be restored.

Remarks	Restores inactive bookmarks for the file specified.  This function is typically called when a new file is loaded, so that inactive bookmarks may be restored.

See Also	_BookmarkAdd, _BookmarkRemove, _BookmarkRestore, _BookmarkGetInfo, _BookmarkFind, _BookmarkQCount


bottom

void [wid_expression.]bottom()

Applies To	Edit Window, Editor Control

Remarks	Places text cursor at end of last line of buffer.

See Also	top


_bottom_height

int [wid_expression.]_bottom_height()

Applies To	Form

Remarks	Returns height in p_xyscale_mode of the bottom border of the window.

See Also	_top_height


bottom_of_buffer

_command void [wid_expression.]bottom_of_buffer()

Ctrl+END

Applies To	Edit Window, Editor Control

Remarks	Places text cursor at end of last line of buffer.  If the "Preserve Column on Top/Bottom..." option ("Tools", "Configuration", "More Options...") is on, the cursor is placed on the last line of the buffer and the column position is unchanged.  Executing this command when the cursor is already on the last line of the buffer will move the cursor to the end of the last line.

See Also	top_of_buffer


bottom_of_window

_command void [wid_expression.]bottom_of_window()

Ctrl+PGDN

Applies To	Edit Window, Editor Control

Remarks	Places text cursor at the last line of the active window or last line of file.

See Also	top_of_window


box

_command void box()

"Document", "Comment Box..."

Applies To	Edit Window, Editor Control

Remarks	Converts selected text into box comment using the comment setup.


brief_delete

_command void [wid_expression.]brief_delete()

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Remarks	If no selection exists in the current buffer, the character under the cursor is deleted.  The next line is joined with the current line when the cursor is past the end of the current line.

If the current buffer has a selection, the selected text is deleted.  No clipboard is created.  The deleted text may only be retrieved with the undo command.


brief_paste

_command int [wid_expression.]brief_paste()

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Remarks	Inserts the clipboard at the cursor.  The text inserted is not highlighted.  LINE type clipboards are inserted before or after the current line depending upon the Line insert style ("Tools", "Configuration", "More Options...", "Line Insert Style").  By default, they are inserted before the cursor.  By default, BLOCK type clipboards are inserted even when the cursor is in replace mode.  If you want BLOCK type clipboards to overwrite the destination text when your cursor is in replace mode,  invoke the command "set-var def-modal-paste 1".  Works on command line or text line.

Return	Returns 0 if successful.  Common return codes are 1 (Clipboard empty, or clipboard text too long for command line) TOO_MANY_MARKS_RC.

See Also	list_clipboards, copy_to_clipboard, copy_word, cut_end_line, cut_line, cut, cut_word, cut_prev_word, paste


brief_home

_command void [wid_expression.]brief_home()

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Remarks	For a text box or combo box, the cursor is placed in column 1 of the text box.

Edit Window and Editor Control:  Pressing the HOME key once moves the cursor to column one.  Pressing the HOME key again moves the cursor to the top of the window.  Pressing the HOME key again moves the cursor to the top of the buffer.  This command may only be bound to the HOME key.

See Also	brief_end


brief_end

_command void [wid_expression.]brief_end()

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Remarks	For a text box or combo box, the cursor is placed after the last character in the text box.

Edit Window and Editor Control:  Pressing the END key once moves the cursor to the end of the current line.  Pressing the END key again moves the cursor to the bottom of the window.  Pressing the END key again moves the cursor to the bottom of the buffer.  This command may only be bound to the END key.

See Also	brief_home


brief_iselect_char

_command void [wid_expression.]brief_iselect_char()

Applies To	Edit Window, Editor Control

Remarks	Starts or deselects an inclusive character selection.  Used for processing sentences of text which do not start and end on line boundaries.  If no selection is active an inclusive character selection is started.  if an inclusive character selection is already active, it is unmarked.  If a different select style than inclusive character selection is active, the select style is switched to an inclusive character selection.

See Also	brief_select_char, brief_select_line, brief_select_block


brief_select_block

_command void [wid_expression.]brief_select_block()

Applies To	Edit Window, Editor Control

Remarks	Starts or deselects a block selection.  Used for processing columns of text.  If no selection is active a block selection is started.  if a block selection is already active, it is unmarked.  If a different select style than a block selection is active, the select style is switched to a block selection.

See Also	brief_select_char, brief_select_line, brief_iselect_char


brief_select_char

_command void [wid_expression.]brief_select_char()

Applies To	Edit Window, Editor Control

Remarks	Starts or deselects a non-inclusive character selection.  Used for processing sentences of text which do not start and end on line boundaries.  If no selection is active a non-inclusive character selection is started.  if a non-inclusive character selection is already active, it is unmarked.  If a different select style than non-inclusive character selection is active, the select style is switched to a non-inclusive character selection.

See Also	brief_iselect_char, brief_select_line, brief_select_block


brief_select_line

_command void [wid_expression.]brief_select_line()

Applies To	Edit Window, Editor Control

Remarks	Starts or deselects a line selection.  Used for processing complete lines of text.  If no selection is active a line selection is started.  if a line selection is already active, it is unmarked.  If a different select style than a line selection is active, the select style is switched to a line selection.

See Also	brief_select_char, brief_select_line, brief_select_block


brief_save

_command void [wid_expression.]brief_save()

Applies To	Edit Window

Remarks	Same as save command except that if the current buffer has a selection, the selection is written to a file you choose.  Another difference, is that the brief_save command does not save the file if it is not modified.


buf_match

_str buf_match(_str name_prefix,int find_first,_str option_letters="")

Return	Returns display name or buffer name of the buffer with prefix matching name_prefix.  A non-zero value for find_first,  begins a new search.  If find_first is zero, the next matching buffer id is returned.  '' is returned if no match is found.  Search is not case sensitive except for file systems like UNIX which are case sensitive.  The global rc variable is set to a non-zero value if there are no more matches.

The options_letters argument is a string of one or more of the following:

H	Return buffers with (p_buf_flags & HIDE_BUFFER) true.

E	Exact buffer name match instead of prefix matching.

X	Same as E option.

V	If the 'V' (verbose) option is specified, a string of the following form is returned:

buf_id modify buf_flags buf_name

B	Find buffer names only.

D	Find document names only.

Example

      // Find names that start with p

      name_prefix='p';

      // Find first.  return verbose information.

      buf_info= buf_match(name_prefix,1,'v');

      for (;;) {

           if (rc) break;

           parse buf_info with buf_id ModifyFlags buf_flags buf_name;

         messageNwait('id='buf_id' ModifyFlags='ModifyFlags' flags='buf_flags' name='buf_name);

           buf_info= buf_match(name_prefix,0,'v');    // find next

      }

See Also	 find_index, name_match, file_match


_buf_transfer

int [wid_expression.]_buf_transfer(int src_buf_id [, int start_linenum [,int end_linenum [,int start_col [,int end_col]]]] )

Applies To	Edit Window, Editor Control

Remarks	Copies specified area of source buffer to the current buffer.

start_linenum	Source start line.  Defaults to first line of source buffer

end_linenum	Source end line.  Defaults to last line of source buffer

start_col	Source start column.

end_col	Source end column.

If start_col and end_col are not specified or '', the source lines are inserted after the current line.  Otherwise the source text is inserted before the cursor position.

Return	Returns 0 if successful.  Otherwise, message box error is displayed.


_bufnameNmode2ext

_str _bufnameNmode2ext(_str buf_name, _str buf_mode_name )

Return	Returns the extension that should be used to lookup extension specific information for the mode buf_mode_name specified.  If no extension data has a mode name of buf_mode_name the extension of the buf_name specified is returned.

Many macros ignore the mode name property and use the extension on the buffer name to determine extension specific options.  It is more correct to use this function to determine the extension to used to lookup extension specific information.


build_load_options

_str build_load_options(_str filename)

Return	Returns file load options string based on filename, the environment variable VSLICKLOAD, the macro variable "def_load_options", the macro variable "def_wide_ext", and the macro variable "def_preload_ext".  The VSLICKLOAD environment variable is not supported by the UNIX version.  The load options string returned is valid input to the load_files built-in.  This procedure is used by the edit command.  The contents of the variable "def_load_options" becomes the prefix of the string returned.  If the extension of the filename exists in the extension list variable "def_wide_ext", the option " +LW" is concatenated to the returned string.  If the extension of filename exists in the extension list variable "def_preload_ext", the option " +LCW" is concatenated to the returned string.  See load_options command for information on the effects of the environment variable VSLICKLOAD.  You may write a replacement to this procedure with more sophisticated options.


build_save_options

_str build_save_options(_str filename)

Return	Returns file save options string based on filename, the environment variable VSLICKSAVE, the macro variable "def_save_options", and the macro variable "def_tab_options".  The VSLICKSAVE environment variable is not supported by the UNIX version.  The save options string returned is valid input to the _save_file built-in.  This procedure is used by the save command.  The contents of the variable "def_save_options" becomes the prefix of the string returned.  If the extension of filename exists in the extension list variable "def_tab_ext", the option " +t" is concatenated to the returned string.  See save_options command for information on the effects of the environment variable VSLICKSAVE.  You may write a replacement to this procedure with more sophisticated options.


c_beautify

_command void c_beautify()

Applies To	Edit Window, Editor Control

Remarks	Beautifies the current buffer using the current options.  Use the C/C++/Java Beautify dialog box set beautifier options used by this command.

See Also	gui_beautify, c_beautify_selection


c_beautify_selection

_command void c_beautify_selection()

Applies To	Edit Window, Editor Control

Remarks	Beautifies the current selection using the current options.  If there is no current selection the entire buffer is beautified.  Use the C/C++/Java Beautify dialog box set beautifier options used by this command.

See Also	gui_beautify, c_beautify


c_begin

_command void [wid_expression.]c_begin()

(C mode only) '{'

Applies To	Edit Window, Editor Control

Remarks	New binding of '{' key when in C mode.  When appropriate, inserts '{' at cursor, inserts blank line, indents cursor on next line, and inserts another line with end brace.  Exact action depends on your C extension specific options.  These options may be accessed by ("Tools", "Configuration", "File Extension Setup...", select C extension, "Options:").


c_endbrace

_command void [wid_expression.]c_endbrace()

(C mode only) '}'

Applies To	Edit Window, Editor Control

Remarks	New binding of '}' key when in C mode.  Inserts '}' at cursor and reindents the brace according to your C extension specific options.  No reindenting occurs if the brace is NOT being inserted into a blank line or if the brace is NOT part of an if, switch, while, do, or else block.  The C extension specific options may be accessed by ("Tools", "Configuration", "File Extension Setup...", select C extension, "Options:").


c_enter

_command void [wid_expression.]c_enter()

(C mode only) ENTER

Applies To	Edit Window, Editor Control

Remarks	New binding of ENTER key when in C mode.  Handles syntax expansion and indenting for files with C or H extension.  Use Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...") to change syntax expansion/indenting options.


_c_extform

_form _c_extform

Syntax	void show('_c_extform')

Remarks	Displays C Options dialog box which is used for modifying the extension specific options for C and C++.


c_match

_str c_match(_str name, int find_first)

Return	Returns next or first command name which is a prefix match of name.  find_first must be non-zero to initialize matching.  Returns '' when no more matches are found.


c_mode

_command void [wid_expression.]c_mode()

Applies To	Edit Window, Editor Control

Remarks	Activates C/C++ file editing mode.


c_proc_search

int [wid_expression.]c_proc_search(_str &proc_name, int find_first)

Applies To	Editor Control, Edit Window

Remarks	If proc_name is '', then this procedure searches for the first or next occurrence of a C language tag definition.  Search always starts from cursor position.  The find_first parameter indicates whether this is the first or next call.  proc_name is set to the name of the tag found.  Currently tags include function definitions, function prototypes, structure/class names, typedef names, #define names, and enum constants.

if proc_name is not '', then a search for a C language tag definition with name proc_name is performed.  Searching begins at the cursor position.  find_first must be non-zero if proc_name is not ''.  The cursor is placed on the definition found, if one is found.

Return	Returns 0 if successful.  Otherwise a non-zero value is returned.


c_space

_command void c_space()

(C mode only) SPACE BAR

Applies To	Edit Window, Editor Control

Remarks	New binding of SPACE key when in C mode.  Handles syntax expansion and indenting for files with C or H extension.  Use the C Options dialog box ("Tools", "Configuration", "File Extension Setup...", select C extension, "Options...") to change the main style.


c_tab

command void [wid_expression.]c_tab()

Applies To	Edit Window, Editor Control

Remarks	Used in EMACS emulation.  If the cursor is on or before the first non blank character of the current line and the proper C statement indent column is after the current column, then the current statement is reindented and the cursor is placed on the first non blank character.  Otherwise the root key table binding for the TAB key is invoked.  This command should only be bound to a mode key table.


cache_size

_command void cache_size( [_str cmdline] )

cmdline is a string in the format: buffer_ksize [state_ksize ]

Remarks	If no parameters are specified the current cache size values are placed on the command line for editing.

The buffer_ksize parameter sets the maximum size of the text buffer cache.  If buffer_ksize is less than zero, the cache will grow until no memory is available.  In most cases, Visual SlickEdit's cache is 3 times faster than operating system cache.  This means that you will want Visual SlickEdit's buffer cache size small enough that the operating system cache is not used.  When the cache is full, text is written to a spill file "$slk.nnn" where nnn is a number.

The state_ksize parameter specifies the maximum amount of swappable state file data (parts of "vslick.sta" or "vslick.stu" under UNIX) to be kept in memory.  -1 specifies no limit.  The -ST invocation option may be used to specify the state cache size.  Modifying the state cache size may not take effect until the editor is reinvoked.  When you specify 0 as the argument to the -ST invocation , this specifies to preload the entire state file and close the file handle.  This function does NOT support the "-ST 0" feature.


_cache_size

_str _cache_size( _str cmdline =null )

cmdline is a string in the format: buffer_ksize [state_ksize ]

Remarks	The buffer_ksize parameter sets the maximum size of the text buffer cache.  If buffer_ksize is less than zero, the cache will grow until no memory is available.  In most cases, Visual SlickEdit's cache is 3 times faster than the operating system cache.  This means that you will want Visual SlickEdit's buffer cache size small enough that the operating system does not swapping memory Visual SlickEdit is using to disk.  When the cache is full, text is written to a spill file "$slk.nnn" where nnn is a number.  When the buffer cache size is set to a small value you may need to change the read ahead/read behind line setting to avoid disk thrashing.  If the DISK light stays on too long while you scroll your text files, execute the command "set-var def-read-ahead-lines 0" to avoid the problem.

The state_ksize parameter specifies the maximum amount of swappable state file data (parts of "vslick.sta" or "vslick.stu" under UNIX) to be kept in memory.  -1 specifies no limit.  The -ST invocation option may be used to specify the state cache size.  Modifying the state cache size may not take effect until the editor is reinvoked.  When you specify 0 as the argument to the -ST invocation , this specifies to preload the entire state file and close the file handle.  This function does NOT support the "-ST 0" feature.

Return	A string of the current cache size values is returned.  On error message, is displayed.


_calc_form

_form _calc_form

Syntax	void show('_calc_form')

Remarks	Displays Calculator dialog box.


calculator

_command void calculator()

"Tools", "Evaluate Expr..."

Remarks	Displays Calculator dialog box.


call

call expression

Remarks	Throws away return value of an expression returning a value.  Insures that rc variable is not changed and function return value is not executed.  Since function return values are no longer executed unless enclosed in parenthesis, this built-in is only necessary for expressions involving more than just a call to a function.

Example

      call status || pos(_error_re3,temp,'','ri');


call_event

typeless [wid_expression.]call_event( [,arg1 [,arg2]... argN],wid_or_etab ,event [, option] )

Applies To	All objects

Remarks	Calls an event handler for an object or for a specific event table.  The event handler is called with arguments arg1,arg2,..,argN if specified.  IMPORTANT:  You must specify the option parameter if you want to call the event handler with arguments.

The option defaults to 'W' and may be one of the following:

'W'	Indicates that wid_or_etab is the window id of the object.  The event handler is determined by the dialog box inheritance order.

'E'	Indicates that wid_or_etab is an index to and event table.

'2'	Indicates that wid_or_etab is the window id of the object. The event handler is determined by the dialog box inheritance order but the user level 1 inheritance is skipped.

event is an event constant.  Use name2event to specify a key event.   See help on Event Names

Example

// Often dialog boxes have an OK button which applies changes and closes

// the dialog box and an Apply button which applies changes but does not

// close the dialog box

defeventtab form1

ok.lbutton_up()

{

     // If the apply button does not reference itself, we do not need to use

     // call event as a method.

     apply.call_event(_control apply,LBUTTON_UP);

     //  Some events do not have constants defined for them.  The commented

     // out call_event statement below has the same effect but uses the

     // name2event primitive which works for key events such

     // as 'a', 'b', 'c'...'?','@','#' etc.

     //     apply.call_event(_control apply,name2event('lbutton-up'));

     p_active_form._delete_window(0);

}

apply.lbutton_up()

{

     // Add code for this event function here.

     // We can return a value if we want to.

}

// Here's an example of calling an event handler of a specific event table

ok.lbutton_up()

{

     // The sample code above is better because it does get effected by changing

     // the form name.  The 'E' option should be used when the dialog

     // box inheritance order won't call the correct event handler or if you

     // have written your own user level2  inheritance code which needs to

     // call other user level2 inheritance code.

     apply.call_event(defeventtab form1.apply,LBUTTON_UP,'E');

     p_active_form._delete_window(0);

}


call_index

typeless call_index([arg1 [,arg2]... argN],index)

Remarks	Calls command or procedure corresponding to name table index passing arguments arg1,arg2,..,argN.  The arguments may be call by reference or call by value as long as a constant is not passed to a procedure expecting a variable which can be referenced.  If the procedure or command is not linked to a module, the interpreter is stopped and the message "Invalid argument" is displayed.  Use the function index_callable to determine whether the procedure or command is linked to a module.

Example

    index=find_index('upcase_filter');

    if (!index_callable(index) ) {

         message("upcase_filter name is either not in names table or not  linked to a module");

    } else {

         string=call_index('abc',index);

    }

See Also	index_callable


call_key

void call_key(_str key , _str continuation_message="\1", _str option= "D" )

Remarks	Calls event handler for key.  This function is intended for use by edit window, editor controls, and text box controls for the special purposes described below.  Use the call_event function for other purposes.

Reasons for using this function:

•	You used get_event and read a key or mouse event and you want normal processing of the event to occur.  Specify first parameter only.

•	You have written a key translator macro such as alt_prefix, ctrl_prefix, shift_prefix, esc_alt_prefix, or case_indirect and you want processing to continue.  Specify the first and second parameters.  The last_index function with the 'p' option will return the key message text.

•	You have written a keyboard hook function for the on_select event or p_on_event property and you want processing to call the original event.  Specify first parameter, second, and third parameters. Specify "E' for the third argument to continue from a p_on_event hook function.  Specify 'S' for the third argument to continue from an ON_SELECT hook function.

If the current object is the command line or an MDI edit window, the root and mode event tables are used to determine the event handler to be called.  If event is an ASCII character and a binding does not exist, the character is inserted.  The call is recorded if macro recording is on.

If the current object is not the command line or an MDI edit window, the dialog box inheritance order is used.  However, user level 1 and 2 inheritance are skipped if the third parameter is given.

If two or more arguments are given and the current object is a text box, an edit window, or an editor control, call_key determines the event handler for the key by using the last event table used to determine an event handler.

If 2 or more parameters are specified, the last event returned by the last_event function is set to key.

Example

      key=get_event();

      call_key(key);

See Also	get_event, test_event, last_event, event2name, event2index, index2event, list_bindings, name2event, eventtab_index


call_list

void call_list(prefix_name [,arg1 [,arg2 [,arg3 [,arg4]]]])

Remarks	Calls all non-built-in Slick-C functions whose name has prefix prefix_name.  The arguments arg1, arg2, arg3, and arg4 are passed to the procedure as arguments 1-4 respectively.


call_root_key

void call_root_key(_str key)

Remarks	If the root (fundamental) event table has a command binding for key, the command is executed.  Otherwise, if key is length one, it is inserted into the buffer.  This function is typically used for syntax expansion.

See Also	try_calling


cancel

void cancel()

Remarks	Displays "Command cancelled" message.


cancel_key_index

int cancel_key_index()

Return	Returns event index for canceling macro recording.  Defaults to event2index(ESC).

See Also	iscancel, islist_cancel


cancel_recording

_command void cancel_recording()

(when recording) ESC

Remarks	When start_recording has been executed, the definition of one key (usually the ESC key) is temporarily bound to this command.  To change the key rebound, modify the Slick-C macro procedure "cancel_key_index".  You can find it by executing the command "find-proc cancel-key-index".


cap_word

_command int [wid_expression.]cap_word()

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Remarks	Capitalizes the first character of the current word and places the cursor after the current word.  To change the word characters for a specific extension, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").

Return	Returns 0 if successful.  Returns 1 if no word exists at cursor.  On error, message is displayed.

See Also	lowcase_word, upcase_word


caps

_command void caps

Remarks	Turn on or off uppercase mode.  The caps command controls whether alphabetic data that you type is automatically converted to uppercase as you edit.

Note that if Auto Caps is turned on for the current file, the editor will set caps mode according to the data in the file when it is opened.  If the data contains uppercase letters and no lowercase letters, caps mode is turned on.  Otherwise, caps mode is off.

See Also	ISPF Line Command Uppercase, Extension Options dialog box, p_caps


_cascade_windows

void [wid_expression.]_cascade_windows()

Applies To	MDI Window

Remarks	Arranges MDI edit windows to be cascaded (One below and right of the other).  Does not effect MDI edit windows that are iconized.

Example

     _mdi._cascade_windows();


cascade_windows

_command void cascade_windows()

"Window", "Cascade"

Applies To	MDI Window

Remarks	Arranges MDI edit windows to be cascaded (One below and right of the other).  Does not effect MDI edit windows that are iconized.


case_indirect

_command void case_indirect()

Remarks	Executes the key binding for the other case of the alphabetic key pressed.  Bind this command to multiple key sequence key bindings that end with an alphabetic key.  For example, if Ctrl+X 'k' is bound to the quit command and Ctrl+X 'K' is bound to the case_indirect command.  When Ctrl+X 'K' is pressed, the quit command is executed.  ALT KEYS ARE NOT CAPS LOCK SENSITIVE!  This command should not be invoked from the command line.


case_toggle

_command void case_toggle()

Applies To	Edit window, Editor control

Remarks	Toggles case sensitive searching on/off.  Effects command line style BRIEF emulation search commands.  Used in BRIEF emulation.

See Also	re_toggle


cbacktab

_command void [wid_expression.]cbacktab()

See Also	Text Box, Combo Box, Edit Window, Editor Control

Remarks	Moves the cursor to the previous indent level or tab stop.  To set the tab stops see help on gui_tabs or tabs command.

See Also	ctab, move_text_tab, move_text_backtab


_cbi_search

int _cbi_search( [reserved [, '$']] )

Applies To	Combo Box

Remarks	Searches for combo box text (p_text) in the combo box list starting from the beginning of the list.  This function is typically used to check if the users input is valid or adjust the current line in the combo box list after more items have been added.  Search is case insensitive by default.  Set the p_case_sensitive property to true if you want a case sensitive search.  Normally the search is considered successful if a line that begins with p_text is found.  To search for an exact match, specify '$' for the second argument.

Example

defeventtab form1

void ok.lbutton_up()

{

     // Check if text in combo box is valid.  You might think you could use a

     // non-editable style combo box.  However, many users prefer typing in

     // names using completion, to using the mouse to select an item out

     // of a list box.

     status=_cbi_search('','$');

     if (status) {

          _message_box("Combo box contains invalid input");

          return;

     }

      // have valid input

      ....

}

command1.lbutton_up()

{

     // Add some items to the combo box list

     combo1.p_cb_list_box._lbadd_item("Hello")

     combo1.p_cb_list_box._lbadd_item("Open");

     combo1.p_cb_list_box._lbadd_item("New");

     // Make the correct item in the combo box list is current so combo box

     // retrieval works better.

     status=combo1._cbi_search('','$');

     if (!status) {

          messageNwait("Found it!");

          // Select the line in the combo box so that an up or down arrow

          // selects the line above or below and not the current line.

          combo1.p_cb_list_box._lbselect_line();

     }

}

Return	Returns 0 if text in combo box is found.


cd

_command int cd(_str cmdline)

cmdline is a  string in the format: [+p | -p] [+a | -a] driveNpath

Remarks	Changes the current working directory to the drive and path if given.  A current directory message is displayed.  By default, this command supports specifying directory aliases for driveNpath and will change directory in the concurrent process buffer.  Use the Change Directory dialog box ("File", "Change Directory...") to change these defaults and press the save settings button.

The options have the following meaning:

+p	Change directory in the concurrent process buffer.

-p	Don't change directory in the concurrent process buffer.

+a	Support directory aliases for driveNpath.

-a	Do not support directory aliases for driveNpath.

Return	Returns 0 if successful.  Common error code is PATH_NOT_FOUND_RC.

See Also	cdd, gui_cd, alias_cd


_cd_form

_form _cd_form

Syntax	_str show('-modal _cd_form' )

Remarks	Displays the Change Directory dialog box which is used to change the current directory and, optionally, the current directory in the concurrent process buffer.

Return	If the return value is not '', the cd function should be called with the return value to change directory.


cdd

_command int cdd( [_str driveNpath] )

Remarks	Changes the current working directory to the drive and path if given.  A current directory message is displayed.  This command will also change directory in the concurrent process buffer if a path is given.

Return	Returns 0 if successful.  Common error code is PATH_NOT_FOUND_RC.  This function can not detect an error which occurs while changing directory in the concurrent process buffer.

See Also	cd, gui_cd, alias_cd


center

_str center(_str string,int width [,_str pad])

Return	Returns a symmetrically padded string of width characters.  If the length of string is less than width characters, the left and right of the returned string will be padded with the pad character.  The right will always be padded the same or more than the left.  If the length of string is greater than or equal to width characters, the returned string will be truncated on the left and right.  The right will always be truncated the same or more than the left.  Pad defaults to "".

Example

center("test",6) 	:==" test "

center("test",6,"-")	:=="-test-"

center("test",7,"-")	:=="-test--"

center("test",3)	:=="tes"

center("test",2)	:=="es"


center_line

_command void [wid_expression.]center_line()

Applies To	Edit Window, Editor Control

Remarks	Centers the current line in the middle of the active window.


_center_window

void [wid_expression.]_center_window( [int centerto_wid] )

Applies To	All objects except Edit Window, MDI Window, Application Window

Remarks	Centers the current window to the window specified.  If centerto_wid is not specified, the p_xyparent is used.  If the current window is not a form, the centerto_wid parameter is ignored.

Example

// Normally the show primitive centers the window for you

// The -hidden option tells the show function not to make the form visible.

wid=show('-mdi -hidden -nocenter form1');

// Center the form to the MDI window

wid._center_window(_mdi);

// Make the form visible now.

wid.p_visible=1;


center_within_margins

command void [wid_expression.]center_within_margins()

Applies To	Edit Window, Editor Control

Remarks	Used in EMACS emulation.  Centers the text on the current line within the margins.


_change_all_wfonts

void _change_all_wfonts(_str font_name,int font_size, _str font_flags)

Remarks	Changes the font of all MDI edit windows.  font_size is a point size.  font_flags is a combination of the following flag constants defined in "slick.sh":

F_BOLD

F_ITALIC

F_STRIKE_THRU

F_UNDERLINE


change_drive

int change_drive( [_str driveNpath] )

Remarks	For file system with drive letters, when a command of the syntax "d:" is executed, the editor translates the command into "change-drive d:" which calls this command procedure.  The change_drive command changes the current working directory to the drive and path specified.  A current directory message is displayed.

Return	Returns 0 if successful.  Common error code is PATH_NOT_FOUND_RC.


change_window

int change_window()

Alt+F1

Applies To	Edit Window

Remarks	Allows you to point with the cursor keys to the window you wish to change to.

Return	Returns 0 if successful.  Otherwise 1 is returned indicating user cancelled or there is no window where the user pointed.  On error, message is displayed.

See Also	next_window, _prev_window, move_edge, window_left, window_right, window_above, window_below


chdir

int chdir(_str path, int changeDrive=0)

Remarks	Changes to drive and directory specified.  If changeDrive is non-zero the current working drive is changed to drive specified.

Return	Returns 0 if successful.  Common return code is PATH_NOT_FOUND_RC.


_CheckLineLengths

int VSAPI _CheckLineLengths( int AllowedLineLen, _str &LineNumbers)

Applies To	Edit Window, Editor Control

Parameters	Description

AllowedLineLen	Lines lengths greater than this length are flagged.

LineNumbers	(Ouput only) ASCIIZ string.   Set to a space delimited list of line numbers of lines which are too long.  Lines with the VSLF_NOSAVE flag set are ignored.

Return	Returns 0 if there are no lines longer than the AllowedLineLen specified. At the moment only the physical line length is checked as if tab characters count as 1 character.  We may change this in the future.


checkin

_command int checkin( [_str cmdline] )

cmdline is a  string in the format: [options] file1 file2 file3 ...

Remarks	The checkin command checks in the files specified into the version control system specified by the current project.  If cmdline is not given or '', the Check In dialog box is displayed.

Options is a string of one or more of the following switches:

+ or -c	Comment for all files.

+ or -p	Prompt for each comment

+ or -d	Discard changes

+ or -new	Create a new archive file

You may specify '.' to check in the current buffer ("checkin .").

Return	Returns 0 if successful.

See Also	checkout


checkout

_command int checkout( [_str cmdline] )

cmdline is a  string in the format: [options] file1 file2 file3 ...

Remarks	The checkout command checks out the files specified from the version control system specified by the current project.  If cmdline is not given or '', the Check Out dialog box is displayed.

Options is a string of one or more of the following switches:

+ or -r	Checkout the file read only.  Ignored by Delta.

+ or -e	Edit the file after checking it out.

You may specify '.' to check out the current buffer ("checkout .").

Return	Returns 0 if successful.

See Also	checkin


chmod

_command int chmod(_str cmdline)

NOTE: Under UNIX this function operates like the chmod command.  See man page for this command for syntax of arguments.

cmdline is a string in the format: [+|-][R][H][S][A] filename

Remarks	Changes the attributes of the filename specified.  + adds the attribute and - removes the attribute.  The attributes have the following meaning:

R     	Read-only

H     	Hidden

S     	System

A     	Archive

Return	Returns 0 if successful.  Common return codes are FILE_NOT_FOUND_RC, PATH_NOT_FOUND_RC, ERROR_WRITING_FILE_RC, and INVALID_OPTION_RC.  On error, message is displayed.


_chmod

int _chmod(_str cmdline)

NOTE: Under UNIX this function operates like the chmod command.  See man page for this command for syntax of arguments.

cmdline is a string in the format: [+|-][R][H][S][A] filename

Remarks	Changes the attributes of the filename specified.  + adds the attribute and - removes the attribute.  The attributes have the following meaning:

R     	Read-only

H     	Hidden

S     	System

A     	Archive

Return	Returns 0 if successful.  Common return codes are FILE_NOT_FOUND_RC, PATH_NOT_FOUND_RC, ERROR_WRITING_FILE_RC, and INVALID_OPTION_RC.


_choose_font

_str _choose_font( int cf_flags= CF_SCREENFONTS,_str font=",10,," )

Remarks	Displays the operating system specific Font dialog box.  We also have our own Font dialog box  (_font_form).  The cf_flags and font parameters determine the font that is initially displayed by the dialog box.

cf_flags is a combination of the following flags defined in "slick.sh":

CF_SCREENFONTS	Display screen fonts.

CF_PRINTERFONTS	Display printer fonts.

CF_EFFECTS	Allows color and strike out and underline selection.

CF_FIXEDPITCHONLY	Display fixed pitch fonts only.

font is a string in the format: font_name, font_size, font_flags [,]

font_size is a font point size.

font_flags is a combination of the following flags defined in "slick.sh":

F_BOLD

F_ITALIC

F_STRIKE_THRU

F_UNDERLINE

Example

defmain()

{

    font="Helvetica,10,"(F_BOLD|F_ITALIC)

    // You can use the _font_param function to build the above string like this

    //     font=_font_param("Helvetica", 10, F_BOLD|ITALIC);

    result=_choose_font(CF_PRINTERFONTS, font);

    if (result==''){

         message("User has cancelled");

    } else {

         parse result with font_name' ,' font_size ',' font_flags ',';

         message("Name="font_name" Size="font_size" Flags="font_flags);

    }

}

Return	Returns '' if user selects cancel.  Otherwise, a font string is returned in the same format as the font argument.  The rgb_color is appended only if the CF_EFFECTS flag is specified.  However, a ',' will still follow the font_flags.

See Also	_font_form, _font_param


chr

_command void chr(_str number )

Remarks	Displays the ASCII character corresponding to number on the command line.  The number string argument may be any mathematical expression support by the math command.


_chr

_str _chr(int ascii_code)

Return	Returns the ASCII character corresponding to ascii_code.

Example

      _chr(65):== 'A'

See Also	_asc


clear_message

void clear_message()

Remarks	Clears the message line and any pending message.

Example

_deselect();

_select_line();	// Cause pending message "Text not selected".

clear_message();	// Message will not get displayed.

See Also	message, messageNwait, _message_box, popup_message, popup_imessage, sticky_message


clear_pbuffer

_command void clear_pbuffer()

Remarks	Clears the contents of the concurrent process buffer (".process").

See Also	start_process, stop_process, cursor_error, exit_process, set_next_error, reset_next_error, next_error


_clex_find

int [wid_expression.]_clex_find(int clexflags, _str options="O" )

Applies To	Edit Window, Editor Control

Return	Searches for language specific symbols or returns information about the symbol at the cursor.  This function returns 0 if the p_lexer_name property has not be set.

clexflags determines the language elements to search or test for.  may be one or more of the following flags defined in "slick.sh" ORed together:

OTHER_CLEXFLAG

KEYWORD_CLEXFLAG

NUMBER_CLEXFLAG

STRING_CLEXFLAG

COMMENT_CLEXFLAG

PPKEYWORD_CLEXFLAG

LINENUM_CLEXFLAG

SYMBOL1_CLEXFLAG

SYMBOL2_CLEXFLAG

SYMBOL3_CLEXFLAG

SYMBOL4_CLEXFLAG

options may be one of the following:

O	(Default) Find any of the language elements specified.  Returns 0 and places cursor on first character of symbol if it is found.  Otherwise, STRING_NOT_FOUND_RC is returned.

N	Find language elements specified which are NOT any of the language elements specified in clexflags.  Returns 0 and placed cursor on first character of symbol if it is found.  Otherwise, STRING_NOT_FOUND_RC is returned.

T	Test if symbol under cursor is any of the language elements specified in clexflags.  Returns non-zero value if cursor is on one of the language elements specified.

G	Return the color constant  (NOT CLEXFLAG) which corresponds to the symbol under the cursor.  The clexflags argument is ignored.  Color constants are defined in "slick.sh" and may be one of the following:

     CFG_WINDOW_TEXT

     CFG_MODIFIED_LINE

     CFG_INSERTED_LINE

     CFG_KEYWORD

     CFG_LINENUM

     CFG_NUMBER

     CFG_STRING

     CFG_COMMENT

     CFG_PPKEYWORD

     CFG_SYMBOL1

     CFG_SYMBOL2

     CFG_SYMBOL3

     CFG_SYMBOL4

The option parameter may include a '-' (dash) character to enable the 'O' and 'N' options to search backwards.

Example

// Find start of comment or string

status=_clex_find(COMMENT_CLEXFLAG|STRING_CLEXFLAG);

if (status) {

   messageNwait("Not found");

   stop();

}

color=_clex_find(0,"g");

if (color==CFG_COMMENT) {

   ...

}

// Assuming already in comment, find non-comment character

status=_clex_find(COMMENT_CLEXFLAG,"n");

// Assuming already in comment, find non-comment character backwards

status=_clex_find(COMMENT_CLEXFLAG,"n-");

See Also	_clex_load, p_color_flags, _clex_skip_blanks


_clex_load

int _clex_load(_str filename)

Remarks	Loads color lexer definition file specified.  By convention, these files have the extension ".vlx".  See Color Coding for information on syntax of lexer definitions.

Return	Returns 0 if successful.

See Also	_clex_find, p_color_flags, _clex_skip_blanks


_clex_skip_blanks

int _clex_skip_blanks([_str options])

Remarks	Starts from cursor position and skips over spaces, tabs, and comments.

options may contain one or more of the following option letters:

-	Search backwards

m	Search within selection

h	Search through hidden lines.

Return	Returns 0 if non-blank character is found.  If this functions fails the cursor is moved but its final location may not be the top or bottom of the buffer (we need to change this should be more concrete).

See Also	_clex_find, p_color_flags, _clex_load


_clipboard_empty

int _clipboard_empty()

Return	Returns non-zero value if the operating system clipboard is empty.  After an auto restore of your previous clipboards, the operating system clipboard may be empty, but there will be some internal clipboards.  Use the clipboard_itype function to determine if there are any internal clipboards.


_clipboard_format

_str _clipboard_format(_str format)

Remarks	Determines if a particular operating system clipboard format is available.  Use the clipboard_itype function to determine the format of an internal TEXT clipboard.

format may be one of the following constants defined in "slick.sh":

CBF_TEXT	There is a TEXT format clipboard.

CBF_VSTEXT	There is a Visual SlickEdit TEXT format clipboard.

CBF_VSCONTROLS

There is a Visual SlickEdit CONTROLS format clipboard.

Return	Returns 0 if the clipboard format is not available.  Otherwise, a non-zero value is returned.  If CBF_VSTEXT is given and the format exists, a string in the format "type process_id more_info" is returned.


clipboard_iNoflines

_str clipboard_iNoflines( [int clipboard_view_id] )

Return	Returns the number of lines in the internal clipboard.  0 is returned if there are no internal clipboards.  The optional clipboard_view_id parameter specifies the view which contains the internal clipboards.


clipboard_itype

_str clipboard_itype( [int clipboard_view_id] )

Return	Returns the clipboard type of the current internal clipboard which may be "LINE", "BLOCK", or "CHAR".  If there are no internal clipboards, '' is returned.  The optional clipboard_view_id parameter specifies the view which contains the internal clipboards.


clipboards

_command void clipboards( [int number] )

Remarks	Sets the maximum number of clipboards saved.  Clipboard text may be retrieved by the command paste (Ctrl+V) or list_clipboards (Ctrl+Shift+V).


cload

_command int cload(_str filename)

Remarks	Loads color coding lexer definition file specified.  If filename is not specified and the current buffer has a ".vlx" extension, it is loaded.  Otherwise a Standard Open File dialog box is displayed which allows you to select a lexer definition file to load.  See Color Coding for information on syntax of lexer definitions.

Return	Returns 0 if successful.

See Also	color_toggle, color_modified_toggle


close_all

_command int close_all()

"File", "Close All"

Applies To	Edit Window

Remarks	Closes all MDI edit windows and buffers.  You are prompted to save changes to modified files.

Return	Returns 0 if successful.  Otherwise, a non-zero number is returned.


close_buffer

_command int close_buffer()

"Document", "Close Buffer"

Applies To	Edit Window

Remarks	Prompts the user to save changes and deletes the current buffer.  The previous buffer is displayed in the current window.  This function is not affected by the One File per Window configuration option.

Return	Returns 0 if the buffer was deleted.  Otherwise, a non-zero number is returned.


close_window

_command int close_window()

Ctrl+F4

Applies To	Edit Window

Remarks	If One File per Window is on (F5 or "Tools", "Configuration"), the current window is closed and the current buffer is deleted if no other windows are displaying the buffer.  Prompts the user to save changes if the buffer is deleted.

If One File per Window is off, the current window is deleted.

After the window is deleted, the operating system decides which windows becomes active.

Return	Returns 0 if the window was deleted.  Otherwise, a non-zero number is returned.


cmdclear_message

_command void cmdclear_message()

Remarks	Clears the message on the message line.


cmdline_toggle

void cmdline_toggle()

ESC

Applies To	Edit Window, Command Line

Remarks	If the visible cursor is on the command line, the cursor is moved to the current edit window.  Otherwise the visible cursor is moved from the current edit window to the command line.


_cob_extform

_form _cob_extform

Syntax	void show('_cob_extform')

Remarks	Displays Cobol Options dialog box which is used for modifying the extension specific options for Cobol.


_col_width

int [wid_expression.]_col_width(int column [, int new_width] )

Applies To	List Box and Tree View

Remarks	Gets and optionally sets a column width of a list box.  This function is used to create the column grid look of the dialog editor properties list box.  column is a number between 0 and 199.  new_width, if specified, sets the width of the column.  new_width is specified in the  scale mode (p_xyscale_mode) of the list box parent.  Each line in the list box should separate each column with a tab character.

Example

defeventtab form1

list1.on_create()

{

     // Assume list box parent scale mode is in twips.  1440 twips make up an inch on the

     // display.

     // In the future, we will allow the scale mode to be modified.

     _col_width(0,1000);

     _col_width(1,1000);

     _lbadd_item("style\t"p_style);

     _lbadd_item("width\t"p_width);

     _lbtop();

}

Return	Returns width of column requested in the list box scale mode (p_scale_mode) .


color

_command void color()

Remarks	Displays the Color Settings dialog box ("Tools", "Configuration", "Colors...") which is used to change the default colors.  Select the screen element.  Then set the foreground and background colors and press the Apply or OK button.  The Apply button updates the colors you have modified without closing the dialog box.

Screen Element

Select the screen element before changing the foreground and background colors.  Most of the screen element items are obvious except for the Cursor screen element.  The Cursor Screen Element is displayed in the active edit window when the cursor is placed on the Visual SlickEdit command line.  It is not the color of the blinking cursor (wish we could change this color).

Apply

Updates all modified screen elements.  The dialog box is not closed.

Reset

Restores all colors to the values they were when the editor was invoked.

Cancel

Restores all colors to the values they were when the colors dialog box was displayed.


_color_form

_form _color_form

Syntax	void show('_color_form')

Remarks	Displays the Color Settings dialog box which is used to modify editor default colors.


color_modified_toggle

_command void color_modified_toggle()

Remarks	Toggles display of modified line coloring on/off.

See Also	color_toggle, cload


color_toggle

_command void color_toggle()

Remarks	Toggles coloring between current line, modified lines, and language specific.  Only one coloring style is displayed at a time.

See Also	color_modified_toggle, cload


column_math

int column_math('+'|'*')

Applies To	Edit Window, Editor Control

Remarks	Adds or multiplies the result of evaluating each sub line of a selected area of text.

Return	Returns 0 if successful.  Otherwise 1 (syntax error) is returned.


column_process_list

int [wid_expression.]column_process_list(int first_col, int col_width, _str search_string, _str action_fun [, _str search_options])

Applies To	Edit Window, Editor Control

Remarks	Generic column list processing function.

INPUT

first_col	Start column of area to be searched within.

col_width	Width of area to be searched.

search_string

String to search for in area specified.

action_fun	Name of procedure which operates on lines found by search.  Use a pre-existing action function such as zap_line or _fselect_line if possible.  The zap_line procedure deletes the current line.  The _fselect_line procedure replaces the first character of the current line with '>'.

search_options

Optionally specifies that search_string is a regular expression.  Specify 'r' for regular expression.  See Regular Expressions for more information.

For each line in the current buffer containing an occurrence of string search_string within the columns specified by first_col and col_width, action_fun is executed with that line as the current line.  The cursor is placed on the last line with a match.

Return	Returns 0 if successful.  Otherwise TOO_MANY_SELECTIONS_RC is returned.


command_execute

void command_execute()

Remarks	Executes the command on the command line and moves the cursor back to the text area if the variable def_stay_on_cmdline is 0.  This function is useful for ENTER key commands.


command_put

void command_put(_str string)

Remarks	Places string on the command line.  Cursor is placed at end of string.


command_state

int [wid_expression.]command_state()

Applies To	Text Box, Combo Box

Return	Returns non-zero value if the current window (p_window_id) is the command line.  Otherwise 0 is returned.

Example

  if ( command_state() ) {

       _delete_char();

  } else {

       wordwrap_delete_char('');

  }

See Also	command_toggle, execute, set_command, get_command


command_toggle

void command_toggle()

Applies To	Edit Window, Command Line

Remarks	If the visible cursor is on the command line, the cursor is moved to the text area.  Otherwise the visible cursor is moved from the text area to the command line.

See Also	command_state, execute, set_command, get_command


comment

_command void comment()

"Document", "Comment Lines..."

Applies To	Edit Window, Editor Control

Remarks	Converts selected lines into line comments using the comment setup.


compare

_command int compare()

F6 or "Tools", "File Compare...", "Compare"

Applies To	Edit Window

Remarks	The compare command compares two buffers in two tiled windows starting from the current cursor position of each window.  If the current window is not one of two tiled windows, you will be prompted for the files/buffers you want to compare and two tiled windows will be set up for you.

You can perform the following steps to manually set up two tiled windows before invoking the compare command:

•	Open (Ctrl+O) both files you wish to compare

•	Make current one of the files you wish to compare current.

•	Zoom the current window by clicking on the Maximize button.

•	Use the hsplit_window command (Ctrl+H or "Window", "Hsplit") to create two tiled windows.

•	Use the link_window command ("Window", "Link Window") and to display the other buffer in the newly created window.

Press F6 to start comparing the buffers displayed in the side by side windows.  After a compare mismatch, you can use the resync command (Shift+F6 or "Tools", "File compare...", "Resync") to adjust the cursor in both windows to the next reasonable match.  This command will be improved in the future to handle more sophisticated mismatches.

Use the Compare Options dialog box ("Tools", "File Compare...", "Options...") to set various compare options.  To set the default compare options, click on the Save Settings button.

In ISPF emulation, this command is not called when invoked from the command line.  Instead ispf_compare is called.  Use ("Tools", "File Compare...", "Compare") to explicitly invoke the compare command.

See Also	compare_options, resync, ispf_compare, diff


compare_bottom

_command void compare_bottom()

Applies To	Edit Window

Remarks	Moves the cursor to bottom of buffer for both buffers being compared.  This command is typically used when comparing files with the compare command.


compare_down

_command void compare_down()

Applies To	Edit Window

Remarks	Moves the cursor down in both buffers being compared.  This command is typically used when comparing files with the compare command.


compare_left

_command void compare_left()

Applies To	Edit Window

Remarks	Moves the cursor left in both buffers being compared.  This command is typically used when comparing files with the compare command.


compare_options

int compare_options()

Remarks	Displays Compare Options dialog box which allows you to modify various options for the compare command.

Binary Compare

When on, a stream oriented compare is performed instead of  an ASCII line by line compare.  In this mode, all other compare options are ignored.

Expand tabs Before Compare

When checked, tabs and spaces are considered equivalent.  This allows you to compare source files where one is indented with tabs and the other is indented with spaces.

Ignore Leading Spaces

When checked, leading spaces are ignored.

Ignore Trailing Spaces

When checked, trailing spaces are ignored.

Ignore All Spaces

When checked, all differences in spaces are ignored.

Ignore Case

When checked, a case insensitive compare is performed.

Save Settings

Saves your compare options for your next edit session.

Return	Returns 0 if successful.  Otherwise, COMMAND_CANCELLED_RC is returned.

See Also	compare, resync


compare_page_down

_command void compare_page_down()

Applies To	Edit Window

Remarks	Moves the cursor to the next page of both buffers being compared.  This command is typically used when comparing files with the compare command.


compare_page_up

_command void compare_page_up()

Applies To	Edit Window

Remarks	Moves the cursor to the previous page of both buffers being compared.  This command is typically used when comparing files with the compare command.


compare_right

_command void compare_right()

Applies To	Edit Window

Remarks	Moves the cursor right in both buffers being compared.  This command is typically used when comparing files with the compare command.


compare_top

_command void compare_top()

Applies To	Edit Window

Remarks	Moves the cursor to top of buffer for both buffers being compared.  This command is typically used when comparing files with the compare command.


compare_up

_command void compare_up()

Applies To	Edit Window

Remarks	Moves the cursor up in both buffers being compared.  This command is typically used when comparing files with the compare command.


_ConfigEnvVar

int _ConfigEnvVar(_str envvar_name, _str new_value)

Remarks	Sets environment variable specified to value specified.  In addition, this environment setting is placed in the users local "vslick.ini" so that the next time the editor is invoked, the environment variable is set to this value.

Return	Returns 0 if successful.


complete

void complete([_str completion_info])

Remarks	Completes the current command argument being entered on the command line according to the command's completion info or completion_info specified.  completion_info must be zero or more completion constants delimited with space characters.  For example, complete(FILE_ARG' 'FILE_ARG) would specify that the command takes two file name arguments.  Completion constants have the suffix "_ARG" and are listed in "slick.sh".


complete_list

void complete_list()

Remarks	Displays a list or words or variables which are a prefix match of the word at the cursor.  If the macro variable "def_complete_vars" is 1 and the word prefix at the cursor is NOT color coded as a string or comment, only variables are retrieved.  However, the integer macro variable "def_complete_var_range" overrides restricting searching to variables for a specified number of lines before and after the cursor.  A value of 1 indicates to include all words on the current line.

See Also	complete_prev, complete_next, complete_next_match, complete_prev_match, complete_more


complete_more

void complete_more()

Remarks	Inserts the text up to and including the next word which follows the last match found by the complete_next, complete_prev, complete_next_match, or complete_prev_match command.

See Also	complete_next, complete_list, complete_next_match, complete_prev_match, complete_prev


complete_next

void complete_next()

Remarks	Retrieves next word or variable which is a prefix match of the word at the cursor.  If the macro variable "def_complete_vars" is 1 and the word prefix at the cursor is NOT color coded as a string or comment, only variables are retrieved.  However, the integer macro variable "def_complete_var_range" overrides restricting searching to variables for a specified number of lines before and after the cursor.  A value of 1 indicates to include all words on the current line.

See Also	complete_prev, complete_list, complete_next_match, complete_prev_match, complete_more


complete_next_match

void complete_next_match()

Remarks	Searches down the file for another occurrence of the text found by the last complete_next, complete_prev, complete_next_match, complete_prev_match command.

See Also	complete_prev, complete_list, complete_next, complete_prev_match, complete_more


complete_prev

void complete_prev()

Remarks	Retrieves previous word or variable which is a prefix match of the word at the cursor.  If the macro variable "def_complete_vars" is 1 and the word prefix at the cursor is NOT color coded as a string or comment, only variables are retrieved.  However, the integer macro variable "def_complete_var_range" overrides restricting searching to variables for a specified number of lines before and after the cursor.  A value of 1 indicates to include all words on the current line.

See Also	complete_next, complete_list, complete_next_match, complete_prev_match, complete_more


complete_prev_match

void complete_prev_match()

Remarks	Searches up the file for another occurrence of the text found by the last complete_next, complete_prev, complete_next_match, complete_prev_match command.

See Also	complete_prev, complete_list, complete_next, complete_next_match, complete_more


concur_command

_command int concur_command( _str command )

Remarks	Inserts command at end of ".process" buffer.  If last line contains the read point, text after the read point is replaced with command.  Concurrent process session is started if necessary.

Return	Returns 0 if command queued successfully.  However, this does not mean that the command will execute successfully.  A non-zero return code means that the concurrent process buffer was not created.  Common error codes are: TOO_MANY_FILES_RC, TOO_MANY_SELECTIONS_RC, CANT_FIND_INIT_PROGRAM_RC, ERROR_CREATING_SEMAPHORE_RC, TOO_MANY_OPEN_FILES_RC, NOT_ENOUGH_MEMORY_RC, ERROR_CREATING_QUEUE_RC, INSUFFICIENT_MEMORY_RC,  and ERROR_CREATING_THREAD_RC.  On error, message is displayed.


concur_shell

int concur_shell( _str command )

Remarks	Creates a concurrent process running in the current buffer.  If command is an empty string ('') then the default command processor is started.  The default command processor is defined by the COMSPEC (UNIX: SHELL) environment variable.  Otherwise command contains the program name and arguments to be executed as a concurrent process.  Each copy of Visual SlickEdit can run one concurrent session.

Return	Returns 0 if successful.  Common error codes are: TOO_MANY_FILES_RC, TOO_MANY_SELECTIONS_RC, CANT_FIND_INIT_PROGRAM_RC, ERROR_CREATING_SEMAPHORE_RC, TOO_MANY_OPEN_FILES_RC, NOT_ENOUGH_MEMORY_RC, ERROR_CREATING_QUEUE_RC, INSUFFICIENT_MEMORY_RC, and ERROR_CREATING_THREAD_RC.  On error, message is displayed.

See Also	shell, xcom, dos


config

_command void config()

F5 or "Tools", "Configuration"

Remarks	Displays the configuration menu.  The configuration menu provides quick access to almost all of Visual SlickEdits configuration options such as colors, file extension setup, emulation, select style, search case sensitivity, cache size, spill file path, scroll style, language syntax options, file load/save options, tabs, margins, and more.


_config_form

_form _config_form

Syntax	void show('_config_form')

Remarks	Displays General Configuration dialog box


_config_path

_str _config_path()

Return	Returns the directory used to store miscellaneous configuration files such as "vslick.sta" (UNIX: "vslick.stu") and "alias.slk".

See Also	restore_path, _create_config_path, _macro_path


convert_spaces2tabs

_command void [wid_expression.]_convert_spaces2tabs()

Remarks	Converts spaces at the beginning of lines to tabs.  If there is a selection, lines in the selection are converted.  Otherwise all lines in the current buffer are converted.

See Also	convert_tabs2spaces


convert_tabs2spaces

_command void [wid_expression.]_convert_tabs2spaces()

Remarks	Converts tabs to spaces.  If there is a selection, lines in the selection are converted.  Otherwise all lines in the current buffer are converted.

See Also	convert_spaces2tabs


copy

_command int copy(_str text )

Remarks	Passes text to the operating system copy (UNIX: cp) command.  See your operating system manual for argument syntax.

In ISPF emulation, this command is not called when invoked from the command line.  Instead ispf_copy is called.  Use dos_copy to explicitly invoke the copy command.

Return	Return code depends on operating system.  Use the copy_file built-in for predictable and portable results.


copy_file

int copy_file(_str source_name, _str dest_name )

Remarks	Copies the file source_name to dest_name.

Return	Returns 0 if successful.  Common return codes are: ACCESS_DENIED_RC, ERROR_OPENING_FILE_RC, FILE_NOT_FOUND_RC, INSUFFICIENT_DISK_SPACE_RC, ERROR_CREATING_DIRECTORY_RC, ERROR_READING_FILE_RC, ERROR_WRITING_FILE_RC,  DRIVE_NOT_READY_RC, and PATH_NOT_FOUND_RC.


_copy_from_clipboard

int [wid_expression.]_copy_from_clipboard()

Applies To	All objects except MDI Window, Application Window, and Command Line

Remarks	If clipboard is a text clipboard, the current object must be an edit window or editor control.  For a text format clipboard, this function inserts the clipboard into the current buffer as a stream of characters.  This function should not be used to paste internal clipboards.  Use the paste command instead.

If the clipboard contains Visual SlickEdit Controls, the controls are inserted as children to the current object or the parent of the current object if the current object does not allow child controls.

Return	Returns 0 if successful.

See Also	_clipboard_format, _clipboard_empty


_copy_objects_to_clipboard

int _copy_objects_to_clipboard()

Applies To	Form

Remarks	Copies selected controls on a form to the clipboard.  A selected control has a non-zero p_selected property.

Return	Returns 0 if successful.


copy_region

_command void [wid_expression.]copy_region()

Applies To	Edit Window, Editor Control

Remarks	Used in EMACS emulation.  Copies the text in the highlighted area to the clipboard and unhighlights the text.  If no highlighted area exists, an invisible region is used which contains the last highlighted text not deleted or the last text pasted by the emacs_paste command.

See Also	select_block, select_line, emacs_select_char, cut_region, indent_region, tabify_region, untabify_region, exchange_point_and_mark, reflow_region, fill_selection, emacs_select_block


_copy_to_clipboard

int [wid_expression.]_copy_to_clipboard( _str mark_id="" )

Applies To	Edit Window, Editor Control

Remarks	Copies text selection to the operating system clipboard.  mark_id is a handle to a selection returned by one of the built-ins _alloc_selection or _duplicate_selection.  A mark_id of '' or no mark_id parameter identifies the active selection.

Return	Returns 0 if successful.

See Also	copy_to_clipboard


copy_to_clipboard

_command int copy_to_clipboard([_str cbname])

Ctrl+C or "Edit", "Copy to Clipboard"

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Remarks	Copies selection to the clipboard.  If no text is selected the current line is copied to the clipboard.  The optional cbname string specifies the name of the clipboard.  This name can be used with the paste command to specify a specific clipboard.  Copies of all clipboards are stored in the ".clipboards" buffer.  The clipboard may be inserted by the paste command (Ctrl+V).  Previous clipboards may be inserted with the list_clipboards command (Ctrl+Shift+V).

IMPORTANT:  cbname needs to start with an alphabetic character (a-z).  numeric values for cbname are reserved for VI emulation.

Return	Returns 0 if successful.  Common return codes are 1 (no text marked in current buffer) and TOO_MANY_SELECTIONS_RC.  On error, message is displayed.

See Also	cut, list_clipboards, paste


copy_to_cursor

_command int [wid_expression.]copy_to_cursor()

"Edit", "Copy to Cursor"

Applies To	Edit Window, Editor Control

Remarks	Copies selection to the cursor.  Character or block selections are inserted before the character at the cursor.  For line selection, lines are inserted before or after current line depending on the Line insert style ("Tools", "Configuration", "More Options...", "Line Insert Style").  By default line marks are inserted after the current line.  Resulting selection is always on destination text.

Return	Returns 0 if successful.  Common return codes are TEXT_NOT_SELECTED_RC and SOURCE_DEST_CONFLICT_RC.  On error, message is displayed.


_copy_to_cursor

int [wid_expression.]_copy_to_cursor( _str mark_id="" )

Applies To	Edit Window, Editor Control

Remarks	Copies the selection specified by mark_id to cursor.  Character or block selections are inserted before the character at the cursor.  Line selections are always inserted after the current line.  Resulting selection is always on destination text.

mark_id is a handle to a selection returned by one of the built-ins _alloc_selection or _duplicate_selection.  A mark_id of '' or no mark_id parameter identifies the active selection.

Return	Returns 0 if successful.  Common return codes are TEXT_NOT_SELECTED_RC, SOURCE_DEST_CONFLICT_RC, and INVALID_SELECTION_HANDLE_RC.  On error, message is displayed.


copy_to_file

_command int [wid_expression.]copy_to_file()

Applies To	Edit Window

Remarks	Used in EMACS emulation.   Writes the contents of the current buffer to a file you specify.  Prompts you on the command line for a file name.

Return	Returns 0 if successful.  Common return values are 1 COMMAND_CANCELLED_RC, TOO_MANY_MARKS_RC, ACCESS_DENIED_RC, ERROR_OPENING_FILE_RC, INSUFFICIENT_DISK_SPACE_RC, ERROR_CREATING_DIRECTORY_RC, ERROR_READING_FILE_RC, ERROR_WRITING_FILE_RC, DRIVE_NOT_READY_RC, and PATH_NOT_FOUND_RC.  On error, message is displayed.

See Also	save_as, save, name, gui_copy_to_file


copy_word

_command int [wid_expression.]copy_word()

Ctrl+K or "Edit", "Copy Word"

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Remarks	Copies word at cursor to the clipboard.  Invoking this command from the keyboard multiple times in succession creates one clipboard.  To change the word characters for a specific extension, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").

Return	Returns 0 if word exists at cursor.  Common return codes are STRING_NOT_FOUND_RC and TOO_MANY_SELECTIONS_RC.  On error, message is displayed.


count_lines

command void [wid_expression.]count_lines()

Applies To	Edit Window, Editor Control

Remarks	Updates the Line status indicator and displays the number of lines in the current buffer on the message line.


count_lines_in_selection

int count_lines_in_selection([_str mark_id])

Applies To	Edit Window, Editor Control

Remarks	Counts the number of lines or sub-lines within the marked area identified by mark_id.  mark_id is a handle to a selection returned by one of the built-ins _alloc_selection or _duplicate_selection.  A mark_id of '' or no mark_id parameter identifies the active selection.

Return	If successful, returns number of lines or sub-lines within the selection.  Otherwise, 0 is returned.


_create_config_path

int _create_config_path()

Remarks	Creates the configuration directory if it does not already exist.  The _config_path function is called to determine the configuration directory.

Return	Returns 0 if successful.  On error, message box is displayed.

See Also	restore_path, _config_path


create_ext

void create_ext(int &kt_index ,_str extension ,_str ref_extension [,_str mode_name [, _str setup_info [,_str compile_info [,_str syntax_info [,_str be_info [,reserved]]]]]])

Remarks	Creates file extension specific setup data which is used by the Extension Options dialog box.  This procedure is typically used when adding support for extensions not already provided by Visual SlickEdit's default configuration.

INPUT parameters

extension	File extension to be setup.

ref_extension	If not '', this extension will refer to the same setup data as files with extension ref_extension.  All optional parameters are ignored if ref_extension is not ''.

mode_name	Name given to the extension's mode.

setup_info	A string which specifies the mode_name, tabs, margins, key table name, word wrap setting, indent with tabs setting, and show tabs style.  See defload procedure in the macro file "modula.e" for an example.

compile_info	Compile command.

syntax_info	A string of numbers separated by spaces.  first number specifies "Syntax Indent".  Second number specifies syntax expansion on or off.  Numbers that follow specify extension specific options.

be_info	String of "Begin/end pairs".

reserved	This parameter is not used.

OUTPUT parameters

kt_index	Names table index to mode event table for this extension.  The key table name is derived from the input variable mode_name with the string "-keys" appended.  Not set if ref_extension is not ''.

See defload procedure in the macro file "modula.e" for an example.


create_prefix_key

_command int create_prefix_key()

Remarks	Creates a new prefix key.  Using this command creates a multiple key sequence key binding of any length.  For example, to create a two key sequence key binding that starts with Ctrl+K, execute this command and press the Ctrl+K key (this assumes the Ctrl+K key is not already a prefix key).  After creating the prefix key, the bind_to_key command will recognize Ctrl+K as a prefix key and prompt for another key.

It is easier to use our Bind Command to Key dialog box ("Tools", "Configuration", "Key Bindings...") for creating and removing bindings.

Return	Returns 0 if successful.  Common return codes are COMMAND_CANCELLED_RC and INTERPRETER_OUT_OF_MEMORY_RC.  On error, message is displayed.

See Also	bind_to_key, unbind_key, list_keydefs


_create_temp_view

_str _create_temp_view(var temp_view_id)

Remarks	Creates a temporary buffer and view.  This function is used to create input and output lists for general purpose dialog boxes.

Return	If successful, temp_view_id is set to the view created, the new view is active, and the original view id is returned.  On error, "" is returned and message box is displayed.

Example

#include "slick.sh"

defmain()

{

    orig_view_id=_create_temp_view(temp_view_id);

    if (orig_view_id=='') return(1);

    // The buffer and view allocated by _create_temp_view are active

    _lbadd_item('a');

    _lbadd_item('b');

    _lbadd_item('c');

    //  The original view must be activated before showing the _sellist_form

    activate_view(orig_view_id);

    result=show('_sellist_form -mdi -modal',

                "Sample Selection List",

                SL_VIEWID|SL_SELECTCLINE,	// Indicate the next argument is a view_id

                temp_view_id,

                "OK",

                "",	// Help item

                '',	// Use default font

                ""   	// Call back function

               );

      if (result) {

           message("Selection list cancelled");

      } else {

           message("Item selected is "result);

      }

}

See Also	_sellist_form, _delete_temp_view


create_tile

_command int create_tile()

Alt+F3

Applies To	Edit Window

Remarks	Allows you to create a new tiled window by pointing to edge for new window with cursor keys.

Return	Returns 0 if successful.  Common return codes are 1 (window too small to split), COMMAND_CANCELLED_RC, TOO_MANY_WINDOWS_RC, and TOO_MANY_SELECTIONS_RC.  On error, message is displayed.

See Also	move_edge, next_window, _prev_window, change_window, delete_tile, window_left, window_right, window_above, window_below


_create_tile_id

int _create_tile_id()

Return	Returns a unique tile id.  Visual SlickEdit uses tile ids to group and ungroup tiled windows.


_create_window

int _create_window(int object_index, int parent_wid, _str title, int x, int y, int width, int height , int cw_flags=0, int bds_style=-1 )

Remarks	Creates an object and returns an instance handle.

Input

object_index	An object constant with prefix "OI_" from "slick.sh".  Can't use OI_MDI_FORM.

parent_wid	Must be an existing window id, _mdi constant, or _app constant.  _mdi is a window handle for the MDI window.  _app is a window handle to the Visual SlickEdit application window (exists but can be seen).

title	Used by OI_FORM, OI_FRAME, OI_COMMAND_BUTTON, OI_CHECK_BOX, and OI_RADIO_BUTTON objects only.

x, y, width, height	Dimensions of window in the parent scale mode.  For a form, this is always in twips.  1440 twips is one inch on the display.

cw_flags	Create window flags.  Many additional properties for objects can be set after the object is created.  These flags are a combination of the flags below.

      CW_HIDDEN	Create the window initially hidden.

      CW_CHILD	Create the object as a child of the parent window, parent_wid.  This flag is not valid for an OI_FORM object and REQUIRED for all other objects.

      CW_PARENT	Keep form object on top of another window.  This flag is only supported by form objects.

      CW_LEFT_JUSTIFY, CW_RIGHT_JUSTIFY

Displays text on left or right for OI_CHECK_BOX or OI_RADIO_BUTTON.

      CW_BSDEFAULT

Selects a OI_COMMAND_BUTTON to be the default button.

      CW_EDIT	Creates the window for editing in the dialog editor.

      CW_COMBO_LIST_ALWAYS

Used to create OI_COMBO_BOX in the list always style.  Effects OI_COMBO_BOX object only.

      CW_COMBO_NOEDIT

Used to create OI_COMBO_BOX in the no edit style.  Effects OI_COMBO_BOX object only.

bds_style	Border style.  Effects OI_FORM object only.  May be one of the following:

       BDS_NONE

       BDS_FIXED_SINGLE

       BDS_SIZABLE

       BDS_DIALOG_BOX

Return	Returns the window id of root window of the object created.  On error, a negative error number is returned.

Example

form_wid=_create_window(OI_FORM,_mdi,"Title",0,0,4000,2000,

           CW_PARENT|CW_HIDDEN,

           BDS_DIALOG_BOX);

text_wid=form_wid._create_window(OI_TEXT_BOX,form_wid,"",100,100,3500,100,

CW_CHILD);

form_wid._center_window(_mdi)

form_wid.p_visible=1;

See Also	_top_height, _bottom_height


ctab

_command  void [wid_expression.]ctab()

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Remarks	If Indent With Tabs ("Document", "Indent With Tabs") is on and the cursor is on or before the first non-blank character, one more syntax indent level is added to the line.  Use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...") to set the Syntax Indent for the current extension.  If the Syntax Indent dialog box item is grayed, the tab stops are used as the Syntax Indent.

If indent with tabs is on and the cursor is after the first non-blank character, a tab character is inserted.

If indent with tabs is off, the cursor is moved to the next indent level.

See Also	indent_with_tabs, tabs, gui_tabs


ctrl_prefix

_command void ctrl_prefix()

Remarks	Defines an alternate CTRL key.  For example, after binding this command to the Ctrl+^ key, pressing Ctrl+^ 'x' is identical to Ctrl+X.

See Also	alt_prefix, shift_prefix, esc_alt_prefix


cua_select

_command void [wid_expression.]cua_select()

Bound to Shift+<cursor keys>

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Remarks	Starts or extends a character selection.  This command is intended to be bound to Shift+cursor keys.


cur_word

_str [wid_expression.]cur_word(int &start_col [, _str from_cursor])

Applies To	Edit Window, Editor Control

Return	Returns the current word.  If from_cursor=="1", word is extracted starting at the cursor position instead of the beginning of the word.  "" is returned if there is no word at the cursor.  start_col is set to the physical position within the current line of the word returned.


current_proc

_command _str [wid_expression.]current_proc([boolean display_message])

RButton-Click (displays menu) "Current Function"

Applies To	Edit Window, Editor Control

Return	Returns name of current function or "" if it can't be found.  If display_message is true or not specified, the current function name is displayed on the message line.


cursor_command

void cursor_command()

Applies To	Edit Window, Command Line

Remarks	Moves the cursor to the command line.


cursor_data

void cursor_data()

Applies To	Edit Window, Command Line

Remarks	Moves the cursor to the text area.


cursor_down

_command void [wid_expression.]cursor_down()

DOWN

Applies To	Edit Window, Editor Control, Command Line

Remarks	For an edit window or editor control, the cursor is moved one line down.  The Up/Down on Text ("Tools", "Configuration", "Redefine Common Keys...") setting affects this command.  For the command line, the next command in the retrieve buffer ".command" is placed on the command line.


cursor_error

_command int cursor_error()

Alt+1 or "Project", "Go to Error/Include"

Applies To	Edit Window

Remarks	This command is typically invoked when the concurrent process buffer (created by the start_process command) is active, to process compiler error messages from within the editor.  However, it can also be used to edit a filename such as an include filename at the cursor.  The current line is assumed to contain a filename and possibly a line and column number.  The cursor is placed on the line and column of file specified by the current line.  Otherwise the filename at or before the cursor is loaded for editing.  The search strategy for include files is as follows:

1.	Current directory.

2.	Same directory as current buffer.

3.	Include directories specified by current project.

Return	Returns 0 if successful. Common return values are TOO_MANY_FILES_RC, TOO_MANY_SELECTIONS_RC, and FILE_NOT_FOUND_RC.  On error, message is displayed.

See Also	next_error


cursor_left

_command void [wid_expression.]cursor_left()

LEFT

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Remarks	Moves the cursor one character to the left.  For a edit window or text box control, if word wrap is on, the cursor will wrap to the end of the previous line when the left margin is hit.


_cursor_move_deselects

boolean _cursor_move_deselects()

Applies To	Edit Window, Editor Control

Return	Returns true if moving the cursor will remove the active selection.


_cursor_move_extendssel

boolean _cursor_move_extendssel()

Applies To	Edit Window, Editor Control

Return	Returns true if moving the cursor will extent the active selection.


cursor_right

_command void [wid_expression.]cursor_right()

RIGHT

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Remarks	Moves the cursor one character to the right.  For an edit window or editor control, if word wrap is on, the cursor will wrap to the next line when the right margin is hit.


cursor_shape

_command void cursor_shape( [_str cmdline] )

cmdline is a string in the format:

      [-v] ins_top ins_bot rep_top rep_bot vins_top vins_bot vrep_top vrep_bottom

Remarks	Sets the cursor shape for insert mode, replace mode, virtual insert mode, and virtual replace mode.  Top and bottom refer to character vertical scan lines.  The cursor is said to be in virtual space if it is past the end of a line or in the middle of a tab character.  To make this function independent of hardware, this function maps the numbers 1 to 1000 to the actual number of vertical scan lines in a character.  If no parameters are specified, the current settings are placed on the command line for editing.  If the -v option is given, all options that follow are ignored and two vertical cursor shapes are selected.  A thin vertical cursor for insert mode and a fat vertical cursor for replace mode.


_cursor_shape

_str _cursor_shape( _str cmdline=null )

cmdline is a string in the format:

     [-v] ins_top ins_bot rep_top rep_bot vins_top vins_bot vrep_top vrep_bottom

Return	Returns and/or sets the cursor shape settings for insert mode, replace mode, virtual insert mode, and virtual replace mode.  The returned string is in the same format as the input string.  Top and bottom refer to character vertical scan lines.  The cursor is said to be in virtual space if it is past the end of a line or in the middle of a tab character.  To make this function independent of hardware, this function maps the numbers 1 to 1000 to the actual number of vertical scan lines in a character.  If the -v option is given, all options that follow are ignored and two vertical cursor shapes are selected.  A thin vertical cursor for insert mode and a fat vertical cursor for replace mode.


cursor_up

_command void cursor_up()

UP

Applies To	Edit Window, Editor Control, Command Line

Remarks	For an edit window or editor control, the cursor moves one line up.  The Up/Down on Text ("Tools", "Configuration", "Redefine Common Keys...") setting effects this command.  For the command line, the previous command in the retrieve buffer ".command" is placed on the command line.


cut

_command int [wid_expression.]cut()

Ctrl+X or "Edit", "Cut"

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Remarks	Deletes selection and copies it to the clipboard.  For an edit window or editor control, if no text is selected, the current line is deleted and copied to the clipboard.  All clipboards are stored in the ".clipboards" buffer.  The last clipboard may be inserted by the paste command (Ctrl+V).  Previous clipboards may be inserted with the list_clipboards command (Ctrl+Shift+V).  The maximum number of clipboards may be set by the General Configuration dialog box ("Tools", "Configuration", "General...", select General Tab).

In ISPF emulation, this command is not called when invoked from the command line.  Instead ispf_cut is called.  Use ("Edit", "Cut") to explicitly invoke the cut command.

Return	Returns 0 if successful.  Common return codes are 1 (no line at cursor) and TOO_MANY_SELECTIONS_RC.  On error, message is displayed.

See Also	copy_to_clipboard, ispf_cut, list_clipboards, paste


cut_end_line

_command int [wid_expression.]cut_end_line()

Ctrl+E or "Edit", "Delete...", "To End of Line"

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Remarks	Deletes text from cursor to end of line and copies it to the clipboard.  For an edit window or editor control, if the cursor is past the last character of the line, the next line is joined with the current line.  Invoking this command from the keyboard multiple times in succession creates one clipboard.  You may retrieve the deleted text with the command paste.

Return	Returns 0 if successful.  Common return codes are BOTTOM_OF_FILE_RC and TOO_MANY_SELECTIONS_RC.  On error, message is displayed.

See Also	delete_end_line


cut_level

_command int [wid_expression.]cut_level()

Applies To	Edit Window, Editor Control

Remarks	Used in EMACS emulation.  Deletes text from cursor to character before end of next parenthesis level and copies it to the clipboard.  See NEXT-LEVEL command for information on how the end of the next parenthesis level is found.   If the end of the next parenthesis level is not found, text from cursor to end of buffer is deleted and copied to the clipboard.  Invoking this command multiple times in succession creates one clipboard.

Return	Returns 0 if successful.  Common return value is TOO_MANY_MARKS_RC.  On error, message displayed.

See Also	next_level, cut_prev_level, prev_level


cut_line

_command int [wid_expression.]cut_line()

Ctrl+BACKSPACE or "Edit", "Delete...", "Line"

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Remarks	Deletes the current line and copies it to the clipboard.  Invoking this command from the keyboard multiple times in succession creates one clipboard.  You may retrieve the deleted line(s) with the command paste.

Return	Returns 0 if successful.  Common return codes are 1 (no line at cursor) and TOO_MANY_SELECTIONS_RC.  On error, message is displayed.

See Also	delete_line


cut_prev_level

_command int [wid_expression.]cut_prev_level()

Applies To	Edit Window, Editor Control

Remarks	Used in EMACS emulation.  Deletes text from character before cursor to start of the previous parenthesis level and copies it to the clipboard.  See prev_level command for information on how the start of previous parenthesis level is found.   If the start of the previous parenthesis level is not found, text from character before cursor to top of buffer is deleted and copied to the clipboard.  Invoking this command multiple times in succession creates one clipboard.

Return	Returns 0 if successful.  Common return values is TOO_MANY_MARKS_RC.  On error, message displayed.

See Also	next_level, cut_level, prev_level


cut_prev_word

_command void [wid_expression.]cut_prev_word()

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Remarks	Deletes from the cursor to the beginning of the previous word and copies it to the clipboard.  Invoking this command from the keyboard multiple times in succession creates one clipboard.  To change the word characters for a specific extension, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").  The deleted text may be retrieved by the command paste.

See Also	delete_prev_word


cut_region

_command void [wid_expression.]cut_region()

Applies To	Edit Window, Editor Control

Remarks	Used in EMACS emulation.  Deletes the text in the highlighted area and copies it to the clipboard.  If no highlighted area exists, an invisible mark is used which contains the last highlighted text not deleted or the last text pasted by the emacs_paste command.

See Also	select_block, select_line, emacs_select_char, copy_region, indent_region, tabify_region, untabify_region, exchange_point_and_mark, reflow_region, fill_selection, emacs_select_block


cut_sentence

_command void [wid_expression.]cut_sentence()

Applies To	Edit Window, Editor Control

Remarks	Used in EMACS emulation.  Deletes the text from cursor to end of sentence and copies it to the clipboard.  End of sentence is defined to be one of the character ., !, or ?  followed by any number of the characters ., !, ?, ", ', ), or ] followed by end of line or two spaces.  Invoking this command multiple times in succession creates one clipboard.

See Also	prev_paragraph, prev_sentence, next_paragraph, select_paragraph, center_within_margins, reflow_region, margins


cut_word

_command int [wid_expression.]cut_word()

Ctrl+Shift+K or "Edit", "Delete...", "Word"

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Remarks	Deletes from the cursor to the end of the word at the cursor or the next word and copies it to the clipboard.  Invoking this command from the keyboard multiple times in succession creates one clipboard.  To change the word characters for a specific extension, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").  The deleted text may be retrieved by the command paste.

Return	Returns 0 if successful.  Common return codes are  TOO_MANY_SELECTIONS_RC, and STRING_NOT_FOUND_RC.  On error, message is displayed.

See Also	delete_word


cut_word2

int [wid_expression.]cut_word2(boolean create_clipboard ,['C'])

Applies To	Edit Window, Editor Control

Remarks	If create_clipboard is true, then a new clipboard is created containing the text from the cursor to the end of the current word.

If create_clipboard is false, then the text from the cursor to the end of the current word is appended to the current clipboard.

Regardless of the value of the create_clipboard parameter, if the second argument is not 'C', the text that is copied is deleted from the buffer.

Return	Returns 0 if successful.  Common return codes are 1 (no line at cursor), TOO_MANY_SELECTIONS_RC, and STRING_NOT_FOUND_RC.


_date

_str _date(_str option='U')

option may be one of the following.

'U'	US format date mm/dd/yyyy.

'L'	Local dependent date string.  Under Windows, this uses the regional settings "Short date style".  For other platforms, this option is still under development.

Return	Returns the system date.


_dbcs

boolean _dbcs()

Return	Returns true if the operating system is in Japanese mode.

See Also	_dbcsIsLeadByte, _dbcsStartOfDBCS, _dbcsStartOfDBCSCol, _dbcsSubstr


_dbcsIsLeadByte

boolean _dbcsIsLeadByte(_str ch)

Return	Returns true if the 1 byte length string ch is a valid first character of a double byte character (DBCS).  Always return false, if the operating system is not in Japanese mode.

Example

     // IF there are at least two bytes left in the current line and the first byte is

    // a dbcs lead byte.

     if (p_col<_text_colc() && _dbcsIsLeadByte(get_text())) {

          p_col+=2;  // Move cursor over double byte character

     } else {

          p_col+=1;  // Move cursor over single byte character

     }

See Also	_dbcs, _dbcsStartOfDBCS, _dbcsStartOfDBCSCol, _dbcsSubstr


_dbcsStartOfDBCS

boolean _dbcsStartOfDBCS(_str &string, int Index)

Return	Returns true if the character at Index in string is the start of a single or double byte character.

See Also	_dbcs, _dbcsIsLeadByte, _dbcsStartOfDBCSCol, _dbcsSubstr


_dbcsStartOfDBCSCol

boolean  [wid_expression.]_dbcsStartOfDBCSCol(int Col)

Return	Returns true if the character at column Col in the current line of the current buffer is the start of a single or double byte character.

See Also	_dbcs, _dbcsIsLeadByte, _dbcsStartOfDBCS, _dbcsSubstr


_dbcsSubstr

_str _dbcsSubstr(_str &string, int StartCol [, int Width])

Return	Returns part of the input string starting from StartCol including the rest of the string or Width characters if specified.  This function is identical to the substr function except when double byte characters are bisected, they are replaced with zeros.  This function does not yet support the pad argument.

Example

     // This will always mismatch if index 5 is the first or second character of

     // a double byte character.

     if (_dbcsSubstr(string,5,1)=='+') {

          ...

     }

See Also	_dbcs, _dbcsIsLeadByte, _dbcsStartOfDBCS, _dbcsStartOfDBCSCol


dde

_command void dde(_str cmdline)

cmdline is a string in the format: [-mdi] [-refresh] [-multi] command

The switches have the following meaning:

-mdi	Invoke command on mdi edit window.

-refresh	Refresh the screen after the command is executed.  If you do not specify this command, you will need to send the dderefresh command after sending all dde commands to insure that the screen is correctly updated.

-multi	Indicates that command contains multiple commands separated with semicolons.

-cd directory	Temporarily change the current directory to directory when executing the command.

Remarks	Supported under Windows, Windows NT, and Windows 95/98.  When another application wants to communicate with Visual SlickEdit using DDE, the other application should use the server name of Visual SlickEdit, the system topic, and call this command so that the command is invoked on the correct object.  The DDE command string:

     'dde -mdi -refresh edit c:\junk'

can be sent to Visual SlickEdit to have Visual SlickEdit open the file "c:\junk".  The first instance of Visual SlickEdit has the server AND application window name "Visual SlickEdit".  All instances of Visual SlickEdit that follow have the server and application window name "Visual SlickEdit Server n" where n starts at 1.  Invoke Visual SlickEdit with the +new option to create another instance.  The editor_name function may be used to get the server name.


_ddecommand

int _ddecommand(_str server_name,_str command, _str topic="", _str item="", int milli_timeout=15000)

Remarks	Supported under Windows, Windows 95/98, and Windows NT only.  Sends a system topic DDE command to the server specified.

Example

   // Invoke a second copy of Visual SlickEdit  by invoking the editor with

                         // the +new invocation option.  Then execute the command below to

                         // set a dde command to the first instance of Visual SlickEdit.

   _ddecommand("Visual SlickEdit", "dde -mdi  -refresh edit c:\\junk");

   // If you use single instead of double quotes above you don't need

                         // the two backslashes.  Now bring the Visual SlickEdit window to the

                         // front to show the user.

   _set_foreground_window("Visual SlickEdit");

   // Get help on MessageBox from Microsoft VC++

   _ddecommand("MSIN","KeywordLookup(`MessageBox')","vcbks40.mvb");


dderefresh

_command void dderefresh()

Remarks	Executes the refresh function to update the editor screen after multiple DDE commands have been sent to the editor from another application.


_dderequest

int _dderequest(_str reserved, _str server_name, _str item, _str topic, int milli_timeout=15000)

Remarks	Supported under Windows, Windows 95/98,and Windows NT only.  Sends a DDE request to the server specified.  Results are inserted into current buffer.  Specify "" for reserved argument.

Example

   // Create a temporary buffer and view to hold results

   // of _dderequest

   orig_view_id=_create_temp_view(temp_view_id);

   // Send DDE request to Microsoft Internet Explorer to open or reopen

   // the HTML file specified.

   filename=absolute("toc.html");

   item='"file:'filename'",,0xFFFFFFFF,0x3,,,';

   status=_dderequest("","iExplore",item,"WWW_OpenURL");

   if (status) {

        messageNwait("Internet Explorer is probably not running");

   }

   // Could use get_line here to look at results in this buffer.

   _delete_temp_view(temp_view_id);

   activate_view(orig_view_id);


_deblink_selected

void _deblink_selected()

Applies To	Form

Remarks	Temporarily blinks the selection handles on all controls selected on the form including the form.  This function is used to help indicate to the user that a dialog editor operation completed.  This function should only be called to operate on forms that are being edited. (p_edit property non-zero).


dec2hex

long dec2hex(long number [,int base])

Return	Returns number converted to base 16 or base specified.  base must be one of the values 2, 8, or 16.  If number is invalid, '' is returned.  Binary numbers are prefixed with the string "0b".  Hex numbers are prefixed with "x".  Octal numbers are prefixed with the digit '0'.


_decreate_mode

void _decreate_mode([int mode ])

Remarks	Gets and optionally sets the create mode for all edited forms.  When in create mode, the cursor appears differently to the user to indicate that a new control can be created on the dialog box.


_default_color

_str _default_color(int ColorIndex, int fg_color=-1,int bg_color=-1, int font_flags=-1)

Remarks	Sets the screen element corresponding to ColorIndex to the foreground and background colors given. The fg_color and bg_color parameters specify an RGB color.  Use the _rgb function to build these colors.   ColorIndex is one of the following constants defined in "slick.sh":

CFG_CLINE

CFG_CURSOR

CFG_SELECTION

CFG_SELECTED_CLINE

CFG_MESSAGE

CFG_STATUS

CFG_WINDOW_TEXT

font_flags is one of the following font flags:

F_BOLD

F_ITALIC

F_STRIKE_THRU

F_UNDERLINE

Return	Returns the current foreground, background, and font flags setting for the field specified each separated with a space.


_default_font

_str _default_font(int field_number, _str font="" )

Remarks	Gets and optionally sets an editor default font.   field_number is one of the following constants defined in "slick.sh":

CFG_CMDLINE

CFG_MESSAGE

CFG_STATUS

CFG_WINDOW_TEXT

font is a string in the format: font_name, font_size, font_flags

font_size is a font point size.

font_flags is a combination of the following flags defined in "slick.sh":

F_BOLD

F_ITALIC

F_STRIKE_THRU

F_UNDERLINE

Example

// Set the default command line.

font="Courier,10,"(F_BOLD|F_ITALIC)

_default_font(CFG_CMDLINE, font);

Return	Returns the current font string value in the same format as the font argument.


_default_option

_str _default_option(_str option ,_str new_value=null )

Remarks	Gets and optionally sets an editor default option.

option may be one of the following letters:

'A'	boolean. Alt  menu.  When true, won't accidentally get placed on menu bar when press Alt key not followed by another key.

'C'	boolean.  Display MDI child cursor position when do not have focus.  Default is on.

'E'	boolean.  Set Slick-C error position on weak interpreter error.  Effects find_error command.

'F'	boolean.  Maximize first MDI child.  Default is off.

'H'	boolean.  Display horizontal scroll bar on edit window.  Default is on.

'I'	boolean.  When on, a carriage return not followed by a new line in the concurrent process buffer erases current line.  Default is on.

'K'	boolean.  Cursor blink.  Default is on.

'L'	int.  Window left margin in twips for edit window and editor control.  Ignored when there are selective display bitmaps or any other line prefix bitmaps.  Default is 100.

'N'	_str.  Past EOF character.  Determines the character displayed on lines past the end of the file.  Useful for VI emulation.

'P'	boolean.  Hide mouse when type character.  Default is off.

'Q'	_str.  Determines the characters display when special characters are display like tabs, new lines, spaces, etc.  This strings must be 6 characters in length.  The special characters in order are EOLCH1, EOLCH2, TAB(9), SPACE(32), VIRTUAL TAB SPACE, and EOF(26).

'R'	Column to display vertical line in edit window.  0 specifies no vertical line.  Defaults to 0.

'S'	int.  Default search flags.

'T' 	boolean.  Display top of file line for edit window and editor control.  Defaults to on.

'U'	boolean. Draw box focus rect around current line for edit window and editor control.  Defaults to off.

'V'	boolean.  Display vertical scroll bar on edit window.  Defaults to on.

'W'	int.  Maximum length of filename placed in menu in bytes.  Effects X windows only.  Defaults to 40.

 'Z'	boolean.  Protect read only mode.  When on, the editor will not allow read only files to be modified.  Saving a read only file always displays the Save As dialog box.  Defaults to on.

VSOPTION_WARNING_ARRAY_SIZE

int.  A message box is displayed when a macro creates an array larger than this value to optional let the use terminate the macro.

VSOPTION_WARNING_STRING_LENGTH

int.  A message box is displayed when a macro creates a string larger than this value to optional let the use terminate the macro.

Return	Returns the (possibly newly set) current value for corresponding option.


_default_state_filename

_str _default_state_filename()

Return	Returns the default state file name that should be used if the user is prompted to save the configuration or if the configuration is automatically saved.


del

_command int del( _str cmdline )

Remarks	Passes text to the operating system del (UNIX: rm) command.  See operating system manual for syntax of arguments.  Use the delete_file built-in for reliable and portable error codes.

In ISPF emulation, this command is not called when invoked from the command line.  Instead ispf_delete is called.  Use dos_del to explicitly invoke the del command.


delay

void delay(int secondsX100, _str option="")

Remarks	Waits secondsX100 is in hundredths of a second.  If 'K' is specified for option, this function returns when a key is pressed.


_deleteActive

void _deleteActive()

Applies To	SSTab

Remarks	Deletes the active tab.


delete_all

_command void [wid_expression.]delete_all()

"Edit", "Delete...", "All"

Applies To	Edit Window, Editor Control

Remarks	Deletes contents of current buffer


delete_blank_lines

command void [wid_expression.]delete_blank_lines()

Applies To	Edit Window, Editor Control

Remarks	Used in EMACS emulation.

Without an argument this command deletes all but one blank line around or before the current line.  If there is only one blank line it is deleted.

With an argument this command changes the number of blank lines around or before the current line to the number specified.


delete_bookmark

void delete_bookmark(_str bookmark_name)

Remarks	Deletes the bookmark specified.  bookmark_name is an identifier returned by one of the functions push_bookmark or set_bookmark.  If bookmark_name is not found, this function does nothing.


_delete_buffer

void [wid_expression.]_delete_buffer()

Applies To	Edit Window

Remarks	Deletes the active buffer from the buffer ring even if the buffer is modified.  The previous buffer's non-active view information (cursor position information) is copied into the active view making the previous buffer active.

See Also	_next_buffer, _prev_buffer


_delete_char

void [wid_expression.]_delete_char()

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Remarks	Deletes character under text cursor.


delete_char

_command void [wid_expression.]delete_char()

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Remarks	Deletes the character at the cursor.  For an edit window, or editor control, if word wrap is on, and no more characters exist on the current line, the next line is joined to the current line.


_delete_edit_windows

void _delete_edit_windows()

Applies To	Edit Window

Remarks	Deletes all MDI edit windows except hidden windows.


delete_end_line

_command void [wid_expression.]delete_end_line()

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Remarks	Deletes text from cursor to end of line.

See Also	cut_end_line


delete_file

int delete_file( _str filename )

Remarks	Deletes the filename specified.

Return	Returns 0 if successful.  Common return codes are ACCESS_DENIED_RC, ERROR_OPENING_FILE_RC, FILE_NOT_FOUND_RC, DRIVE_NOT_READY_RC, and PATH_NOT_FOUND_RC.


delete_line

_command void [wid_expression.]delete_line()

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Remarks	Deletes current line.

See Also	cut_line


_delete_line

int [wid_expression.]_delete_line()

Applies To	Edit Window, Editor Control

Remarks	Deletes current line of the current buffer.  If the buffer only has one line and delete_line is executed, the cursor is moved to the top border of the window.  This imaginary line is called line 0.

Return	Returns BOTTOM_OF_FILE_RC if last line is deleted.  Otherwise, 0 is returned.

See Also	get_line, insert_line, replace_line


_delete_macro

int _delete_macro( name )

Remarks	Deletes macro source code for macro command with name given.  This function is typically used to deleted a recorded macro.  However, it may be used to delete the source code for any macro command.  Currently comments that appear before the command are not deleted and trailing blanks after the function are not deleted.  This is likely to be changed in the future.

Return	Returns 0 if successful.


delete_name

void delete_name( int index )

Remarks	Removes name entry corresponding to name table index.  If index is not a valid index, the interpreter is halted.  The internal name types for procedure, variable, and module, may not be deleted.

See Also	find_index, name_match, name_name, name_type, name_info, call_index, insert_name, set_name_info, replace_name


delete_prev_word

_command void [wid_expression.]delete_prev_word()

See Also	Edit Window, Editor Control, Text Box, Combo Box

Remarks	Deletes from the cursor to the beginning of the previous word.  To change the word characters for a specific extension, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").

See Also	cut_prev_word


delete_selection

_command void delete_selection()

(when selection is active) BACKSPACE

Remarks	Deletes the selection.  No clipboard is created.  This function performs a "binary" delete when in hex mode (p_hex_mode==true).  A binary delete allows bisecting of end of line pairs like CR,LF.

Return	On error, displays message.  Possible message is "Text not selected".

See Also	cut


_delete_selection

int _delete_selection( _str mark_id="" )

Remarks	Deletes the marked text specified.  No clipboard is created.  mark_id is a handle to a selection returned by one of the built-ins _alloc_selection or _duplicate_selection.  A mark_id of '' or no mark_id parameter identifies the active selection.  This function performs a "binary" delete when in hex mode (p_hex_mode==true).  A binary delete allows bisecting of end of line pairs like CR,LF.

Return	Returns 0 if successful.  Otherwise TEXT_NOT_SELECTED_RC is returned. On error, message is displayed.


delete_space

_command void [wid_expression.]delete_space()

Applies To	Edit Window, Editor Control

Remarks	Used in EMACS emulation.  Deletes all space and tab characters to left and to right of cursor on the current line.


_delete_temp_view

void _delete_temp_view([int temp_view_id [,boolean dodelete_buffer]] )

Remarks	Deletes view and buffer corresponding to temp_view_id.  temp_view_id should have been returned by the _create_temp_view function.  If temp_view_id is not given, current view and buffer are deleted.  If dodelete_buffer is false or not specified, the buffer attached to the view is not deleted.


_delete_text

void [wid_expression.]_delete_text(int Nofbytes, _str option="" )

Applies To	Edit Window, Editor Control

Remarks	Deletes number of bytes of text starting from cursor location.  Specify -1 to delete to end of line.  Specify -2 to delete to end of buffer.  option may be "C" to delete columns of text.  If the "C" option is given, Nofbytes must not be negative and is the number of columns to delete from the current line.


delete_tile

_command int delete_tile()

Alt+F5

Applies To	Edit Window

Remarks	Allows you to delete a window tile by pointing to the edge of the window you wish to delete with the cursor keys.

Return	Returns 0 if successful.  Common return codes are 1 (there is no window where the user pointed), and COMMAND_CANCELLED_RC. On error, message is displayed.


_delete_tile_id

void _delete_tile_id(int tile_id)

Applies To	Edit Window

Remarks	Deletes the current window if tile_id is equal to the current window's tile id (p_tile_id).


_delete_unused

void _delete_unused()

Remarks	Deletes unused items in the names table.  Global function (including command) names are deleted if there are no references to the function.  Global variables are deleted if there is no reference to the variable.  Using the index returned by find_index to call a function or set a variable DOES NOT count as a reference.  Pictures are deleted if there are no references to the picture and the picture name does not start with an underscore.


_delete_window

void [wid_expression.]_delete_window( _str modal_retvalue="" )

Applies To	All objects except MDI Window, Application Window, Command Line

Remarks	Deletes the current window and all child controls on the window.  This function is typically used to close a dialog box and optionally return a value to _modal_wait.  When canceling a dialog box the modal_retvalue SHOULD NOT BE SPECIFIED unless it is ''.  This convention is used so that editing a dialog box which causes the dialog box to be deleted, is the same as canceling the dialog box.  Only modal dialog boxes can return a value.  You CAN NOT RELY on the focus returning to a particular window.  This function leaves focus selection up to the operating system.  If the window being deleted is a form and (p_init_style & (IS_REINIT|IS_HIDEONDEL) is true when _delete_window is called, the form is made invisible and no windows are actually deleted.  Under UNIX, the show command options -reinit and -hideondel turn on these p_init_style flags.  The _load_template function is used to create an instance of a dialog box.  The function _modal_wait, may be called with the instance handle (window id) returned by _load_template, to wait for the dialog box to be closed by the _delete_window function.  The return value of _modal_wait is the modal_retvalue given to _delete_window function.

Example

#include "slick.sh"

_command test()

{

    index=find_index("form1", oi2type(OI_FORM));

    // Normally the show command is called instead of the more low level

    // function _load_template

    wid=_load_template(index,_mdi);

    result=_modal_wait(wid);

    message('result='result);

}

defeventtab form1

ok.lbutton_up()

{

     p_active_form._delete_window("This is a test");

}

cancel.lbutton_up()

{

     // Return '' to _modal_wait

     p_active_form._delete_window();

}


delete_word

_command void [wid_expression.]delete_word()

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Remarks	Deletes from the cursor to the end of the current word.  To change the word characters for a specific extension, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").

See Also	cut_word


_deleteel

void ArrayOrHashTable._deleteel(typeless index, int Nofitems=1 )

Remarks	Deletes element from hash table or array variable.  Nofitems specifies the number of elements to delete and is ignored for hash table variables.  Nofitems defaults to 1.  Yes we need a _shiftel and possibly _insertel function which operates on an array.

Example

t[0]=1;

t[1]=2;

t[2]=3;

t._deleteel(1);   // Delete t[1].  t[1] will not contain 3

t:["a"]=1;

t._deleteel("a");  // Delete "a" element

See Also	_el, _nextel, _makeempty, _isempty, _varformat, _indexin, _sort


deselect

_command void deselect()

Ctrl+U or "Edit", "Select...", "Deselect"

Applies To	Edit Window, Editor Control

Remarks	Clears the selection.


_deselect

void _deselect( _str mark_id)

Remarks	Clears selection specified.  mark_id is a handle to a selection returned by one of the built-ins _alloc_selection or _duplicate_selection.  A mark_id of '' or no mark_id parameter identifies the active selection.


deselect_all

_command void deselect_all()

"File Manger...", "Select...", "Deselect All"

Remarks	Removes the character '>' from the beginning of each line of the current buffer.  Typically used in fileman mode.  Use the fileman command ("File", "File Manager...", "New List...") to start fileman mode.


deselect_mark

_command void deselect_mark()

"File Manager...", "Select...", "Deselect Highlight"

Remarks	Removes the character '>' from the beginning of each line of the marked text.  Typically used in fileman mode.  Use the fileman command ("File", "File Manager...", "New List...") to start fileman mode.


dfprintf

void dfprintf(char *s, ...)

Note	This function is a DLL API function.  It does not have a vs prefix or have the VSAPI attribute because it is not a portable function.  It is compiler dependant.  We expect this function to work with most (maybe all) UNIX C compilers.  However, under Windows, this function will likely only work for you if you are using Microsoft Visual C++.  This function is NOT callable from Slick-C.

Remarks	This functions parameters are identical to the C run-time printf function.  Appends a debug message to the file "c:\junk" (UNIX: /tmp/junk.slk).  This function is used for debugging a DLL that is crashing.  For this reason, the output file is openned and closed on each call to ensure that the debug information will be there even if the application crashes.

See Also	xprintf, mprintf, dfprintf


diff

_command void diff( [_str cmdline] )

Ctrl+= or "Tools", "File Difference..."

cmdline is a  string in the format: [options] file1 file2

options specify one or more of the following:

-i	Interleaved output

-r1	Make file1 read only

-r2	Make file2 read only

-q	Quiet option:only shuts off the "Files  match" message

-modal	Run diff modally

-B1	file1 is a buffer name or document name.

-B2	file2 is a buffer name or document name.

Remarks	If file1 and file2 are given. a differences is performed on these files and the output is displayed side by side or interleaved depending on your Diff Setup.

If cmdline is not given or is "", the Diff Setup dialog box is displayed.

Visual SlickEdit file differencing is used to help you merge changes from one version of a file to another or help you determine what changes have been made to a file.  The output can be viewed side by side or interleaved.  In either case the output is color coded to make it easier for you to see the changes.  You can difference edit binary or record files.  The side by side output is much more powerful because you can transfer changes from one file to the other just by clicking on a button.  You can even edit the files without exiting the Diff dialog box.  Undo, syntax expansion/indenting , SmartPaste, and much of your emulation key mappings work when editing in the Diff dialog box.

See Also	merge


dir

_command int dir( [_str command_line] )

Remarks	Creates a buffer and inserts a list of the files specified with columns for size, date, time, attributes (UNIX: permissions), and name.  The mode is changed to fileman mode.  When in fileman mode, there are some additions and changes to the key bindings.  See help on fileman_mode.

command_line has the following syntax:

      {[ [- | +] option_letters] [ [@]filespec ]}

option_letters may be 'H','S','D','P','T' with the following meaning:

H     	Include hidden files.  Default is off.  Ignored by UNIX version.

This option is always turned on under Windows if the "Show all files"explorer option is set.

S     	Include system files.  Default is off.  Ignored by UNIX version.

This option is always turned on under Windows if the "Show all files"explorer option is set.

D     	Include directory files.  Defaults to on.

P     	Append path.  Default is on.

T     	Tree file list.  Default is off.

filespec may contain operating system wild cards such as '*' and '?'.  If filespec is not specified, the current directory is used.  '@' sign prefix to filespec indicates that filespec is a file or buffer which contains a list of file names to be used as arguments to this command.

Example

dir	List file and directory entries of the current directory.

dir @backup.lst

List file or directory entries specified by each line of the file "backup.lst".

dir c:\	List file and directory entries in the root directory of drive C.

dir +HS c:\	List file and directory entries in the root directory of drive C including hidden and system files.

Return	Returns 0 if successful.  Common return values are TOO_MANY_FILES_RC, FILE_NOT_FOUND_RC, PATH_NOT_FOUND_RC, and TOO_MANY_SELECTIONS_RC.  On error, message is displayed.

See Also	fileman


display_hscroll

_command void display_hscroll( [ 'Y'| 'N'] )

Remarks	Determines whether horizontal scroll bars are displayed on edit windows.


display_top

_command void display_top( [ 'Y'| 'N'] )

Remarks	Determines whether a top of line indicator is displayed in edit windows.


display_vscroll

_command void display_vscroll( [ 'Y'| 'N'] )

Remarks	Determines whether vertical scroll bars are displayed on edit windows.


_dlge_form

_form _dlge_form

Syntax	void show('_dlge_form')

Remarks	Displays dialog editor Properties dialog box.


_dll_match

_str _dll_match(_str name, int find_first)

Return	Returns next DLL module name in the names table which is a prefix match of name.  find_first must be non-zero to initialize matching.  Returns "" when no more matches are found.


_dllexport

int _dllexport(_str FuncProto ,_str NameInfo="" ,int arg2=0)

Remarks	Registers a DLL command or function that can be called from the Slick-C macro.  This function is identical to the vsDLLExport function except that you always need to specify the dll module the function is contained in.   See vsDLLExport for information on parameters.


_dllload

int _dllload(_str DllFilename ,_str option='L' )

Remarks	This function is not yet available in the UNIX version.  Loads or unloads a DLL which uses our DLL Interface functions.  The entry point function of the DLL registers DLL functions that can be bound to keys and called from Slick-C macros.  See simple.c for an example of a DLL that can be loaded.  Specify the 'L' option to load a DLL and the 'U' option to unload a DLL.

Return	Returns 0 if successful.

See Also	dunload, _dllload


dload

_command int dload( [_str DllFilename] )

Remarks	This function is not yet available in the UNIX version.  Loads a DLL which uses our DLL Interface functions.  The entry point function of the DLL registers DLL functions that can be bound to keys and called from Slick-C macros.  If DllFilename is not given, you a prompted for one.  See simple.c for an example of a DLL that can be loaded.

Return	Returns 0 if successful.

See Also	dunload, _dllload


_dlpath

_str [wid_expression.]_dlpath( [_str new_path])

Applies To	Directory List Box

Remarks	Gets and optionally sets the directory displayed by a directory list box control.  In addition, this function sends an on_change event to the current control with CHANGE_PATH as the first argument if the path was changed.

Example

#include 'slick.sh'

defeventtab form1

command1.lbutton_up()

{

    // list1 is the name of the directory list box.

    // Two backslashes are not required unless you use double quotes

    result=list1._dlpath("c:\\vslick");

    messageNwait('new path is 'result);

}


_dmless

void [wid_expression.]_dmless( ['H'] )

Applies To	Command Button

Remarks	Decreases the size of an expandable dialog box.  An expandable dialog is a dialog box which changes its size to show more or less controls when a command button is pressed.  This function is usually called during an on_create event to display less of an expandable dialog box.  To create an expandable dialog box, create a dialog box in the dialog editor that is the full size of the dialog box when expanded.  Then add a command button at the lower right hand corner of the dialog box when it is NOT expanded.  The p_caption of the button must end with ">>" characters.  By default, the bottom edge of the dialog box is moved up so that the controls below the current button are not seen.  Specify the 'H' option if you want the right edge of the dialog moved to the left so that the controls to the right of the current button are not seen.  The "<<" characters in the button caption are changed to ">>" characters.

Example

expandbutton.on_create()

{

    // Don't display the controls below this button.

     _dmless();

}

expandbutton.lbutton_up()

{

     // Toggle where the controls below this button are displayed.

     _dmmoreless();

}

See Also	_dmmore, _dmmoreless


_dmmore

void [wid_expression.]_dmmore( ['H'] )

Applies To	Command Button

Remarks	Increases the size of an expandable dialog box.  An expandable dialog is a dialog box which changes its size to show more or less controls when a command button is pressed.  To create an expandable dialog box, create a dialog box in the dialog editor that is the full size of the dialog box when expanded.  Then add a command button at the lower right hand corner of the dialog box when it is NOT expanded.  The p_caption of the button must end with ">>" characters.  By default, the bottom edge of the dialog box is moved down so that the controls below the current button are not seen.  Specify the 'H' option if you want the right edge of the dialog moved to the right so that the controls to the right of the current button are not seen.  The ">>" characters in the button caption are changed to "<<" characters.

Example

expandbutton.on_create()

{

    // Don't display the controls below this button.

     _dmless();

}

expandbutton.lbutton_up()

{

     // Toggle where the controls below this button are displayed.

     old_caption=p_caption;

     _dmmore();	// This function changes the >> to << in the caption

     p_caption=old_caption;

     p_enabled=0;	// Disable this button so it can't be pressed.

}

See Also	_dmmore, _dmmoreless


_dmmoreless

void [wid_expression.]_dmmoreless( ['H'] )

Applies To	Command Button

Remarks	Toggles the size of an expandable dialog box.  An expandable dialog is a dialog box which changes its size to show more or less controls when a command button is pressed.  To create an expandable dialog box, create a dialog box in the dialog editor that is the full size of the dialog box when expanded.  Then add a command button at the lower right hand corner of the dialog box when it is NOT expanded.  The p_caption of the button must end with ">>" characters.  By default, the bottom edge of the dialog box is moved down or up to display or not display the controls below the current button.  Specify the 'H' option if you want the right edge of the dialog moved right or left to display or not display the controls to the right of the current button.  The ">>" characters in the button caption the are changed from ">>" to "<<" or from "<<" to >>".  This function assumes that the dialog box needs to be expanded if the caption of the button contains ">>".  Otherwise the dialog box sized is reduced.

Example

expandbutton.on_create()

{

    // Don't display the controls below this button.

     _dmless();

}

expandbutton.lbutton_up()

{

     // Toggle where the controls below this button are displayed.

     _dmmoreless();

}

See Also	_dmmore, _dmless


dos

_command int dos( [_str command] )

"Tools", "OS Shell"

command is a string in the format: [-e | -w | -s | -t] ProgramName Args

Remarks	Executes the external program command specified.  No search for Visual SlickEdit batch programs is performed.  If no command is specified, the shell specified by the COMSPEC (UNIX: SHELL) environment variable is executed with no parameters.

Specify the -e parameter if you want the standard output of the command to be processed as error messages.  The DOS command is intended to be called from the command line.  Use the shell built-in to achieve the same function from within a macro.

The -w option is used when you want to run a text mode program and wait for a key press in order to view the output before the DOS (UNIX: xterm) window is closed.  Under UNIX, this is equivalent to typing xterm -T "pgm" -e slkwait $SHELL -c "command".

The -s option specifies to run the command synchronous.  When the -s option is not specified, the program is run asynchronously.

The -t option specifies to run the command specified in an xterm window.   This is equivalent to typing xterm -T "pgm" -e $SHELL -c "command" at a UNIX prompt.  Where pgm is the first word or quoted string of command.  You can set a VSLICKXTERM environment variable to run a different xterm program.  This option is ignored under non-UNIX platforms.

Command line example:

     dos -w dir/w	- Execute the DOS dir command and wait for key press.

     dos -t man cc	- Run the UNIX man program and wait for a key press

Return	Returns positive return code of program executed which may include 0 (Windows 3.x version returns 0 for all programs except DOS programs).  Common negative return codes may be FILE_NOT_FOUND_RC, PATH_NOT_FOUND_RC, and INSUFFICIENT_MEMORY_RC.  Almost all negative return codes occur before the program is executed.

non-UNIX platforms: When a pipe symbol, '|', or '<' is used, Visual SlickEdit executes the default shell to handle the redirection.  The default shell may throw away the return code of the program executed.

UNIX platforms:  The default shell is always used to parse the command string specified.

IMPORTANT: The Windows 3.x version of Visual SlickEdit is only able to retrieve return codes of DOS programs and not Windows programs.  When fixes/enhancements are made to Windows/WIN32s, we will correct this limitation.

See Also	shell


down

int [wid_expression.]down( [int number] )

Applies To	Edit Window, Editor Control

Remarks	Moves cursor number of lines down.  If number is not given, a value of '1' is used.  If line is not in view, line is center scrolled or smooth scrolled into view.

Example

       status=down();

       if (status==BOTTOM_OF_FILE_RC ) {

           message(get_message(status));

       }

Return	Returns 0 if successful. Otherwise BOTTOM_OF_FILE_RC is returned.

See Also	up


draw

draw [1|2|3|4|B|Any character]

Applies To	Edit Window

Remarks	Batch program which draws lines as you press the cursor keys.  To call a batch program from a Slick-C macro, quote the command line.  For example, the statement "draw 1" including quotes.  From the command line no quotes are necessary.

Argument description

1	Single line top/bottom sides and left/right sides.

2	Double line top/bottom sides and left/right sides.

3	Single line sides and double line top/bottom sides.

4	Double line sides and single line top/bottom sides.

B	Draw with blank character.  Used to erase drawing.

Any character	Any character may be used as the draw character.


_draw_rect

void [wid_expression.]_draw_rect(int x1, int y1, int x2, int y2, int color=0, _str options="N")

Applies To	All objects except Image

Remarks	Draws a rectangle specified by the upper left coordinate (x1,y1) and lower right coordinate (x2,y2).

options may be one or more of the following:

'E'	Clip to form and allow drawing on border of form.  You can not draw on the border of a UNIX form.

'N'	Normal clipping.  Clip within window.

'D'	Draw drag style rectangle.

The following properties of the current object effect the rectangle:

p_scale_mode	Indicate the scale of x1,y1, x2, and y2.  May be SM_PIXEL or SM_TWIP.

p_draw_style	May be one of the following constants defined in "slick.sh":

      PSDS_SOLID	Draw solid line.

      PSDS_DASH	Draw dashed line.  Solid line is drawn if p_draw_width>1.

      PSDS_DOT	Draw dotted line.  Solid line is drawn if p_draw_width>1.

      PSDS_INSIDE_SOLID

Draw solid line inside rectangle specified.  Use this to resize a window frame.  The UNIX version only supports this feature when drawing a rectangle in which the points are given in the left, top, right, bottom order.

p_draw_width	Width in pixels of rectangle border.

p_draw_mode	May be one of the following constants defined in "slick.sh"

        PSDM_XORPEN	XOR rectangle border with screen pixels and color.

        PSDM_COPYPEN	Write rectangle border

p_forecolor	RGB Color of rectangle border.  Ignored if color parameter specified.  Use the _rgb function to create an RGB color.

p_fill_color                Not implemented.

p_fill_style                 Not implemented.  Must be PSFS_TRANSPARENT.

Example

#include 'slick.sh'

defmain()

{

    p_fill_style=PSFS_TRANSPARENT;

    p_draw_width=1;p_draw_style=PSDS_DOT;

    p_draw_mode= PSDM_COPYPEN;

    color=_rgb(0x80,0x80,0x80);  /* Gray */

    x1=10;y1=10;x2=200;y2=100;

    _draw_rect(x1,y1,x2,y2,color,'e');

}

Example

#include 'slick.sh'

defeventtab form1

command1.lbutton_up()

{

     // Place the mouse cursor at the lower right corner of the button.

     x=p_x+p_width;y=p_y+p_height;

     _lxy2dxy(p_xyscale_mode,x,y);

     _map_xy(p_xyparent,0,x,y,SM_PIXEL);

     mou_set_xy(x,y);

     size_me();

}

static size_me()

{

     selected_wid=orig_wid=p_window_id;

     p_window_id=selected_wid.p_parent;

     _save_draw_setup(draw_setup);

     p_fill_style=PSFS_TRANSPARENT;

     p_draw_width=1;

     p_draw_style=PSDS_DASH;

     p_draw_mode=PSDM_XORPEN

     color=_rgb(0x80,0x80,0x80);  /* Gray */

     mou_mode(1);

     mou_capture();

     morig_x=mou_last_x('M');morig_y=mou_last_y('M');

     morig_x=selected_wid.p_x+selected_wid.p_width;

     morig_y=selected_wid.p_y+selected_wid.p_height;

     rectangle_drawn=0;

     done=0;

     selected_wid._get_window(orig_x,orig_y,orig_width,orig_height);

     x1=orig_x;y1=orig_y;x2=x1+orig_width;y2=y1+orig_height;

     orig_x1=x1;orig_y1=y1;orig_x2=x2;orig_y2=y2;

     smallest_width=_HANDLE_WIDTH*2;

     smallest_height=_HANDLE_HEIGHT*2;

     _lxy2lxy(SM_TWIP,p_scale_mode,smallest_width,smallest_height);

     for (;;) {

         event=get_event();

         switch (event) {

         case MOUSE_MOVE:

             new_x1=x1;new_y1=y1;new_x2=x2;new_y2=y2;

             // Size the right corner of the window

             new_x2=orig_x2+mou_last_x('M')-morig_x;

             new_y2=orig_y2+mou_last_y('M')-morig_y;

             if (new_x2-new_x1<smallest_width) {

                new_x1=x1;new_x2=x2;

             }

             if (new_y2-new_y1<smallest_height) {

               new_y1=y1;new_y2=y2;

            }

             if (rectangle_drawn) {

                if (x1==new_x1 && y1==new_y1 && x2==new_x2 && y2==new_y2){

                    break;

                }

                /* Erase the rectangle. */

                _draw_rect(x1,y1,x2,y2,color,'e');

             }

              rectangle_drawn=1;

              x1=new_x1;y1=new_y1;x2=new_x2;y2=new_y2;

              _draw_rect(x1,y1,x2,y2,color,'e');

              break;

          case LBUTTON_UP:

          case ESC:

               done=1

          }

          if( done) break;

     }

     mou_mode(0);

     mou_release();

     if (rectangle_drawn) {

        /* Erase the rectangle. */

        _draw_rect(x1,y1,x2,y2,color,'e');

        if (event!=ESC) {

           selected_wid._move_window(x1,y1,x2-x1,y2-y1)

        }

     }

     _restore_draw_setup(draw_setup);

     selected_wid._get_window(new_x,new_y,new_width,new_height);

     p_window_id=orig_wid;

     return(0);

}


_drive_type

int _drive_type( _str drive )

Remarks	(Supported under Windows, Windows 95/98, and Windows NT only) Returns the drive type of the drive specified.  drive is a drive letter followed by a colon character.  The drive type may be one of the following constants defined in "slick.sh":

DRIVE_NOROOTDIR	Indicates that the drive is not valid.

DRIVE_REMOVABLE	Drive is a floppy drive.

DRIVE_FIXED	Drive is a non-removable drive.

DRIVE_REMOTE	Drive is a network drive.

DRIVE_CDROM	Drive is a CD-ROM

DRIVE_RAMDISK	Drive is a RAM (in memory) disk.

Example

defmain()

{

     message("drive type of A: is "_drive_type("A:"));

}


dunload

_command int dunload( [_str DllFilename] )

Applies To	Edit Window

Remarks	This function is not yet available in the UNIX version.  Unloads a DLL.  All functions registered to this DLL with the vsDllExport function are deleted.  Do not specify a path in DllFilename.  If DllFilename is not given, you a prompted for one.

Return	Returns 0 if successful.

See Also	dload, _dllload


_duplicate_selection

_str _duplicate_selection(_str mark_id=null)

Return	If successful, a handle to a newly created selection identical to the selection specified.  Otherwise a negative error code is returned.  Possible error codes are INVALID_SELECTION_HANDLE_RC or TOO_MANY_SELECTIONS_RC.  mark_id is a handle to a selection returned by one of the built-ins _alloc_selection or _duplicate_selection.

IMPORTANT:  If an empty string ('') is specified for the mark_id parameter, a handle to the active selection is returned.  This is different than other selection functions which automatically assume the active selection and perform the same operation.

On error, message is displayed.

Example

_deselect();_select_line();

mark_id=_duplicate_selection();	// Duplicate active selection

mark_showing=_duplicate_selection('');	// Save handle of active selection

_copy_to_cursor();

_show_selection(mark_id);	// Keep selection on source text.

_free_selection(mark_showing);	// Free selection on destination text.


duplicate_window

void [wid_expression.]duplicate_window()

Applies To	Edit Window

Remarks	Creates a new window viewing the current buffer.  The window size of the original window is not duplicated.


_dvldrive

_str [wid_expression.]_dvldrive( [_str drive] )

Applies To	Drive List

Return	This function is not available under UNIX.  Returns and optionally sets the current drive being displayed in a drive list combo box.  Drive may be a drive letter followed by a colon or a UNC root name (Network \\server\sharename).  This function does not cause an on_change event to occur.


_dx2lx

int _dx2lx( int scale_mode, int x )

Return	Returns the x position converted from pixels to the scale mode specified.  scale_mode may be one of the constants SM_TWIP or SM_PIXEL  defined in "slick.sh".

See Also	_lx2dx, _lx2lx, _lxy2lxy, _dxy2lxy, _lxy2dxy, _ly2dy, _ly2ly, _dy2ly, _map_xy


_dxy2lxy

int _dxy2lxy( int scale_mode, int &x, int &y)

Remarks	Converts the x and y positions given from pixels to the scale mode specified.  scale_mode may be one of the constants SM_TWIP or SM_PIXEL  defined in "slick.sh".

See Also	_lx2dx, _lx2lx, _dx2lx, _lxy2lxy, _lxy2dxy, _ly2dy, _ly2ly, _dy2ly, _map_xy


_dy2ly

int _dy2ly( scale_mode, y )

Return	Returns the y position converted from pixels to the scale mode specified.  scale_mode may be one of the constants SM_TWIP or SM_PIXEL  defined in "slick.sh".

See Also	_lx2dx, _lx2lx, _dx2lx, _lxy2lxy, _dxy2lxy, _lxy2dxy, _ly2dy, _ly2ly, _map_xy


e

_command int edit( _str cmdline )

Applies To	Edit Window

cmdline is a string in the format: options filespec options filespec ...

Remarks	Command line version of the gui_open command.  Edits the file(s) specified.  filespec may have wild card characters (* or ?  for DOS).  Default options for the EDIT command may by set with the load_options command.  The edit mode of each file loaded is set based on file extension.   To add or change default file extension setup information use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").

The useful edit options are listed below.  For a complete list of options, see load_files.  A few options are only useful in Visual SlickEdit macros.

+#command	Execute command on active buffer.  For example, "s test.c +#100" places the cursor on line 100 of test.c.

+ or -L[C|Z]	Turn on/off load entire file switch.  The optional C suffix count the number of lines in the file.  The Z suffix counts the number of lines in the file and truncates the file if an EOF character is found in the middle of the file.

+ or -LF	+LF turns off loading entire file and turns on fast line count.  This is the fastest way for Visual SlickEdit to count the number of lines in a file.  -LF turns off fast line counting.

+ or -LB	Turns on/off binary loading.  All edit/save options which performed translations are ignored.   For example, tab expansion or tab compression options are ignored.  This allows "safe" editing of binary files even when edit/save file translation are on.

+ or -LE	Turns on/off show EOF option.  When on, EOF characters at the end of DOS files are not stripped.  This option is not supported when the +LZ option is given.

+ or -LN	Turns on/off show new line characters option.  When on, new line characters are initially visible.

+ or -W	If the file or buffer is not already displayed in a window, insert a window for displaying the file or buffer.

+ or -S	Turn on/off unmodified block swapping to spill file.

+nnn	Load binary file(s) that follow in record width nnn.

+T [buf_name]	Start a default operating system format temp buffer with name buf_name.

+TU [buf_name]	Start a UNIX format temp buffer with name buf_name.

+TM [buf_name]	Start a MACINTOSH format temp buffer with name buf_name.

+TD [buf_name]	Start a DOS format temp buffer with name buf_name.

+Tnnn	Start a temp buffer where nnn is the decimal value of the character to be used as the line separator character.

+FU [buf_name]	Force Visual SlickEdit to interpret a file in UNIX format.

+FM [buf_name]	Force Visual SlickEdit to interpret a file in MAC format.

+FD [buf_name]	Force Visual SlickEdit to interpret a file in DOS format.

+Fnnn	Force Visual SlickEdit to use nnn as the decimal value of the line separator character.

+ or -E	Turn on/off expand tabs to spaces switch.  Default is off.  Only tab increments of 8 are supported.

+ or -D	Turn on/off memory buffer name search.  Disk file search.

+B buf_name	Look in memory only for buffer with name buf_name.

+N or -N	Network support switch.  When on, Visual SlickEdit will detect when another application has the same file open and automatically select "Read only" mode.  This option requires an extra file handle open to the original file.

The options above that only show a plus sign will also take a minus sign.  However their function will remain the same.

If you need to edit a file whose name contains space characters, place double quotes around the name.

Example

e +l test	Loads all of the file test and frees the file handle.  If test is already loaded, its buffer is activated.

e "this is.c"	Edit a file whose name contains a space character.

e +d test	Loads the file test from disk regardless if a copy already exists in memory.

e +w test	(One file per window option) Display file test in its own window.  If file test is already displayed in a window, the window is activated.

e +b test	Activates the buffer test if it exists.

e +t test	Starts a new buffer called test.

e +40 +d test	Loads the binary file test from disk in 40 character line width.  File may be edited and saved.

Return	Returns 0 if successful.  Common return codes are FILE_NOT_FOUND_RC (occurs when wild card specification matches no files), NEW_FILE_RC (empty buffer created with filename specified because file did not exist), PATH_NOT_FOUND_RC, TOO_MANY_FILES_RC, and TOO_MANY_SELECTIONS_RC.  On error, message is displayed.

See Also	gui_open, ispf_edit


_e_extform

_form _e_extform

Syntax	void show('_e_extform')

Remarks	Displays the Slick-C Options dialog box which is used for modifying the extension specific options for the Slick-C language.


e_match

_str e_match(_str name, int find_first)

Return	Returns next environment variable name which is a prefix match of name.  find_first must be non-zero to initialize matching.  Returns '' when no more matches are found.


e_proc_search

int [wid_expression.]e_proc_search(_str &proc_name, int find_first)

Applies To	Edit Window, Editor Control

Remarks	If proc_name is '', then this procedure searches for the first or next occurrence of a Slick-C language command or procedure definition.  Search always starts from cursor position.  The find_first parameter indicates whether this is the first or next call.  proc_name is set to the name of the function found.

If proc_name is not '', then a search for a Slick-C function definition with name proc_name is performed.  Searching begins at the cursor position.  find_first must be non-zero if proc_name is not ''.  The cursor is placed on the function definition, if one is found.

Return	Returns 0 if successful.  Otherwise a non-zero value is returned.


edit_file

int [wid_expression.]edit_file(_str filename)

Applies To	Edit Window, Editor Control

Remarks	Loads filename.  Filename may contain options allowed by load_files built-in.

Return	Returns 0 if successful.  Otherwise an error code is returned in which negative numbers are valid input codes to the get_message built-in.  On error, message is displayed.


_edit_form

_form _edit_form

Syntax	_str show('-modal _edit_form', title, initial_wildcards, file_type_list,

        ofn_flags, default_ext, initial_filename, initial_directory [,retrieve_name [,help_item]] )

Input

title	Title of dialog box.

initial_wildcards	Semicolon delimited wildcards (Ex.  "*.c;*.h").  The File list box will initially display files matching these wildcards.  This string should exist within parentheses in the file_type_list string.

file_type_list	List of comma delimited strings to be inserted into the List Files of Type combo box.  Each item must contain a parenthesized wildcard list.  For example, "All File (*.*), C Files (*.c;*.h)".

ofn_flags	May a combination of the following flag constants defined in "slick.sh":

      OFN_ALLOWMULTISELECT

 	Allow multiple file selection.  When set, caller must process a return value which may have space delimited filenames, some of which are double quoted.

      OFN_FILEMUSTEXIST

File(s) selected must exist.

      OFN_CHANGEDIR

Don't restore original directory on exit

      OFN_NOOVERWRITEPROMPT

Don't prompt user with overwrite existing dialog.

      OFN_SAVEAS	File list box does not select files and user is prompted whether to overwrite an existing file.

      OFN_DELAYFILELIST

Display dialog box before displaying file list.  Can speed up display of dialog box.

      OFN_READONLY

Show read only button.    See OFN_PREFIXFLAGS flag.

      OFN_KEEPOLDFILE

Show keep old name button.    See OFN_PREFIXFLAGS flag.

      OFN_PREFIXFLAGS

Prefix return value with -r if OFN_READONLY flag given and -n if OFN_KEEPOLDFILE flag given.

default_ext	Usually '' is specified for this parameter.  This extension is used if the file the user has selected does not have an extension.

initial_filename	Filename that initially appears in the File Name combo box.

initial_directory	Current directory is switched to this directory when the dialog box is displayed.

retrieve_name	Retrieve name used to keep track of the previously typed file names in the File Name combo box.  Typically this is the name of the command or function that invoked the dialog box.

help_item	Specifies help displayed when F1 is pressed or the help button is pressed.  If the help_item starts with a '?' character, the characters that follow are displayed in a message box.  The help string may also specify a unique keyword in the "vslick.hlp" (UNIX: "uvslick.hlp") help file.  The unique keywords for the help file are contained in the file "vslick.lst" (UNIX: "uvslick.lst").  In addition, you may specify a unique keyword for any windows help file by specifying a string in the format:  keyword:help_filename.

Remarks	Displays the Open dialog box used for opening edit window files.

Example

#include "slick.sh"

defmain()

{

      result=show("-modal _edit_form",

                            'Open",	// title

                             "*.c;*.h",	// Initial wildcards

                             "C Files (*.c;*.h),All Files (*.*)",	// File type list

                             OFN_READONLY|OFN_PREFIXFLAGS,

                             "",	// Default extension

                             "",	// Initial filename

                             "",	// Initial directory

                             "defmain"	//Retrieve name

                         );

       if (result=='') {

           return(COMMAND_CANCELLED_RC);

       }

       message('result='result);

}

Return	Returns '' if  the dialog box is cancelled.  Otherwise, the file names selected are returned separated with spaces.  If a file name contains spaces, it is placed in double quotes.  Only one file name is returned if the OFN_ALLOWMULTISELECT flag is not given.  If the OFN_PREFIXFLAGS flag is given, the return value is prefixed with -r if the OFN_READONLY flag is given and -n if the OFN_KEEPOLDFILE flag is given.

See Also	_edit_form


_edit_window

int [wid_expression.]_edit_window()

Applies To	All objects

Remark	If the current window is displaying a buffer, the current window id is returned.  Otherwise, the active MDI edit window id is returned.


edit_with

_command typeless edit_with( _str cmdline )

cmdline is a string in the format: filename command

Remarks	Loads the filename specified and executes the command specified.  If command modifies the file, a prompt appears asking whether to save the file.  The file is quit if it has been saved or is not modified.  This command is useful in fileman mode for executing the change command on the selected files.

Example

        for-select edit-with %f  c/string1/string2

        for-select edit-with %f  c/string1/string2/**    No prompting

Return	Returns 0 if command executes successfully.  If command returns a non-zero value, the edit_with function returns the commands return code which could be anything.


editor_name

_str editor_name(_str option='E')

Return	Return value depends on input.  option defaults to 'E' if not given or ''.

Input	Return Value

'E'	Invocation name of editor.  (argv[0])

'P'	Absolute editor executable path with trailing backslash.

'S'	Absolute state file name.

'R'	Absolute auto restore file name.

'V'	DDE server name.


_el

typeless &ArrayOrHashtable._el(typeless index)

Remarks	Returns a reference to an element in a hash table or array.

Example

t[0]=1;

t._el(0)=4;    //  Same as t[0]=4;

p= &t._el(0); // Get a pointer to t[0] element

*p=5;           // Same as t[0]=5;

messageNwait("t[0]="t._el(0));

See Also	_deleteel, _nextel, _makeempty, _isempty, _varformat, _indexin, _sort


emacs_paste

_command void [wid_expression.]emacs_paste()

Applies To	Edit Window, Editor Control

Remarks	Used in EMACS emulation.  Inserts the last clipboard created.

See Also	list_clipboards, paste


emacs_quit

_command void [wid_expression.]emacs_quit()

Applies To	Edit Window, Editor Control

Remarks	Used in EMACS emulation.  Prompts for the name of a buffer to delete.  If the current buffer is deleted, you are prompted for another buffer to switch to.

See Also	select_buffer, edit


emacs_scroll_down

_command void [wid_expression.]emacs_scroll_down()

Applies To	Edit Window, Editor Control

Remarks	Used in EMACS emulation.   Moves the lines of the current buffer one line down.  The cursor is moved one screen row down if the cursor is not on the bottom row of the window.

See Also	emacs_scroll_up, scroll_up, scroll_down, scroll_left, scroll_right


emacs_scroll_up

_command void [wid_expression.]emacs_scroll_up()

Applies To	Edit Window, Editor Control

Remarks	Used in EMACS emulation.   Moves the lines of the current buffer one line up.  The cursor is moved one screen row up if the cursor is not on the top row of the window.

See Also	emacs_scroll_down, scroll_up, scroll_down, scroll_left, scroll_right


emacs_select_block

_command void [wid_expression.]emacs_select_block()

Applies To	Edit Window, Editor Control

Remarks	Used in EMACS emulation.   Starts an inclusive block selection at the cursor position.  The highlighted text extends to where the cursor moves.  Ctrl-G may be used to cancel the mark.

See Also	emacs_select_char, select_line, cut_region, copy_region, indent_region, tabify_region, untabify_region, exchange_point_and_mark, reflow_region, fill_selection


emacs_select_char

_command void [wid_expression.]emacs_select_char()

Applies To	Edit Window, Editor Control

Remarks	Used in EMACS emulation.   Starts an non-inclusive character selection at the cursor position.  The highlighted text extends to where the cursor moves.  Ctrl-G may be used to cancel the mark.

See Also	emacs_select_block, select_line, cut_region, copy_region, indent_region, tabify_region, untabify_region, exchange_point_and_mark, reflow_region, fill_selection


_enable_non_modal_forms

_str _enable_non_modal_forms(boolean enable, int skip_wid [, _str wid_list] )

Remarks	Enables or disables forms specified.  For simple, modal dialog boxes, you should not use this function.  If you want to write a loop which does some process and have a dialog box show the status of the process and allow canceling, you should use this function.

Input

enable	If non-zero, forms are enabled.

skip_wid	Form with window id equal to this value will not be effected.

wid_list	Specific space delimited window ids of the forms to be enabled or disabled.  Usually, this variable is the list of window ids to be reenabled.  The list of windows disabled by this function is returned by this function.

Return	'' is returned if the enable argument was non-zero.  Otherwise, a space delimited list of the window ids that were disabled is returned.

Example

#include "slick.sh"

static  typeless gcancel

_command test()

{

    // Show the form modeless so there is no modal wait

    form1_wid=show('form1');

    disabled_wid_list=_enable_non_modal_forms(0,form1_wid);

    gcancel=0;

    for (;;) {

          // Read mouse, key, and all other events until none are left

          // or until the variable gcancel  becomes true.

          process_events(gcancel);

          if (gcancel) break;

    }

    _enable_non_modal_forms(1,0,disabled_wid_list);

    form1_wid._delete_window();

}

defeventtab form1

cancel.lbutton_up()

{

     gcancel=1;

}


_enabled

int [wid_expression.]_enabled()

Applies To	All objects

Remarks	Returns zero if the current window or any of its parents are disabled or invisible.   Otherwise, 1 is returned.  Checking stops when a form is reached.  A typical use of this function is to check if it is reasonable to tab to a control (one should also check if the control fits within the bounds of the dialog box).

See Also	p_enabled, p_visible


_end_line

void [wid_expression.]_end_line()

See Also	Edit Window, Editor Control, Text Box, Combo Box

Remarks	Places cursor after end of current line.

See Also	_begin_line


end_line

_command end_line()

END

See Also	Edit Window, Editor Control, Text Box, Combo Box

Remarks	Places cursor after end of current line.


end_recording

_command int end_recording()

Remarks	Ends the definition of a recorded macro and names it last_macro.

Return	Returns 0 if successful and displays message.  Otherwise a non-zero value is returned and a message or message box is displayed.

See Also	start_recording, record_macro_toggle,  record_macro_end_execute, list_macros, gui_save_macro, save_macro, _macro


end_select

_command int end_select()

Applies To	Edit Window

Remarks	Places cursor on last character of selection.  If the current selection type is LINE, the cursor is moved to the last line of the selection and the column position is unchanged.

Return	Returns 0 if successful.  Otherwise TEXT_NOT_SELECTED_RC is returned.  On error, message is displayed.


_end_select

int [wid_expression.]_end_select( _str mark_id="" )

Applies To	Edit Window, Editor Control

Remarks	Places cursor on last character of selection specified.  mark_id is a handle to a selection returned by one of the built-ins _alloc_selection or _duplicate_selection.  A mark_id of '' or no mark_id parameter identifies the active selection.  If the selection type is LINE, the cursor is moved to the last line of the selection and the column position is unchanged.

Return	Returns 0 if successful.  Possible return codes are TEXT_NOT_SELECTED_RC or INVALID_SELECTION_HANDLE_RC.  On error, message is displayed.


_end_select_compare

int [wid_expression.]_end_select_compare(_str mark_id="")

Applies To	Edit Window, Editor Control

Remarks	Compares current line position to last line of selection specified.

Return Values

   0	Current line is on last line of selection

> 0	Current line is after last line of selection

< 0	Current line is before last line of selection

   1	Text is not selected or selection is not in current buffer

See Also	_begin_select_compare


end_window

command void [wid_expression.]end_window()

Applies To	Edit Window, Editor Control

Remarks	Places cursor at bottom right of window.

See Also	begin_window


enter_on_bl

int [wid_expression.]enter_on_bl()

Applies To	Edit Window, Editor Control

Remarks	Typically used by a command which is bound to the ENTER key.  Called when ENTER key is pressed on a blank line.

Return	Returns the column position where the cursor should be placed on a new line that is inserted by an ENTER key command.  You may want to write a replacement for this procedure.


enumerate

_command void enumerate(_str cmdline)

Applies To	Edit Window, Editor Control

cmdline is a  string in the format: [-x | -xf] [-l leading] [-t trailing] [start [ increment [ DigitWidth ]]]

Remarks	This commands adds incrementing numbers to a selection.

-x	Specifies hexadecimal output.  If -l and -t options are not specified, the buffers extension specific syntax for hex numbers is used.  If not hex syntax has been defined in the buffers color coding, "0x" is used for leading text.

-xf	Specifies hexadecimal output.  If -l and -t options are not specified, the buffers extension specific syntax for hex numbers is used.  If not hex syntax has been defined in the buffers color coding, "0x" is used for leading text.  NOTE: the meaning of start and increment change when this option is specified (see below).

-l leading	Specifies text to prefix each number with.

-t trailing	Specifies text to append to each number.

start	Specifies the number used for first line of the selection.  This may be floating point as long as the "-x" or -"xf" option is not specified.  When the "-xf" option is selected, the start must be an integer bit position or the first hexadecimal number to start with.

increment	Specifies how much to increment the number for each line which follows in the selection.  This may be floating point as long as the "-x" or -"xf" option is not specified.  When the "-xf" option is selected, this specifies the number of bit positions to increment by.

DigitWidth	Specifies the digit width for each number.  Number is padded to at least this number of digits by adding leading 0's.

See Also	gui_enumerate


env_case

_str env_case(_str env_name)

Return	Returns env_name in operating specific case.  DOS environment variables are displayed in upper case.


env_match

_str env_match(_str name_prefix, int find_first)

Return	Returns the name of the environment variable matching the prefix name_prefix.  If a match is not found, the global rc variable is set to STRING_NOT_FOUND_RC and '' is returned.  If find_first is non-zero, matching starts from the first environment variable.  Otherwise matching starts after the previous match.

See Also	get_env, set_env


eq_name2value

_str eq_name2value(_str name, _str namesNvalues)

Return	Returns word in namesNvalues to right of the string expression (lowcase(name)'='). Now that Slick-C has arrays and hash tables, you don't need to use this function.


eq_value2name

_str eq_value2name(_str value, _str namesNvalues)

Return	Returns word in namesNvalues to left of the string expression ('='value).  Now that Slick-C has arrays and hash tables, you don't need to use this function.


error_pos

_str error_pos( _str cmdline )

cmdline is a string in the format: pcode_offset filename

Return	Returns string containing pcode_offset and filename of the last interpreter run-time error.  The filename returned has no path.  pcode_offset is the offset in .ex (pcode) file of error.  This information may be passed to st command to find the corresponding line of the last run-time error.  If the pcode_offset and filename arguments are specified, the error position information is set.

Example

      parse error_pos() with pcode_offset filename;

      sourcefilename= path_search(substr(filename,1,length(filename)-1));

      st('-f 'pcode_offset sourcefilename);


esc_alt_prefix

_command void esc_alt_prefix()

Remarks	Defines an alternative ALT key and defines a completion/enter argument  key.  For example, after binding this command to the ESC key, pressing  ESC 'x' is identical to Alt-X when the cursor is in the text area.  When the cursor is on the command line pressing the ESC key will complete argument at the cursor.  If a unique argument is found, it is returned as if the ENTER key was pressed.

See Also	shift_prefix, ctrl_prefix, alt_prefix


_escape_re_chars

_str _escape_re_chars( _str string [,'U' |'B'] )

Return	Returns string with regular expression special characters prefixed with \.  Specify the 'U' option to escape UNIX regular expression special characters.  Specify the 'B' option to escape Brief regular expression special characters.

Example

_escape_re_chars("abc")	== "abc"

_escape_re_chars("*.c")	=="\*.c"

_escape_re_chars("*.c",'U')	=="\*\.c"

_escape_re_chars("*.c",'B')	=="\*\.c"

_escape_re_chars("+++")	=="\+\+\+"


eval_exp

int eval_exp(_str &result, _str expression, int base)

Remarks	Evaluates expression and places the result in the variable result in the base specified.  base may be 2,8, 10, or 16.

Return	Returns 0 if successful.  Otherwise a non-zero value is returned.


event2index

int event2index(_str event)

Return	Returns the event index corresponding to the binary event string given.  The event index returned by this function may be used by the functions eventtab_index, or index2event. event may have been returned by get_event(), test_event(), and last_event().

Example

     key=get_event();

     root_keys= find_index('root_keys',EVENTTAB_TYPE);

     index=eventtab_index(root_keys,p_mode_eventtab,EVENT2INDEX(key));

     // name could be type nothing, proc, command, macro, or key table.

     message('Key is bound to 'name_name(index));

See Also	get_event, test_event, last_event, call_key, event2name, index2event, list_bindings, name2event, eventtab_index


event2name

_str event2name(_str event [, _str option] )

Return	Returns the event name corresponding to the binary event string.  Event may have been returned by get_event(), test_event(), and last_event() into a event name.

option defaults to 'S' and may be one of the following:

'S'	Return Slick-C source code event name.

'L'	Return long menu bar event name.

'C'	Return condensed menu bar event name.

Example

      key=get_event()

       message 'The key pressed was 'event2name(key)

See Also	get_event, test_event, last_event, call_key, event2index, index2event, list_bindings, name2event, eventtab_index


eventtab_index

int eventtab_index( int root_keys_index, int mode_keys_index, int key_index, _str option="")

Return	Returns name table index bound to the key corresponding to key_index.  The fourth parameter may be set to "U", to return the index of the event table used.  If the mode event table has a non zero binding for the key corresponding to key_index this index is returned.  Otherwise the root key table binding is returned.

Example

key=get_event();

root_keys_index= find_index('default-keys',EVENTTAB_TYPE);

index=eventtab_index(root_keys_index,p_mode_eventtab,event2index(key));

// Display information about the binding to this key.

message('name='name_name(index)' type='name_type(name));


eventtab_inherit

int eventtab_inherit( int etab_index, int new_etab_index=-1)

Return	Returns and optionally sets the inheritance event table of an event table.  This function allows you to link one event table to another to create inheritance.  When an event handler does not exist in one event table, the next event is checked for an event handler and the next until there are no more event tables in the chain.


exchange_point_and_mark

_command void [wid_expression.]exchange_point_and_mark()

Applies To	Edit Window, Editor Control

Remarks	Used in EMACS emulation.   Exchanges the cursor position with the pivot point or anchor of the selection.  If no highlighted text exists, an invisible mark is used which contains the last highlighted text not deleted or the last text pasted by the emacs_paste command.

See Also	indent_with_tabs, select_block, select_line, emacs_select_char, cut_region, indent_region, copy_region, untabify_region, exchange_point_and_mark, reflow_region, fill_selection, tabify_region, emacs_select_block


execute

typeless execute( _str command=null,_str options="" )

Remarks	Runs the command currently on the command line or the command specified.  Command may be an internal command (_command), an external operating system command, or an external Slick-C batch macro (with defmain entry point).  If the command argument is null, the command line is erased and the command is inserted into the command retrieve buffer ".command".  See retrieve_prev, retrieve_next.

options is a string of one or more of the following letters:

W	If command is an external program, run slkwait program to wait for program to complete.   This option allows you to view the results after running a DOS text mode application which displays results to the screen.  Defaults to OFF.

A	If command is an external program, run program asynchronously (no wait).  Defaults to OFF.

R	Insert command into command retrieve buffer (.command) and clear command line.  Defaults to OFF unless no arguments given.

Return	Return value of command executed is returned.

IMPORTANT: The Windows 3.x version of Visual SlickEdit is only able to retrieve return codes of DOS programs and not Windows programs.  When fixes/enhancements are made to Windows/WIN32s, we will correct this limitation.

See Also	command_state, command_toggle, set_command, get_command


execute_selection

void execute_selection()

Alt+EQUAL

Applies To	Edit Window

Remarks	Executes the commands in a selection.

Displays messages if commands are completed successfully or unsuccessfully.


_executed_from_key_or_cmdline

int _executed_from_key_or_cmdline()

Remarks	Returns non-zero value if the command was executed from a key or the command line.  This function should only be called from a command (_command) function.


exit

void exit( [int number] )

Remarks	Exits the editor without saving anything.  The editors return code is set to number if given.  Otherwise return code is set to 0.

See Also	safe_exit, fexit


exit_list

void exit_list()

Remarks	Calls all Slick-C macro procedures whose name has prefix "_exit_" before Visual SlickEdit is terminated by one of the commands safe_exit, save_exit (BRIEF emulation), or quit.


exit_process

_command void exit_process()

Remarks	Exits the concurrent process buffer by entering the "exit" command and waiting until the command processor finishes.


expand_alias

_command int [wid_expression.]expand_alias()

Ctrl+Space bar

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Remarks	Expands the alias name before the cursor by deleting the alias name and replacing it with its value.

Return	Returns 0 if successful.  Otherwise a non-zero number is returned.

See Also	alias, alias_cd


expand_tabs

_str [wid_expression.]expand_tabs(_str string, int start=1, int count=-1, _str option='E')

Applies To	Edit Window, Editor Control

Return	Returns a sub-string of input string containing tab characters.  The start and count specification correspond to the input string as if tab characters were expanded according to the current buffers tab settings.  We call this type of text position or count imaginary.  Strings containing tab characters are expanded before displayed.  Hence, the need arises for a differentiation between physical and imaginary positions.  A physical position corresponds to a character in string.  The characters are numbered one to the length of string.  An imaginary position corresponds to a position in a string once tabs have been expanded.

By default, the tab characters in string specified by start and count are expanded to spaces according to the current buffer's tab settings.  Specify 'S' for option if you only want to expand tabs to spaces when a tab character is bisected.  If count extends past the imaginary length of string, the result is padded with blank characters.  A count of -1 specifies the rest of the input string starting from the imaginary column start.  The start parameter must be greater than zero.

 Example   (Assume tabs are  1 9 17 25 33 41 ... (increments of 8))

      expand_tabs("abc\tdef\tghi") :=="abc"FIVE_SPACES"def":+FIVE_SPACES:+"ghi"

      expand_tabs("abc\tdef\tghi",4) :== FIVE_SPACES"def":+FIVE_SPACES"ghi"

      expand_tabs("abc\tdef\tghi",1,-1,"S") :== "abc\tdef\tghi"

      expand_tabs("abc\tdef\tghi",4,-1,"S") :== "\tdef\tghi"

      expand_tabs("abc\tdef\tghi",5,-1,"S") :== FOUR_SPACES"def\tghi"

      expand_tabs("abc\tdef\tghi",5,10,"S") :== FOUR_SPACES"def":+THREE_SPACES

See Also	_text_colc, text_col, _expand_tabsc


_expand_tabsc

_str [wid_expression.]_expand_tabsc(int start=1,int count=-1,_str option="E")

Applies To	Edit Window, Editor Control

Return	Returns a sub-string of current line containing tab characters.  The start and count specification correspond to the current line as if tab characters were expanded according to the current buffers tab settings.  We call this type of text position or count imaginary (or column).  Strings containing tab characters are expanded before displayed.  Hence, the need arises for a differentiation between physical and imaginary positions.  A physical position corresponds to a character in string.  The characters are numbered one to the length of string.  An imaginary position corresponds to a position in a string once tabs have been expanded.

By default, the tab characters in the current line specified by start and count are expanded to spaces according to the current buffer's tab settings.  option may be 'E' or 'S'.  If the 'S' option is given, only bisected tab characters are expanded to the appropriate number of spaces.  If count extends past the imaginary length of string, the result is padded with blank characters.  A count of -1 specifies the rest of the line starting from the imaginary column start.  The start parameter must be greater than zero.

See Also	_text_colc, text_col, expand_tabs


expand_window

_command void expand_window()

Applies To	Edit Window

Remarks	Increases the size of the current tile.  If the current window has no adjacent tile, an error is displayed.

See Also	shrink_window, move_edge, delete_tile, create_tile, kill_window, hsplit_window, vsplit_window, change_window, window_left, window_right, window_above, window_below, next_window, prev_window


_ext_form

_form _ext_form

Syntax	void show('_ext_form')

Remarks	Displays the Extension Options dialog box.


extern

typeless extern( _str command )

Remarks	Utility command for invoking an external macro or program from a menu.  Normally, when an external macro or program is executed from a menu, there is no message displayed if the macro or program is not found (if it can't be executed for some strange reason).  Prefix your external macro or program you want to execute with extern to get better error handling.

Return	Returns 0 or return code of program or macro if successful.  Common negative return codes are FILE_NOT_FOUND_RC, and ACCESS_DENIED_RC.  Return value of external macro can be anything.


external_cmd

void external_cmd(_str name, _str params, _str shell_options)

Remarks	Invokes DOS command name with params and waits for key press if shell_options<>''.


f

_command int f( _str tag_name )

Remarks	This function is identical to the push_tag command except it requires less typing.

In ISPF emulation, this command is not called when invoked from the command line.  Instead ispf_f (short for ispf_find) is called.  Use push_tag or ("Search", "Go To Definition...") to explicitly invoke the f command.

See Also	make_tags, find_tag, gui_make_tags, find_proc, push_tag, list_tags


f_match

_str f_match(_str name, int find_first)

Return	Returns next file name which is a prefix match of name.  find_first must be non-zero to initialize matching.  Returns '' when no more matches are found.


fast_scroll

_command void fast_scroll()

Applies To	Edit Window, Editor Control

Remarks	This command may only be bound to the following scroll bar events:

on_vsb_line_down

on_vsb_line_up

on_sb_end_scroll

on_hsb_line_down

on_hsb_line_up

The above events are only received by edit window, and editor controls.  It performs some optimizations for speeding up scrolling.


fexit

_command void fexit()

Remarks	Exits the editor without saving files or doing anything.  This command is mainly useful to a macro hacker and the developers of Visual SlickEdit.  You might want to use this function to test our AutoSave feature.

See Also	safe_exit


field

_str field(_str string, int width)

Return	Returns string padded with trailing spaces to width characters.  If length of string is greater or equal to width characters, string is padded with one space.


file

_command int [wid_expression.]file( [_str cmdline] )

F4

Applies To	Edit Window

cmdline is a string in the format: options [filename]

Remarks	Saves current file under name specified and quits the current file.  If filename is not specified, buffer name is used.  Default options for the file command may be set with the save_options command.  options are:

+ or -O	Turn on/off overwrite file switch.  Turn this switch on if you do not want your files backed up.

+ or -T	Turn on/off compress with tabs file switch.  Always uses tab increments of 8 (1 9 17 ...).

+ or -E	Turn on/off expand tabs to spaces switch.  Default is off.  The default may be set by the save_options command.

+ or -B	Turn on/off binary save switch.  Save file without carriage return, line feeds or end of file marker.

Return	Returns 0 if successful.  Common return codes are INSUFFICIENT_DISK_SPACE_RC, PATH_NOT_FOUND_RC, ACCESS_DENIED_RC, ERROR_OPENING_FILE_RC, ERROR_WRITING_FILE_RC, DRIVE_NOT_READY_RC, and INVALID_OPTION_RC.  On error, message is displayed.


_file_date

_str _file_date(_str filename [,'B' ] )

Return	Returns date of filename.  Currently you must specify the 'B' option which returns the date in binary string comparison form.  '' is returned if filename is not found.  The time returned is in milliseconds.  The actual accuracy may depend on the Operating System.

See Also	file_date


file_date

_str file_date(_str filename)

Return	Returns date of filename in the form dd-mm-yy.  dd will start with a space if it is less than 10.  mm will start with a 0 if it is less than 10.

See Also	_file_date


file_eq

int file_eq(_str file1,_str file2)

Remarks	Compares file parts file1 to file2 in the case sensitivity of the operating system file system.


file_list_field

_str file_list_field(_str filename ,int col ,int width)

Return	Returns the size, date, time or attributes/permissions for the filename specified.  col is one of the constants DIR_SIZE_COL, DIR_DATE_COL, DIR_TIME_COL, or DIR_ATTR_COL from "slick.sh".  width is one of the constants DIR_DATE_WIDTH, DIR_TIME_WIDTH, DIR_ATTR_WIDTH, or DIR_SIZE_WIDTH from "slick.sh".  If file is not found or error occurs, '' is returned.

See Also	file_time, file_date


file_match

_str file_match( _str name_prefix_options, int find_first)

Remarks	Performs find first, find next directory search.

name_prefix_options has the following syntax:

      	{name_prefix  | ['-' | '+' option_letters]}

option_letters may be 'R','H','S','D','P','X','V' with the following meaning:

H     	Include hidden files.  Defaults to off.  Ignored by UNIX version.

This option is always turned on under Windows if the "Show all files"explorer option is set.

S     	Include system files.  Defaults to off.  Ignored by UNIX version.

This option is always turned on under Windows if the "Show all files"explorer option is set.

D     	Include directory files.  Defaults to on.

P     	Prefix match.  Defaults to on.

T	Tree list.  Defaults to off.

X	Exclude non-directory files.  Defaults to off.

V	Verbose match.  Defaults to off.  When on, string returned is in the same format as the file manager file list except that no path is included.  Column constants in "slick.sh" may be used to parse out name, file size, date, time, and attributes.

G	List registered data sets.  This option is ignored for all platforms except OS/390.

N	Stat of data sets.  By default, no trailing slash is appended to partioned data sets (directories).  We have this default mainly due to the fact that this feature can cause a hang.  Use this option when you have to differentiate files from directories.  This option is ignored for all platforms except OS/390.

Z	Return data set member info in the same format as ISPF. This option is ignored for all platforms except OS/390.

DIR_SIZE_COL

DIR_SIZE_WIDTH

DIR_DATE_COL

DIR_DATE_WIDTH

DIR_TIME_COL

DIR_TIME_WIDTH

DIR_ATTR_COL

DIR_ATTR_WIDTH

DIR_FILE_COL

There is an R option for read only files which defaults to off.  However, read only files will always be included in file matching due to operating system limits.

When prefix match is on, file names with prefix matching name_prefix are returned (the prefix "abc" matches "abcd" and "abce").  When prefix match is off, a normal directory search is performed for file names matching name_prefix.  If any wild card characters such as '*' or '?' are present in name_prefix, prefix matching is ignored.

A non-zero value for find_first, begins a new directory search.  If find_first is zero, the next matching file name is returned.  '' is returned if no match is found and rc is set to the error code.  Search is not case sensitive except for file systems like UNIX which are case sensitive.  If a directory is found, the name returned ends with a backslash.

Example

       // Find all C source files in the current directory.  '-P' turns off prefix match.

       //  No directories will be found since the D switch is not on.

       filename= file_match('*.c -P',1);         // find first.

       for (;;) {

           if (filename=='=' )  break;

           messageNwait('name found='filename);

           // Be sure to pass filename with correct path.

           // Result filename is built with path of given file name.

           filename= file_match(filename,0);       // find next.

       }

        // find out if the file "junk" is read only

        if (pos('R',substr(line,DIR_ATTR_COL,DIR_ATTR_WIDTH)) ) {

             message('File "junk" is read only');

        } else {

             message('File "junk" is NOT read only');

        }

See Also	find_index, name_match, buf_match, path_search


file_time

_str file_time(_str filename)

Return	Returns time of filename in the format of the Visual SlickEdit file manager. '' is returned if filename is not found.


fileman

_command void fileman( [_str append] )

"File", "File Manager", "New File List..."

Remarks	Displays a dialog box for listing files.  If the append option is not given or is an empty string (""), a new buffer is created and the files are listed in the buffer.  Otherwise, the files are listed at the end of the current buffer.  This command switches to fileman mode when append option is not specified.  When in fileman mode, there a some new key bindings.  See help on fileman_mode.

See Also	dir, list


fileman_attr

_command void fileman_attr()

(fileman mode only) Alt+Shift+T or "File", "File Manager...", "Attributes..."

Remarks	Displays the Set Attributes dialog box used by the file manager to change attributes (UNIX: permissions) on the selected files.  Used by fileman mode.


fileman_backup

_command void fileman_backup()

(fileman mode only) Alt+Shift+B or "File", "File Manager...", "Backup..."

Remarks	Displays the Backup dialog box used by the file manager to copy the selected files while preserving the directory structure of the original files.  Used by fileman mode.


fileman_command

typeless fileman_command(_str msg ,_str operation ,_str source ,_str destfilename, _str arg2)

Remarks	Executes a command built with the expression:

(operation" "maybe_quote_filename(source)"  "maybe_quote_filename(destfilename) )

and handles file I/O error recovery.

The operation parameter is typically a file management command that has already been implemented to be supported by this procedure, such as _fm_subcopy, _fm_copy, or _fm_move.  If you write a new command, be sure that it returns 0 when your command completes successfully.

The message, msg, is displayed in a full screen shell window before the command is executed.  If arg2 is not '' , the user must close the fileman status window before this function will return.

Return	Returns 0 if successful.  If the command returns a non-zero value, this function returns that value which could be anything.


fileman_copy

_command void fileman_copy()

(fileman mode only) Alt+Shift+C or "File", "File Manager...", "Copy..."

Remarks	Displays the Copy dialog box used by the file manager to copy the selected files to a directory you choose.


fileman_delete

_command void fileman_delete()

(fileman mode only) Alt+Shift+D or "File", "File Manager...", "Delete..."

Remarks	Prompts you whether you wish to delete the selected files.  Used in fileman mode.


fileman_deselect_down

_command void fileman_deselect_down()

(fileman mode only) '3'

Remarks	Removes the '>' character at the beginning of the current line and moves the cursor to next line.  Used by fileman mode.


fileman_deselect_up

_command void fileman_deselect_up()

(fileman mode only) '9'

Remarks	Removes the '>' character at the beginning of the current line and moves the cursor to previous line.  Used by fileman mode.


fileman_edit

_command void fileman_edit()

(fileman mode only) Alt+Shift+E

Remarks	Opens the selected files for editing.  Used by fileman mode.


fileman_enter

_command void fileman_enter()

(fileman mode only) ENTER

Remarks	Opens the file at the cursor or inserts directory file list.  Used by fileman mode.


fileman_help

_command void fileman_help()

(fileman mode only) F1

Remarks	Displays help for fileman mode.


fileman_keyin_name

_command void fileman_keyin_name()

(fileman mode only) Alt+Shift+N

Remarks	Keys in file name at text cursor into the command line.  Used by fileman mode.

See Also	keyin_buf_name


fileman_mode

_command void fileman_mode()

Remarks	The fileman mode keys are activated after executing the fileman_mode, dir, list, or fileman commands.  The keys are redefined as indicated below

Alt+Shift+A	Select all files.

Alt+Shift+B	Backup selected files.

Alt+Shift+C	Copy selected files.

Alt+Shift+D	Delete selected files.

Alt+Shift+E	Edit selected files.

Alt+Shift+G	Search and Replace on selected files.

Alt+Shift+M	Move select files.

Alt+Shift+N	Keyin current line filename.

Alt+Shift+O	File Sort dialog box.

Alt+Shift+R	Repeat Command on Selected dialog box.

Alt+Shift+T	Fileman Set Attributes dialog box.

ENTER	Edit current file or insert directory files.

Space bar	Select current file toggle.

'8'	Select and cursor up.

'2'	Select and cursor down.

'9' 	Deselect and cursor up.

'3'	Deselect and cursor down.

RButtonDown

Displays file manager pop-up menu.

Selected directories are skipped by Backup, Move, Delete, Edit, and Set file attribute commands.


fileman_move

_command void fileman_move()

(fileman mode only)  Alt+Shift+M or "File", "File Manager...", "Move..."

Remarks	Displays the Move dialog box used by the file manager to move the selected files to a directory you choose.   The directory can be on a different drive.


fileman_replace

_command int fileman_replace()

(fileman mode only) Alt+Shift+G

Remarks	Performs a search and replace on the selected files.  This command is used while in fileman mode to perform a search and replace across multiple files and directories.  The dialog box this command displays is similar to the Replace dialog box (see gui_replace command for more information).

Return	Returns 0 if successful.   Otherwise, a non-zero number is returned.


fileman_select_down

_command void fileman_select_down()

(fileman mode only) '1'

Remarks	Replaces the first character of the current line with '>' and moves the cursor to next line.  Used by fileman mode.


fileman_select_up

_command void fileman_select_up()

(fileman mode only) '7'

Remarks	Replaces the first character of the current line with '>' and moves the cursor to previous line.  Used by fileman mode.


fileman_sort

_command void fileman_sort()

(fileman mode only) Alt+Shift+O or "File", "File Manager...", "Sort..."

Remarks	Displays the file manager File Sort dialog box.  Used by fileman mode.


fileman_space

_command void fileman_space()

(fileman mode only) SPACE BAR

Remarks	If the visible cursor is in the text area, the select character '>' is toggled on or off.  Otherwise the default binding of space bar is executed.  Used by fileman mode.


fill_selection

_command int fill_selection( [_str gui] )

"Edit", "Fill..."

Applies To	Edit Window, Editor Control

Remarks	Fills selection with key you type.  If the gui option is given and not '', a message box is displayed to prompt the user to press a key to fill the selection.  Otherwise, message is displayed on the message line to prompt the user to press a key.

Return	Returns 0 if successful.

See Also	gui_fill_selection


_fill_selection

int _fill_selection( _str character, _str mark_id="")

Applies To	Edit Window, Editor Control

Remarks	Fills the selection specified with character.  mark_id is a handle to a selection returned by one of the built-ins _alloc_selection or _duplicate_selection.  A mark_id of '' or no mark_id parameter identifies the active selection.

Return	Returns 0 if successful.  Otherwise, TEXT_NOT_SELECTED_RC is returned.


filter_get_string

int filter_get_string(_str & in_string)

Applies To	Edit Window, Editor Control

Remarks	Sets variable in_string to next partial line of selection being filtered.  A non-zero value is returned if all text in the selection has been filtered.  The procedure filter_init must be called before this function.

Return	Returns 0 if successful.  A non-zero value is returned if all text in the selection has been filtered.

See Also	filter_init, filter_put_string, filter_restore_pos, filter_selection


filter_init

void filter_init()

Applies To	Edit Window, Editor Control

Remarks	Saves the cursor position and prepares for calls to functions filter_get_string, filter_put_string, and filter_restore_pos.

See Also	filter_get_string, filter_put_string, filter_restore_pos, filter_selection


filter_put_string

int filter_put_string(_str out_string)

Applies To	Edit Window, Editor Control

Return	Returns 0 and replaces current partial line of the selection being filtered with out_string.

See Also	filter_init, filter_get_string, filter_restore_pos, filter_selection


filter_restore_pos

void filter_restore_pos()

Applies To	Edit Window, Editor Control

Remarks	Restores the cursor position to the position saved by the filter_init procedure.

See Also	filter_get_string, filter_put_string, filter_init, filter_selection


filter_selection

int filter_selection(typeless filter_proc_name)

Applies To	Edit Window, Editor Control

Remarks	Filters the selection with the filter function filter_proc_name.  filter_proc_name must either be the name of a global function or a function address.  The filter function takes a partial line and must return a filtered partial line.

Return	Returns PROCEDURE_NOT_FOUND_RC if filter_proc_name is not found.  Otherwise 0 is returned.

See Also	filter_init, filter_get_string, filter_put_string, filter_restore_pos


find

_command int [wid_expression.]find(_str string, _str options)

Applies To	Edit window, Editor control

Syntax	/string[/options] or L /string[/options] or find /string[/options]

Remarks	The /, L, or find command searches for the string specified.  Press and hold Ctrl+Alt+Shift to terminate a long search.  Any search or search and replace command may be terminated by pressing and holding Ctrl+Alt+Shift.  If you use the L or find command, the first non blank character is used as the delimiter.

In ISPF emulation, this command is not called when invoked from the command line.  Instead ispf_find is called.  Use ("Edit", "Find...") to explicitly invoke the find command.

When no parameters are specified, you are prompted for the string parameter.  While you enter the string parameter the following keys take on a new meaning:

Ctrl+R	Searches in reverse for the next occurrence of the search string

Ctrl+S	Searches forward for the next occurrence of the search string.

Ctrl+T	Toggles regular expression pattern matching on/off.  See section Regular Expressions for information on regular expressions.  The key bound to the BRIEF emulation command re_toggle will also toggle regular expression pattern matching.

Ctrl+W 	Toggles word searching on/off.  Word searching is useful for search and replacing variables.  To change the word characters for a specific extension, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").

Ctrl+C	Toggles case sensitivity.  The key bound to the BRIEF emulation command case_toggle will also toggle the case sensitivity.

Ctrl+M	Toggles searching within selection.

Ctrl+O	Toggles incremental search mode.

Ctrl+Q	Quotes the next character typed.

The options argument is a string of one or more of the following:

E	Exact case.

I	Ignore case.

-	Reverse search.

M	Limit search to marked area.

<	If found, place cursor at beginning of word.

>	If found, place cursor at end of word.

R	Interpret string as a regular expression.  See section MicroEdge Regular Expressions for syntax of regular expression.

U	Interpret string as a UNIX regular expression.   See section UNIX Regular Expressions.

B	Interpret string as a Brief regular expression.   See section Brief Regular Expressions.

H	Search through hidden lines.

N	Do not interpret search string as a regular expression.

P	Wrap to beginning/end when string not found.

W	Limits search to words.  Used to search for variables.  To change the word characters for a specific extension, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").

W=MicroEdge-regular-expression

Specifies the valid characters in a word.  The default value is [A-Za-z0-9_$].

W:P	Limits search to word prefix.  For example, searching for "pre" matches "pre" and "prefix" but not "supreme" or "supre".

W:PS	Limits search to strict word prefix.  For example, searching for "pre" matches "prefix" but not "pre", "supreme" or "supre".

W:S	Limits search to word suffix.  For example, searching for "fix" matches "fix" and "sufix" but not "fixit".

W:SS	Limits search to strict word suffix.  For example, searching for "fix" matches "sufix" but not "fix" or "fixit".

Y	Binary search.  This allows start positions in the middle of a DBCS character (only effects Japanese operating systems).  This option is useful when editing binary files which may contain characters which look like DBCS but are not.

,	Delimeter to separate ambiguous options.

XCCLetter'	Requires the first character of search string NOT be one of the color coding elements specified. For example, "XCS" requires that the first character not be in a comment or string. CCLetters is a string of one or more of the following color coding element letters:

O	Other

K	Keyword

N	Number

S	String

C	Comment

P	Preprocessing

L	Line number

1	Symbol 1

2 	Symbol 2

3 	Symbol 3

4 	Symbol 4

F	Function color

V	No save line

CCCLetters	Requires the first character of search string to be one of the color coding elements specified. See CCLetters above.

Default search options may be set by the Search Tab ("Tools", "Configuration", "General...", select Search Tab).

Command Line Examples

/xyz/-  	Search for string "xyz" using default search case in reverse.

L /xyz/-  	Search for string "xyz" using default search case in reverse.  Notice that prefixing the string "/xyz/-" with L has no effect on this command.

L $xyz$-  	Search for string "xyz" using default search case in reverse.  The L command can change the string delimiter which in this case is not necessary.

L $/$             	Search forward for the character slash.  The L command has been used so that the string delimiter could be changed to $ which allows searching for the / character.

L $/$-           	Search backward for the character slash.

/i/w              	Search for the variable i.

/xyz/e	Search for "xyz" in exact case.

Return	Returns 0 if the search string specified is found.  Common return codes are STRING_NOT_FOUND_RC, INVALID_OPTION_RC and INVALID_REGULAR_EXPRESSION_RC.  On error, message is displayed.

See also	i_search, c, gui_find, gui_replace, find_next, find_prev


find_buffer

_command void find_buffer( [_str buffer_name] )

Remarks	Activates the buffer specified.


_find_control

int [wid_expression.]_find_control( _str control_name )

Applies To	All objects.

Return	Returns instance handle (window id) of control, control_name, in the current form.  If the current form does not have a control with name (p_name), control_name, 0 is returned.

Example

defeventtab form1

command1.lbutton_up()

{

    wid=_find_control("command1");	// Look for self

    if (p_window_id==wid) {

         message("Found myself");

    } else {

         message("Not possible");

    }

}


find_delimiter

_command void [wid_expression.]find_delimiter()

Applies To	Edit Window, Editor Control

Remarks	Used in EMACS emulation.   Temporarily places cursor at the start of the previous parenthesis level until delay time expires.  See prev_level command for information on how the start of previous parenthesis level is found.  If the start of the previous parenthesis level is not found, the cursor does not move.

See Also	find_matching_paren, keyin_match_paren


find_error

_command void find_error()

"Macro", "Find Slick-C Error"

Remarks	Finds the last Visual SlickEdit interpreter run time error.  The module with the error is loaded and the cursor is placed on the line causing the error.  By default, only errors that cause a dialog box with the title "Slick-C Error" can be found.  However, if you want mild errors displayed, which occur in some built-in functions, turn on the weak errors option (see _default_option function for more information).


find_file

_command void find_file()

Applies To	Edit Window

Remarks	Displays the Find File dialog box which lets you find and open one or more files for editing.


_find_file_form

_form _find_file_form

Syntax	_str show('-modal _find_file_form')

Remarks	Displays Find File dialog box used to search for open files.

Return	Returns string which should be used as input to the edit command.  If '' is returned, the user cancelled the dialog box.

Example

#include "slick.sh"

defmain()

{

    result = show('-modal _find_file_form');

    if (result == '') {

       return(COMMAND_CANCELLED_RC);

    }

    return(edit(result))

}


_find_form_eventtab

int _find_form_eventtab(_str form_or_etab_name)

Remarks	Find source code for form or event table specified.  Cursor is placed on definition of event table.

Return	Returns 0 if successful.  Otherwise, STRING_NOT_FOUND_RC or FILE_NOT_FOUND_RC is returned and message box is displayed.


_find_formobj

int _find_formobj(_str form_name [,'E' |'N')

Return	Returns an instance handle (window id) to form form_name.  Returns 0 if an instances is not found.  Beware, by default, this function will find edited or non-edited instances of a form.  Specify the 'N' option if you only want to find a non-edited instances of the form.  Specify the 'E' option if you only want to find an edited instance of a form.

See Also	_find_object, _find_control


find_index

int find_index(_str name, int name_t)

Return	Returns name table index to name of type name_t.  0 is returned if a match is not found.  A name type match is considered if  (name_t & name_type(index)) is true.  Search is case sensitive unless one of the flags MODULE_TYPE, PICTURE_TYPE, or IGNORECASE_TYPE is given.  When one of the flags MODULE_TYPE or PICTURE_TYPE is given, search is case sensitive for file systems like UNIX which is case sensitive.  The search is always case insensitive when the IGNORECASE_TYPE flag is given.  All underscore characters in name are converted to dash characters before searching takes place.  The name type flags are listed in the file "slick.sh".

Name Type Flags (name_t)

PROC_TYPE	Matches global function

VAR_TYPE 	Matches global variable

EVENTTAB_TYPE 	Matches event table

COMMAND_TYPE Matches command

MODULE_TYPE	Matches module

PICTURE_TYPE	Matches picture.

BUFFER_TYPE	Matches buffer scope variable

OBJECT_TYPE	Matches any type of dialog box template.  Use the oi2type to build the correct object flags.  See example below.

MISC_TYPE	Matches miscellaneous.

IGNORECASE_TYPE	Perform case insensitive search.

Example (Must include 'slick.sh')

// Call a global function by index

index=find_index("gui_open",COMMAND_TYPE);

call_index(index);

// Find the Calculator dialog box template.

index=find_index("_calc_form",oi2type(OI_FORM));

if (index) {

     messageNwait("Found it");

} else {

     messageNwait("Did not find it");

}

// Some properties can be retrieved by the name table index.  However, none

// can be set unless the dialog box is displayed.

messageNwait("Dialog box caption is "index.p_caption);

// Display the dialog box modelessly

wid=show(index);	// show(name_name(index)) also works

// wid is the window id or instance handle for this dialog box.  We can use this to change

// the caption

wid.p_caption="Changed the caption";

See Also	name_match, name_name, name_type, name_info, call_index, insert_name, set_name_info, delete_name, oi2type, replace_name


_find_longest_line

int [wid_expression.]_find_longest_line()

Applies To	Edit Window, Editor Control, List Box

Return	Returns display width of longest line in buffer in the parent scale mode (p_xyscale_mode).  This function is typically used to change the size of a dialog box and list box based on the longest display item in the list box.

Example

#include 'slick.sh'

defeventtab form1

list1.on_create()

{

   _lbadd_item("Line1");

   _lbadd_item("This is a longer line2");

   _lbadd_item("This is the longest item in the list box");

   longest=_find_longest_line();

   // Add on a little to account for the left and right borders of the

   // list box.  Have to convert client width because it's in pixels.

   list_width=longest+ p_width-_dx2lx(p_xyscale_mode,p_client_width);

   form_wid=p_active_form;

   // Again we have to account for the left and right borders.

   // Multiple p_x of list box by two to show equal amounts of spacing on each side

   // of the list box

   form_width=2*p_x+ list_width+ form_wid.p_width-

              _dx2lx(form_wid.p_xyscale_mode,form_wid.p_client_width);

   p_width=list_width;

   form_wid.p_width=form_width;

   // Now make sure the whole dialog box can be seen on screen

   form_wid._show_entire_form();

}


find_matching_paren

_command int [wid_expression.]find_matching_paren()

Ctrl+] or "Tools", "Match Paren"

Applies To	Edit Window, Editor Control

Remarks	Finds the parenthesis that matches the parenthesis the cursor is on.  The supported parenthesis pairs are [], {}, and ().  This command also matches begin/end structures for the languages C, C++, Pascal, REXX, AWK, Assembly, Modula-2, Clipper, and Slick-C.  To add begin/end structure matching for another language see Extension Options dialog box.

Return	Returns 0 if match found.  Common return codes are TOO_MANY_SELECTIONS_RC and STRING_NOT_FOUND_RC.

See Also	keyin_match_paren


find_next

_command int [wid_expression.]find_next()

Ctrl+G or "Search", "Next Occurrence"

Applies To	Edit Window, Editor Control

Remarks	Repeats a search initiated by a search command in same direction and with the same search options.

Return	Returns 0 if successful.  Otherwise STRING_NOT_FOUND_RC is returned.  On error, message is displayed.

See Also	find, replace, gui_replace, gui_find, find_prev


_find_object

int _find_object( _str object_name [, 'E'|'N'] )

object_name is a string in the format: form_name[.control_name]

Return	Returns an instance handle (window id) to the object, object_name.  Returns 0 if an instance is not found.  Beware, by default, this function will find edited or non-edited instances of an object.  Specify the 'N' option if you only want to find a non-edited instance of an object.  Specify the 'E' option if you only want to find an edited instance of an object.

Example

defmain()

{

   // Get an instance handle to the MDI button bar.  Don't want edited form.

   // Can get a 0 return value if the user has turned off the menu bar.

   form_wid=_find_object("_mdibutton_bar_form", 'N');

   if (form_wid) {

        // Lets delete it (HA HA).  Bet you didn't think you could do that

       form_wid._delete_window();

       // To restore the button bar,   invoke the menu item  "Macro", "Edit MDI Button Bar"

       // and press the OK button.

   }

}

Example

defeventtab form1

command1.lbutton_up()

{

    wid=_find_object("form1.command1");	// Look for self

    if (p_window_id==wid) {

         message("Found myself");

    } else {

         message("You must have another instance of form1 that does not have a command1 button");

    }

}

See Also	_find_formobj, _find_control


find_prev

_command int [wid_expression.]find_prev()

"Search", "Previous Occurrence"

Applies To	Edit Window, Editor Control

Remarks	Repeats a search initiated by a search command in the opposite direction.

Return	Returns 0 if successful.  Otherwise STRING_NOT_FOUND_RC is returned.  On error, message is displayed.

See Also	find, replace, gui_replace, gui_find, find_next


find_proc

_command _str find_proc( _str tag_name )

"Macro", "Find Slick-C Proc"

Applies To	Edit Window

Remarks	Finds Slick-C source code or help for the Slick-C identifier tag_name specified.  This function supports tagging global functions, static functions if in current file, event tables, and dialog boxes (form names).  Unlike the find_tag command, the find_proc command does not use a tag file.

Return	Returns 0 if successful.  Otherwise a non-zero value is returned and a message box is displayed.

See Also	f, find_tag, push_tag, gui_find_proc


find_tag

_command int find_tag( _str tag_name )

Applies To	Edit Window

Remarks	This command is the same as the push_tag command except that no bookmark is pushed.  See push_tag command for more information.

Return	Returns 0 if successful.  Otherwise, a non-zero value is returned.

See Also	make_tags, gui_make_tags, find_proc, push_tag, f, gui_push_tag


_find_tile

int _find_tile( _str buffer_name )

Applies To	Edit Window

Remarks	Searches for a window with the same tile id as the current window which is displaying the buffer, buffer_name.

Return	Returns the window id, if successful.  Otherwise, 0 is returned.  If the current window is displaying buffer_name, the current window id is returned.


find_view

int find_view(_str buf_name)

Applies To	Edit Window

Remarks	Activates the view in the current window with buffer name, buf_name.

Return	Returns 0 if successful.  Otherwise, a non-zero value is returned.


find_window_with_edge

_str find_window_with_edge(int x1, int y1, int x2, int y2)

Applies To	Edit Window

Return	If successful, the view id of the window with edge (x1,y1) to (x2,y2) and the same tile id (p_tile_id) as the current window is returned.  Otherwise, '' is returned.


find_window_with_point

_str find_window_with_point(int x, int y)

Applies To	Edit Window

Return	If successful, the view id of the window with point (x,y) on window edge and the same tile id (p_tile_id) as the current window is returned.  Otherwise, '' is returned.


first_non_blank

_command void [wid_expression.]first_non_blank()

Applies To	Edit Window, Editor Control

Remarks	Moves the cursor to the first non space or tab character of the current line.


_flfilename

_str [wid_expression.]_flfilename( [_str wildcards [,_str path]] )

Applies To	File List Box

Remarks	When arguments are given to this function, the file list of a file list box will display the files from directory path and match any of the wildcards specified.  wildcards is a string of semicolon delimited wildcards (Ex. "*.c;*.h").  In addition, this function sends an on_change event to the current control with CHANGE_FILENAME as the first argument if the arguments given are different.

Remarks	Returns the current wildcards and path used to fill in a file list box.  The return value is a string in the following format:

     path;wildcards

Example

// This examples requires a form with a file list box named list1 and a button named

// command1

defeventtab form1

command1.lbutton_up()

{

   // If you use double quotes, you need two \\

   list1._flfilename('*.e;*.h','c:\vslick');

   parse list1._flfilenames with path ';' wildcards

   messageNwait('path='path'  wildcards='wildcards);

}


flush_keyboard

void flush_keyboard()

Remarks	Removes all key and mouse events from input queue.


flush_repeats

void flush_repeats(_str key)

Remarks	Flushes the keyboard of pending repeats of the key specified.


_fm_copy

int _fm_copy( _str cmdline )

cmdline is a string in the format: filename directory

Remarks	Copies filename specified to directory specified.  directory is created if it does not exists.  Used by fileman mode.  For your own macros, you will probably want to use the copy_file function to copy files.

Return	Returns 0 if successful.  Common return codes are: ACCESS_DENIED_RC, ERROR_OPENING_FILE_RC, FILE_NOT_FOUND_RC, INSUFFICIENT_DISK_SPACE_RC, ERROR_CREATING_DIRECTORY_RC, ERROR_READING_FILE_RC, ERROR_WRITING_FILE_RC, DRIVE_NOT_READY_RC, and PATH_NOT_FOUND_RC.  When invoked from the command line, error messages are displayed.


_fm_erase

int _fm_erase( _str filename )

Remarks	Erase the filename specified.  Used by fileman mode.  For your own macros, you will probably want to use the delete_file function to delete files.

Return	Returns 0 if successful.  Common return codes are ACCESS_DENIED_RC, FILE_NOT_FOUND_RC, DRIVE_NOT_READY_RC, and PATH_NOT_FOUND_RC.  When invoked from the command line, error messages are displayed.


_fm_move

int _fm_move( _str cmdline )

cmdline is a string in the format: filename directory

Remarks	Moves the filename specified to the directory specified.  directory is created if it does not exist.  Used by fileman mode.

Return	Returns 0 if successful.  Common return codes are: ACCESS_DENIED_RC, ERROR_OPENING_FILE_RC, FILE_NOT_FOUND_RC, INSUFFICIENT_DISK_SPACE_RC, ERROR_CREATING_DIRECTORY_RC, ERROR_READING_FILE_RC, ERROR_WRITING_FILE_RC, DRIVE_NOT_READY_RC,  and PATH_NOT_FOUND_RC.  When invoked from the command line, error messages are displayed.


_fm_subcopy

int _fm_subcopy( _str source_file dest_directory)

Remarks	Copies source_file to dest_directory concatenated to path_no_drive(source_file).  Preserves directory structure.  Destination directory is created if it does not exist.  Disk is formatted if necessary.  Handles errors necessary for backing up a file.  Used in fileman mode.

Return	Returns 0 if successful.  Common return codes are: 1 (no parameters specified), ACCESS_DENIED_RC, ERROR_OPENING_FILE_RC, FILE_NOT_FOUND_RC, INSUFFICIENT_DISK_SPACE_RC, ERROR_CREATING_DIRECTORY_RC, ERROR_READING_FILE_RC, ERROR_WRITING_FILE_RC, DRIVE_NOT_READY_RC, and PATH_NOT_FOUND_RC.  On error, message is displayed.


fmsay

_command int fmsay(_str string)

Remarks	This command is intended to be executed by the for_select command and not directly from the command line.  Displays string in fileman status window and opens shell window if it is not already open.  Useful for testing the commands for_all, for_mark, for_select, and for_dir.

Command Line Example

      for-all fmsay %L

Return	Returns 0.

See Also	for_all, for_mark, for_select, for_dir


_font_flags2props

void [wid_expression.]_font_flags2props(int font_flags)

Applies To	All objects except MDI Window, Form, Image, Picture, Gauge, Spin

Remarks	This function sets the font properties of the current object based on the font flags.  font_flags is a combination of the following flag constants defined in "slick.sh":

      F_BOLD

      F_ITALIC

      F_STRIKE_THRU

      F_UNDERLINE

      F_PRINTER

See Also	_font_props2flags


_font_form

_form _font_form

Syntax	_str show('-modal _font_form', options , font)

Remarks	Displays the Font dialog box.  The 'P' option specifies that printer fonts be listed.  font specifies the initial font displayed in this dialog box.

options is a string of zero or more of the following option letters:

F	Display fixed fonts only.

P	Display printer fonts.  If not specified, screen fonts are displayed.

font is a string in the format: font_name, font_size, font_flags [,]

font_size is a font point size.

font_flags is a combination of the following flags defined in "slick.sh":

F_BOLD

F_ITALIC

F_STRIKE_THRU

F_UNDERLINE

Return	Returns '' if the user cancels the dialog box.  Otherwise, a string in the same format as the font argument parameter is returned.

Example

   font='Courier,10,0';

    // You can use the _font_param function to build the above string like this

    //     font=_font_param("Courier", 10, 0);

   result = show('-modal _font_form',

        'F',      // Display fixed fonts only

        font

        );

   if (result == '') {

      return(COMMAND_CANCELLED_RC);

   }

   parse result with font_name','font_size','font_flags','

See Also	_choose_font, _font_param


_font_param

_str _font_param(_str font_name, int font_size, int font_flags

Remarks	This function is used to assist in creating a font string argument used as input to several Slick-C functions.  The rgb_color argument is ignored by some Slick-C functions that don't support it.

Return	Returns a string in the format: font_name,  font_size,  font_flags,


_font_props2flags

int [wid_expression.]_font_props2flags()

Applies To	All objects except MDI Window, Form, Image, Picture, Gauge, Spin

Return	This returns font flags based on the current objects font properties.  The font flags returned are a combination of the following flag constants defined in "slick.sh":

      F_BOLD

      F_ITALIC

      F_STRIKE_THRU

      F_UNDERLINE

      F_PRINTER

See Also	_font_flags2props


_font_type

int _font_type(_str font_name, _str options="S")

Return	This function is used by font dialog boxes.  The following font type flags are returned:

RASTER_FONTTYPE	Font is a raster font.

DEVICE_FONTTYPE	Font is a printer font.

TRUETYPE_FONTTYPE	Font is a true type font

FIXED_FONTTYPE	Font is a fixed size

options is a string of zero or more of the following option letters:

F	This letter is ignored and is only here because it is used by other font functions.

P	Get font type for print font font_name.

S	(Default) Display screen fonts.

See Also	_insert_font_list, _choose_font, _font_form, _isscalable_font


for_all

_command typeless for_all( _str command )

Remarks	Executes command specified on all the lines of the current buffer.  Parts of the line being executed are inserted into the command specified according to the following specifications:

%E	File extension with dot (Directory buffers only)

%F	Filename  (Directory buffers only)

%N	Name without extension (Directory buffers only)

%L	Entire line

%R	Current project

%V	Drive with : (Directory buffers only).  This is not very useful under UNIX.

%nnn	Nth word is inserted

%(envvar)	Value of environment variable envvar

%% 	percent character

Command Line Example

     for-all fmsay %L               Displays all lines of the current buffer


for_dir

_command typeless for_dir( _str command )

Remarks	Executes command specified on the selected files.  Used by fileman mode.  Unlike the for_select command, directory files are not skipped.  See help on for_all command for information on inserting parts of line in the command.


for_each_buffer

typeless for_each_buffer(_str command [,_str _external_cmd])

Remarks	Executes command for each buffer.  command must be a Slick-C function if _external_cmd is '' or not specified.  Otherwise command may be any external macro or program.  command is only executed on buffers "visible" to user.  If command returns a non-zero value, this function stops iterating buffers and returns that value.  Buffers with (p_buf_flags & HIDE_BUFFER) false are visible to the user.

Return	Returns 0 if successful.  Common return codes are STRING_NOT_FOUND_RC, TOO_MANY_SELECTIONS_RC, and FILE_NOT_FOUND_RC.


_for_each_control

typeless _for_each_control(int wid, callback [,'H' [,arg1 [,arg2 [,arg3 [,arg4 ]]]]] )

Remarks	Executes a callback function on a tree of controls where wid is the root window id of the tree.  callback is either the address of a function, the name of a global function, an index to a global function.  The callback function is called with the argument arg1..arg4 arguments if specified.

If the window tree is NOT being edited (p_edit==0), disabled, invisible and controls clipped by the dialog box are skipped.  Specify the 'H' option if you do not want any controls skipped.

If the window tree is being edited (p_edit==1), invisible (p_undo_visible==0) and controls clipped by the dialog box are skipped.  Specify the 'H' option if you do not want any controls skipped.  It is likely that full undo (not just undelete) will be added to the dialog editor.  When this is done the p_undo_visible property will be removed.

Return	Returns 0 if callback function always returns 0.  Otherwise, the non-zero value (which can be anything) returned by the callback function is returned.


for_each_mdi_child

typeless for_each_mdi_child(_str command [,_str _external_cmd])

Remarks	Executes command for each MDI edit window.  command must be a Slick-C function if _external_cmd is '' or not specified.  Otherwise command may be any external macro or program.  Windows with (p_window_flags & HIDE_WINDOW_OVERLAP) true, are skipped.

Return	Returns 0 if successful.  Common return codes are STRING_NOT_FOUND_RC, TOO_MANY_SELECTIONS_RC, and FILE_NOT_FOUND_RC.


_for_extform

_form _for_extform

Syntax	void show('_for_extform')

Remarks	Displays Fortran Options dialog box which is used for modifying the extension specific options for Fortran files.


for_list

typeless for_list(_str atsign_bufname, _str command, _str echo_command)

Remarks	This function is intended to be called to process "@buffer_name" string returned by the _sellist_form function.  See for_all command for information on parsing parts of each line into command.

Activates buffer specified by the expression substr(atsign_bufname,2) and applies command to each line in the buffer.  Parts of the line being processed may be inserted into the command.  On completion, the buffer is deleted.

Example

     status=edit("list");

     if (status) {

          return(status);

     }

     for_list("@"absolute("list"), "e %L",0);

Return	Returns 0 if successful.  Otherwise a non-zero value is returned.  This function may return the return value of the for_all function which can return anything the command returns.


for_mark

_command typeless for_mark( _str command )

Remarks	Executes command specified on the selection.  See help on for_all command form information on inserting parts of line in the command.


for_select

_command typeless for_select( _str command )

Remarks	Executes command specified on the selected files.  Used by fileman mode.  Directory files are skipped.  See for_all for help on inserting parts of line in command.


_form_match

_str _form_match(_str name_prefix, int find_first)

Return	Returns the name of the form matching the prefix name_prefix.  If a match is not found, '' is returned.  Specify find_first == 1, to start from the first form and 0 to find the next match.  This function scans the names table for forms and not instances of forms already displayed.


_form_parent

int _form_parent()

Applies To	All objects

Return	Returns the parent window id of the active form.  If the p_parent property of the active form is 0, the active MDI edit window is returned (_mdi.p_child).   Some dialog boxes such as the Replace and Spelling dialog boxes determine what buffer they are operating on by calling this function.  It is probably sufficient to use the expression (p_active_form.p_parent).  We added this function just in case it is needed for portability.


format_columns

_command int format_columns()

Applies To	Edit window, Editor control

Remarks	Formats words for each line in a selection based on the words in the first line.

Return	Returns 0 if successful.


_FreeColor

void [wid_expression.]_FreeColor(int ColorIndex)

Applies To	Edit window, Editor control

Remarks	Frees a color index returned by _AllocColor.

See Also	_AllocColor, _SetTextColor, _GetTextColor, _default_color


_free_selection

void _free_selection( _str mark_id )

Remarks	Frees the selection handle or bookmark handle corresponding to mark_id.  _free_selection will not free the active selection (the one that is seen on screen).  Use _show_selection if necessary to activate another selection before freeing the selection.  mark_id is a handle to a selection returned by one of the built-ins _alloc_selection or _duplicate_selection.  A mark_id of '' or no mark_id parameter identifies the active selection.

Example

      // Get handle to active selection

      current_mark_id=_duplicate_selection('');

      // Allocate another mark.

      mark_id=_alloc_selection();

      _select_line(mark_id);

      _show_selection(mark_id);get_event();

      _show_selection(current_mark_id);

      _free_selection(mark_id);

See Also	_alloc_selection


_fselect_line

int [wid_expression.]_fselect_line()

Applies To	Edit Window, Editor Control

Remarks	Replaces the first character of the current line with '>'.  This function is used as input to the process_list procedure.

Return	Returns 0.


fsort

_command int fsort()

"File", "File Manager...", "Sort..."

Remarks	 Runs the file manager File Sort dialog box.  Used in fileman mode.

Return	Returns 0 if successful.


full_justify

_command void [wid_expression.]full_justify()

Applies To	Edit Window, Editor Control

Remarks	Reformats current paragraph or selection using full justification.

See Also	left_justify


fundamental_mode

_command void [wid_expression.]fundamental_mode

Applies To	Edit Window, Editor Control

Remarks	Switches to Fundamental mode key bindings.


gb

_command int gb ...

Applies To	Edit Window

Remarks	This function is identical to the goto_bookmark command except it requires less typing.

See Also	push_bookmark, pop_bookmark, set_bookmark, sb, goto_bookmark


get

_command int [wid_expression.]get( _str filename )

Applies To	Edit Window, Editor Control

Remarks	Inserts the file specified before or after the current line depending on the Line insert style ("Tools", "Configuration", "More Options...", "Line Insert Style").

Return	Returns 0 if successful.  Common return codes are FILE_NOT_FOUND_RC, PATH_NOT_FOUND_RC, TOO_MANY_SELECTIONS_RC, and TOO_MANY_FILES_RC.  On error, message is displayed.

See Also	gui_insert_file


_GetButtonBar

int _GetButtonBar(int bbside)

Applies To	MDI Window

Returns	Returns window id of docked toolbar for a particular MDI frame side.  If no toolbar exists for the that side 0 is returned.  bbside may be one of the following constants defined in "slick.sh":

BBSIDE_LEFT

BBSIDE_TOP

BBSIDE_RIGHT

BBSIDE_BOTTOM

See Also	_LoadButtonBar


_GetCaps

_str [wid_expression.]_GetCaps()

Applies To	Edit Window, Editor Control

Return	Returns 1 if the file contains uppercase letters and no lowercase letters.


_get_cmdname

_str _get_cmdname( _str cmdline )

Return	Returns the command name parsed from the front of the cmdline argument string.

Example

_get_cmdname("/test")	=="/"

_get_cmdname("sb 1")	=="sb"


get_command

void [wid_expression.]get_command(_str &text [,int &start_sel [,int &end_sel [,_str &prompt ]]])

Applies To	Text Box, Combo Box

Remarks	Be sure to look at the get_string  function which prompts the user for command line input.

Return	Returns the command line text, start of selection, end of selection, and prompt in the corresponding variables.  If 2 arguments are specified, start_sel is set to the cursor position.  The prompt variable is always set to the prompt before the command line and not the current text box.

See Also	command_state, command_toggle, execute, set_command


get_completion_info

_str get_completion_info([_str string])

Return	Returns completion information for string.  A string of zero or more completion constants delimited with space characters is returned.  If string starts with a '.' character, string specifies a command.  Otherwise string should specify a completion constant name without the "_ARG" suffix.  Completion constants have the suffix "_ARG" and are listed in "slick.sh".


get_env

_str get_env(_str name)

Return	Returns the value of the environment variable name.  If name is not found, rc is set to STRING_NOT_FOUND_RC and '' is returned.

See Also	env_match, set_env


get_event

_str get_event(_str options="")

Remarks	options  defaults to '' and may be one or more of the following:

'R'	Specifies no screen refresh.

'K'	Return keys from physical keyboard and not keyboard macro that is being played back.

'N'	Get next key.  When a Slick-C macro uses get_event for multiple key sequence key bindings, all get_event calls after the first should pass this parameter.  Otherwise key stroke recording will not work since terminating key stroke recording requires that the last key sequence be removed.

'D'	Return and possibly set the prefix key delay in 10ths of seconds.  To set the prefix key delay, concatenate a number to the 'D'.  For example, the parameter 'D4' sets the prefix key delay to .4 seconds.  The current or new prefix key delay is returned.

'B'	Reset mouse button click count to 0.

Waits for a key to be pressed and returns a binary string representation of the key typed.  For ASCII keys a string of length 1 is returned except for extended keys such as Ctrl+ENTER, Ctrl+BACKSPACE, Alt+A, Ctrl+A, etc.  For extended keys a string of length 2 or 3 is returned.

If 'R'  option is not given, the screen is refreshed.

Example

      key=get_event();

      message('The key pressed was 'event2name(key));

See Also	pgetkey, test_event, last_event, call_key, event2name,  event2index, index2event, list_bindings, name2event, eventtab_index


get_extension

_str get_extension(_str filename)

Remarks	Returns extension of filename without dot.


_get_focus

int _get_focus()

Return	Returns the id of the window which currently has the focus.  0 is returned if a Slick-C window does not have focus.

See Also	_set_focus


_GetFontCharSet

int _GetFontCharSet(_str FontName, _str FontSize, _str options)

Applies To	Label, Text Box, Edit Window, Editor Control, Frame, Command Button, Radio Button, Check Box, Combo Box, List Box, Drive List, File List Box, Directory List Box

Returns	Returns SHIFTJIS_CHARSET if the font specified contains japanese characters.

options is a string of zero or more of the following option letters:

F	Display fixed fonts only.

P	Display printer fonts.

S	(Default) Display screen fonts.

The S and P options may not both be specified.


get_line

void [wid_expression.]get_line( _str &line )

Applies To	Edit Window, Editor Control

Remarks	Places the current line of the current buffer into the variable line.

See Also	insert_line, replace_line, _delete_line


_GetListColCaption

_str  [wid_expression.]_GetListColCaption(int index)

Applies To	Label

Returns	Returns the caption for corresponding to the column index specified.

See Also	_GetListColInfo, _SetListColCaption, _SetListColInfo


_GetListColInfo

void  [wid_expression.]_GetListColInfo(int index, int &twWidth,int &Style, int &InitialState)

Applies To	Label

Remarks	This method retrieves the column values set by the _SetListColInfo method.

See Also	_SetListColInfo, _SetListColCaption, _SetListColInfo


_get_menu_state

int _get_menu_state(int menu_handle, _str command_or_category,int &mf_flags,_str option="C",_str &item_text="", _str &command="",_str &category="", _str &help_command="", _str &help_message)

Remarks	This function is identical to the _menu_get_state function and is present only for backward compatibility with Visual SlickEdit Version 1.0x.


get_message

_str get_message(int error_code=MAXINT)

Return	Returns message corresponding to error number error_code.  If error_code does not exists, "Message not available" is returned.  If the error_code argument is not given or is MAXINT, the message currently displayed on the Visual SlickEdit message line is returned.  The error codes are listed in the file "rc.sh".


_get_reflow_pos

void _get_reflow_pos(int &Noflines_down,int &col)

Applies To	Edit Window, Editor Control

Return	Returns relative position where cursor should be placed in resulting reflowed text output from the _reflow_selection function.  If the cursor does not need to be moved, Noflines_down will be a negative number, otherwise Noflines_down indicates the number of lines to move down in the reflowed text, and col specifies the column to move to.


_get_sel

int [wid_expression.]_get_sel( int &start_pos=0, int &end_pos=0)

Applies To	Text Box, Combo Box

Return	Returns the cursor position (same as end_pos).  start_pos, if given, is set to the cursor position from which the selection was started.  end_pos, if given, is set to the current cursor position.  The lowest cursor position is 1.

See Also	_set_sel, p_sel_start, p_sel_length


_get_selinfo

int _get_selinfo( int &start_col, int &end_col, int &buf_id, _str mark_id="", _str &buf_name="")

Applies To	Edit Window, Editor Control

Remarks	Places start column, end column, buffer id, and buffer name of the selection specified in the corresponding variables.  mark_id is a handle to a selection or bookmark returned by one of the built-ins _alloc_selection or _duplicate_selection.  A mark_id of '' or no mark_id parameter identifies the active selection.  If mark_id specifies a book mark, end_col is set to start_col.

Return	Returns 0 if successful.  Otherwise, TEXT_NOT_SELECTED_RC is returned.


get_string

int get_string(_str &line, _str prompt [,_str completion_info ,[_str initial_value]])

Remarks	Prompts user for an input string on the command line.  The result is placed in the variable line.  The users response is initialized to initial_value if given.  prompt is displayed to left of user input area.   get_string supports retrieval based on the prompt argument and completion.

completion_info has the syntax arg_type[;help_name] and is used for argument completion and help.  arg_type may be any completion constant listed in "slick.sh'".  Completion constants have the suffix "_ARG".  If arg_type starts with a '-' character,  the arg_type is assumed to be the completion constant name without the "_ARG" suffix  (i.e. "FILE" for FILE_ARG).  If the arg_type starts with "-.", the string following is assumed to be a command name.  The command name my be used to get the completion information and help.  help_name may specify a help item in "vslick.hlp" (UNIX: "uvslick.hlp") or be a message.  If help_name starts with a '.', it should specify a help item in "vslick.hlp" (UNIX: "uvslick.hlp").

Return	Returns 0 if successful.  Otherwise 1 (user aborted) is returned.  On error, message is displayed.

Example

     /* Completion/help on edit command. */

     status=get_string(line,'Filename: ', '-.edit')

     /* Completion/help on edit command. */

     status=get_string(line,'Filename: ', FILE_ARG';.edit command')

     /* Completion on file argument with pop-up message help. */

     status=get_string(line,'Filename: ','-FILE;Help message')

     /* Completion on file argument with pop-up message help. */

     status=get_string(line,'Filename: ','-.edit;Help message')

See Also	letter_prompt, prompt


_GetSystemMetrics

int _GetSystemMetrics(int vsm_index)

Returns	Returns operating system default value for specified constant.  vsm_index may be one of the following constants defined in "slick.sh":

VSM_CYCAPTION	// Pixel caption height

VSM_CXDLGFRAME	// Pixel non-sizable dialog box border

VSM_CYDLGFRAME

// X Windows menu font may be different.

VSM_CYMENU	// Height of menu if using system default font.

VSM_CXFRAME	// Sizable border. */

VSM_CYFRAME

VSM_CXSIZE	// Min/max button */

VSM_CYSIZE

VSM_CXVSCROLL	// Default Vertical scroll bar width

VSM_CYHSCROLL	// Default horizontal scroll bar height

VSM_CYSMCAPTION	// Small caption height.

Note that the X windows version only supports VSM_CXVSCROLL and VSM_CYHSCROLL.


get_text

_str [wid_expression.]get_text(int count=1, int seek_pos=-3 )

Applies To	Edit Window, Editor Control

Return	Returns count characters from current buffer starting from seek_pos.  get_text is a stream oriented function which for ASCII buffers will return line separation characters.  Use the get_text function to retrieve strings found by a regular expression search.  count defaults to 1 if not specified.  seek_pos defaults to the physical character at the cursor position or the first physical character to the left of the cursor.

Example

     // This example works for files with tab characters.

     status=search('{if|then|while}','rew');

     if (status) {

          message('Match not found');

          return(status);

     }

     word=get_text(match_length('0'),match_length('S0'))


_GetTextColor

int [wid_expression.]_GetTextColor()

Applies To	Edit window, Editor control

Return	Returns the color index for the character at the cursor.

See Also	_FreeColor, _AllocColor, _SetTextColor, _default_color


_get_var

typeless &_get_var(int index)

Return	Returns the contents of the variable corresponding to the name table index given.

Example

      // VAR_TYPE is defined in "slick.sh"

      index=find_index('rc',VAR_TYPE);

      message('rc='_get_var(index));

See Also	set_var


get_view_id

void get_view_id(int &view_id)

Applies To	All objects

Remarks	For an explanation of how windows,views, and buffers are related, see section Windows Structure.

A view holds the information necessary for the editor to remember your cursor location and scroll position in a buffer.  When you have more than one window looking at the same buffer, the windows have different views of that buffer.  Views can't exist without being attached to a window and a buffer.

Example

get_view_id(view_id);	// Remember current window, view, and buffer.

_next_view();	// Switch to next view in current window.  BY

                                                  // CONVENTION, only the hidden window

                                                  // has more than one view.

activate_view(view_id);	// Go back to orig. window, view, and buffer.

See Also	activate_view, _next_view, _prev_view, _quit_view, load_files, _next_window, _prev_window


_get_window

void [wid_expression.]_get_window(int &x, int &y, int &width, int &height, _str option='C', int &icon_x=0, int &icon_y=0)

Applies To	All objects.

Remarks	Sets the variables given with the x, y, width, height, icon_x, and icon_y of the current window.  All values returned are in the parent scale mode (p_xyscale_mode).  The last argument defaults to 'C'.  The 'C' argument requests the current size of the window.  The 'N' option requests the normalized size of the window  (before it was iconized or maximized).

See Also	_move_window, p_x, p_y, p_width, p_height


_get_windows_directory

_str _get_windows_directory()

Applies To	All objects.

Return	Returns directory with trailing backslash which contains "system.ini".


getcwd

_str getcwd([_str drive])

Return	Returns the current working directory for the drive specified.  drive must be a one character drive letter.  The drive argument is ignored under UNIX.

Example

      message getcwd()      /* Display current working directory. */

      message getcwd('D')  /* Display current working directory of  drive D*/


_gethostname

_str _gethostname()

Return	Returns the host name of the current machine.  This function is only supported by the UNIX version.


getpid

int getpid()

Return	Returns the process id of Visual SlickEdit.


goto_bookmark

_command int goto_bookmark([_str bookmark_name])

"Search", "Go to Bookmark..."

Applies To	Edit Window

Remarks	Places the cursor at the bookmark bookmark_name.  If bookmark_name is not given, the Go to Bookmark dialog box is displayed.

Return	Returns 0 if successful.  Otherwise, a non-zero value is returned and a message is displayed.

See Also	push_bookmark, pop_bookmark, set_bookmark, sb, gb


goto_clipboard

int goto_clipboard( [Nth_clipboard] )

Applies To	Edit Window

Remarks	Places the cursor on the definition line of the Nth clipboard in the ".clipboards" system buffer.  The first clipboard is the most recently created or pasted internal clipboard.  The ".clipboards" buffer must be active before calling this function (activate_view _clipboards_view_id).


goto_line

[wid_expression.]goto_line( [int line_number] )

Applies To	Edit Window, Editor Control

Remarks	Moves the cursor to the line number specified.  Cursor column position is not changed.  Another way to go to a line is to type the line number on the Visual SlickEdit command line.  Press ESC to get to the command line.

Return	Returns 0 if the input line_number is an integer.  Otherwise, 1 is returned and a message is displayed.

See Also	gui_goto_line, gui_goto_col, p_line, p_RLine


_GoToOldLineNumber

int [wid_expression.]_GoToOldLineNumber(int OldLineNumber)

Applies To	Edit Window, Editor Control

Remarks	Searches for the OldLineNumber specified and places the cursor on the line with that old line number or the closest old line number.  If no lines have an old line number set, then the cursor is placed on the real line (p_RLine) number given.  The "real line number" does not count non-savable lines (that is lines with the NOSAVE_LF flag). Use the _SetAllOldLineNumbers function to set the old line numbers.  Note that the Slick-C save command takes an option to set the old line numbers on save.


goto_point

int [wid_expression.]goto_point( _str text_pos, int line_number=-1 )

Applies To	Edit Window, Editor Control

Remarks	Moves the current buffer location to text position specified.  text_pos may either be a seek position to any byte in the current buffer or a text line position which is specified with a seek position to the beginning of a line followed by a count of the number of lines to scroll down.  If line_number is specified, the current line number is set to line_number.  The built-in function point may be used to return the text line position (not necessarily the seek position for a record file) of the beginning of the current line.  The current line number may also be retrieved by the built-in function point.

IMPORTANT:  This function includes lines with NOSAVE_LF set which means that these file offsets will not match what is on disk if the file has non-savable lines.  Use _GoToROffset, _QROffset, p_RLine, and p_RNoflines for dealing with disk seek positions and line numbers.

If a file offset is given, it can not be past the end of the file.  Negative file offsets are possible due to Visual SlickEdit's implementation of line 0.

Return	Returns 0 if successful.  Otherwise INVALID_POINT_RC is returned.

Example

     // Get seek position to the beginning of the current line

     text_pos=point();line_number=point('L');

     down(4);

     goto_point(text_pos,line_number);

See Also	point, seek, gui_seek, _nrseek, _GoToROffset, _QROffset


goto_read_point

void goto_read_point()

Remarks	Places the cursor on the "read point" of the concurrent process buffer.  Process output is inserted before the "read point".  If the read point is not found, the cursor is placed on the first line of the process buffer and the column position is left unchanged.  The concurrent process buffer must be active before calling this function.


_GoToROffset

int [wid_expression.]_GoToROffset(long offset)

Applies To	Edit Window, Editor Control

Remarks	Places the cursor at the byte offset specified. Non-savable lines (lines with the NOSAVE_LF flag set) are not included.  This methed is intended for dealing with disk seek position.  However, if you have changed the load options to translate files when they are openned, these offsets will not match what is on disk.

Returns	Returns 0 if offset is a valid offset.   Otherwise an negative error code is returned.

See Also	goto_point, point, _QROffset, _GoToROffset


goto_tag

_command void [wid_expression.]goto_tag()

Applies To	Edit Window, Editor Control

Remarks	Used in EMACS emulation.  Prompts for a procedure tag name and places the cursor on the definition of the procedure name specified.

See Also	make_tags, gui_make_tags, push_tag


grid

_command void grid( [_str cmdline] )

cmdline is a string in the format: width height

Remarks	Displays or sets the grid width and height used by the dialog editor.  This effects the distance displayed between the dots displayed on a form that is being edited.  If no parameters are given, the current grid width and height are displayed on the command line.  The width and height parameters are in twips (1440 twips are one inch on the display).

See Also	gui_grid, _grid_width, _grid_height


_grid_height

int _grid_height( int new_height= -1 )

Return	Returns and optionally sets the grid height used by the dialog editor.  This affects the distance displayed between the dots displayed on a form that is being edited.  If the new_height parameter is given, the grid height is set to this value.  The new_height parameters is in twips (1440 twips are one inch on the display).

See Also	gui_grid, _grid_width, grid


_grid_width

int _grid_width( int new_width = -1)

Return	Returns and optionally sets the grid width used by the dialog editor.  This affects the distance displayed between the dots displayed on a form that is being edited.  If the new_width parameter is given, the grid width is set to this value.  The new_width parameter is in twips (1440 twips are one inch on the display).

See Also	gui_grid, grid, _grid_height


gui_append_selection

_command int gui_append_selection()

Remarks	Appends the selection to a file you specify.  The Explorer Standard Open dialog box or Standard Open dialog box is displayed to prompt you for a file to append the selection to.

Return	Returns 0 if successful.

See Also	append, put, gui_write_selection


gui_beautify

_command void gui_beautify()

"Tools", "Beautify Source..."

Applies To	Edit Window, Editor Control

Remarks	Runs the C/C++/Java Beautify dialog box which is used to set beautifier options and beautify code.  When we have beautifiers for other languages, this command will pick the beautifier dialog box based on the current buffers extension or prompt the user to pick a beautifier.

See Also	c_beautify, c_beautify_selection


gui_bind_to_key

_command void gui_bind_to_key()

"Tools", "Key Bindings..."

Applies To	Edit Window

Remarks	Runs the Bind Command to Key dialog box which allows you to change your key bindings.  This command is also used to run or edit any Slick-C command.

See Also	bind_to_key, unbind_key


gui_cd

_command int gui_cd()

Ctrl+D or "File", "Change Directory..."

Remarks	Changes the current directory.  The Change Directory dialog box is displayed to prompt you for the directory to change to.  This command supports directory aliases and may change the current directory in the concurrent process buffer.

Return	Returns 0 if successful.

See Also	cd, cdd, alias_cd


gui_copy_to_file

_command int [wid_expression.]gui_copy_to_file()

Applies To	Edit Window

Remarks	Used in EMACS emulation.   Writes the contents of the current buffer to a file you specify.  Prompts you for the file name using the Explorer Standard Open dialog box or Standard Open dialog box.

Return	Returns 0 if successful.  Common return values are 1 COMMAND_CANCELLED_RC, TOO_MANY_MARKS_RC, ACCESS_DENIED_RC, ERROR_OPENING_FILE_RC, INSUFFICIENT_DISK_SPACE_RC, ERROR_CREATING_DIRECTORY_RC, ERROR_READING_FILE_RC, ERROR_WRITING_FILE_RC, DRIVE_NOT_READY_RC, and PATH_NOT_FOUND_RC.  On error, message is displayed.

See Also	save_as, save, name, copy_to_file


gui_draw

_command void gui_draw()

"Tools", "Draw Lines..."

Remarks	The gui_draw command is used to draw lines in the current buffer using the PCDOS graphics characters.  Line drawing characters are not available under most UNIX systems.  The Draw Lines dialog box is displayed which prompts you for a box character set.  You will want to use the OEM Fixed Font (default) in order to view the graphic characters.  Under UNIX, we don't which font if any supports the line drawing characters.

See Also	draw, box


gui_enumerate

_command void gui_enumerate()

"Edit", "Tools", "Enumerate..."

Applies To	Edit Window, Editor Control

Remarks	Adds incrementing numbers to a selection.  Displays Enumerate dialog box.

See Also	enumerate


gui_fill_selection

_command void gui_fill_selection()

"Edit", "Fill..."

Applies To	Edit Window, Editor Control

Remarks	Fill the selection with a character you choose.  The Fill Selection dialog box is displayed to prompt you for the character to press.

See Also	fill_selection


gui_find

_command int [wid_expression.]gui_find()

Ctrl+F or "Edit", "Find..."

Applies To	Edit Window, Editor Control, MDI Window when no edit window present

Remarks	Searches for a string you specify.  The Find dialog box is displayed to prompt you for the search string and options.

Return	Returns 0 if successful.

See Also	find_next, gui_replace,  find, replace, find_prev


gui_find_backward

_command void [wid_expression.]gui_find_backward()

Applies To	Edit Window

Remarks	Used in BRIEF emulation.  Same as gui_find command except that the search direction is initially backward.


gui_find_backward_regex

_command void [wid_expression.]gui_find_backward_regex()

Applies To	Edit Window

Remarks	Used in EMACS emulation.  Same as gui_find command except that the search direction is initially backward and regular expressions are turned on.


gui_find_regex

_command void [wid_expression.]gui_find_regex()

Applies To	Edit Window

Remarks	Used in EMACS emulation.  Same as gui_find command except that  regular expressions are turned on.


gui_find_proc

_command int gui_find_proc()

"Search", "Find Slick-C Proc..."

Applies To	Edit Window

Remarks	Searches for a Slick-C macro tag you specify.  Global functions and event tables are tagged.  In addition, you can enter a static function name defined in the current file.  A dialog box is displayed which allows you to type the tag name in or select from a list of existing tag names.  Completion may be used to assist you in entering the name.

Return	Returns 0 if successful.

See Also	find_proc, list_tags


gui_goto_col

_command void [wid_expression.]gui_goto_col()

Click on Mode Name

Applies To	Edit Window, Editor Control

Remarks	Places the cursor on a column you specify.  A dialog box is displayed which prompts you for the column.

See Also	p_line, goto_line, gui_goto_line, p_RLine


gui_goto_line

_command void [wid_expression.]gui_goto_line()

Ctrl+J or "Search", "Go to Line"

Applies To	Edit Window, Editor Control

Remarks	Places the cursor on a line number you specify.  A dialog box is displayed which prompts you for a line number.

See Also	p_line, goto_line, gui_goto_col, p_RLine


gui_grid

_command void gui_grid()

"Macro", "Grid..."

Remarks	Displays and optionally sets the grid width and height used by the dialog editor.  This affects the distance displayed between the dots displayed on a form that is being edited.  The Grid dialog box is displayed which prompts you for the width and height.  The width and height parameters are in twips (1440 twips are one inch on the display).

See Also	grid, _grid_height, _grid_width


gui_insert_file

_command void gui_insert_file()

"File", "Insert a File..."

Applies To	Edit Window

Remarks	Inserts a file you choose into the current buffer.  The Explorer Standard Open dialog box or Standard Open dialog box is displayed which prompts you to enter a filename.  The file is inserted before or after the current line depending on the Line insert style ("Tools", "Configuration", "More Options...", "Line Insert Style").

See Also	get


gui_justify

_command void gui_justify()

"Document", "Justify..."

Applies To	Edit Window

Remarks	The gui_justify command affects the way the editor handles spaces between words when formatting paragraphs.  By default, the reflow_paragraph and reflow_selection commands place one space between words accept after the punctuation characters ".?!" which get two spaces.

Visual SlickEdit provides three justification styles:

Justification style	Word wrap effects

Justified	Full justification.  Left and right edges of text will align exactly at margins.

Left and Respace	(Default) Left justification with space character reformatting.  One space is placed between words except after the punctuation characters ".?!" which get two spaces.

Left	Left justification with respect for space characters between words.  This setting requires the save options ("Tools", "Configuration", "File Options...", select Save Tab) to be set such that trailing spaces are not stripped when a buffer is saved.

To change the justification style for specific file extensions, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...", select an extension, "Justify Style").

See Also	justify


gui_load

_command int gui_load()

"Macro", "Load Module..."

Remarks	Loads a Slick-C macro module.  The Explorer Standard Open dialog box or Standard Open dialog box is displayed to prompt you for a macro file to load.

Return	Returns 0 if successful.

See Also	gui_unload, load, unload


gui_make_tags

_command int gui_make_tags()

"Search", "Tag Files..."

Remarks	This command builds or updates tag files.  The tags files are used by the push_tag and gui_push_tag to go to tag definitions.  The Tag Files dialog box is displayed which lets you choose the files you wish to tag.

Return	Returns 0 if successful.

See Also	make_tags, push_tag, gui_push_tag, find_tag, f


gui_margins

_command void gui_margins()

"Document", "Margins..."

Applies To	Edit Window

Remarks	This command sets the left, right, and new paragraph margins for the current buffer.  For convenience, we decided to turn word wrap on when the margins are set.  Each buffer has one set of margins.  The Margins dialog box is displayed to prompt you for the new margins.  To set up different initial margins for specific file extensions, use the Extension Options dialog box ("Tools", Configuration...", "File Extension Setup...").

See Also	margins, reflow_paragraph, reflow_selection, gui_justify, justify


gui_open

_command int gui_open( [ int ofn_flags ] )

Ctrl+O, F7 or "File", "Open..."

Applies To	Edit Window

Remarks	Opens one or more files for editing.  The Open dialog box is used to prompt for files and open options.  If a file is already open, that file is activated.

ofn_flags defaults to (OFN_READONLY|OFN_ALLOWMULTISELECT) and may a combination of the following flag constants defined in "slick.sh":

      OFN_ALLOWMULTISELECT

 	Allow multiple file selection.  When set, caller must process a return value which may have space delimited filenames, some of which are double quoted.

      OFN_FILEMUSTEXIST

File(s) selected must exist.

      OFN_CHANGEDIR

Don't restore original directory on exit

      OFN_NOOVERWRITEPROMPT

Don't prompt user with overwrite existing dialog.

      OFN_SAVEAS	File list box does not select files and user is prompted whether to overwrite an existing file.

      OFN_DELAYFILELIST

Display dialog box before displaying file list.  Can speed up display of dialog box.

      OFN_READONLY

Show read only button.    See OFN_PREFIXFLAGS flag.

      OFN_KEEPOLDFILE

Show keep old name button.    See OFN_PREFIXFLAGS flag.

      OFN_PREFIXFLAGS

Prefix return value with -r if OFN_READONLY flag given and -n if OFN_KEEPOLDFILE flag given.

Return	Returns 0 if successful.

See Also	e, edit


gui_print

_command int gui_print()

"File", "Print"

Applies To	Edit Window

Remarks	non-UNIX Platforms: Prints the current buffer or the selection.  The Print dialog box is displayed, which allows you to specify various print options.

UNIX: Prints the current buffer or the selection.  The Text Mode Print dialog box is displayed, which allows you to specify various print options.

Return	Returns 0 if successful.

See Also	print, tprint


gui_push_tag

_command int gui_push_tag()

"Search", "Go To Definition..."

Applies To	Edit Window

Remarks	The push_tag command pushes a bookmark at the cursor position and places the cursor on the source code for a tag you specify.  A dialog box is displayed which allows you to type the tag name in or select from a list of previously entered tag names.  Use the pop_bookmark command (Ctrl+,) to return to the previous bookmark. To create or modify a tag file, use the Tag Files dialog box ("Search", "Tag Files...").  Your tag files will automatically be updated when you make edits.  The SPACE BAR and '?' keys may be used to complete the tag name.  For those of you working in case sensitive languages, you may (we like it the ways it is) want to make tag name searching case sensitive.  The command "set-var def-ignore-tcase 0" will force all tag name searching to be case insensitive.  Currently the C, C++, Pascal, REXX, AWK, Modula-2, Clipper, Cobol, Fortran, and Assembly languages are supported.  See "tags.e" for information on adding support for other languages.

Return	Returns 0 if successful.

See Also	make_tags, push_tag, gui_make_tags, find_tag, f


gui_replace

_command int [wid_expression.]gui_replace()

Ctrl+R or "Search", "Replace..."

Applies To	Edit Window, Editor Control,  MDI Window when no edit windows

Remarks	Searches for a string you specify and replaces it with another string you specify.  The Replace dialog box is displayed to prompt you for the search and replace options.

Return	Returns 0 if successful.

See Also	find_next, gui_find,  find, replace, gui_replace2, find_prev


gui_replace_backward

_command void [wid_expression.]gui_replace_backward()

Applies To	Edit Window

Remarks	Used in BRIEF emulation.  Same as gui_replace command except that the search direction is initially backward.


gui_replace_regex

_command void [wid_expression.]gui_replace_regex()

Applies To	Edit Window

Remarks	Used in EMACS emulation.  Same as gui_replace command except that  regular expressions are turned on.


gui_replace2

int [wid_expression.]gui_replace2(_str search_string, _str replace_string,_str options)

Applies To	Edit Window, Editor Control

Remarks	Searches for search_string and prompts you whether to replace it with replace_string.  The Prompt Replace dialog box is displayed to prompt you for an action when an occurrence is found.

The options argument is a string of one or more of the following:

E	Exact case.

I	Ignore case.

-	Reverse search.

M	Limit search to marked area.

V	Preserve case. When specified, each occurrence found is checked for all lower case, all upper case, first word capitalized or mixed case.  The replace string is converted to the same case as the occurrence found excepted when the occurrence found is mixed case (possibly mulltiple capitalized words).  In this case, the replace string is used without modification.

<	If found, position cursor at beginning of word.

>	If found, position cursor at end of word.

*	Make changes without prompting.

R	Interprets string1 to be a MicroEdge regular expression.  In addition, the characters \ and # take on new meaning in the replace string.  See MicroEdge Regular Expressions.

U	Interprets string1 to be a UNIX regular expression.  In addition, the character \ takes on new meaning in the replace string.  See UNIX Regular Expressions.

B	Interpret string as a Brief regular expression.   See section Brief Regular Expressions.

H	Search through hidden lines.

N	Do not interpret search string as a regular search string.

P	Wrap to beginning/end when string not found.

W	Limits search to words.  Used to search and replace variable names.  To change the word characters for a specific extension, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").

W=MicroEdge-regular-expression

Specifies the valid characters in a word.  The default value is [A-Za-z0-9_$].

W:P	Limits search to word prefix.  For example, searching for "pre" matches "pre" and "prefix" but not "supreme" or "supre".

W:PS	Limits search to strict word prefix.  For example, searching for "pre" matches "prefix" but not "pre", "supreme" or "supre".

W:S	Limits search to word suffix.  For example, searching for "fix" matches "fix" and "sufix" but not "fixit".

W:SS	Limits search to strict word suffix.  For example, searching for "fix" matches "sufix" but not "fix" or "fixit".

Y	Binary search.  This allows start positions in the middle of a DBCS character (only effects Japanese operating systems).  This option is useful when editing binary files which may contain characters which look like DBCS but are not.

,	Delimeter to separate ambiguous options.

XCCLetters	Requires the first character of search string NOT be one of the color coding elements specified. For example, "XCS" requires that the first character not be in a comment or string. CCLetters is a string of one or more of the following color coding element letters:

O	Other

K	Keyword

N	Number

S	String

C	Comment

P	Preprocessing

L	Line number

1	Symbol 1

2 	Symbol 2

3 	Symbol 3

4 	Symbol 4

F	Function color

V	No save line

CCCLetters	Requires the first character of search string to be one of the color coding elements specified. See CCLetters above.

Return	Returns 0 if successful.

See Also	find_next, gui_find,  find, replace, gui_replace, find_prev


gui_save_as

_command int gui_save_as()

"File", "Save As..."

Applies To	Edit Window

Remarks	Saves the current buffer under a name you specify.  The Explorer Standard Open dialog box or Standard Open dialog box is displayed to prompt you for the output file name.  The name of the current buffer is changed unless the Keep old name check box is checked.  You may use the "Save File As Type" combo box to change file format to DOS, UNIX, or Macintosh ASCII format.

Return	Returns 0 if successful.

See Also	save, name, save_as


gui_save_config

_command int gui_save_config()

"Tools", "Configuration", "Save Configuration..."

Remarks	You are prompted whether you wish to save the configuration changes.  Source code representing your configuration changes is saved in the files "vusrdefs.e" (UNIX: "vunxdefs.e"), "vusrobjs.e" (UNIX: "vunxobjs.e"), and "vusrsNNN.e" (UNIX: "vusrsNNN.e") where NNN is unique characters for this version of Visual SlickEdit.  The state file will be saved to "vslick.sta" (UNIX: "vslick.stu") if you loaded new macro modules.    When the editor is invoked, the state file is loaded and then the source code representing your configuration changes are applied.

The state file contains macro module(s), name table, dialog box templates, bitmaps, event table(s), global/static variable value(s), and editor options.  When the editor is invoked, it searches for the state file.  First the directory from which the editor was loaded is searched and then the path directories are searched.  The editor will not search for a state file if the editor is invoked with the '-x' option in the command line.

Return	Returns 0 if successful.  Common return codes are: COMMAND_CANCELLED_RC, ACCESS_DENIED_RC, ERROR_OPENING_FILE_RC, INSUFFICIENT_DISK_SPACE_RC, ERROR_READING_FILE_RC, ERROR_WRITING_FILE_RC, DRIVE_NOT_READY_RC, and PATH_NOT_FOUND_RC.  On error, message box displayed.

See Also	write_state, save_config


gui_save_macro

_command int gui_save_macro()

"Macro", "Save last-macro..."

Remarks	Saves the last macro recorded under the command name you specify.  The Slick-C source for the macro is appended to the "vusrmacs.e" file.  The Save Macro dialog box is displayed to prompt for a name for the macro and options.

Return	Returns 0 if successful.

See Also	save_macro, start_recording, end_recording, record_macro_toggle, record_macro_end_execute


gui_seek

_command void gui_seek()

"Search", "Seek..."

Remarks	The gui_seek command displays the current buffer seek position and allows you to specify a mathematical expression representing a seek position (See math command for syntax of expression).  A seek position is a character position relative to the beginning of the file.  The first character of the file is seek position 0.

If a seek position is given, it can not be past the end of the file.  Negative seek positions are possible due to Visual SlickEdit's implementation of line 0.

You may use the gui_seek command to determine the number of bytes in a file.  However, keep in mind that if your load options are set to expand tabs when loading, the seek file size will not match the disk file size.  In addition, for ASCII files, Visual SlickEdit strips the EOF (character 27) if there is one at the end of the file.

See Also	seek, _QROffset, _GoToROffset, goto_point, point, _nrseek


gui_select_ext

_command void gui_select_ext()

(fileman mode only) "File", "File Manager...", "Select...", "Extension..."

Remarks	Places the character '>' in column one for all files that have the extension specified.  A dialog box is displayed to prompt you for an extension.  Used in fileman mode.

See Also	select_ext


gui_set_var

_command void gui_set_var()

"Macro", "Set Macro Variable..."

Remarks	Displays and optionally sets a macro variable you specify.  A dialog box is displayed to prompt you for the macro variable and value.

See Also	set_var


gui_shift_selection

_command void gui_shift_selection(['L'|'R'])

RButton-Click (selection menu) "Shift Selection Left..." or

RButton-Click (selection menu) "Shift Selection Right..."

Applies To	Edit Window, Editor Control

Remarks	Shifts selected text left or right by an amount you specify.  A dialog box is displayed to prompt you for a shift count.  If the L or R option is not specified the text is shifted left.  Character selections are treated as line selections.


gui_sort

_command void gui_sort()

"Tools", "Sort..."

Applies To	Edit Window

Remarks	Sorts the current buffer or selection.  The Sort dialog box is displayed which allows you to select various sort options.

See Also	sort_buffer, sort_within_selection, sort_on_selection


gui_tabs

_command void gui_tabs()

"Document", "Tabs..."

Applies To	Edit Window

Remarks	Displays and optionally sets the tabs for the current buffer.  The Tabs dialog box prompts you for the tab stops.

See Also	tabs


gui_unlist_ext

_command void gui_unlist_ext()

(fileman mode only) "File", "File Manager...", "Files...", "Unlist Extension..."

Remarks	Deletes lines of files with a specified extension.  A dialog box is displayed which prompts you for an extension.  Used in fileman mode.

See Also	unlist_ext


gui_unload

_command void gui_unload()

"Macro", "Unload Module..."

Remarks	Unloads a Slick-C macro module you choose.  A dialog box is displayed which prompts you for a macro module.  Type in a Slick-C module name or select a module name from the list box.

See Also	unload


gui_visit_file

_command void [wid_expression.]gui_visit_file()

Applies To	Edit Window

Remarks	Used in EMACS emulation.  Loads a file from disk and replaces the contents of the current buffer with it.  Prompts you for the file to load using the Explorer Standard Open dialog box or Standard Open dialog box.

See Also	edit, visit_file


gui_write_selection

_command int gui_write_selection()

"File", "Write Selection..."

Applies To	Edit Window

Remarks	Writes the selection to a file you specify.  The Explorer Standard Open dialog box or Standard Open dialog box is displayed to prompt you for a file to write the selection to.

Return	Returns 0 if successful.

See Also	put, append, gui_append_selection, get


h_beautify

_command void h_beautify()

Applies To	Edit Window, Editor Control

Remarks	Beautifies the current buffer using the current options.  Use the HTML Beautify dialog box set beautifier options used by this command.

See Also	gui_beautify, h_beautify_selection


h_beautify_selection

_command void h_beautify_selection()

Applies To	Edit Window, Editor Control

Remarks	Beautifies the current selection using the current options.  If there is no current selection the entire buffer is beautified.  Use the HTML Beautify dialog box set beautifier options used by this command.

See Also	gui_beautify, h_beautify


help

_command int help( [_str name] )

F1 or "Help", "Contents"

Remarks	The help command allows you to use the command line to get help on a specific help item.  The name parameter is one of over 1700 possible help items (stored in "vslick.lst" or "uvslick.lst" for UNIX).  You don't have to memorize every help item.  Use the space bar and '?' keys (completion) to help you enter the name.  If you are looking at some macro source code and want help on a function, invoke the help command and specify the name of the function.  Browse some of the features on the Help menu.  You may find them useful as well.  If you specify "-search" for name, the help search dialog box is displayed.  For UNIX, if you specify "-using" for name, help on using help is displayed.

Press the ESC key to toggle the cursor to the command line.

Example

     help substr

     help _control

     help windows keys

     help slickedit keys

     help emacs keys

     help brief keys

     help regular expressions

     help operators

F1	Displays context sensitive help.  When you are not in any context, help on table of contents is displayed.


help_index

_command void help_index( [_str name] )

"Help",  "Index Help On"

Remarks	Provides indexed help on the word at the cursor.  If there is no word at the cursor, the Help Index dialog box is still displayed.


hex

_command void [wid_expression.]hex()

Ctrl+Shift+H or "View", "Hex"

Applies To	Edit Window, Editor Control

Remarks	Toggles hex/ASCII display on/off.  This command does more than just set the p_hex_mode property.

In ISPF emulation, this command is not called when invoked from the command line.  Instead ispf_hex is called.  Use ("View", "Hex") to explicitly invoke the hex command.


hex_backspace

_command void [wid_expression.]hex_backspace()

Applies To	Edit Window, Editor Control

Remarks	Deletes byte to left of cursor when in hex mode.


_hex_begin_line

void [wid_expression.]_hex_begin_line()

Applies To	Edit Window, Editor Control

Remarks	Moves the cursor to the beginning of a hex line when in hex mode.


hex_bottom

_command void [wid_expression.]hex_bottom()

Applies To	Edit Window, Editor Control

Remarks	Moves the cursor 1 byte past the last byte in the current buffer.


hex_del

_command void [wid_expression.]hex_del()

Applies To	Edit Window, Editor Control

Remarks	Deletes the byte under the cursor when in hex mode.


_hex_down

void [wid_expression.]_hex_down()

Applies To	Edit Window, Editor Control

Remarks	Moves the cursor down 1 hex line when in hex mode.


_hex_end_line

void [wid_expression.]_hex_end_line()

Applies To	Edit Window, Editor Control

Remarks	Moves the cursor to the last bye in the current hex line.


hex_keyin

_command void [wid_expression.]hex_keyin()

Applies To	Edit Window, Editor Control

Remarks	Inserts byte or nibble specified by last_event() depending on whether cursor is in ASCII column or hex nibbles.


_hex_keyin

void [wid_expression.]_hex_keyin(_str string)

Applies To	Edit Window, Editor Control

Remarks	Inserts bytes or nibbles depending on whether cursor is in ASCII column or hex nibbles.


_hex_left

void [wid_expression.]_hex_left()

Applies To	Edit Window, Editor Control

Remarks	Moves cursor left 1 byte or 1 nibble depending on whether cursor is in ASCII column or hex nibbles.


_hex_pagedown

void [wid_expression.]_hex_pagedown()

Applies To	Edit Window, Editor Control

Remarks	Moves cursor down to next hex page.


_hex_pageup

void [wid_expression.]_hex_pageup()

Applies To	Edit Window, Editor Control

Remarks	Moves cursor up to previous hex page.


_hex_right

void [wid_expression.]_hex_right()

Applies To	Edit Window, Editor Control

Remarks	Moves cursor right 1 byte or 1 nibble depending on whether cursor is in ASCII column or hex nibbles.


hex_tab

_command void [wid_expression.]hex_tab()

Applies To	Edit Window, Editor Control

Remarks	Toggles cursor between ASCII column or hex nibbles when in hex mode.


_hex_up

void [wid_expression.]_hex_up()

Applies To	Edit Window, Editor Control

Remarks	Moves the cursor up 1 hex line when in hex mode.


hex2dec

long hex2dec(_str number [,int base])

Return	Returns number of base 16 or base specified in base 10.  Only bases 2, 8, and 16 are supported.  If number is invalid, '' is returned.  Binary numbers may start with 'b'.  Hex numbers may start with '0x' or 'x'.  Octal numbers may start with the digit '0'.


hide_all_comments

_command void [wid_expression.]hide_all_comments()

"View", "Hide All Comments"

Applies To	Edit window, Editor control

Remarks	Hides all lines in current buffer which contain only comment text.

See Also	all, hide_selection, hide_code_block, show_all, preprocess, allnot, show_procs, show_col1, _lineflags, selective_display, show_braces, show_indent, show_paragraphs


hide_code_block

_command void [wid_expression.]hide_code_block()

"View", "Hide Code Block"

Applies To	Edit window, Editor control

Remarks	Hides lines in current code block.  The definition of the current block depends on the language.  Invoking this command from a key, menu, or button bar multiple times in succession hides larger code blocks.

See Also	all, hide_selection, hide_all_comments, show_all, preprocess, allnot, show_procs, show_col1, _lineflags, selective_display, show_braces, show_indent, show_paragraphs


hide_mouse

_command void hide_mouse( [ 'Y'| 'N'] )

Remarks	Determines whether the mouse is hidden when characters are typed into an edit window or editor control.  When no parameters are given, the current value is displayed on the command line.


hide_selection

_command void [wid_expression.]hide_selection()

"View", "Hide Selection"

Applies To	Edit window, Editor control

Remarks	Hides lines in current selection.

See Also	all, hide_code_block, hide_all_comments, show_all, preprocess, allnot, show_procs, show_col1, _lineflags, selective_display, show_braces, show_indent, show_paragraphs


_hsb_thumb_pos

void _hsb_thumb_pos()

Remarks	This function is executed when the on_hsb_thumb_pos event occurs to horizontally scroll the current window.  This event occurs while the use drags the thumb (elevator).  The hsb_pos argument is a number between 0 and 32000.


hsplit_window

_command int hsplit_window()

Ctrl+H or "Window", "Hsplit"

Applies To	Edit Window

Remarks	Splits the current window horizontally in half.

Return	Returns 0 if successful.  Common return codes are TOO_MANY_WINDOWS_RC and TOO_MANY_SELECTIONS_RC.  On error, message is displayed.

See Also	vsplit_window


html_mode

_command void [wid_expression.]html_mode()

Applies To	Edit Window, Editor Control

Remarks	Activates HTML file editing mode.


html_preview

_command void [wid_expression.]html_preview()

Applies To	Edit Window, Editor Control

Remarks	Saves the current buffer if necessary and runs an HTML browser.  Use the ("Tools", "HTML Setup...") menu item to configure an HTML browser.  This command is on the button bar by default.


i_search

_command void i_search()

Ctrl+I

Applies To	Edit Window

Remarks	Starts an incremental search.  Searching takes place as characters are typed.  A long search may be stopped by pressing Ctrl+Break.  The following keys take on a different definition during an incremental search:

Ctrl+R	Searches in reverse for the next occurrence of the search string

Ctrl+S	Searches forward for the next occurrence of the search string.

Ctrl+T	Toggles regular expression pattern matching on/off.  See section Regular Expressions for information on regular expressions.  The key bound to the BRIEF emulation command re_toggle will also toggle regular expression pattern matching.

Ctrl+W 	Toggles word searching on/off.  To change the word characters for a specific extension, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").

Ctrl+C	Toggles case sensitivity.  The key bound to the BRIEF emulation command case_toggle will also toggle the case sensitivity.

Ctrl+M	Toggles searching within mark.

Ctrl+O	Toggles incremental search mode.

Ctrl+Q	Quotes the next character typed.

See Also	reverse_i_search,  gui_find, find, replace, gui_replace


iconize_mdi

_command void iconize_mdi()

Alt+F9

Remarks	Iconizes the MDI window.


iconize_window

_command void [wid_expression.]iconize_window()

Ctrl+F9

Applies To	Edit Window

Remarks	Iconizes an MDI child edit window.


_idle_time_elapsed

int _idle_time_elapsed()

Return	Returns the time in milliseconds since the last key or mouse event.


_in_comment

boolean [wid_expression.]_in_comment( [boolean in_ml_comment] )

Applies To	Edit Window, Editor Control

Return	Returns true if cursor is within a comment and p_lexer_name is not "".  If in_ml_comment is true, true is return only if the cursor is inside a multi-line comment.  This is useful for determining if after pressing ENTER (splitting the line at the cursor) the cursor will be inside a multi-line comment.


include_search

_str include_search(_str filename [,_str include_dirs])

Remarks	Searches for filename in include directories specified by the include_dirs parameter.  If the include_dirs parameter contains an '=' character, it is assumed to be an environment variable. include_dirs defaults to INCLUDE=' if not specified.

Return	If successful, a complete file specification for filename is returned.  Otherwise '' is returned.


indent_on_enter

void [wid_expression.]indent_on_enter(int indent_amount [,int column])

Applies To	Edit Window, Editor Control

Remarks	Determines action taken when syntax indenting is on and the ENTER key is pressed and the current line starts with a language key word such as IF, WHILE, FOR etc.  If a new line is inserted, it is indented by the indent_amount given.  The optional column parameter may be given to specify an exact column for the cursor to be placed.


indent_previous

_command void [wid_expression.]indent_previous()

Applies To	Edit Window, Editor Control

Remarks	Used in EMACS emulation.  If the cursor is before the first non-blank character of the current line and the previous line is indented with more tabs and/or spaces than the current line, the current lines is indented to align with the previous line.  Otherwise, a tab character is inserted at the cursor position.  This command always inserts a tab character when the command line is active.

See Also	indent_region, indent_rigidly


indent_region

_command void [wid_expression.]indent_region()

Applies To	Edit Window, Editor Control

Remarks	Used in EMACS emulation.  Indents the highlighted text to the next tab stop.  Tab or space  characters are used depending on the indent_with_tabs style.  If no highlighted text exists, an invisible selection is used which contains the last highlighted text not deleted or the last text pasted by the emacs_paste command.

See Also	indent_with_tabs, select_block, select_line, emacs_select_char, cut_region, copy_region, tabify_region, untabify_region, exchange_point_and_mark,  reflow_region, fill_selection, emacs_select_block


indent_rigidly

_command void [wid_expression.]indent_rigidly()

Applies To	Edit Window, Editor Control

Remarks	Used in EMACS emulation.  Without an argument, this command indents the highlighted text to the next tab stop.  Tab or space characters are used depending on the indent_with_tabs  style.  If no highlighted text exists, an invisible selection is used which contains the last highlighted text not deleted or the last text pasted by the emacs_paste command.

With an argument, this command indents or unindents each line in the highlighted text by the number of characters specified by the argument.  For a positive argument, tab or space characters are used depending on the indent_with_tabs style.

See Also	indent_with_tabs, select_block, select_line, emacs_select_char, cut_region, indent_region, tabify_region, untabify_region, exchange_point_and_mark, reflow_region, fill_selection, emacs_select_block


indent_selection

_command void [wid_expression.]indent_selection()

TAB or "Edit", "Indent"

Applies To	Edit Window, Editor Control

Remarks	Indents the marked text.  For line and character marks, one indent level is added to each line.  For block marks, one indent level starting from the left edge of the mark is added.  Indenting will be with tab or space characters depending upon the indent style (CONFIG, "File extension setup...", select an extension, "Indent with tabs").  Set the indent for each level using the CONFIG menu (CONFIG, "File extension setup...", pick an extension, "Indent for each level:").  If this menu item does not exist, the tab stops are used as the indent for each level.

See Also	unindent_selection


indent_string

_str indent_string(width)

Return	If indent with tabs is on, a string of tabs of length width is returned.  Otherwise, a string of spaces of length width is returned.


indent_with_tabs

_command [wid_expression.]indent_with_tabs(['Y'|'N'] )

Applies To	Edit Window, Editor Control

Remarks	If yes, the indent caused by invoking an ENTER key command or reformat paragraph command indents with tab characters.  The indent_with_tabs command only affects the current buffer.  To set the default indent style for a specific file extension use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...", select an extension, "Indent With Tabs').

See Also	indent_with_tabs_toggle


indent_with_tabs_toggle

_command [wid_expression.]indent_with_tabs_toggle(['Y'|'N'] )

"Document", "Indent With Tabs"

Applies To	Edit Window, Editor Control

Remarks	Toggles indenting with tabs on or off for the current buffer.

See Also	indent_with_tabs


index_callable

int index_callable(int index)

Return	Returns index into the name table of the module to which the procedure or command, corresponding to index, is linked.  If index is invalid or does not correspond to a procedure or command, 0 is returned.

Example

      index=find_index('upcase_filter');

      if (!index_callable(index) ) {

           message('upcase_filter name in name table but not linked');

      } else {

           message('upcase_filter is defined in module 'name_name(index));

      }

See Also	call_index


index2event

_str index2event(int index)

Remarks	Converts key table index into the binary string representation of keys returned by get_event(), test_event, and last_event().

See Also	get_event, test_event, last_event, call_key, event2name, event2index, list_bindings, name2event, eventtab_index


_indexin

typeless *HashTable._indexin(_str index)

Return	Returns non-zero pointer to element if element exists at index given.

Example

defmain()

{

    typeless a:[];

    a:['sdf']._makeempty();  // a._indexin('sdf') will be false

    a:['key1']=5;         // a._indexin('key1') will be true

}

See Also	_el, _nextel, _makeempty, _isempty, _varformat, _indexin, _sort


_ini_delete_section

int _ini_delete_section(_str filename, _str section)

Return	Deletes section specified from filename.  The start of a section is identified by a section name in square brackets.  All lines until the next section or end of file are deleted.  Returns 0 if successful.


_ini_delete_section2

int _ini_delete_section2(_str section)

Return	Deletes section specified from current buffer.  The start of a section is identified by a section name in square brackets.  All lines until the next section or end of file are deleted.  Returns 0 if successful.


_ini_find_section

int _ini_find_section(_str section)

Return	Place cursor on start of section specified in current buffer.  Search for section starts from the beginning of the buffer.  The start of a section is identified by a section name in square brackets.  Returns 0 if successful.


_ini_get_section

int _ini_get_section(_str filename, _str section, int &temp_view_id)

Return	Creates view and buffer containing section.  The start of a section is identified by a section name in square brackets.  All lines until the next section or end of file are copied not including the start section line.  Returns 0 if successful.


_ini_get_value

int _ini_get_value(_str filename, _str section, _str field_name , _str &result [, _str default_value])

Return	Places value for field_name defined within section of file specified in result variable.  The start of a section is identified by a section name in square brackets.  All lines until the next section or end of file are part of the section.  If section or field_name do not exist, default_value is placed in result. Returns 0 if successful.

".ini" File Syntax:

[section1]

field_name1=value1

field_name2=value2

...

[section2]

field_name1=value1

field_name2=value2

...


_ini_list_sections

int _ini_list_sections(_str filename)

Return	Creates a buffer and view in list box format of all section names in square brackets in filename.  Returns 0 if successful.

".ini" File Syntax:

[section1]

field_name1=value1

field_name2=value2

...

[section2]

field_name1=value1

field_name2=value2

...


_ini_parse_line

int _ini_parse_line(int ini_view_id ,_str &field_name, _str value)

Return	After a call to _ini_find_section, this function is called to parse each field_name=value line in the section.  A non-zero value is returned when the end of the section is reached.

".ini" File Syntax:

[section1]

field_name1=value1

field_name2=value2

...

[section2]

field_name1=value1

field_name2=value2

...


_ini_put_section

int _ini_put_section(_str filename, _str section, int temp_view_id)

Return	Replaces all field_name=value lines in the section specified with the buffer text contained in temp_view_id.

".ini" File Syntax:

[section1]

field_name1=value1

field_name2=value2

...

[section2]

field_name1=value1

field_name2=value2

...

See Also	_ini_replace_section


_ini_replace_section

int _ini_replace_section(_str filename, _str section, int temp_view_id)

Return	For each field_name=value line in buffer corresponding in temp_view_id, the field_name value is replaced or inserted into section.  In addition, the temp_view_id is deleted.  Unlike the _ini_put_section function, fields which are not defined are NOT deleted.  This allows more than one user to replace multiple field values in one call without deleting field names defined by someone else.  This function is slower than the _ini_put_section function which replaces the entire section with the buffer corresponding to temp_view_id.

".ini" File Syntax:

[section1]

field_name1=value1

field_name2=value2

...

[section2]

field_name1=value1

field_name2=value2

...


_ini_set_value

int _ini_set_value(_str filename, _str section, _str field_name, _str value)

Return	Sets value of field_name defined within section of filename to value specified.

".ini" File Syntax:

[section1]

field_name1=value1

field_name2=value2

...

[section2]

field_name1=value1

field_name2=value2

...


init_command_op

void init_command_op()

Remarks	A command that operates on a single line in a buffer may be extended to operate on all text boxes including the command line by calling init_command_op before, and retrieve_command_results after the command.  Calls to this function may not be nested.

Example

_command upcase_line()

      name_info(','VSARG2_REQUIRES_EDITORCTL |VSARG2_TEXT_BOX)

{

     init_command_op();

     get_line(line);replace_line(upcase(line));

     retrieve_command_results();

}


init_error

void init_error()

Remarks	Initializes regular expression and procedure index variables used for searching and parsing error messages.  See comment at the top of "error.e" for details.


_insert_drive_list

void [wid_expression.]_insert_drive_list()

Applies To	Edit Window, Editor Control, List Box

Remarks	This function is not available under UNIX.  Inserts a list of valid drives for use by a list box.   Each drive letter is in lower case followed by a colon.

Example

combo1.on_create()

{

     // Combo boxes have 3 separate controls.  Each of which can be accessed with all the

     // properties and methods of the stand alone control.  See Combo Box Control.

     p_cb_list_box._insert_drive_list();

}


insert_file_list

int [wid_expression.]insert_file_list(_str command_line )

Applies To	Edit Window, Editor Control, List Box

Remarks	Inserts a file list of the files specified with columns for size, date, time, attributes, and name.

command_line has the following syntax:

        {filespec  | ['-' | '+' option_letters]}

option_letters may be 'H','S','A','D','P','T','V' with the following meaning.

H     	Include hidden files (defaults to OFF)

This option is always turned on under Windows if the "Show all files"explorer option is set.

S     	Include system files (defaults to OFF)

This option is always turned on under Windows if the "Show all files"explorer option is set.

A     	Include archive files (defaults to OFF)

D     	Include directory files (default to OFF)

P     	Append path (defaults to OFF)

T     	Tree file list (defaults to OFF)

V	Verbose output with size, date, attributes.  (defaults to ON)

G	List registered data sets.  This option is ignored for all platforms except OS/390.

N	Stat of data sets.  By default, no trailing slash is appended to partioned data sets (directories).  We have this default mainly due to the fact that this feature can cause a hang.  Use this option when you have to differentiate files from directories.  This option is ignored for all platforms except OS/390.

Z	Return data set member info in the same format as ISPF. This option is ignored for all platforms except OS/390.

filespec may contain operating system wild cards such as '*' and '?'.  If filespec is not specified, current directory is used.

Example

insert_file_list('\*.*");	// List just root directory with directories.

insert_file_list('+tp \*.*");	// List all files.  Append paths.

insert_file_list('-v *.*');	// List files in current directory.  Just file names.

Return	Returns 0 if successful.  Common return codes are FILE_NOT_FOUND_RC, PATH_NOT_FOUND_RC, NO_MORE_FILES_RC, and ACCESS_DENIED_RC.


_insert_font_list

void [wid_expression.]_insert_font_list(_str options="S",_str font_name="" )

Applies To	Edit Window, Editor Control, List Box

Remarks	Inserts a list of font names or font sizes.  If the font_name parameter is specified,, font sizes are inserted.  Otherwise, a list of font names are inserted.

options is a string of zero or more of the following option letters:

F	Display fixed fonts only.

P	Display printer fonts.

S	(Default) Display screen fonts.

The S and P options may not both be specified.

Example

combo1.on_create()

{

     // Combo boxes have 3 separate controls.  Each of which can be accessed with all the

     // properties and methods of the stand alone control.  See Combo Box Control.

     p_cb_list_box._insert_font_list();

}

See Also	_font_type, _choose_font, _font_form, _isscalable_font


insert_keydef

_command void insert_keydef()

Remarks	Inserts Slick-C source code for the binding of the key(s) you type.

Displays message if key sequence pressed has no definition.


insert_line

void [wid_expression.]insert_line( _str line )

Applies To	Edit Window, Editor Control

Remarks	Inserts line into current buffer after the current line and places the cursor after the last character of line.

See Also	get_line, replace_line, _delete_line


insert_literal

int [wid_expression.]insert_literal()

Applies To	Edit Window, Editor Control

Remarks	Inserts a character you choose into the current buffer.  The Insert Literal dialog box is displayed which allows you to enter the character in decimal, hexadecimal, or ASCII.

Return	Returns 0 if a character was inserted.

See Also	keyin


insert_name

int insert_name(_str name, int type ,_str info="", int copy_index=0)

Remarks	Inserts name into names table with type and optional info.  Valid types are listed in "slick.sh" and have the suffix "_TYPE".  Internal name types may not be inserted except for PICTURE_TYPE and EVENTTAB_TYPE.  If the type given is PICTURE_TYPE, name must be a filename.

Return	If successful, the index of the new name table entry is returned.  Otherwise 0 is returned and rc is set to INTERPRETER_OUT_OF_MEMORY_RC.  On error, message displayed.

See Also	find_index, name_match, name_name, name_type, name_info, call_index, set_name_info, delete_name, _insert_name_list, replace_name


_insert_name_list

void [wid_expression.]_insert_name_list(int type ,_str name="")

Applies To	Edit Window, Editor Control, List Box

Remarks	Inserts a list of names from the names table which match name prefix, name, and have the type specified.  If name is not specified, all names having the specified type are inserted.  Valid types are listed in "slick.sh" and have the suffix "_TYPE".


insert_object

_command [wid_expression.]insert_object( [_str object_name ])

"Macro", "Insert Form/Menu Src"

Applies To	Edit Window, Editor Control

Remarks	Inserts Slick-C source code for the dialog box template or menu template into the current buffer.  If object_name is not given, a dialog box is displayed which allows you to enter a form or menu name or select from a list of existing objects.  If the current buffer has a selection that is not locked, it is replaced unless the current selection style does not perform a paste replace (See Select Styles Tab).


insert_retrieve

void insert_retrieve(int retrieve_view_id, _str &first_retrieve, _str command)

Remarks	Inserts command at end of retrieve buffer retrieve_view_id if command is different from last line of buffer.  first_retrieve is set to 1.

See Also	pretrieve_next, pretrieve_prev


_insert_state

int [wid_expression.]_insert_state( _str newValue="",_str set_default="" )

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Remarks	Each text box has its own insert state.  However, all edit windows and editor controls share the same insert state.

Return	When no parameters specified, returns '1' if insert mode on.  Otherwise '0' is returned.

When newValue parameter is not "", the insert state is set to newValue.  newValue must be an integer.

Specify "D" for set_default to set the initial insert state used when the editor is invoked.  The current insert state is not changed.  The current initial insert state is returned.  Specify "" for newValue and "D' for set_default to get the current initial insert state.

Example

      // Make the active object the command line

      p_window_id=_cmdline;

      // set insert mode on.

      _insert_state(1);

      keyin('insert these characters into the command line');

See Also	_insert_toggle


_insert_text

void [wid_expression.]_insert_text(_str string ,boolean binary=false,_str NewLineChars="\r\n" )

Applies To	Edit Window, Editor Control

binary defaults to false.

NewLineChars defaults to "\r\n".

Remarks	Insert string at cursor position.  Specify true for the binary option if you want to allow splitting of newline characters (i.e. CR<insert here>LF).  You may use this function to insert multiple lines of text.  The NewLineChars string specifies a 1 or two byte sequence which indicates the line separation characters for the string argument.  The NewLineChars argument is ignored if the binary option is true.

When you use this function on a record file (p_buf_width!=0) and the binary option is true, all data is inserted into current line and not broken up into multiple lines.

NOTE: If you are inserting at the end of a file and the last character of string is a new line, you can end up with a blank line that has no new line characters in it.  You can test for this condition by calling _line_length(1) which will return 0.  Use delete_line() to delete the line.


insert_toggle

_command void [wid_expression.]insert_toggle()

INS

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Remarks	Toggles insert mode on/off.  The cursor shape is a full character when in over-write mode.  When in insert mode, characters are inserted at the cursor position.  When in over-write mode, the characters at the cursor position are replaced.


_insert_toggle

void [wid_expression.]_insert_toggle()

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Remarks	Toggles insert mode on/off.  Normally the cursor shape is smaller when in insert mode.  When in insert mode, characters are inserted at the cursor position.  When in over-write mode, the characters at the cursor position are replaced.

Example

      // set insert mode on.

      if (!_insert_state()) _insert_toggle();

      keyin('insert these characters into the command line');

See Also	_insert_state


insert_var

void [wid_expression.]insert_var( [_str GlobalVariableName] )

Applies To	Edit Window, Editor Control

binary defaults to false.

NewLineChars defaults to p_newline.

Remarks	Inserts Slick-C source code to rebuild current value of the global variable specified.  If GlobalVariableName is not given, you are prompted to select a global variable name.


_inslit_form

_form _inslit_form

Syntax	_str show('_inslit_form')

Remarks	Displays the Insert Literal dialog box.

Return	Returns '' if the user cancelled.  Otherwise, a 1 character length string is returned.


isalnum

boolean isalnum(_str char)

Return	Returns true if char is a numeric or alphabetic character.


isalpha

boolean isalpha(_str char)

Return	Returns non-zero value if char is an alphabetic character.


iscancel

boolean iscancel(_str key)

Return	Returns true if key:==ESC or key is bound to the command abort.

See Also	islist_cancel, cancel_key_index


isdigit

boolean isdigit(_str char)

Return	Returns true if char is a numeric character.


isdirectory

_str isdirectory(_str filename [,'1'])

Return	Returns non-zero string if filename is a drive or directory specification.  If the '1' option is given, filename is returned in correct format for appending '*.*' (UNIX: '*') or any file list specification.


isdrive

boolean isdrive(_str string)

Return	Returns true if string is of the format d: where d is the drive.


isid_valid

boolean isid_valid(_str name)

Return	Returns true if the name specified is a valid Slick-C identifier.


_isempty

boolean VariableClass._isempty()

Remarks	This method operates on _str, array ( [] ) , hash table ( :[] ) , struct, and union types.  Returns true if variable does not yet point to anything.  This function is very specific to the required implementation of Slick-C.  The changes we plan to make in the future will not effect this function.

Example

t:["a"]=1;

t:["b"]=2;

t:["c"]=3;

// Traverse the elements in hash table

for (i._makeempty();;) {

    t._nextel(i);

    if (i._isempty()) break;

    messageNwait("index="i" value="t:[i]);

}

See Also	_el, _nextel, _makeempty, _deleteel, _varformat, _indexin, _sort


_isfunptr

boolean _isfunptr(typeless t)

Return	Returns true if t is a valid pointer to a function that can be called in the Slick-C syntax (*t)(...).


isinteger

boolean isinteger(_str string)

Return	Returns true if string is a valid signed or unsigned integer.  If string is floating point number, 0 is returned.


_IsKeyDown

int _IsKeyDown(_str key)

Return	Returns a non-zero value if the key specified is currently down.  One of the following keys may be specified:

     CTRL

     SHIFT

This function is typically used when get_event() returns the on_keystatechange event.

Example

defmain()

{

     mou_mode(1);

OuterLoop:

     for (;;) {

         event=get_event();

         switch( event ) {

         case ESC:

              break OuterLoop;

          case ON_KEYSTATECHANGE:

              if (_IsKeyDown(CTRL) ){

                   message("CTRL is down");

               } else {

                    message("CTRL is not down");

               }

           }

      }

      mou_mode(0);

        }


islist_cancel

boolean islist_cancel(_str key)

Return	Returns true if key:==ESC, key is bound to the command abort, or key is bound to the command quit.

See Also	iscancel, cancel_key_index


_isloaded

int _isloaded(int form_index, _str option="")

Return	Returns the window id of a displayed form whose p_template property matches form_index.  Returns 0 if a match is not found.  form_name is an index into the names table of a form.  When a form is loaded with the _load_template function (show calls this function), the p_template property is set to the form_index given to the _load_template function.   This allows a macro to determine the correct name of a form when you press Shift-SPACE to edit a dialog box.  Using the form name would be incorrect since this can be changed after the form is loaded.  The p_template property is read only and is set only by the _load_template and _update_template functions. Beware, by default, this function will find edited or non-edited instances of an object.

option may be 'N' or 'E'.  Specify the 'N' option if you only want to find a non-edited instance of an object.  Specify the 'E' option if you only want to find an edited instance of an object.

See Also	_find_object, _find_formobj, _find_control


_isno_name

boolean _isno_name(_str name)

Return	Returns true if the string name starts with "no-name<b".


isnormal_char

boolean isnormal_char(_str key)

Return	Returns true if isprint(key), key is bound to the normal_character command, or key is not bound to a command and asc(substr(key,1,1))>27.


_isnull_selection

boolean _isnull_selection()

Return	Returns true if there is no selection or the selection is zero bytes in length.  Otherwise, false is returned.

See Also	_select_type, select_active


isnumber

boolean isnumber(_str string)

Return	Returns non-zero value if string is a valid number of any kind, including floating point.


isprint

boolean isprint(_str char)

Return	Returns true if char is length one and its ASCII value is greater than 29.


_isscalable_font

int _isscalable_font(_str font_name ,_str options="S" )

Return	Returns non-zero value if the font_name given is a scalable font.

options is a string of zero or more of the following option letters:

F	Display fixed fonts only.

P	Display printer fonts.

S	(Default) Display screen fonts.

The S and P options may not both be specified.

See Also	_insert_font_list, _choose_font, _font_form, _font_type


_istagging_supported

int _istagging_supported(_str filename)

Return	Returns non-zero value if the filename given has Slick-C macro support for tagging loaded.

See Also	push_tag, gui_make_tags, make_tags


isunc_root

boolean isunc_root(_str filename)

Remarks	This procedure returns true if filename is a root directory on a UNC network.


iswildcard

boolean iswildcard(_str filename)

Return	Returns true if filename contains wild card characters.  For DOS and Windows NT, the wild card characters are '*' or '?'.  For UNIX, the wild card characters are '*', '?', '[', ']', '^', '{', '}', '|', '\', or '~'.


_iswindow_valid

boolean _iswindow_valid(window_id)

Return	Returns true if window_id is a valid window handle.  This function is used to loop through all windows and to check if a window was deleted.

Example

_find_formobj(form_name /*,'E' - Find edited forms only | 'N'-Find non-edited forms only*/)

{

   last=_last_window_id();

   option=upcase(arg(2));

   for (i=1;i<=last;++i) {

      if (_iswindow_valid(i) && i.p_object==OI_FORM &&

           (option=='' || (option=='E' && i.p_edit) ||

           (option=='N' && !i.p_edit)

           )

         ) {

         if (name_eq(i.p_name,form_name)) {

            return(i);

         }

      }

   }

   return(0);

}


java_mode

_command void [wid_expression.]java_mode()

Applies To	Edit Window, Editor Control

Remarks	Activates Java file editing mode.


java_proc_search

int [wid_expression.]java_proc_search(_str &proc_name, int find_first)

Applies To	Editor Control, Edit Window

Remarks	If proc_name is '', then this procedure searches for the first or next occurrence of a Java language function definition.  Search always starts from cursor position.  The find_first parameter indicates whether this is the first or next call.  proc_name is set to the name of the function found.

if proc_name is not '', then a search for a Java language function definition with name proc_name is performed.  Searching begins at the cursor position.  find_first must be non-zero if proc_name is not ''.  The cursor is placed on the definition found, if one is found.

Return	Returns 0 if successful.  Otherwise a non-zero value is returned.


join_line

_command void [wid_expression.]join_line()

Applies To	Edit Window, Editor Control

Remarks	Joins the next line to the current line at the cursor position.  Leading blanks on the next line are removed.


_join_line

int [wid_expression.]_join_line()

Applies To	Edit Window, Editor Control

Remarks	Joins the next line to the end of the current line.

Returns	Returns 0 if successful.  The join is aborted if the join will create a line longer than the truncation length and the truncation length is non-zero (see p_TruncateLength property).   A non-zero value is returned if the join is aborted.

See Also	_JoinLineToCursor


_JoinLineToCursor

void [wid_expression.]_JoinLineToCursor()

Applies To	Edit Window, Editor Control

Remarks	Joins the next line to the cursor position.   If necessary the current line is padded with blanks.  If the cursor is before the end of the current line, the next line is joined at the end of the current line.

Returns	Returns 0 if successful.  The join is aborted if the join will create a line longer than the truncation length and the truncation length is non-zero (see p_TruncateLength property).   A non-zero value is returned if the join is aborted.

See Also	_join_line


justify

_command void [wid_expression.]justify( ['Y' | 'N' | 'U'] )

Applies To	Edit Window, Editor Control

Remarks	The justify command affects the way the editor handles spaces between words when formatting paragraphs.  By default, the reflow_paragraph and reflow_selection commands place one space between words except after the punctuation characters, ".?!", which get two spaces.

Justification style	Word wrap effects

'Y'	Full justification.  Left and right edges of text will align exactly at margins.

'U'	(Default) Left justification with space character reformatting.  One space is placed between words except after the punctuation characters ".?!" which get two spaces.

'N'	Left justification with respect for space characters between words.  This setting requires the save_options to be set such that trailing spaces are not stripped when a buffer is saved.  See Save Options.

The justify command only affects the current buffer.  To set the default justify style for a specific file extension, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...",  select an extension, "Justify").

IMPORTANT: If justify is set to "N", the save options should be set to not strip spaces at the end of each line when a file is saved ("Tools", "Configuration", "File Options...", select Save Tab).

See Also	word_wrap, gui_justify


_justify_form

_form _justify_form

Syntax	_str show('_justify_form', justify_option )

Remarks	Displays Justification dialog box.  See justify function for information on justify_option.

Return	Returns '' if user cancelled the dialog box.  Returns the justify option selected by the user.  You may use the justify function to set the justification based on this return value.


k_match

_str k_match(_str name_prefix,int find_first)

Return	Returns the name of the user recorded macro matching the prefix name_prefix.  If a match is not found, '' is returned.  If find_first is non-zero, matching starts from the first user recorded macro.  Otherwise matching starts after the previous match.


_keepquit_id

int _keepquit_id(int buf_id)

Applies To	Edit Window

Remarks	Switches to the previous buffer if buf_id is equal to the current buffer's buffer id (p_buf_id) and the current window id is not the hidden window id.

Return	Returns 0.


_key_for_display

_str _key_for_display(_str key)

Return	Returns the key name for key.  If the length of the key name is one,  the key name is enclosed in single quotes.  If the key name is the single quote character, it is enclosed in double quotes.  If the key name contains a space, the space is translated to the word 'SPACE'.


key_not_defined

_command void key_not_defined()

Remarks	The editor invokes this command when the user presses a key that has no definition, or a mouse event occurs that has no binding.


key2ascii

_str key2ascii(_str key)

Return	Returns ASCII character corresponding to key.  This is useful for converting keys like ENTER and TAB to the characters Ctrl+M and Ctrl+I.


keyin

void [wid_expression.]keyin( _str string )

Applies To	Text Box, Combo Box, Edit Window, Editor Control

Remarks	Inserts or overwrites string into the command line or text area depending on the insert state and the cursor position.  This function performs word wrap.  Use the _insert_text or insert_line function for better speed.


keyin_buf_name

_command void [wid_expression.]keyin_buf_name()

Applies To	Edit Window, Editor Control Text Box, Combo Box

Remarks	Inserts or overwrites the MDI edit window buffer name depending on the insert state.


keyin_dir_name

_command void [wid_expression.]keyin_dir_name()

Applies To	Edit Window, Editor Control Text Box, Combo Box

Remarks	Inserts or overwrites the MDI edit window buffer name path depending on the insert state.


keyin_match_paren

_command void keyin_match_paren()

')'

Applies To	Edit Window, Editor Control

Remarks	Inserts one of the end parenthesis ], }, or ) and then temporarily places the cursor on the matching begin parenthesis for a short period of time.

See Also	find_matching_paren


keymsg_delay

_command void keymsg_delay( [int tenths_of_second] )

Remarks	Sets the delay before a prefix key is displayed in 10ths of a second.  The prefix key is not displayed if the next key is pressed before the delay specified by tenths_of_second.  If no parameters are specified, the current key message delay is displayed.


_kill_timer

void _kill_timer( int timer_handle=-1)

Remarks	Frees the timer corresponding to timer_handle.  timer_handle must have been allocated by the _set_timer function.  When timer_handle is -1, the get_event timer is killed (see _set_timer) Beware, if a timer callback function dies, the timer handle is automatically killed to prevent infinite error message loops.

See Also	_set_timer


kill_window

_command void [wid_expression.]kill_window()

Applies To	Edit Window

Remarks	Used in EMACS emulation.  Deletes the current window.  This command only works on horizontally split windows.

See Also	shrink_window, move_edge, delete_tile, create_tile, hsplit_window, vsplit_window, change_window, window_left, window_right, window_above, window_below, next_window, prev_window

_command L ...

Remarks	Same as find command except less typing.

See Also	replace, gui_replace, gui_find, find_next, find, find_prev


last_buffer

int last_buffer()

Return	Returns non-zero value if there are more non-hidden buffers.


last_char

_str last_char(_str &string)

Return	Returns last character of string.  If string is null, the space character is returned.


last_event

_str last_event( _str event=null )

Return	Returns a binary string representation of the last event returned from get_event or test_event.  If the event parameter is specified, the last event is set to event.  For ASCII keys, a string of length 1 is returned.  For extended keys like Alt+L, and ESC, a string of length 2 or 3 is returned.  Use the mou_mode function if you want button-up events returned by get_event.

Example

      event=get_event();

      message('The key pressed was 'event2name(last_event()));

See Also	get_event, test_event, call_key, event2name, event2index, index2event, list_bindings, name2event, eventtab_index


last_index

int last_index(_str new_value="",_str option='D')

Return	All index values returned by this function are indexes into the names table.  Visual SlickEdit stores information for names of procedures, commands, variables, event tables, and more in the names table.

When the second parameter is 'D', this function returns (and sets if new_value not ''), the index of the last command executed by a key or the built-in call_key function.

When the second parameter is 'C', this function returns (and sets if new_value not ''), the index of the last command executed by any mechanism.

When the second parameter is 'P', this function returns the prefix key message displayed on the message line for the last key sequence executed.  new_value parameter is ignored.

When the second parameter is 'K', this function returns the index of the last event table used to determine a key binding.  new_value parameter is ignored.

When the second parameter is 'W', this function returns (and sets if new_value not ''), the command line/menu wait value.  This flag is set to non-zero when a command is invoked from the command line or a menu.

See Also	prev_index


last_macro

_command void last_macro()

"Macro", "Execute last-macro"

Remarks	Executes the last recorded macro if one exists.  Message is displayed if no macro exists.


_last_window_id

int _last_window_id()

Return	Returns the highest possible window id allocated.  This function is used in conjunction with the _iswindow_valid function to loop through all windows.

Example

_find_formobj(form_name /*,'E' - Find edited forms only | 'N' - Find non-edited forms only */)

{

   last=_last_window_id()

   option=upcase(arg(2))

   for (i=1;i<=last;++i) {

      if (_iswindow_valid(i) && i.p_object==OI_FORM &&

           (option=='' || (option=='E' && i.p_edit) ||

                   (option=='N' && !i.p_edit)

           )

         ) {

         if (name_eq(i.p_name,form_name)) {

            return(i)

         }

      }

   }

   return(0)

}


lastpos

int lastpos(_str needle [,_str haystack [,_str start [,_str options]]])

Return	Returns the position (1..length(haystack)) of the last occurrence of needle in haystack.  If needle is not found, 0 is returned.  The start parameter specifies the position at which searching begins.  If not specified or if "" is specified, searching begins at end of haystack.  start must be in the range 1..MAX_WHOLE_NUMBER.

Multiple options may be specified with the following meaning:

'I'	Ignore case.

'R'	Interpret search string needle as MicroEdge regular expression.  See section MicroEdge Regular Expressions for syntax of MicroEdge regular expressions.

'U'	Interpret search string as a UNIX regular expression.  See UNIX Regular Expressions.

'B'	Interpret string as a Brief regular expression.   See section Brief Regular Expressions.

'Y'	Binary search.  This allows start positions in the middle of a DBCS character (only effects Japanese operating systems).  This option is useful when scanning binary data which may contain characters which look like DBCS but are not.

Example

lastpos('a','aca')	== '3'

lastpos('aa','aaa',2)	== '2'

lastpos('W\cord','word test',3,'IR')	== '2'

Calling the lastpos function with one parameter allows you to retrieve tagged expression information.  Specifying 'S' followed by a tagged expression number 0-9 (i.e. 'S0') will return the start position of that tagged expression.  1 is returned if that tagged expression was not found.  If 'S' is not followed by a number, the start position of the entire string found is returned.  Specifying a tagged expression number 0-9 will return the match length of that tagged expression.  For 'R' option regular expressions, the first tagged expression is 0 and the last is 9.  For 'U' option regular expressions, the first tagged expression is 1 and the last is 0.  0 is returned if that tagged expression was not found.  A value of '' will return the match length of the entire string found.

Example

     get_line(line);

     word_sep='([~a-zA-Z0-9_$]|^|$)';

     i=lastpos(word_sep'{if|then|while}'word_sep,line,'','r');

     if (!i) {

          message('Match not found');

          return(1);

     }

     word=substr(line,lastpos('S0'),lastpos('0'));

The pos and lastpos function return the same tagged expression information.  For example, pos('S0')==lastpos('S0') will always be true.

See Also	pos


_lbadd_item

void [wid_expression.]_lbadd_item(_str item [,int indent [,int picture_index]] )

Applies To	List Box

Remarks	Adds an item to a list box after the current line.

Input parameters

item	Text of item to be added to the list box.

indent	Indent in twips before picture.  If this parameter is given, you must specify the picture_index parameter.  1440 twips are one inch on the display.

picture_index	Index into names table of a picture to display.  Currently, only bitmap pictures are supported.  The _update_picture function may be used to load a picture and return an index.  In addition, there are several global picture index variables defined in "slick.sh" (look for  _pic_??? variables).

Example

#include 'slick.sh'

#define   PIC_LSPACE_Y 60    // Extra line spacing for list box.

#define   PIC_LINDENT_X 60   // Indent before for list box bitmap.

defeventtab form1

list1.on_create()

{

   p_pic_space_y=PIC_LSPACE_Y;

   _lbadd_item('a:',PIC_LINDENT_X,_pic_drremov);

   _lbadd_item('b:',PIC_LINDENT_X,_pic_drremov);

   _lbadd_item('c:',PIC_LINDENT_X,_pic_drfixed);

   // The p_picture property must be set to indicate that this list box

   // is displaying pictures and to provide a scaling picture for

   // the p_pic_point_scale property.  The p_pic_point_scale property allows the picture to

   // be resized for fonts larger or smaller that the value of the p_pic_point_scale point size.

   p_picture=_pic_drfixed;

   p_pic_point_scale=8;

}

See Also	_lbget_text, _lbget_seltext, _lbget_item, _lbset_item


_lbbottom

void [wid_expression.]_lbbottom(_str item [,int indent [,int picture_index]] )

Applies To	List Box

Remarks	Places the cursor on the last item of the list box.  If the p_multi_select property is MS_NONE or MS_EXTENDED, selected lines are deselected.


_lbclear

void [wid_expression.]_lbclear()

Applies To	List Box

Remarks	Deletes all lines in a list box or buffer.


_lbdelete_item

void [wid_expression.]_lbdelete_item()

Applies To	List Box

Remarks	Deletes the current item in a list box and decrements the p_Nofselected property if the current item was selected.


_lbdeselect_all

void [wid_expression.]_lbdeselect_all()

Applies To	List Box

Remarks	Deselects all selected lines in a list box.  The p_Nofselected property is set to 0.

See Also	 _lbselect_all, _lbselect_line, _lbdeselect_line, _lbinvert, _lbisline_selected, _lbmulti_select_result, _lbfind_selected


_lbdeselect_line

void [wid_expression.]_lbdeselect_line()

Applies To	List Box

Remarks	Deselects the current item in the list box.  The p_Nofselected property is decremented if the current item was selected.

See Also	_lbdeselect_all, _lbselect_all, _lbselect_line, _lbinvert, _lbisline_selected, _lbmulti_select_result, _lbfind_selected


_lbdown

int [wid_expression.]_lbdown()

Applies To	List Box

Remarks	Places the cursor on the next item in the list box.  If the p_multi_select property is MS_NONE or MS_EXTENDED, selected lines are deselected.

Return	Returns non-zero value if the function is called when already on last item.


_lbfind_selected

int [wid_expression.]_lbfind_selected(int find_first)

Applies To	List Box

Remarks	Places the cursor on the next or first selected item of a list box.  Specify a non-zero value for the find_first parameter to find the first selected item.  This function is intended for list boxes with the p_multi_select property set to MS_EXTENDED or MS_SIMPLE_LIST.   If p_multi_select is set to MS_NONE, the line at the cursor is the only line that can be selected (unless a macro has a bug).

Return	Returns 0 if a selected item is found.

See Also	_lbdeselect_all, _lbselect_all, _lbselect_line, _lbdeselect_line, _lbinvert, _lbisline_selected, _lbmulti_select_result


_lbget_item

void [wid_expression.]_lbget_item( _str &item, int &indent, int &picture_index)

Applies To	List Box

Remarks	Places the text, indent, and picture_index of the current item in the list box into the corresponding variables.

See Also	_lbget_text, _lbget_seltext,  _lbset_item, _lbadd_item


_lbget_seltext

_str [wid_expression.]_lbget_seltext()

Applies To	List Box

Return	Returns the text of current item in the list box.  If the current item is not selected, '' is returned.

See Also	_lbget_text, _lbget_item


_lbget_text

_str  [wid_expression.]_lbget_text()

Applies To	List Box

Return	Returns the text of current item in the list box.

See Also	_lbget_seltext, _lbget_item


_lbi_search

int [wid_expression.]_lbi_search(_str &last_data , _str text [,_str options [,'$']] )

Applies To	List Box

Remarks	Searches for an item in the list box which starts with the string, text.  Set last_data to '' to initialize or reinitialize searching.  If you modify any items in the list box, you need to set the last_data input variable to ''.  Otherwise, on subsequent calls to this function, pass in the previous last_data value for fastest search.  When the last_data variable is '', searching always begins from the top of the list box which can be slow if there are many items in the list box.

options is a string of zero or more of the following letters:

E	Match case exactly

I	(Default) Ignore case

R	Interpret text as a MicroEdge regular expression.

U	Interpret text as a UNIX regular expression.

B	Interpret text as a Brief regular expression.

Return	Returns 0 if match is found

See Also	_lbsearch


_lbinvert

void [wid_expression.]_lbinvert()

Applies To	List Box

Remarks	Select all lines in the list box which are currently not selected and deselects all lines which are selected.

See Also	_lbdeselect_all, _lbselect_all, _lbselect_line, _lbdeselect_line, _lbfind_selected, _lbmulti_select_result, _lbisline_selected


_lbisline_selected

int [wid_expression.]_lbisline_selected()

Applies To	List Box

Return	Returns non-zero value if the current line in the list box is selected.

See Also	_lbdeselect_all, _lbselect_all, _lbselect_line, _lbdeselect_line, _lbinvert, _lbfind_selected, _lbmulti_select_result


_lbmulti_select_result

int [wid_expression.]_lbmulti_select_result( [_str always_create_list [,_str cwd]] )

Applies To	List Box

Return	Returns '' if no items are selected in the list box.  Items which contain space characters are placed in double quotes.  Items which contain double quotes are not supported.  If the always_create_list parameter is given and is not '', an "@buffer_name" is always returned.  buffer_name is a buffer where each line contains a filename.  If the cwd parameter is given and is not '', the list box text is assumed to be file names and will be converted to absolute form relative to the directory, cwd.

See Also	_lbdeselect_all, _lbselect_all, _lbselect_line, _lbdeselect_line, _lbinvert, _lbisline_selected, _lbfind_selected


_lbsearch

int [wid_expression.]_lbsearch(_str text [,_str options] )

Applies To	List Box

Remarks	Searches for a whole item in the list box which matches the text string given.  If the options parameter contains the R option, this function will search for an item which contains the text string given.  The search always starts from the top of the list.

options is a string of zero or more of the following letters:

E	Match case exactly

I	(Default) Ignore case

R	Interpret text as a regular expression.

U	Interpret text as a UNIX regular expression.

B	Interpret text as a Brief regular expression.

Return	Returns 0 if match is found

See Also	_lbi_search


_lbselect_all

void [wid_expression.]_lbselect_all()

Applies To	List Box

Remarks	Selects all lines in a list box.  The p_Nofselected property is set to the number of lines in the list box.  Do not call this function if the p_multi_select property is MS_NONE.

See Also	_lbdeselect_all, _lbselect_line, _lbdeselect_line, _lbinvert, _lbisline_selected, _lbmulti_select_result, _lbfind_selected


_lbselect_line

void [wid_expression.]_lbselect_line()

Applies To	List Box

Remarks	Selects the current item in the list box.  The p_Nofselected property is incremented if the current item was not selected.

See Also	_lbdeselect_all, _lbselect_all, _lbdeselect_line, _lbinvert, _lbisline_selected, _lbmulti_select_result, _lbfind_selected


_lbset_item

void [wid_expression.]_lbset_item(_str item [,int indent [,int picture_index]] )

Applies To	List Box

Remarks	Replaces the current item in a list box.

Input parameters

item	Text of item to be added to the list box.

indent	Indent in twips before picture.  If this parameter is given, you must specify the picture_index parameter.  1440 twips are one inch on the display.

picture_index	Index into names table of a picture to display.  Currently only bitmap pictures are supported.  The _update_picture function may be used to load a picture and return an index.  In addition, there are several global picture index variables defined in "slick.sh" (look for  _pic_??? variables).

Example

#include 'slick.sh'

#define PIC_LSPACE_Y 60    // Extra line spacing for list box.

#define PIC_LINDENT_X 60   // Indent for list box bitmap.

defeventtab form1

list1.on_create()

{

   _insert_drive_list();

   p_pic_space_y=PIC_LSPACE_Y;

   _lbtop();_lbup();

   for (;;) {

      if (_lbdown()) break;

      line=_lbget_text();

      dt=_drive_type(line);

      if (dt==DRIVE_NOROOTDIR) {

         status=_lbdelete_item();

         // If deleted last line

         if (status) break;

         _lbup();

         continue;

      } else if (dt==DRIVE_FIXED) {

         picture=_pic_drfixed;

      } else if (dt==DRIVE_CDROM){

         picture=_pic_drcdrom;

      } else {

         picture=_pic_drremov;

      }

      _lbset_item(line,PIC_LINDENT_X,picture);

   }

   // The p_picture property must be set to indicate that this list box is displaying pictures

   // and to provide a scaling picture for the p_pic_point_scale property.

   // The p_pic_point_scale property allows the picture to be resized for fonts larger or

   // smaller than the value of the p_pic_point_scale point size.

   p_picture=picture;

   p_pic_point_scale=8;

}

See Also	_lbget_text, _lbget_seltext, _lbget_item, _lbadd_item


_lbsort

void [wid_expression.]_lbsort( [_str cmdline [,int start_point [,int end_point]]] );

Applies To	List Box

Remarks	Sort items in a list box.  By default, a case insensitive string sort is performed.  If cmdline is specified and is not '', a case sensitive sort will be performed unless the 'I' option letter is specified.

cmdline is a string in the format: [ A|  D]   [ E | I ]    [ -N | -F]

cmdline may contain multiple options having the following meaning:

A	(Default) Sort in ascending order.

D	Sort in descending order.

I	Case insensitive sort (Ignore case).

E	Case sensitive sort (Exact case).

-N	Sort numbers

-F	Sort filenames

start_point and end_point are seek positions to the beginning of lines in the list box returned by the point function.  If start_point is given, sorting does not affect lines above the line on this seek position.  If end_point is given, sorting does not affect lines below the line on this seek position.

Example

#include "slick.sh"

defeventtab form1

list1.on_create()

{

    _lbadd_item("10");

    _lbadd_item("1");

    _lbadd_item("4");

    _lbsort("-n");	// Sort the number in the list box

    _lbsort("d -n");	// Now sort them in descending order

    _lbclear();

    _lbadd_item("c");

    _lbadd_item("A");

    _lbadd_item("C");

    _lbsort();	// Sort strings case insensitive in ascending order.

    _lbsort("d");	// Sort strings case sensitive in descending order.

    _lbsort("i d");	// Sort strings case insensitive in descending order.

}


_lbtop

void [wid_expression.]_lbtop()

Applies To	List Box

Remarks	Places the cursor on the first item of the list box.  If the p_multi_select property is MS_NONE or MS_EXTENDED, selected lines are deselected.


_lbup

int [wid_expression.]_lbup()

Applies To	List Box

Remarks	Places the cursor on the previous item in the list box.  If the p_multi_select property is MS_NONE or MS_EXTENDED, selected lines are deselected.  The first item in a list box is on line 1 (p_line==1).  If there are non items in the list box, the current line will be line 0 (p_line==0).  If you call the _lbup function when on line 1, the cursor will be placed on line 0.  You might want to check if the list is empty (p_Noflines==0) or if you are on line 1 (p_line==1)  before calling this function.

Return	Returns non-zero value call when on line 0 (p_line==0).


lbutton_double_click

event lbutton_double_click

Remarks	Occurs when the left mouse button is double clicked.


lbutton_down

event lbutton_down

Remarks	Occurs when the left mouse button is pressed.  The lbutton_up event occurs when the left button is released.  This event already has default processing which is not typically overridden.  For an edit window you can bind this event to one of the commands mou_click, mou_click_line, mou_click_block, mou_click_menu, mou_click_menu_line, or mou_click_menu_block .


lbutton_triple_click

event lbutton_triple_click

Remarks	Occurs when the left mouse button is triple clicked.

Applies To	Text Box, Combo Box, List Box,  Directory List Box, File List Box, Drive List, Vscroll Bar, Hscroll Bar


lbutton_up

event lbutton_up

Remarks	Command Button - Occurs when the left mouse button is pressed and released and also when the selection character is pressed.

Check Box -  Occurs when the left mouse button is pressed and released and also when the selection character is pressed.

Radio Button - Occurs when the left mouse button is pressed and released and when the p_value property is changed to a non-zero value.

Picture Box, Image - Depends on p_style property as follows:

Value	Description

PSPIC_DEFAULT	Occurs when the left mouse button is pressed and released.

PSPIC_PARTIAL_BUTTON	Occurs when the left mouse button is pressed and released while inside the window.

PSPIC_AUTO_BUTTON	Occurs when the left mouse button is pressed and released while inside the window.

PSPIC_AUTO_CHECK	Occurs when the left mouse button is pressed.

PSPIC_ BUTTON	(Image control only) Occurs when the left mouse button is pressed and released while inside the window.

PSPIC_ FLAT_BUTTON	(Image control only) Occurs when the left mouse button is pressed and released while inside the window.

Other - Occurs when the left mouse button is released.


left

void [wid_expression.]left()

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Remarks	Moves the text cursor one position to the left.

See Also	right


left_justify

_command void [wid_expression.]left_justify()

Applies To	Edit Window, Editor Control

Remarks	Reformats current paragraph or selection using left justification.

See Also	full_justify


left_side_of_window

void [wid_expression.]left_side_of_window()

Applies To	Edit Window, Editor Control

Remarks	Moves the cursor to the left side of the window.

See Also	right_side_of_window


_length

int ArrayVariable._length()

Return	Returns the number of elements in an array.

Example

int a[];

a[0]=1;

a[1]=2;

messageNwait("Number of elements="a._length());


length

int length(_str string)

Return	Returns the number of characters in string.

Example

length('abc')	== 3

length('')	== 0


letter_prompt

_str letter_prompt(_str msg[, _str letters]])

Remark	Displays msg given on message line and waits for a character key contained in the letters argument, or the cancel key to be pressed.  The letters defaults to 'YN' if not specified.

Return	Returns key pressed which caused return.  If it is one of the letter keys, it is returned in upper case.

See Also	get_string, prompt


_line_length

int [wid_expression.]_line_length(boolean IncludeNLChars=false)

Applies To	Edit Window, Editor Control

Return	Returns number of bytes in current line not including end of line characters.  Specify IncludeNLChars=true if you want to include the end of line characters in the returned length.


_lineflags

int [wid_expression.]_lineflags(int flags=0,int mask=flags)

Applies To	Edit Window, Editor Control

Remark	Gets or sets the line status flags for the current line.  If the flags argument is given, the line status flags for the current line are modified.  mask defaults to the same value as flags if it is not specified.  The mask indicates which bits will be set according to flags.

MLCOMMENTINDEX_LF	Indicates which multi-line comment.

Only two are allowed. Must know which

multi-line comment we are in so we know

what will terminate it.

MLCOMMENTLEVEL_LF	Indicates multi-line comment nest level.

NOSAVE_LF	Used by Difference Editor and Merge Editor.  Lines with the NOSAVE_LF flag set are not saved in the file.

VIMARK_LF	Used by VI emulation to mark lines.

MODIFY_LF	Line has been modified.

INSERTED_LINE_LF	Line was inserted.

HIDDEN_LF	Indicates that this line should not be displayed.

PLUSBITMAP_LF	Display "+" bitmap to left of this line.

MINUSBITMAP_LF	Display "-" bitmap to left of this line.

CURLINEBITMAP_LF	Display current line bitmap.

LEVEL_LF	Bits used to store selective display nest level.

The MLCOMMENT flags can not be modified.

Return	The new current line status flags for the current line.

Example

    if (_lineflags() & INSERTED_LINE_LF) {

        messageNwait("This line was inserted");

    }

    if (_lineflags() & MODIFY_LF) {

        messageNwait("This line was modified");

    }

    // Turn on hidden flag

    _lineflags(HIDDEN_LF,HIDDEN_LF);

    if (_lineflags() & HIDDEN_LF) {

        messageNwait("HIDDEN flag is on");

    }

    // Turn off HIDDEN flag

    _lineflags(0,HIDDEN_LF);

    if (!(_lineflags() & HIDDEN_LF)) {

        messageNwait("hidden flag is off");

    }


line_to_bottom

_command void [wid_expression.]line_to_bottom()

Applies To	Edit Window, Editor Control

Return	Places current line at bottom of window.


line_to_top

_command void [wid_expression.]line_to_top()

Applies To	Edit Window, Editor Control

Return	Places current line at top of window.


linewrap_delete_char

_command void linewrap_delete_char()

Del

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Remarks	Deletes character at the cursor.  If the cursor is in an edit window or editor control, and the rest of the line is null, the next line is joined to the current line.


linewrap_rubout

_command void linewrap_rubout()

Backspace

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Remarks	Deletes character to left of cursor.  For an edit window or editor control, the cursor will wrap to the end of the previous line when the left margin is hit.  If you want line wrapping to occur when column one is reached, turn on the Line Wrap on Text check box on the Redefine Common Keys dialog box ("Tools", "Configuration", "Redefine Common Keys...").


link_window

_command int link_window()

"Window", "Link Window..."

Applies To	Edit Window

Remarks	Displays Link Window dialog box.  Allows you to select a different file or buffer to display in the current window.  This command is only useful when One File per Window is on ("Tools", "Configuration").  Use the list_buffers command,  if you are NOT in one file per window mode because it is more powerful than this function.

Return	Returns 0 if switched buffers successfully.


list

int list( [_str cmdline] )

Applies To	Edit Window

Remarks	Creates a buffer and inserts a tree directory list of the files specified with columns for size, date, time, attributes, and name.  The mode is changed to fileman mode.  When in fileman mode F1 becomes help on file management keys and the right mouse button brings up a menu of file management commands.

cmdline has the following syntax:

      {[ [- | +] option_letters] [ [@]filespec ]}

option_letters may be 'H','S','D','P','T' with the following meaning:

H     	Include hidden files.  Defaults to off.  Ignored by UNIX version.

This option is always turned on under Windows if the "Show all files"explorer option is set.

S     	Include system files.  Defaults to off.  Ignored by UNIX version.

This option is always turned on under Windows if the "Show all files"explorer option is set.

D     	Include directory files.  Defaults to off.

P     	Append path.  Defaults to on.

T     	Tree file list.  Defaults to on.

filespec may contain operating system wild cards such as '*' and '?'.  If filespec is not specified, the current directory is used.  '@' sign prefix to filespec indicates that filespec is a file or buffer which contains a list of file names to be used as arguments to this command.

Command Line Examples

list c:\	List all files on drive C.

list @backup.lst	List files specified by each line of the file "backup.lst".

list	List all files starting from the current directory.

list +HS c:\	list all files on drive C including hidden and system files.

Return	Returns 0 if successful.  Common return codes are TOO_MANY_SELECTIONS_RC, FILE_NOT_FOUND_RC, PATH_NOT_FOUND_RC, and TOO_MANY_SELECTIONS_RC.  On error, message is displayed.

See Also	DIR


list_bindings

void list_bindings(int &key_index,  int &name_index_found, int &used_etab_index, int root_etab_index, int mode_etab_index, int match_index)

Remarks	Finds all bindings to a name table index.

Parameters	Description

key_index	(Input and Output)  Previous event table index. Set this to -1 to start search from the beginning of the event tables.  On return, this is set to -1 to indicate if nothing was found. or the index into the used_etab_index of the item found.

name_index_found	(Ouput only)  Index of names table item found.  This will either be an event table or match_index.

used_etab_index	(Output only) Set to root_etab_index or mode_etab_index.

root_etab_index	Name table index of root key table.  Usually _default_keys.

mode_etab_index	Name table index of mode key table.  Usually p_mode_eventtab.

match_index	Index of command to find.

Example

// For a more complete example, see at source for append_key_bindings

// in "bind.e".

match_index=find_index("gui_find",COMMAND_TYPE);

key_index= -1;

list_bindings(key_index,name_index_found,used_etab_index,

                     _default_keys,p_mode_eventtab,match_index);

if (key_index>=0 ) {

    if (name_type(key_index) & EVENTTAB_TYPE) {

        message("Found an event table.  Must recurse");

    } else {

         message("Found one key binding: "event2name(index2event(key_index)));

    }

}

See Also	get_event, test_event, last_event, call_key, event2name, event2index, index2event, eventtab_index, name2event


list_buffers

_command int list_buffers()

Ctrl+Shift+B or "Document", "List Buffers..."

Applies To	Edit Window

Remarks	Displays Select a Buffer dialog box.  Displays selection list of all buffers being edited.  The buttons on the right of this dialog box operate on the selected line in the buffer list box.

Return	Returns 0 if switched buffers successfully.


list_clipboards

_command int list_clipboards()

Ctrl+Shift+V or "Edit", "List Clipboards..."

Applies To	Edit Window, Editor Control

Remarks	Displays List Clipboards dialog box.  Allows you to select a clipboard from a list of your most recently used (15 is the default maximum) clipboards to insert at the cursor.  Subsequent calls to the paste command will insert the same text as your last list_clipboards.  LINE type clipboards are inserted before or after the current line depending upon the Line insert style ("Tools", "Configuration", "More Options...", "Line Insert Style").  By default, they are inserted after the current line.

Return	Returns 0 if successful.  Common return codes are 1 (clipboard empty, nothing selected, or clipboard text too long), TOO_MANY_SELECTIONS_RC, TOO_MANY_WINDOWS_RC, and TOO_MANY_FILES_RC.  On error message is displayed.

See Also	paste


list_config

_command int list_config()

Remarks	Runs the external batch macro 'listcfg.e' with no arguments.  This command creates a new buffer and inserts Slick-C source code representing the configuration of insert mode, colors, search case sensitivity, cache size, spill file path, scroll style, language syntax options, file load/save options, tabs, margins, and more.  For all variables that start with the four letters 'def_', an assignment statement (variable= current value) will be inserted into this buffer.  This command does NOT list key bindings or modified dialog box templates.  The commands list_objects, list_usersys_objects, and list_source generate other information.

Return	Returns 0 if successful.

See Also	list_source, list_keydefs, list_objects, list_usersys_objects, list_sys_objects


list_errors

_command void list_errors()

Applies To	Edit Window

Remarks	Displays the concurrent process buffer in a popup edit window and allows you to go to a specific error location.

See Also	next_error, cursor_error, project_compile, project_build


list_keydefs

_command int list_keydefs()

Remarks	Runs the external batch macro 'listkeys.e' with no arguments.  This command creates a new buffer and inserts Slick-C source code representing all the key definitions including key definitions for all modes.  You may want to print this file and use it as a reference of your key definitions.

See Also	list_source, list_objects, list_usersys_objects, list_config


list_macros

_command void list_macros()

"Macro", "List Macros..."

Applies To	Edit Window

Remarks	List user recorded macros and allows them to be bound to keys, edited, or run.

See Also	start_recording, end_recording, last_macro, record_macro_toggle, record_macro_end_execute


list_matches

_str list_matches(_str name, _str match_fun_name [,_str title [,_str allow_multi_select [,_str help_fun_name]])

Remarks	Creates a pop-up selection list of items that are a prefix match of name.  Returns line selected or '' to indicate that nothing was selected.  match_fun_name is a prefix name or index of a completion function.   "_match" is appended to match_fun_name to determine the complete function name.  The following are completion functions tag_match, b_match, c_match, _pic_match, _form_match, mt_match, e_match, f_match, _menu_match, m_match, pcb_match, pc_match, and v_match.  New completion functions may be defined (see comment in module "complete.e" for more information).  The selection list window title is set to title if given.    The help_fun_name argument is the name of a help procedure.

Return	If allow_multi_select is not '', multiple lines in the selection list may be selected with the space- bar key.   list_matches returns each selected line separated with a space or if there are too many, a list file specification is returned.  A list file specification starts with the character '@'.  If allow_multi_selection is not given or '', line selected is returned.  '' is returned to indicate user pressed cancel key, list is null, or error.  On error message is displayed and user is prompted to press a key.

Example

    file_name=list_matches('','f');

    if (file_name=='' ) {

         return(1)  // Cancel key pressed or list null.

    }

    message('file_name='file_name);


list_modified

_command int list_modified([_str title])

Applies To	Edit Window

Remarks	Displays a list of buffers that are modified.  The Modified Buffers dialog box is displayed which allows you to select the files you wish to save, save all files, or save none.  The title argument specifies the title of the dialog box and defaults to "Modified Buffers" if not specified or ''.

Return	Returns 0 if successful.


list_objects

_command int list_objects()

Remarks	Opens a new buffer called "vusrobjs.e" and inserts Slick-C source code for all dialog box templates (forms) created by the user.  System dialog box templates are not inserted.

Return	Returns 0 if successful.  Returns 1 if no templates are defined.  Other errors are non-zero.

See Also	list_usersys_objects, list_sys_objects


list_source

int list_source()

Applies To	Edit Window

Remarks	This command creates a buffer called "vusrdefs.e" (UNIX: "vunxdefs.e") and inserts Slick-C source code representing your current configuration.  All configuration changes are listed except modified or new dialog box templates and menu templates.  See list_objects, list_sys_objects for information on generating source code for your dialog box and menu templates.   The purpose of generating this file is usually to update to a new version of Visual SlickEdit that can not read your old "vslick.sta" file.  The vusrdefs (UNIX: vunxdefs) batch macro can be executed in the new version of Visual SlickEdit by typing the name on the command line.

Return	Returns 0 if successful.

See Also	list_objects, list_usersys_objects, list_keydefs, list_config


list_sys_objects

_command int list_sys_objects()

Applies To	Edit Window

Remarks	Opens a new buffer called "sysobjs.e" and inserts Slick-C source code for all system dialog box (forms) and menu templates that existed when Visual Slick Edit was installed.  No user created dialog box templates are inserted.  This command is typically used by the developers of Visual SlickEdit.

Return	Returns 0 if successful.  Returns 1 if no templates are defined (this should never happen).  Other errors are non-zero.

See Also	list_usersys_objects, list_objects


list_tags

_command int list_tags()

"Search", "List Tags..."

Applies To	Edit Window

Remarks	Scans the current buffer for tags and displays the tags in a selection list.  Only functions are listed.  You may select a tag to go to.  Unlike the push_tag and find_tag commands, this function does not require a tags file.  Currently the C, C++, Pascal, REXX, AWK, Modula-2, dBASE, Cobol, Fortran, Ada, and Assembly languages are supported.  Use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...") to install support for Modula-2, dBASE, Cobol, Fortan, and Ada.  See "tags.e" for information on adding support for other languages.

Return	Returns 0 if successful user selected to go to a tag.

See Also	push_tag, find_tag, find_proc, make_tags, gui_make_tags


list_usersys_objects

_command int list_usersys_objects()

Applies To	Edit Window

Remarks	Opens a new buffer called "vusrsNNN.e" and inserts Slick-C source code for system dialog box templates (forms) that have been modified since Visual SlickEdit was installed.  No user created dialog box templates are inserted.

Return	Returns 0 if successful.  Returns 1 if no templates are defined.  Other errors are non-zero.

See Also	list_sys_objects, list_objects


load

_command int load( [_str modules] )

Applies To	Edit Window

Remarks	Compiles (if necessary) and loads the modules specified.  If the module is already loaded it is replaced.  If no module is specified and the current buffer has the extension ".e", the current buffer is saved (if necessary) and loaded.

Return	Returns 0 if successful.  Since this command does not actually load the modules until the macro terminates, it is possible that the load can still fail.

See Also	gui_load, gui_unload, unload


_load

int _load(_str modules,_str load_option="L");

Remarks	load_option may be 'L','R', or 'U'.  Module name extensions are replaced with '.ex'.

Return	If load_option=='L' the modules specified are loaded if the module is not already loaded.  If any of the modules are already loaded, loading stops and MODULE_ALREADY_LOADED_RC is returned.  Error return codes may be INTERPRETER_OUT_OF_MEMORY_RC or a file I/O RC.  Upon successful completion, 0 is returned.

If load_option=='R' the modules specified are loaded after the Slick-C interpreter stops.  If any of the modules are already loaded, they are unloaded before the new module is loaded.  Return value may be INTERPRETER_OUT_OF_MEMORY_RC immediately after _load is executed.  Upon successful completion, 0 is returned.  If any of the modules can not be unloaded, the message "Can't remove module" will be displayed.

If load_option=='U' the modules specified are unloaded.  If any of the modules can not be unloaded because they are running, unloading stops and CANT_REMOVE_MODULE_RC is returned.  Upon successful completion, 0 is returned.

See Also	unload, load, gui_load, gui_unload, load_all


load_all

int load_all( [_str eventtab_name] );

Remarks	Loads all Slick-C source files (.e) currently opened.  If the eventtab_name argument is given and not '', only source files which define an event table of the specified name are loaded.

See Also	unload, load, gui_load, gui_unload, _load


_LoadButtonBar

void _LoadButtonBar(int index, int bbside=BBSIDE_TOP)

Applies To	MDI Window

Remarks	Loads a form onto an MDI window side.  index is corresponds to a form in the names table returned by find_index.  bbside may be one of the following constants defined in "slick.sh":

BBSIDE_LEFT

BBSIDE_TOP

BBSIDE_RIGHT

BBSIDE_BOTTOM

See Also	_GetButtonBar


load_files

int [wid_expression.]load_files( _str params )

Applies To	Edit Window, Editor Control

Remarks	For an explanation of how windows, views, and buffers are related, see section "Windows Structure".

Params may contain file names and the following options

name	Find the buffer specified or load the file

+ or -L[C|Z]	Turn on/off load entire file switch.  The optional C suffix count the number of lines in the file.  The Z suffix counts the number of lines in the file and truncates the file if an EOF character is found in the middle of the file.

+ or -LF	+LF turns off loading entire file and turns on fast line count.  This is the fastest way for Visual SlickEdit to count the number of lines in a file.  -LF turns off fast line counting.

+ or -LB	Turns on/off binary loading.  Sets initial value of p_binary property.  All edit/save options which performed translations are ignored.   For example, tab expansion or tab compression options are ignored.  This allows "safe" editing of binary files even when edit/save file translation are on.

+ or -LE	Turns on/off show EOF option.  Sets initial value of p_showeof property.  When on, EOF characters at the end of DOS files are not stripped.  This option is not supported when the +LZ option is given.

+ or -LN	Turns on/off show new line characters option..  When on, new line characters are initially visible.

+ or -BP	Turn on/off reinsert selected buffer/window after current buffer/window.  Wonderful option!  Helps prev_buffer and prev_window commands to switch previously active file or window.

+ or -S	Turn on/off unmodified block swapping to spill file.  Default is off.

+nnn	Load binary file(s) that follow in record width nnn.

+T [buf_name]	Start a default operating system format temp buffer with name buf_name.

+TU [buf_name]	Start a UNIX format temp buffer with name buf_name.

+TM [buf_name]	Start a MACINTOSH format temp buffer with name buf_name.

+TD [buf_name]	Start a DOS format temp buffer with name buf_name.

+Tnnn	Start a temp buffer where nnn is the decimal value of the character to be used as the line separator character.

+FU [buf_name]	Force Visual SlickEdit to interpret a file in UNIX format.

+FM [buf_name]	Force Visual SlickEdit to interpret a file in MAC format.

+FD [buf_name]	Force Visual SlickEdit to interpret a file in DOS format.

+Fnnn	Force Visual SlickEdit to use nnn as the decimal value of the line separator character.

+ or -U[:nnn]	Turn on/off undo.  Specifying nnn sets the maximum number of undoable steps.  Default is off.  If +U  is not followed by :nnn, nnn defaults to 300.  The range of nnn is 0..32767.

+ or -E	Turn on/off expand tabs to spaces switch.  Default is off.  Only tabs of increments of 8 are supported.

+E:ddd	Expand tabs to spaces.  This expands tabs in increments of ddd.

+ or -D	Turn on/off memory buffer name search.  Disk file search.

+ or -C	Turn copy view switch on or off.  Default is off.

+V [view_id]	Selects buffer by view information.

-I or +I	Insert a window with no views.

+ or -W	If the file or buffer is not already displayed in a window, insert a window for displaying the file or buffer.

+B buf_name	Look in memory only for buffer with buffer name or document name buf_name.

+BB buf_name	Look in memory only for buffer with buffer name buf_name.

+BD buf_name	Look in memory only for buffer with document name buf_name.

+BI buf_id	Activate buffer with buffer id buf_id.

+ or -M	If on, do not save view(cursor position) of current buffer before activating a new buffer.

+ or -N	Network support switch.  When on, Visual SlickEdit will detect when another application has the same file open and automatically select "Read only" mode.  This option requires an extra file handle open to the original file.

+ or -R	Turn replace current buffer switch on/off.

+ or -Q	Quiet switch.

The options above that only show a plus sign will also take a minus sign.  However there function will remain the same.

  Here is a more detailed description of the options.

+ or -L[C]	Turn on/off load entire file switch.  Default is off.    Entire file is loaded and unmodified blocks are swapped to spill file so that file handle is freed.  Used to speed up file scrolling on slow disk.  Used to free file handles or prevent file sharing problems.  Used to guard against losing files loaded from remote system.  The optional C suffix tells Visual SlickEdit to count the number of lines in the file.  The Z suffix counts the number of lines in the file and truncates the file if an EOF character is found in the middle of the file.

+ or -BP	Turn on/off reinsert selected buffer/window after current buffer/window.  Effects any macro which uses the edit command to activate an existing buffer or window.  Effected commands include push_tag, next_error, edit, cursor_error, and list_buffers.  Helps the prev_buffer and prev_window commands to switch to previously active file or window.

+ or -S	Turn on/off unmodified block swapping to spill file.  When on, unmodified blocks are spilled to spill file.  Used for editing remote files across slow links.  Once a block is loaded from a slow access link, if it needs to be spilled, it is written to your local hard disk or EMS/extended memory.

+nnn	Load binary file giving each line nnn characters.  Used for editing binary or record files.

+T [buf_name]	Start a temp buffer with name buf_name.  buf_name is expanded to absolute form and stored in the internal variable ".buf_name".  The options +TU, +TM, and +TD are identical to the +T option except they select one of the ASCII file formats UNIX,  MACINTOSH, or DOS.

+ or -U[:nnn]	Turn on/off undo.  Specifying nnn sets the maximum number of undoable steps.  Default is off.  If +U  is not followed by :nnn, nnn defaults to 300.  The range of nnn is 0..32767.

+ or -E	Turn on/off expand tabs to spaces switch.  Default is off.  Only tab increments of 8 are supported.

+ or -D	Turn on/off memory buffer name search.  When on, files are loaded from disk regardless if there is a copy already in memory.  It is wise to  rename the copy after loading it to prevent saving the wrong file.

+ or -C	Turn copy view switch on or off.  Default is off.  When a file name is specified and a buffer exists with the same name this option determines whether a new view (+C) of the buffer is inserted into the current window or the active view information is replaced with non-active view information of the buffer specified.

+V [view_id]	Selects buffer by view information.  If no view is specified the active view is assumed.

+I	Insert a window with no views.  Window is deleted if no views are inserted.

+ or -W	Insert a window for each file that follows.

+B buf_name	Look in memory only for buffer with buffer name or document name buf_name.  If buffer is not found, FILE_NOT_FOUND_RC is returned.  No buffer is created, if buffer is not found.  Buffer name search is case insensitive for file systems like DOS which are case insensitive.  Buf_name must be in absolute form (Full path spec).

+BB buf_name	Look in memory only for buffer with buffer name buf_name.  If buffer is not found, FILE_NOT_FOUND_RC is returned.  No buffer is created, if buffer is not found.  Buffer name search is case insensitive for file systems like DOS which are case insensitive.  Buf_name must be in absolute form (Full path spec).

+BD buf_name	Look in memory only for buffer with document name buf_name.  If buffer is not found, FILE_NOT_FOUND_RC is returned.  No buffer is created, if buffer is not found.  Buffer name search is case insensitive for file systems like DOS which are case insensitive.  Buf_name must be in absolute form (Full path spec).

+BI buf_id	Activate buffer with buffer id buf_id.

+ or -M	If on, do not save view(cursor position) of current buffer before activating a new buffer.  This option has no effect if the +I or +W options are used.

+ or -N	Network support switch.  When on, Visual SlickEdit will detect when another application has the same file open and automatically select "Read only" mode.  This option requires an extra file handle open to the original file.

+ or -R	Turn replace current buffer switch on/off.  When on the files that follow will replace the current buffer.

+ or -Q	Quiet switch.  When on, no message is displayed when an error occurs.

Example

      /* Create a temp buffer with no name and replace the active view information with */

      /*  the view information for the temp buffer. */

      /* The previous buffers view information is saved in the buffers non-active view. */

      load_files '+t'

      /* Create a temp buffer with no name and turn undo on saving last 300 steps.*/

      load_files '+u +t'

      /* Create a temp buffer with no name and turn undo on saving last 32767 steps.*/

      load_files '+u:32767 +t'

      /* Load the file "test.c" from disk even if already in memory */

      load_files '+d test.c'

      /* Create a new window and a temporary buffer.  The new */

      /* window will show the temporary buffer created. */

      load_files '+i +t'

      /* Create a new window and edit the file test.c in it. */

      load_files '+i test.c'

      /* Activate the ".command" retrieve buffer */

      load_files '+b .command'

      /* Activate the ".command" retrieve buffer */

      load_files '+v 'RETRIEVE_VIEW_ID

      /* Insert a view of the ".command" retrieve buffer into the active window view ring. */

      load_files '+c +v 'RETRIEVE_VIEW_ID

      /* Create a new window and display the active buffer in it. */

      load_files '+i +v'

;          Case 1  No buffer has name absolute(filename).

;          Then     Filename is loaded from disk.  The active view information

;                       is replaced with the non-active view information of this

;                       buffer.

;          Case 2  Buffer exists with name absolute(filename).

;          Then     The active view information is replaced with the non-active

;                       view information of this buffer.

;

;          In any case, the active view information is saved in the active buffer's non-active view.

load_files 'filename'

Return	Returns 0 if successful.  Common return codes are FILE_NOT_FOUND_RC (occurs when wild card specification matches no files), NEW_FILE_RC (empty buffer created with filename specified because file did not exist), PATH_NOT_FOUND_RC, TOO_MANY_WINDOWS_RC, TOO_MANY_FILES_RC, TOO_MANY_SELECTIONS_RC, NOT_ENOUGH_MEMORY_RC.  On error, message is displayed.

See Also	get_view_id, activate_view, _next_view, _prev_view, _quit_view, _next_window, _prev_window


load_options

_command void load_options( [options] )

Remarks	If you prefer using menus, use the File Options dialog box ("Tools", "Configuration", "File Options...", select Load Tab).  The load_options command specifies the default switches used by the e or edit commands.  If no options are given, the current option settings are displayed on the command line.

non-UNIX platforms:  If you want different load_options for different disk drives, define an environment variable called VSLICKLOAD and specify each drive followed by the options.  For example, "set VSLICKLOAD= a: +L b:+L" specifies preloading files from floppy drives A and B.

options may contain the following switches:

+ or -L[C|Z]	Turn on/off load entire file switch.  The optional C suffix tells Visual SlickEdit to count the number of lines in the file.  The Z suffix counts the number of lines in the file and truncates the file if an EOF character is found in the middle of the file.

IMPORTANT:  Under DOS, some compilers such as Clipper and TURBO Pascal to not support sharing files.  If your compiler can not open a source file Visual SlickEdit has loaded, turn this switch on.

+ or -LF	+LF turns off loading entire file and turns on fast line count.  This is the fastest way for Visual SlickEdit to count the number of lines in a file.  -LF turns off fast line counting.

+ or -LB	Turns on/off binary loading.  All edit/save options which performed translations are ignored.   For example, tab expansion or tab compression options are ignored.  This allows "safe" editing of binary files even when edit/save file translation are on.

+ or -LE	Turns on/off show EOF option.  When on, EOF characters at the end of DOS files are not stripped.  This option is not supported when the +LZ option is given.

+ or -LN	Turns on/off show new line characters option.  When on, new line characters are initially visible.

+ or -BP	Turn on/off reinsert selected buffer/window after current buffer/window.  Effects any macro which uses the edit command to activate an existing buffer.  Effected commands include push_tag, next_error, edit, cursor_error, and list_buffers.

+ or -S	Turn on/off unmodified block swapping to spill file.

+ or -E	Turn on/off expand tabs to spaces.  If your tabs settings for the file being loaded are of the form "+<increment>" (like +4), then  tabs are expanded in increments of increment.  Otherwise tabs are expanded in increments of 8.  To set your tabs in a form "+<increment>", bring up the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup", select the extension, and set the "Tabs:" text box).  For languages such as REXX and UNIX shell scripts which require the contents of the file to be analyzed before the file type is known, the fundamental mode tab settings are used.

+ or -U[:nnn]	Turn on/off undo.  Specifying nnn, sets the maximum number of undoable steps.  The default is 32000.  The range of nnn is 0..32767.

+ or -N	Network support switch.  When on, Visual SlickEdit will detect when another application has the same file open and automatically select "Read only" mode.  This option requires an extra file handle open to the original file.

IMPORTANT:  Under DOS, some compilers such as Clipper and TURBO Pascal to not support sharing files.  If your compiler can not open a source file Visual SlickEdit has loaded, turn this switch off.


_load_template

int _load_template( int form_index, int parent_wid, _str options, [arg1, [arg2 ... ]])

Remarks	Loads the form corresponding to the names table index form_index.  We recommend you use the higher level show function instead of this function if it can do what you need.  parent_wid is a window id.  All forms must have a parent.  The form will always stay on top of the parent window.  Specify _app for parent_wid (constant defined in "slick.sh") if you want to allow a form to go behind the MDI window.  Specify _mdi for parent_wid (constant defined in "slick.sh') if you want the form to stay on top of the MDI window.

options is a string containing zero or more of the following letters:

H	Load the form initially invisible.  You can make the form visible by setting the p_visible property to 1 or (TRUE).

E	Load the form for editing.  The p_edit property for all loaded objects is set to 1.  The on_create and on_load events are not sent when this option is given.

A	Get the on_create arguments from the stack of the current function starting at the argument number stored in the input parameter arg1.  See example below.

W	Indicates that form_index is a window id and not and index into the names table.   Create events are dispatched unless C option is specified.

R	Effects W option only.  Causes some properties of for and controls to be reinitialized.

C	Effects W option only.  Specifies no create events.

When a form is loaded, all objects loaded, including the form and all of its controls, are sent an on_create and an on_create2 event.  arg1, arg2... are passed as arguments to the on_create event (not passed to the on_create2 event).  In addition, an on_load event is sent to the form.  The on_load event may be used to set the initial focus.  You can not use the on_create event to set the initial focus.  We recommend you use the on_create event instead of the on_load event for initializing controls because you will more easily be able to use Clipboard Inheritance® to copy code from one dialog box to another.  We recommend that the on_create2 event not be processed by user level 1 inheritance (See Dialog Box Inheritance Order).

Example

#include "slick.sh"

defmain()

{

     index=find_index('form1',oi2type(OI_FORM));

     if (!index) {

          messageNwait("form1 not found");

          return(1);

     }

     form_wid=_load_template(index, _mdi, 'H', 'param 1 to on_create', 'param 2 to on_create');

     // Center the form to the MDI window while the form is invisible

     form_wid._center_window(_mdi);

     // Make the form visible

     form_wid.p_visible=1;

}

Example

#include "slick.sh"

defmain()

{

     myfunction('param 1 to on_create', 'param2 to on_create');

}

static myfunction()

{

     index=find_index('form1',oi2type(OI_FORM));

     if (!index) {

          messageNwait("form1 not found");

          return(1);

     }

     form_wid=_load_template(index, _mdi, 'HA', 1);

     // Center the form to the MDI window while the form is invisible

     form_wid._center_window(_mdi);

     // Make the form visible

     form_wid.p_visible=1;

}

Return	If successful, a positive window id of the form created is returned.  0 is an invalid window id.  Otherwise, a negative error code is returned.

See Also	show


lock_selection

int [wid_expression.]lock_selection()

Applies To	Edit Window, Editor Control

Remarks	Stops the selection area from being extended as the cursor moves.  Used for any selection style which extends the selection area as the cursor moves.  The adjust_block_selection command is only useful when the selection is locked so a destination can be indicated with the cursor.

Return	Returns 0 if no mark active in current buffer.  Otherwise 1 is returned.


lowcase

_str lowcase(_str string)

Return	Returns string converted to lower case.

Example

lowcase('ABc')	== 'abc'

lowcase('ABC')	== 'abc'

See Also	upcase


lowcase_selection

_command void lowcase_selection()

"Edit", "Other...", "Lowcase"

Applies To	Edit Window, Editor Control

Remarks	Translates characters within a selection into lower case.  Text may be selected with one of the commands select_char (F8), select_line (Ctrl+L), or select_block (Ctrl+B).

Displays message if text not marked.

See Also	upcase_selection


lowcase_word

_command int [wid_expression.]lowcase_word()

Ctrl+Shift+L

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Remarks	Translates the current word to lower case and places the cursor after the current word.  To change the word characters for a specific extension, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").

Return	Returns 0 if successful.  Returns 1 if no word exists at cursor.  On error, message is displayed.

See Also	upcase_word, cap_word


_lx2dx

int _lx2dx(int scale_mode, int x)

Return	Returns the x coordinate which is the scale, scale_mode, converted to pixels.  scale_mode may be SM_PIXEL or SM_TWIP.

See Also	_lx2lx, _dx2lx, _lxy2lxy, _dxy2lxy, _lxy2dxy, _ly2dy, _ly2ly, _dy2ly, _map_xy


_lx2lx

int _lx2lx(in_scale_mode , int out_scale_mode, int x)

Return	Returns the x coordinate which is the scale, in_scale_mode, converted to scale, out_scale_mode.  The scale mode parameters may be SM_PIXEL or SM_TWIP.

See Also	_lx2dx, _dx2lx, _lxy2lxy, _dxy2lxy, _lxy2dxy, _ly2dy, _ly2ly, _dy2ly, _map_xy


_lxy2dxy

void _lxy2dxy(int scale_mode, int &x, int &y)

Remarks	Converts the x and y variables which are in the scale, scale_mode, to pixels.  scale_mode may be SM_PIXEL or SM_TWIP.

See Also	_lx2dx, _lx2lx, _dx2lx, _lxy2lxy, _dxy2lxy, _ly2dy, _ly2ly, _dy2ly, _map_xy


_lxy2lxy

void _lxy2lxy(int in_scale_mode, int out_scale_mode, int &x, int &y)

Remarks	Converts the x and y variables which are in the scale, in_scale_mode, to the scale out_scale_mode.  The scale mode parameters may be SM_PIXEL or SM_TWIP.

See Also	_lx2dx, _lx2lx, _dx2lx, _lxy2lxy, _dxy2lxy, _lxy2dxy, _ly2dy, _ly2ly, _dy2ly, _map_xy


_ly2dy

int _ly2dy(int scale_mode, int y)

Return	Returns the y coordinate which is in the scale, scale_mode, converted to pixels.  scale_mode may be SM_PIXEL or SM_TWIP.

See Also	_lx2dx, _lx2lx, _dx2lx, _lxy2lxy, _dxy2lxy, _lxy2dxy, _ly2ly, _dy2ly, _map_xy


_ly2ly

int _ly2ly(int in_scale_mode, int out_scale_mode, int y)

Return	Returns the y coordinate which is in the scale, in_scale_mode, converted to scale, out_scale_mode.  The scale mode parameters may be SM_PIXEL or SM_TWIP.

See Also	_lx2dx, _lx2lx, _dx2lx, _lxy2lxy, _dxy2lxy, _lxy2dxy, _ly2dy,_dy2ly, _map_xy


m_match

_str m_match(_str name, int find_first)

Return	Returns next Slick-C module name which is a prefix match of name.  find_first must be non-zero to initialize matching.  Returns '' when no more matches are found.  Only loaded macro modules are listed.


ma

_command void [wid_expression.]ma( [_str cmdline] )

cmdline is a string in the format left [right [new-paragraph]]

Applies To	Edit Window, Editor Control

Remarks	The ma or margins command sets the left, right, and new paragraph margins.  Each buffer has one set of margins.  To set up different initial margins for specific file extensions, use the Extension Options dialog box ("Tools", Configuration...", "File Extension Setup...").

See Also 	gui_margins, reflow_paragraph, reflow_selection, gui_justify, justify


machine

_str machine()

Return	Returns 'NT386' if running under Windows NT on 386 compatible machine.  Returns 'NTMIPS' if running under Windows NT on MIPS/compatible machine.  Returns NTALPHA if running under Windows NT on a DEC ALPHA AXP machine.  Returns 'SPARC' if running under SUN SPARC station.  Returns 'RS6000' if running under AIX RS600.  Returns 'NTPPC' if running under Windows NT on a PowerPC.  Returns 'LINUX' if running under LINUX on Intel machine.  Returns 'HP9000' if running under UNIX on HP9000.  Returns 'SGMIPS' if running under UNIX on Silicon Graphics machine.

See Also	_win32s


_macro

int _macro( [_str option , _str new_value=null )

Applies To	Edit Window

Remarks	Performs many macro recording related functions.  There are two kinds of macros.  Source code macros and keyboard macros.  If you have a slow machine, source code macros take a little bit more time to define but run faster.  Only one keyboard macro may be defined and it is not saved between edit sessions.  Currently we only use keyboard macros in VI emulation.  option defaults to 'M' when not given.

Option	Description

'M'	Temporarily turns recording output on or off.  If the second parameter is specified, recording output is set to new_value.  Returns current recording output value.  A non-zero value indicates macro actions should be recorded.

'S'	Returns non-zero value if macro recording is on.  Second parameter is ignored.

'B'	Turns on macro recording.  Output for recording is to the current file.  Returns 0.  Second parameter is ignored.

'E'	Turns off macro recording.  Returns 0.  Second parameter is ignored.

'R'	Indicates that a recording macro is running.  The editor needs to know when a recorded macro is being executed to correctly handle special cases.  For example, when in BRIEF emulation, after performing a search the delay function gets called to wait for 4 seconds or until a key is pressed to temporarily show a highlight on the text that was found.  When running a recorded macro, the delay function will return immediately.

'KB'	Begin recording keyboard macro.

'KE'	End recording keyboard macro.

'KD'	End recording keyboard macro but delete the last key sequence in the recording since it is the key sequence which executed the command to end recording.

'KR'	Query if a keyboard macro is being played back.  new_value argument is ignored.

'KP'	Terminate if necessary and play the last recorded keyboard macro.

The 'M' option allows macro recording to be on, but no recorded actions to be output.  This allows for the editor and macros, which output recording information, to temporarily stop outputting Slick-C source code without turning off macro recording.

When one command calls another command, recording output is turned off.  The original command can turn recording output back on with the statement "_macro('m', _macro('s'));".  If your command calls the show command or another command, you may need to turn recording output back on.

See Also	start_recording, end_recording, record_macro_toggle,  record_macro_end_execute, list_macros, gui_save_macro, save_macro, _macro


_macro_append

void _macro_append( _str string )

Remarks	If macro recording and output is on (_macro()!=0), the string argument specified is appended to the end of the macro being recorded.

Example

_macro_call('find','Find this', 'ri');

// The above is identical to

_macro_append("find('Find this', 'ri')");

// and is also identical to

_macro_append( "find(" _quote('Find this') ',' _quote('ri') ")" );


_macro_call

void _macro_call( _str proc_name [,_str arg1 [,_str arg2 .. ]] )

Remarks	If macro recording and output is on (_macro()!=0), the call to function proc_name with arguments arg1, arg2.. is appended to the end of the macro being recorded.

Example

_macro_call('find','Find this', 'ri');

// The above is identical to

_macro_append("find('Find this', 'ri')");

// and is also identical to

_macro_append( "find(" _quote('Find this') ',' _quote('ri') ")" );

See Also	_macro, _macro_append, _macro_delete_line, _macro_get_line, _macro_replace_line, _macro_repeat


_macro_delete_line

void _macro_delete_line()

Remarks	If macro recording and output is on (_macro()!=0), the last source line of recorded macro is deleted.

See Also	_macro, _macro_append, _macro_get_line, _macro_replace_line, _macro_repeat, _macro_call


_macro_get_line

_str _macro_get_line()

Return	If macro recording and output is on (_macro()!=0), the last source line of recorded macro is returned.  Otherwise, '' is returned.

See Also	_macro, _macro_append, _macro_delete_line, _macro_replace_line, _macro_repeat, _macro_call


_macro_path

_str _macro_path( [_str try_first [, _str try_second ... ]])

Return	Returns the directory used to store macro files such as "vusrdefs.e" (UNIX: "vunxdefs.e").  This function uses the slick_path_search function to find the try_first and try_second files if they are given.  If one is found, the path on the file found is returned.  After looking for the argument specified, this function looks for "vusrdefs.e" (UNIX: "vunxdefs.e"), "vusrobjs.e" (UNIX: "vunxobjs.e"), and "windefs.e" (UNIX: "windu.e") and returns the path of the first one found.  If no files are found, the _config_path is returned.

See Also	restore_path, _create_config_path, _config_path


_macro_repeat

void _macro_repeat()

Remarks	If macro recording and output is on (_macro()!=0), the first argument to the last source line of the recorded macro is incremented.  The argument is incremented only if the current command specified by last_index is the same as the previous command indicated by prev_index.

See Also	_macro, _macro_append, _macro_delete_line, _macro_replace_line, _macro_call, _macro_get_line


_macro_replace_line

void _macro_replace_line(_str string)

Remarks	If macro recording and output is on (_macro()!=0), the last source line of the recorded macro is replaced with string.

See Also	_macro, _macro_append, _macro_delete_line, _macro_replace_line, _macro_call, _macro_get_line


_make

int _make( _str modules )

Remarks	The date of each module in modules is checked against the date of the '.ex' file.  If the '.ex' file does not exist or the source file date is later than the '.ex' file, the command 'st -q -w source_name' is executed.  If no extension is given, '.e' is used.  Any module name with the extension '.ex' is not compiled.

Return	Returns 0 if successful.  Common return codes are FILE_NOT_FOUND_RC, PATH_NOT_FOUND_RC, and 1 (error returned from Slick-C translator).


make_buf_match

_str make_buf_match(_str buf_name)

Return	Returns buf_name in a form which makes the root name more identifiable by placing the path at the end in angle braces.  For example, a buf_name of "c:\autoexec.bat" is translated to "autoexec.bat<c:\>"


make_path

_str make_path(_str path)

Remarks	Makes multi-level directories in path so that files may be copied to path.

Return	Returns 0 if successful.   Common return codes are PATH_NOT_FOUND_RC, INSUFFICIENT_DISK_SPACE_RC, and ACCESS_DENIED_RC.


make_tags

_command void make_tags( [_str cmdline] )

cmdline is a string in the format [-t][-r | -d] [-o OutputFile] [@]file1  [@]file2 ...

Remarks	This command runs the external macro "maketags.e".  The make_tags command builds a file called "tags.vtg" (UNIX: "utags.vtg") by default which is a binary database file.  Use the -o option to specify an alternate output data base file name.  This information is used by the push_tag command to quickly find one of your procedures.  Multiple files with wild cards may be specified.  The '@' is used to specify a file that contains a list of file names.  The file manager write_list command may be used to create a list of file names.  See "tags.e" for information on adding support for other languages.  The -t option recursively search directories.  The -r is used to replace or add tags for the files that follow.  The  -d option deletes tags for the files specified.  Currently the C, C++, Pascal, REXX, AWK, Modula-2, dBASE, Cobol, Fortran, and Assembly languages are supported.  Use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...") to install support for Modula-2, dBASE, Cobol, and Fortan.  See "tags.e" for information on adding support for other languages.

Command Line Example

make-tags   -t *.c *.asm

make-tags   @list1 *.pas

See Also	push_tag, gui_make_tags


_makeempty

void VariableClass._makeempty()

Remarks	This method operates on _str, array ( [] ) , hash table ( :[] ) , struct, and union types.  Sets variable to point to nothing.  Slick-C allocates spaces for the variable when an assignment is made.  This function is very specific to the required implementation of Slick-C.  The changes we plan to make in the future will not effect this function.

Example

t:["a"]=1;

t:["b"]=2;

t:["c"]=3;

// Traverse the elements in hash table

for (i._makeempty();;) {

    t._nextel(i);

    if (i._isempty()) break;

    messageNwait("index="i" value="t:[i]);

}

See Also	_el, _nextel, _isempty, _deleteel, _varformat, _indexin, _sort


makeNload

int makeNload(_str module_name)

Applies To	Edit Window

Remarks	Compiles (if necessary) and loads the Slick-C module_name given.

Return	Returns 0 if successful.


man

_command man([ _str ManHelpItem ])

Remarks	UNIX only.  Displays man page(s) a newly created edit buffer for man help item specified.  We attempt to remove special text screen formatting characters.  However, this filter may need to be changed for some UNIX configurations.  Lets us know if our filter does not work on your system.  If ManHelpItem is not given, a dialog box is displayed which allows you to enter one.

Return	Returns 0 if successful.


_map_xy

void _map_xy(int from_wid, int to_wid, int &x, int &y, int scale_mode=SM_PIXEL )

Remarks	Converts (maps) the x and y variables from the coordinate space relative to the from_wid to the coordinate space relative to the to_wid.   If scale_mode  specifies the input and output scale for the x and y variables.  scale_mode may be SM_PIXEL or SM_TWIP.

See Also	_lx2dx, _lx2lx, _dx2lx, _lxy2lxy, _lxy2dxy, _ly2dy, _ly2ly, _dy2ly


margins

_command margins ...

Remarks	See ma command.

See Also	reflow_paragraph, reflow_selection, gui_justify, justify, gui_margins


match_length

int match_length( 'C'|['S'][0-9]|'')

Return	Returns the length or buffer position of the string found by the last search or repeat_search executed.  If the 'C' parameter is given, the number of characters from the beginning of the match to the cursor is returned.

The ['S'][0-9] parameter is used to return a match length or a start buffer position of a tagged expression.  Specifying 'S' followed by a tagged expression number 0-9 (i.e. 'S0') will return the start buffer position of that tagged expression.  The start buffer position is a seek position or point which may be used as input to the goto_point and get_text built-ins.  An undefined start buffer position is returned if that tagged expression was not found.  If 'S' is not followed by a number, the start position of the entire string found is returned.  Specifying a tagged expression number 0-9 will return the match length of that group.  0 is returned if that tagged expression was not found.

Example

     // This example works for files with tab characters.

     status=search('{if|then|while}','rew');

     if (status) {

          message('Match not found');

          return(status);

     }

     // In this case, match_length('S')==match_length('S0');

     // and match_length()==match_length('0');

     word=get_text(match_length('0'),match_length('S0'))

See Also	_select_match, search, repeat_search, search_replace, save_search, restore_search, _search_case


math

void math( _str expression )

Remarks	Evaluates Slick-C expression given and places the results on the command line.  Unlike the Slick-C translator, octal numbers may be specified by prefixing the number with a 0 and binary numbers may be specified by prefixing the number with '0b' or 'b'.  If no operator is specified between two unary expressions, addition is assumed.

Not all Slick-C operators are supported.

expression can have the following unary operators:

~	bitwise complement

- 	Negation

+	No change

The available binary operators are listed below from lowest to highest precedence.  A comma after the operator indicates that the next operator is of the same precedence.

| 	bitwise or

^	xor

&	bitwise and

<<,	shift left

>>	shift right

+, 	addition

blank(s),	Implied addition.

- 	subtraction

/,	division

*,	multiplication

%,	remainder

**	power

See Also	mathx, matho, mathb


mathb

_command void mathb( _str expression )

Remarks	Evaluates Slick-C expression given and places the result on the command line in octal.  Unlike the Slick-C translator, octal numbers may be specified by prefixing the number with a 0 and binary numbers may be specified by prefixing the number with '0b' or 'b'.  If no operator is specified between two unary expressions, addition is assumed.

Not all Slick-C operators are supported.  See math command for a list of operators.

See Also	mathx, math, matho


matho

_command void matho(_str expression )

Remarks	Evaluates Slick-C expression given and places the result on the command line in octal.  Unlike the Slick-C translator, octal numbers may be specified by prefixing the number with a 0 and binary numbers may be specified by prefixing the number with '0b' or 'b'.  If no operator is specified between two unary expressions, addition is assumed.

Not all Slick-C operators are supported.  See math command for a list of operators.

See Also	mathx, math, mathb


mathx

_command void mathx(_str expression)

Remarks	Evaluates Slick-C expression given and places the result on the command line in hexadecimal.  Unlike the Slick-C translator, octal numbers may be specified by prefixing the number with a 0 and binary numbers may be specified by prefixing the number with '0b' or 'b'.  If no operator is specified between two unary expressions, addition is assumed.

Not all Slick-C operators are supported.  See math command for a list of operators.

See Also	matho, math, mathb


maximize_mdi

_command void [wid_expression.]maximize_mdi()

Alt+F10

Applies To	Edit Window

Remarks	Maximizes the MDI window.  Not support in UNIX version.


maximize_window

_command void [wid_expression.]maximize_window()

Ctrl+F10

Applies To	Edit Window

Remarks	Maximizes an MDI child edit window.


maybe_complete

_command void maybe_complete( [_str completion_info] )

SPACE BAR

Applies To	Edit Window, Editor Control, Command Line

Remarks	For the command line, the partially typed command currently on the command line is filled in ("completed") as much as possible.

For an edit window or editor control, a space character is inserted at the cursor.

The completion_info must be specified for this function to work properly for a text box other than the command line.  For a text box, the partially typed argument is completed according to the completion_info string.   completion_info is a space-delimited string of completion constants.  The completion constants are defined in "slick.sh' and have the suffix "_ARG".


maybe_delete_selection

int maybe_delete_selection()

Applies To	Edit Window, Editor Control

Remarks	Deletes the selection if a CUA selection style is being used and the selection is not locked.

Return	Returns 1 if the selection was deleted.  Otherwise, 0 is returned.


maybe_find_file

int maybe_find_file(_str &file_spec, _str file_no_path)

Remarks	If file_spec is null, a path search for file_no_path is performed and the result is stored in file_spec.

Return	Returns 0 if successful.  Otherwise 1 is returned.


maybe_list_matches

_command int maybe_list_matches([_str completion_info])

'?'

Applies To	Edit Window, Editor Control, Text Box

Remarks	For the command line, if the cursor is on the command line, a selection list of possible completions to the partially typed command currently on the command line is displayed.

For an edit window or editor control, a '?' character is inserted at the cursor.

The completion_info must be specified for this function to work properly for a text box other than the command line.  For a text box, a selection list of possible completions to the partially typed argument is displayed.  completion_info is a spaced-delimited string of completion constants.  The completion constants are defined in "slick.sh' and have the suffix "_ARG".


maybe_normal_character

_command void maybe_normal_character()

Applies To	Edit Window, Editor Control

Remarks	If the cursor is on the command line, the binding to the last key pressed is executed.  Otherwise the command key_not_defined is called.  Used by fileman mode.


maybe_quote_filename

_str maybe_quote_filename(_str filename)

Return	Returns filename, with quotes around it, if it contains a space character.  Otherwise filename is returned.


maybe_split_insert_line

_command void [wid_expression.]maybe_split_insert_line()

Applies To	Command Line, Edit Window, Editor Control

Remarks	If the cursor is on the command line, the command is executed.

Otherwise if insert state is on, the current line is split at the cursor.  Enough blanks are appended to the beginning of the new line to align it with the first non blank character of the original line.

If the insert state is off, the cursor is moved to column one of the next line.


mdibutton_bar

_command void mdibutton_bar()

Remarks	Displays a list box of all the current forms and allows you to type in a form or select a form from the list box to be used as the MDI button bar.  If you change the form used for the MDI button bar, the toolbars command may stop working.

Return	Returns '' if the dialog box is cancelled.

See Also	toolbars


_mdibutton_bar_form

_form _mdibutton_bar_form

Remarks	This form is loaded as the MDI button bar when Visual SlickEdit starts up with the following statement in "main.e"

     _mdi.p_button_bar=_default_option('B');


_menu_add_filehist

void _menu_add_filehist(_str filename)

Remarks	Adds file history to end of File menu on the Visual SlickEdit MDI menu bar.  The filename argument MUST be specified in absolute.  Use the absolute function to do this.

See Also	on_init_menu, _menu_add_filehist, _menu_add_hist, _menu_add_prjhist, _menu_bind, _menu_delete, _menu_destroy, _menu_find, _menu_get_state, _menu_info, _menu_insert, _menu_load, _menu_match, _menu_move, _menu_set, _menu_set_state, _menu_show, alt_menu, insert_object, menu_mdi_bind_all, mou_show_menu, show


_menu_add_hist

void _menu_add_hist(_str filename, int menu_handle, typeless submenu_pos, _str dash_category, _str command, _str category, _str help_command, _str help_message)

Remarks	General purpose function for adding files to a drop-down menu on a menu bar.  This function is limited to adding filenames and not arbitrary strings because it uses the file_eq function to compare filenames already added to the list.  The filename argument MUST be specified in absolute.  Use the absolute function to do this.

INPUT

filename	Filename to add.

menu_handle	Handle to loaded menu bar returned by p_menu_handle or _menu_load.

submenu_pos	Integer position (0.._menu_info(menu_handle)-1) of drop-down menu.  If this is not a valid integer, this must be the caption of the drop-down menu (ex. &File or &Project).

dash_category	Unique category for menu item line before files in drop-down menu.  This is how this function finds items in the existing list.  You do not have to add the menu item line.  This function will add it for you.

command	Command which will be given the filename argument to open the file.

category	Category given to added menu items.

help_command	Help command given to added menu item that is executed when F1 is pressed.

help_message	Message given to added menu item that is displayed on the message line when the menu item is selected.

See Also	on_init_menu, _menu_add_filehist, _menu_add_prjhist, _menu_bind, _menu_delete, _menu_delete, _menu_destroy, _menu_find, _menu_get_state, _menu_info, _menu_insert, _menu_load, _menu_match, _menu_move, _menu_set, _menu_set_state, _menu_show, alt_menu, insert_object, menu_mdi_bind_all, mou_show_menu, show


_menu_add_prjhist

void _menu_add_prjhist(_str filename)

Remarks	Adds project file history to end of Project menu on the Visual SlickEdit MDI menu bar.  The filename argument MUST be specified in absolute.  Use the absolute function to do this.

See Also	on_init_menu, _menu_add_hist, _menu_add_filehist, _menu_bind, _menu_delete, _menu_destroy, _menu_find, _menu_get_state, _menu_info, _menu_insert, _menu_load, _menu_match, _menu_move, _menu_set, _menu_set_state, _menu_show, alt_menu, insert_object, menu_mdi_bind_all, mou_show_menu, show


_menu_bind

int _menu_bind(int menu_handle, int resource_handle, _str command, _str key_string, _str option)

Remarks	Sets or clears key bindings in loaded menu and/or menu resource.

INPUT

menu_handle	Handle of loaded menu returned by p_menu_handle, _menu_load, _menu_find, or _menu_get_state.  Specify 0 if you want this parameter to be ignored.

resource_handle	Handle to menu resource returned by find_index, name_match, p_child, p_next, or p_child.  Specify 0 if you want this parameter to be ignored.

command	Name of command to bind

key_string	If option=='B', key_string is displayed to right of menu items which execute command.  If option=='U', key strings for menu items which display key string to right of menu item are removed.

option	May be one of the following letters:

      'B'	key_string is displayed to right of menu items which execute command.

      'U'	Key strings for menu items which display key string to right of menu item are removed.

      'C'	Clear all bindings for menu_handle or resource_handle.

Return	Returns 0 if successful.

See Also	on_init_menu, _menu_add_filehist, _menu_add_hist, _menu_add_prjhist, _menu_delete, _menu_destroy, _menu_find, _menu_get_state, _menu_info, _menu_insert, _menu_load, _menu_match, _menu_move, _menu_set, _menu_set_state, _menu_show, alt_menu, insert_object, menu_mdi_bind_all, mou_show_menu, show


_menu_delete

int _menu_delete(int menu_handle, int menu_pos)

Remarks	Deletes a menu or menu item in a loaded menu or a menu resource.

INPUT

menu_handle	Handle of loaded menu returned by p_menu_handle, _menu_load, _menu_find, or _menu_get_state.  This handle may also be a handle to menu resource returned by find_index or name_match.

menu_pos	Position within menu menu_handle.  The first menu item position is 0.

Example

#include "slick.sh"

defmain()

{

     status=_menu_find(_mdi.p_menu_handle,"M","help -using",mh,mpos);

     if (!status) _menu_delete(mh,mpos);

}

Return	Returns 0 if successful.

See Also	on_init_menu, _menu_add_filehist, _menu_add_hist, _menu_add_prjhist, _menu_bind, _menu_destroy, _menu_find, _menu_get_state, _menu_info, _menu_load, _menu_match, _menu_move, _menu_set, _menu_set_state, _menu_show, alt_menu, insert_object, menu_mdi_bind_all, mou_show_menu, show


_menu_destroy

int _menu_destroy(int menu_handle)

Remarks	Destroy menu loaded by the _menu_load function.  This function is typically used to destroy the old menu bar when replacing a menu bar or to destroy a pop-up menu after it has been displayed.  menu_handle is typically returned by p_menu_handle or _menu_load.

Return	Returns 0 if successful.

See Also	on_init_menu, _menu_add_filehist, _menu_add_hist, _menu_add_prjhist, _menu_bind, _menu_delete, _menu_find, _menu_get_state, _menu_info, _menu_insert, _menu_load, _menu_match, _menu_move, _menu_set, _menu_set_state, _menu_show, alt_menu, insert_object, menu_mdi_bind_all, mou_show_menu, show


_menu_editor_form

_form _menu_editor_form

Syntax	void show('_menu_editor_form' [, [-new] [menu_name]] )

Remarks	Displays the Menu Editor dialog box and edits the menu specified.  If the -new option is given, a new menu resource called menu_name is created if one does not already exist.  If no arguments are given, the Visual SlickEdit menu bar is edited.


_menu_find

int _menu_find(int menu_handle, _str command_or_category, int output_menu_handle, int output_menu_pos , _str option='C')

Remarks	Finds menu or menu item with a specified command or category.

INPUT

menu_handle	Handle of loaded menu returned by p_menu_handle, _menu_load, _menu_find, or _menu_get_state.

command_or_category

Command or category of menu item to find.  If a command is specified, the command must match exactly.  See option parameter.

output_menu_handle

Handle to loaded menu which contains menu item found.

output_menu_pos

Position of menu item found within output_menu_handle.  0 is the position of the first menu item.  Use the _menu_info function to determine the number of items in a loaded menu.

option	May be 'M' or  'C'.  If the 'M' option is given, command_or_category is the command of the menu item to be found.  If the 'C' option is given,  command_or_category is the category of the menu item to be found.  Defaults to 'C' if not specified.

Return	Returns 0 if successful.

Example

#include "slick.sh"

defmain()

{

    // Find the menu item which executes the gui-find command

    status=_menu_find(_mdi.p_menu_handle, "new", output_mh, output_mp,'M');

    if (status) {

        message("Command not found in menu bar");

        return(0);

    }

    _menu_get_state(output_mh, output_mp, mf_flags, 'P', caption,

                         command, categories, help_command, help_message);

    message("Help message for new command is "help_message);

}

See Also	on_init_menu, _menu_add_filehist, _menu_add_hist, _menu_add_prjhist, _menu_bind, _menu_delete, _menu_destroy, _menu_get_state, _menu_info, _menu_insert, _menu_load, _menu_match, _menu_move, _menu_set, _menu_set_state, _menu_show, alt_menu, insert_object, menu_mdi_bind_all, mou_show_menu, show


_menu_get_state

int _menu_get_state(int menu_handle, _str command_or_category, int &mf_flags, _str option="C", _str &caption="", _str &command="",_str &categories="",_str &help_command="", _str &help_message="" )

Remarks	Gets menu item values for the menu items which contain the command or category specified.

INPUT

menu_handle	Handle of loaded menu returned by p_menu_handle, _menu_load, _menu_find, or _menu_get_state.

command_or_category

Command, category, or position within menu_handle of menu item.  If a command is specified, the command must match exactly.  See option parameter.

option	May be 'M', 'C', 'P'.  If the 'M' option is given, command_or_category is the command of the menu item to be found. If the 'C' option is given,  command_or_category is the category of the menu item to be found.  If the 'P' option is given, command_or_category is the position (0.._menu_info(menu_handle)-1) of the menu item with in menu_handle.  Defaults to 'C'.

OUTPUT

mf_flags	 mf_flags may be zero or more of the following flags defined in "slick.sh":

    MF_CHECKED

    MF_UNCHECKED

    MF_GRAYED

    MF_ENABLED

    MF_SUBMENU

caption	Menu item title.

command	For sub-menu, command is a menu handle which may be used in calls to _menu_get_state or _menu_info.  Otherwise, this is the command to be executed when the menu item is selected.

categories	Menu item categories.  May be one or more categories separated with a '|' character.  See _menu_set_state function for more information about categories.

help_command	Menu item help command.  Executed when F1 pressed on menu item.

help_message	Menu item help message.  Displayed when cursor is on menu item.

Example

// This code traverses a menu that has been loaded with _menu_load

#include "slick.sh"

defmain()

{

     traverse_menu(_mdi.p_menu_handle);

}

static void traverse_menu(menu_handle)

{

    Nofitems=_menu_info(menu_handle,'c');

    for (i=0;i<Nofitems;++i) {

         _menu_get_state(menu_handle,i,mf_flags,'p',caption,command,

                      categories,help_command,help_message);

         messageNwait("p_caption="caption)

         if (mf_flags & MF_SUBMENU) {

             traverse_menu(command);

         }

    }

}

Return	Returns 0 if successful.

See Also	on_init_menu, _menu_add_filehist, _menu_add_hist, _menu_add_prjhist, _menu_bind, _menu_delete, _menu_destroy, _menu_find, _menu_info, _menu_insert, _menu_load, _menu_match, _menu_move, _menu_set, _menu_set_state, _menu_show, alt_menu, insert_object, menu_mdi_bind_all, mou_show_menu, show


_menu_info

int _menu_info(int menu_handle [, reserved] )

Return	Returns number of menu items in loaded menu menu_handle.   menu_handle is returned by p_menu_handle, _menu_load, _menu_find, or _menu_get_state.

See Also	on_init_menu, _menu_add_filehist, _menu_add_hist, _menu_add_prjhist, _menu_bind, _menu_delete, _menu_destroy, _menu_find, _menu_get_state, _menu_insert, _menu_load, _menu_match, _menu_move, _menu_set, _menu_set_state, _menu_show, alt_menu, insert_object, menu_mdi_bind_all, mou_show_menu, show


_menu_insert

int _menu_insert(int menu_handle, int menu_pos, int mf_flags, _str caption ,_str  command="", _str categories="", _str help_command="", _str help_message="" )

Remarks	Inserts a menu or menu item into a loaded menu or a menu resource.

INPUT

menu_handle	Handle of loaded menu returned by p_menu_handle, _menu_load, _menu_find, or _menu_get_state.  This handle may also be a handle to menu resource returned by find_index or name_match.

menu_pos	Position within menu menu_handle.  Menu item is inserted before position.  The first menu item position is 0.  Specify -1 or a position greater than the last menu item to insert after the last menu item.

mf_flags	 mf_flags may be zero or more of the following flags defined in "slick.sh":

    MF_CHECKED

    MF_UNCHECKED

    MF_GRAYED

    MF_ENABLED

    MF_SUBMENU

caption	Menu item title.

command	The command to be executed when the menu item is selected.  This parameter is ignored if mf_flags contain the MF_SUBMENU flag.

categories	Menu item categories.  May be one or more categories separated with a '|' character.  See _menu_set_state function for more information about categories.

help_command	Menu item help command.  Executed when F1 pressed on menu item.

help_message	Menu item help message.  Displayed when cursor is on menu item.

Example

#include "slick.sh"

defmain()

{

     // Insert 2 items into a menu resource called menu1

     index=find_index("menu1",oi2type(OI_MENU));

     if (!index) {  // IF menu1 does not already exist?

         // Create new menu resource in names table

         index=insert_name("menu1",oi2type(OI_MENU));

         if (index<=0) {

             message("unable to create menu1");

             return("");

         }

     }

     // Insert File menu

     _menu_insert(index, 0,MF_ENABLED|MF_SUBMENU,"&File",

                               "","","help file menu","");

     // Insert New menu item within File menu

     _menu_insert(index.p_child,0,MF_ENABLED,"&New","New","",

                             "help file menu", "");

     // Load and display the menu as a pop-up menu

     show('menu1');

}

Return	Returns 0 if successful.

See Also	on_init_menu, _menu_add_filehist, _menu_add_hist, _menu_add_prjhist, _menu_bind, _menu_delete, _menu_destroy, _menu_find, _menu_get_state, _menu_info, _menu_load, _menu_match, _menu_move, _menu_set, _menu_set_state, _menu_show, alt_menu, insert_object, menu_mdi_bind_all, mou_show_menu, show


_menu_load

int [wid_expression.]_menu_load(int menu_index, _str option='M' | 'P')

Return	If successful, loads menu resource and returns handle of loaded menu.  Otherwise a negative error code is returned.   option may be 'M' or 'P'.  Specify 'P' for option to display a menu resource as a pop-up menu.  menu_index is a handle to a menu resource returned by find_index or name_match.

Example

#include "slick.sh"

// Create a form called form1 and set the border style to anything BUT

// BDS_DIALOG BOX.  Windows does not allow forms with a dialog

// box style border to have menu bars.

defeventtab form1

form1.on_load()

{

    // Find index of Visual SlickEdit MDI menu resource

    index=find_index(def_mdi_menu,oi2type(OI_MENU));

    // Load this menu resource

    menu_handle=p_active_form._menu_load(index);

    // _set_menu will fail if the form has a dialog box style border.

    // Put a menu bar on this form.

    _menu_set(menu_handle);

    // You DO NOT need to call _menu_destroy.  This menu is destroyed when the form

    // window is deleted.

}

IMPORTANT:  _menu_load is a method because under X windows we must know which window a menu bar will be attached before you call _menu_set.  Make sure your _menu_load and _menu_set calls operate on the same object.  Otherwise, your Slick-C code will not work under X windows.  For pop-up menus, _menu_load does not need know the object.

See Also	on_init_menu, _menu_add_filehist, _menu_add_hist, _menu_add_prjhist, _menu_bind, _menu_delete, _menu_destroy, _menu_find, _menu_get_state, _menu_info, _menu_insert, _menu_match, _menu_move, _menu_set, _menu_set_state, _menu_show, alt_menu, insert_object, menu_mdi_bind_all, mou_show_menu, show


_menu_match

_str _menu_match(_str name, int find_first)

Return	Returns next menu name in names table which is a prefix match of name.  find_first must be non-zero to initialize matching.  Returns '' when no more matches are found.

See Also	on_init_menu, _menu_add_filehist, _menu_add_hist, _menu_add_prjhist, _menu_bind, _menu_delete, _menu_destroy, _menu_find, _menu_get_state, _menu_info, _menu_insert, _menu_load, _menu_move, _menu_set, _menu_set_state, _menu_show, alt_menu, insert_object, menu_mdi_bind_all, mou_show_menu, show


menu_mdi_bind_all

_command void menu_mdi_bind_all()

Remarks	Determines the key bindings for all menu items on the Visual SlickEdit menu bar.

See Also	on_init_menu, _menu_add_filehist, _menu_add_hist, _menu_add_prjhist, _menu_bind, _menu_delete, _menu_destroy, _menu_find, _menu_get_state, _menu_info, _menu_insert, _menu_load, _menu_match, _menu_move, _menu_set, _menu_set_state, _menu_show, alt_menu, insert_object, mou_show_menu, show


_menu_move

int _menu_move(int src_menu_index, int src_menu_pos, int dest_menu_index, int dest_menu_pos)

Remarks	Moves menu or menu item from source position to destination position.  src_menu_index and dest_menu_index do not have to be the same menu.  src_menu_index and dest_menu_index are returned by find_index, name_match, p_child, p_next, or p_child. This function currently only supports menu resources and not loaded menus.

See Also	on_init_menu, _menu_add_filehist, _menu_add_hist, _menu_add_prjhist, _menu_bind, _menu_delete, _menu_destroy, _menu_find, _menu_get_state, _menu_info, _menu_insert, _menu_load, _menu_match, _menu_set, _menu_set_state, _menu_show, alt_menu, insert_object, menu_mdi_bind_all, mou_show_menu, show


_menu_set

int [wid_expression.]_menu_set(int menu_handle)

Applies To	MDI Window, Form

Remarks	Sets the menu bar to the loaded menu specified.   If the form already has a menu bar you should destroy the old menu bar AFTER setting the menu bar.  See example below.

Return	Returns 0 if successful.

Example

#include "slick.sh"

defmain()

{

    // Find index of Visual SlickEdit MDI menu resource

    index=find_index("_mdi_menu",oi2type(OI_MENU));

    if (!index) {

        message("Can't find _mdi_menu");

        return("");

    }

    // Load this menu resource

    menu_handle=_menu_load(index);

    old_menu_handle=_mdi.p_menu_handle;  // Remember old menu handle

    _mdi._menu_set(menu_handle);

    if (old_menu_handle) {  // IF there was a menu bar

        _menu_destroy(old_menu_handle);  // Delete old menu bar

    }

    // You DO NOT need to call _menu_destroy to destroy the new menu when

    // the MDI window is deleted.  This menu is destroyed automatically

    // when the MDI window is deleted.

}

See Also	on_init_menu, _menu_add_filehist, _menu_add_hist, _menu_add_prjhist, _menu_bind, _menu_delete, _menu_destroy, _menu_find, _menu_get_state, _menu_info, _menu_insert, _menu_load, _menu_match, _menu_move, _menu_set_state, _menu_show, alt_menu, insert_object, menu_mdi_bind_all, mou_show_menu, show


_menu_set_state

int _menu_set_state(int menu_handle ,_str command_or_category  ,int mf_flags , _str option="C",_str item_text="",_str command="", _str category="", _str help_command="", _str help_message="")

Remarks	Sets menu item values for the menu items which contain the command or category specified.

INPUT

menu_handle	Handle of loaded menu returned by p_menu_handle, _menu_load, _menu_find, or _menu_get_state.

command_or_category

Command/category to look for or position of menu item within menu_handle.  If a command is specified, the command must match exactly.  See option parameter.

mf_flags	 mf_flags may be zero or more of the following flags defined in "slick.sh":

    MF_CHECKED

    MF_UNCHECKED

    MF_GRAYED

    MF_ENABLED

option	May be 'M', 'C', 'P'.  If the 'M' option is given, command_or_category is the command of the menu item to be found. If the 'C' option is given,  command_or_category is the category of the menu item to be found.  If the 'P' option is given, command_or_category is the position (0.._menu_info(menu_handle)-1) of the menu item with in menu_handle.  Defaults to 'C'.

item_text	Menu item text.

command	Menu item command to be executed.

category	Menu item category.  Another way to search for a menu item.

help_command	Menu item help command.  Executed when F1 pressed on menu item.

help_message	Menu item help message.  Display when cursor on menu item.

Example

#include "slick.sh"

// Create a form called form1 and set the border style to anything BUT

// BDS_DIALOG BOX.  Windows does not allow forms with a dialog

// box style border to have menu bars.

defeventtab form1

form1.on_load()

{

    // Find index of Visual SlickEdit MDI menu resource

    index=find_index(def_mdi_menu,oi2type(OI_MENU));

    // Load this menu resource

    menu_handle=p_active_form._menu_load(index);

    // _set_menu will fail if the form has a dialog box style border.

    // Put a menu bar on this form.

    _menu_set(menu_handle);

    // You DO NOT need to call _menu_destroy.  This menu is destroyed when the form

    // window is deleted.

    // Gray out all menu items which are not allowed when there no child windows.

    _menu_set_state(menu_handle,"new",MF_GRAYED,'M');

}

Return	Returns 0 if successful.

See Also	on_init_menu, _menu_add_filehist, _menu_add_hist, _menu_add_prjhist, _menu_bind, _menu_delete, _menu_destroy, _menu_find, _menu_get_state, _menu_info, _menu_insert, _menu_load, _menu_match, _menu_move, _menu_set, _menu_show, alt_menu, insert_object, menu_mdi_bind_all, mou_show_menu, show


_menu_show

int _menu_show(int menu_handle, int vpm_flags= VPM_LEFTBUTTON|VPM_LEFTALIGN, int x=0, int y=0 )

Remarks	Displays/runs menu as pop-up.  All menu items should be grayed/checked before calling this function.  This function does not return until the menu is closed.

INPUT

menu_handle	Handle of loaded menu returned by p_menu_handle, _menu_load, _menu_find, or _menu_get_state.

vpm_flags	Defaults to VPM_LEFTBUTTON|VPM_LEFTALIGN.  vpm_flags may be zero or more of the following flags defined in "slick.sh":

    VPM_LEFTBUTTON

Track menu items with left mouse button.

    VPM_RIGHTBUTTON

Track menu items with right mouse button.

    VPM_LEFTALIGN

x coordinate represents left most corner of menu.

    VPM_CENTERALIGN

x coordinate represents horizontal center of menu

    VPM_RIGHTALIGN

x coordinate represents right side of menu.

x	x coordinate of left side of menu.  Defaults to 0 if not given.

y	y coordinate of top of menu.  Defaults to 0 if not given.

Example

#include "slick.sh"

defmain()

{

   // Low-level code to display Visual SlickEdit menu bar as pop-up.

   // Could just use show or mou_show_menu function.

   index=find_index("_mdi_menu",oi2type(OI_MENU))

   if (!index) {

       message("Can't find _mdi_menu");

   }

   menu_handle=_menu_load(index,'P');

   // Display this menu in the menu of the screen.

   x=_screen_width()/2;y=_screen_height()/2;

   flags=VPM_CENTERALIGN|VPM_LEFTBUTTON;

   _menu_show(menu_handle,flags,x,y)

   _menu_destroy(menu_handle);

}

Return	Returns 0 if successful.

See Also	on_init_menu, _menu_add_filehist, _menu_add_hist, _menu_add_prjhist, _menu_bind, _menu_delete, _menu_destroy, _menu_find, _menu_get_state, _menu_info, _menu_insert, _menu_load, _menu_match, _menu_move, _menu_set, _menu_set_state, alt_menu, insert_object, menu_mdi_bind_all, mou_show_menu, show


merge

_command void merge()

"Tools", "File Merge..."

Remarks	Displays 3 Way Merge Setup dialog box.  A 3 Way Merge is typically used after two people make a local copy of the same source file and make some modifications to their local copy.   A 3 Way Merge very cleverly takes both sets of changes and creates an new source file.   If there are any conflicts (because they edited the same area of code), a dialog box is displayed which lets you select whose change you want in the output file.  Our 3 Way Merge lets you edit the output file without exiting 3 Way Merge mode.

See Also	diff


message

void message(_str string)

Remarks	string is temporarily displayed on the message line.  Message will disappear after a key is pressed.

See Also	sticky_message, _message_box, clear_message, messageNwait, popup_message, popup_imessage


_message_box

int _message_box(_str string, _str title="Visual SlickEdit", int mb_flags=MB_OK|MB_ICONEXCLAMATION )

Remarks	Creates a modal dialog box and displays string message and various buttons.  string may contain carriage return characters to break a string message into multiple lines.  By default, string is broken into multiple lines on word boundaries if necessary.  The title of the dialog box is set to title if given.

mb_flags is a combination of zero or more of the following flags:

MB_OK	Display an OK button.

MB_OKCANCEL	Display an OK and Cancel button.

MB_ABORTRETRYIGNORE

Display  Abort, Retry, Ignore buttons.  Not supported on UNIX.

MB_YESNOCANCEL	Display Yes, No, and Cancel buttons.

MB_YESNO	Display Yes, and No buttons.

MB_RETRYCANCEL	Display a Retry and Cancel button.  Not supported on UNIX.

MB_ICONHAND	Display a stop sign picture to the left of the message.

MB_ICONQUESTION	Display a question picture to the left of the message.

MB_ICONEXCLAMATION

Display an exclamation point picture to the left of the message.

MB_ICONINFORMATION

Display an 'i' picture to the left of the message.

MB_ICONSTOP	Display a stop sign picture to the left of the message.

MB_ICONNONE	Don't display a picture to the left of the message.

MB_DEFBUTTON1	Make the default button the first button.

MB_DEFBUTTON2	Make the default button the second button.

MB_DEFBUTTON3	Make the default button the third button.

Return	Returns the button id of the button pressed which closed the dialog box.  One of the following constants is returned:

IDOK

IDCANCEL

IDABORT

IDRETRY

IDIGNORE

IDYES

IDNO

Example

result=_message_box("Save changes?", '', MB_YESNO|MB_ICONQUESTION);

if (result==IDYES) {

    // save the file

} else {

    // Don't save it

}

See Also	sticky_message, message


messageNwait

void messageNwait(_str msg)

Remarks	Displays string msg and waits for a key press.  Used when debugging macros.  Press Ctrl+Break to halt a macro during a messageNwait or get_event call.


_mffind

int _mffind( _str search_string, _str options, _str files, _str atbuflist [,int mfflags])

Applies To	Edit Window

Remarks	Searches for occurrences of the string, search_string, in the files and buffers specified.  When an occurrence is chosen, the file is opened and the cursor is placed on the occurrence.  Use the find_next (Ctrl+G) and find_prev commands to find the next and previous occurrences respectively.

Input

search_string	String to search for.

options	A string of zero or more of the following search options:

E	Exact case.

I	Ignore case.

-	Reverse search.

M	Limit search to marked area.

<	If found, place cursor at beginning of word.

>	If found, place cursor at end of word.

R	Interpret string as a MicroEdge regular expression.  See section MicroEdge Regular Expressions for syntax of regular expression.

U	Interpret string as a UNIX regular expression.   See section UNIX Regular Expressions.

B	Interpret string as a Brief regular expression.   See section Brief Regular Expressions.

H	Search through hidden lines.

N	Do not interpret search string as a regular-expression search string.

P	Ignored.

W	Limits search to words.  Used to search for variables.  To change the word characters for a specific extension, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").

W=MicroEdge-regular-expression

Specifies the valid characters in a word.  The default value is [A-Za-z0-9_$].

W:P	Limits search to word prefix.  For example, searching for "pre" matches "pre" and "prefix" but not "supreme" or "supre".

W:PS	Limits search to strict word prefix.  For example, searching for "pre" matches "prefix" but not "pre", "supreme" or "supre".

W:S	Limits search to word suffix.  For example, searching for "fix" matches "fix" and "sufix" but not "fixit".

W:SS	Limits search to strict word suffix.  For example, searching for "fix" matches "sufix" but not "fix" or "fixit".

Y	Binary search.  This allows start positions in the middle of a DBCS character (only effects Japanese operating systems).  This option is useful when editing binary files which may contain characters which look like DBCS but are not.

,	Delimeter to separate ambiguous options.

XCCLetters

Requires the first character of search string NOT be one of the color coding elements specified. For example, "XCS" requires that the first character not be in a comment or string. CCLetters is a string of one or more of the following color coding element letters:

O	Other

K	Keyword

N	Number

S	String

C	Comment

P	Preprocessing

L	Line number

1	Symbol 1

2 	Symbol 2

3 	Symbol 3

4 	Symbol 4

F	Function color

V	No save line

CCCLetters	Requires the first character of search string to be one of the color coding elements specified. See CCLetters above.

files	Zero or more space delimited file specifications which may contain wild cards.  '+T' and '-T' switches may be embedded between files specifications to turn subdirectory (tree) searching on or off.

atbuflist	Zero or more space delimited buffer names.  If a buffer name starts with a '@' character, it is assumed to be a buffer which contains a list of buffer names to search.

mfflags	One or more of the following flags:

   MFFIND_CURBUFFERONLY	Search current buffer only.

   MFFIND_FILESONLY	List files only.

   MFFIND_APPEND	Append to current output

   MFFIND_MDICHILD	Output to MDI child

   MFFIND_SINGLE	Stop after first occurrence.

   MFFIND_GLOBAL	Find all without prompting.

Default search options may be set by the Search Tab ("Tools", "Configuration", "General...", select Search Tab).

Return	Returns 0 if one or more occurrences are found.

Example

// Case sensitive word search for "main"  through all c and h files in or below the current

// directory.

_mffind('main', 'ew', '+t *.c *.h','');

See Also	_mfreplace, mflast


mflast

_command int mflast()

"Edit", "List Files from Find..."

Applies To	Edit Window

Remarks	Displays selection list of files/buffers and occurrences found by the last multi-file find performed (See Find dialog box).  When a file or buffer is chosen, the file is opened and the cursor is placed on the first occurrence of the search string.  Use the find_next command  (Ctrl+G) to find the next occurrence of the search string.

Return	Returns 0 if a file from the list is selected for editing.

See Also	find


_mfreplace

int _mfreplace( _str search_string, _str replace_string, _str options, _str files, _str atbuflist)

Applies To	Edit Window

Remarks	Performs a search and replace on the files and buffers specified.

Input

search_string	String to search for.

replace_string	String to replace search string with.

options	A string of zero or more of the following search options:

*	Perform search and replace without prompting for replace or save.

E	Exact case.

I	Ignore case.

-	Reverse search.

M	Limit search to marked area.

V	Preserve case. When specified, each occurrence found is checked for all lower case, all upper case, first word capitalized or mixed case.  The replace string is converted to the same case as the occurrence found excepted when the occurrence found is mixed case (possibly mulltiple capitalized words).  In this case, the replace string is used without modification.

<	If found, place cursor at beginning of word.

>	If found, place cursor at end of word.

R	Interprets search_string to be a MicroEdge regular expression.  In addition, the characters \ and # take on new meaning in the replace string.  See MicroEdge Regular Expressions.

U	Interpret string as a UNIX regular expression.   See section UNIX Regular Expressions.

B	Interpret string as a Brief regular expression.   See section Brief Regular Expressions.

H	Search through hidden lines.

N	Do not interpret search string as a regular-expression search string.

P	Ignored.

W	Limits search to words.  Used to search for variables.  To change the word characters for a specific extension, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").

W=MicroEdge-regular-expression

Specifies the valid characters in a word.  The default value is [A-Za-z0-9_$].

W:P	Limits search to word prefix.  For example, searching for "pre" matches "pre" and "prefix" but not "supreme" or "supre".

W:PS	Limits search to strict word prefix.  For example, searching for "pre" matches "prefix" but not "pre", "supreme" or "supre".

W:S	Limits search to word suffix.  For example, searching for "fix" matches "fix" and "sufix" but not "fixit".

W:SS	Limits search to strict word suffix.  For example, searching for "fix" matches "sufix" but not "fix" or "fixit".

Y	Binary search.  This allows start positions in the middle of a DBCS character (only effects Japanese operating systems).  This option is useful when editing binary files which may contain characters which look like DBCS but are not.

,	Delimeter to separate ambiguous options.

XCCLetters

Requires the first character of search string NOT be one of the color coding elements specified. For example, "XCS" requires that the first character not be in a comment or string. CCLetters is a string of one or more of the following color coding element letters:

O	Other

K	Keyword

N	Number

S	String

C	Comment

P	Preprocessing

L	Line number

1	Symbol 1

2 	Symbol 2

3 	Symbol 3

4 	Symbol 4

F	Function color

V	No save line

     CCCLetters

Requires the first character of search string to be one of the color coding elements specified. See CCLetters above.

files	Zero or more space delimited files which may contain wild cards.  '+T' and '-T' switches may be embedded between files specifications to turn subdirectory (tree) searching on or off.

atbuflist	Zero or more space delimited buffer names.  If a buffer name starts with a '@' character, it is assumed to be a buffer which contains a list of buffer names to search.

Default search options may be set by the Search Tab ("Tools", "Configuration", "General...", select Search Tab).

Return	Returns 0 if a search and replace proceeds through all files and no errors occur.

Example

// Case sensitive word search for "list"  through all c and h files in or below the current

// directory.  Replace with better_name_list.

_mfreplace('list', 'better_name_list', 'ew', '+t *.c *.h','');

See Also	_mffind, mflast


min_abbrev

_str min_abbrev(_str word, _str word_list, _str options)

Remarks	This function is present for backward compatibility.  New macros should use the min_abbrev2 function.  Performs list completion (like '?' key) on partial argument word with valid sorted argument list word_list.  The third word of the options argument must be the minimum abbreviation length for list completion to take place.  This procedure is typically used to allow syntax expansion to occur when space bar is pressed after an incomplete keyword.  For example, typing "m<SPACE>" while in C mode inserts a template for main(){}.

Return	Returns completed word if successful.  Otherwise '' is returned.


min_abbrev2

_str [wid_expression.]min_abbrev2(_str word, _str (&word_list)[], _str options, _str &aliasfilename)

Applies To	Edit Window, Editor Control

Remarks	Performs list completion (like '?' key) on partial argument word with valid argument list word_list and the extension specific aliases.  The third word of the options argument must be the minimum abbreviation length for list completion to take place.  This procedure is typically used to allow syntax expansion to occur when space bar is pressed after an incomplete keyword.  For example, typing "m<SPACE>" while in C mode inserts a template for main(){}.

Return	Returns completed word if successful.  If the word is from the extension specific alias file, aliasfilename is set to the full path of the alias file.  Otherwise aliasfilename is set to "".   This function returns "" if word is not a valid partial match.


mkdir

int mkdir(_str path)

Remarks	Creates the directory specified by path.

Return	Returns 0 if successful.  Common return codes are PATH_NOT_FOUND_RC, INSUFFICIENT_DISK_SPACE_RC, and ACCESS_DENIED_RC.


mktemp

_str mktemp([int start_number])

Return	Returns a filename which does not yet exist for storing temporary data on disk.  The name returned is based on the process id, the current buffer id, and a count (1-99).  The path on the temp name is the same as your spill file path (CONFIG, "Spill file path...").  start_number is an optional number to start the count.  If you write a macro which needs more than one temp file at a time, increment the start_number to enhance the speed of this procedure.

If a unique name can not be created after 99 tries, '' is returned.


_mod_extform

_form _mod_extform

Syntax	void show('_mod_extform')

Remarks	Displays Modula-2 Options dialog box which is used for modifying the extension specific options for the Modula-2 language.


_modal_wait

typeless _modal_wait(_str form_wid)

Return	Waits for a dialog box (form) to be closed, and returns the parameter specified to the _delete_window function which closes the dialog box.  If no parameter is specified to _delete_window, '' is returned.  form_wid is the instance handle (window id) usually returned by one of the functions _load_template or show.  All other forms, other than form_wid, are disabled.  When the wait terminates, all forms are reenabled unless there is a previous modal wait.  If there is a previous modal wait, the previous wait dialog box receives focus.

Example

#include "slick.sh"

_command test()

{

    //  Normally the show function is called with -modal option so that it calls _modal_wait.

    //  However, there are a few instances where you might wait to get an instance handle

    //  returned from show so you can perform some initializations on the dialog box.

    form_wid=show('form1');

    // Perform initializations on dialog box here.

    // Now wait for dialog box to be deleted.

    result=_modal_wait(wid);

    message('result='result);

}

defeventtab form1

ok.lbutton_up()

{

     p_active_form._delete_window("This is a test");

}

cancel.lbutton_up()

{

     // Return '' to _modal_wait

     p_active_form._delete_window();

}


modify_toggle

_command void [wid_expression.]modify_toggle()

Applies To	Edit Window, Editor Control

Remarks	Used in EMACS emulation.  Toggles the buffer modified flag (p_modify property) which indicates whether the current buffer has been modified.


mou_capture

void [wid_expression.]mou_capture()

Applies To	All objects

Remarks	Forces all mouse messages to the current window.  This function is typically called after an lbutton_down event which performs a get_event loop which waits for an lbutton_up event to occur.

Example

#include 'slick.sh'

defeventtab form1

// For this example, create a picture or image control and set the

// p_picture property to "_arrow.bmp" or any two state bitmap.  Also

// set the p_Nofstates property to 2.

picture1.lbutton_down()

{

   mou_mode(1)

   mou_capture();

   done=0;

   for (;;) {

      event=get_event();

      switch (event) {

      case MOUSE_MOVE:

         mx=mou_last_x('m');  // 'm' specifies mouse position in current scale mode

         my=mou_last_y('m');

         if (mx>=0 && my>=0 && mx<p_width && my<p_height) {

            if (!p_value) {

               // Show the button pushed in.

               p_value=1;

            }

         } else {

            if (p_value) {

               // Show the button up.

               p_value=0;

            }

         }

         break;

      case LBUTTON_UP:

      case ESC:

         done=1;

      }

      if (done) break;

   }

   mou_mode(0);

   mou_release();

   return('')

}

See Also	mou_release


mou_click

_command void [wid_expression.]mou_click([_str select_type [, 'E'] ] )

Lbutton-down

Applies To	Text Box, Edit Window, Editor Control

Remarks	Sets the cursor position to the mouse location.  Click and drag to character-select the text with this command. While dragging the mouse, you may use the right button to change the selection type to BLOCK, LINE, or CHAR  The select_type parameter specifies the selection type and may be "CHAR", "LINE", or "BLOCK" and defaults to "CHAR".  The 'E' specifies that the current selection (if one exists) be extended to the mouse pointer instead of a new selection being created  This command is intended to be bound to a mouse button event.

See Also	mou_click_block, mou_click_line, mou_select_line,  mou_extend_selection, mou_select_word, mou_click_menu, mou_click_menu_block, mou_click_menu_line


mou_click_block

_command void [wid_expression.]mou_click_block()

Applies To	Text Box, Edit Window, Editor Control

Remarks	Sets the cursor position to the mouse location.  Click and drag to block (column) select text with this command. While dragging the mouse, you may use the right button to change the selection type to BLOCK, LINE, or CHAR  This command is intended to be bound to a mouse button event.

See Also	mou_click, mou_click_line, mou_select_line,  mou_extend_selection, mou_select_word, mou_click_menu, mou_click_menu_block, mou_click_menu_line


mou_click_line

_command void [wid_expression.]mou_click_line()

Applies To	Text Box, Edit Window, Editor Control

Remarks	Sets the cursor position to the mouse location.  Click and drag to line-select text with this command. While dragging the mouse, you may use the right button to change the selection type to BLOCK, LINE, or CHAR  This command is intended to be bound to a mouse button event.

See Also	mou_click, mou_click_block, mou_select_line, mou_extend_selection, mou_select_word, mou_click_menu, mou_click_menu_block, mou_click_menu_line


mou_click_menu

_command void [wid_expression.]mou_click_menu([_str select_type [, 'E'] ] )

Applies To	Edit Window, Editor Control

Remarks	Starts a character selection or displays an extension menu.  Use the Extension Menu dialog box to set the extension specific menus.  A selection can only be created if the "Select First" option is on (default is on).

See Also	mou_click, mou_click_block, mou_click_line, mou_select_line,  mou_extend_selection, mou_select_word, mou_click_menu_block, mou_click_menu_line


mou_click_menu_block

_command void [wid_expression.]mou_click_menu_block()

Rbutton-down

Applies To	Edit Window, Editor Control

Remarks	Starts a block selection or displays an extension menu.  Use the Extension Menu dialog box to set the extension specific menus.  A selection can only be created if the "Select First" option is on (default is on).

See Also	mou_click, mou_click_block, mou_click_line, mou_select_line,  mou_extend_selection, mou_select_word, mou_click_menu, mou_click_menu_line


mou_click_menu_line

_command void [wid_expression.]mou_click_menu_line()

Applies To	Edit Window, Editor Control

Remarks	Starts a line selection or displays an extension menu.  Use the Extension Menu dialog box to set the extension specific menus.  A selection can only be created if the "Select First" option is on (default is on).

See Also	mou_click, mou_click_block, mou_click_line, mou_select_line, mou_extend_selection, mou_select_word, mou_click_menu, mou_click_menu_block


mou_copy_to_cursor

_command void mou_copy_to_cursor()

Ctrl+Shift+RbuttonDown

Applies To	Edit Window, Editor Control

Remarks	Copies current selection to cursor position.


mou_col

int mou_col(int pixel_x)

Applies To	Edit Window, Editor Control, Text Box

Return	Returns the character position (first character is 1) corresponding to the pixel_x position given.  This function is typically used after a mouse press within a text box control to determine which character to place the cursor on.  For edit window and editor controls, we recommend you use the p_cursor_x property.


mou_extend_selection

_command void [wid_expression.]mou_extend_selection()

Shift+Lbutton-down

Applies To	Text Box, Edit Window, Editor Control

Remarks	Sets the cursor position to the mouse location and extends the selection to the cursor.  If no selection exists, the text between the old cursor position and the new cursor position is selected.  This command is intended to be bound to a mouse button event

See Also	mou_click, mou_click_block, mou_select_line, mou_click_line, mou_select_word


mou_get_xy

void mou_get_xy(int &x, int &y)

Remarks	Sets the x and y variables to the current mouse coordinates, in pixels, relative to the screen.  Top left of screen is 0,0.

See Also	mou_set_xy


mou_in_window

int [wid_expression.]mou_in_window()

Applies To	Edit Window, Editor Control

Return	Returns a non-zero value if the last mouse position read by get_event() or test_event() is within the current window.


mou_last_x

int [wid_expression.]mou_last_x( ['M'])

Applies To	All Objects

Return	Returns the last mouse x position relative to active window in pixels.  If the "M' option is given, the return value is in current windows scale mode (p_scale_mode).

See Also	mou_last_y


mou_last_y

int [wid_expression.]mou_last_y()

Applies To	All objects

Return	Returns the last mouse y position relative to active window in pixels.  If the "M' option is given, the return value is in current windows scale mode (p_scale_mode).

See Also	mou_last_x


mou_limit

void [wid_expression.]mou_limit(int x1, int y1, int x2, int y2)

Applies To	All objects except image control

Remarks	(Supported under Windows, Windows 95/98, and Windows NT only)Limits the range of the mouse to pixel rectangle (x1,y1) to (x2,y2) relative to the current window.  To cancel a limit, specify 0 for all parameters.

Example

mou_limit(0,0,p_client_x,p_client_height);

for (;;){

     event=get_event();

     // Move controls within current window until get lbutton_up event.

     ...

}

// Cancel mouse range limit

mou_limit(0,0,0,0);


mou_mode

int mou_mode(int mode=-1 )

Return	Gets and optionally sets the mouse event mode. The currentor new mouse event mode is returned.

mode may be one of the following:

-1	Don't set mode.  Just return current mode.

0	Turn mode off.

1	Turn mode on.  When on, button-up events are returned by get_event() and test_event().


mou_move_to_cursor

_command void mou_move_to_cursor()

Ctrl+Rbutton-down

Applies To	Edit Window, Editor Control

Remarks	Copies current selection to cursor position.


mou_paste

_command int [wid_expression.]mou_paste()

Mbutton-down

Applies To	Edit Window, Editor Control

Remarks	Places the cursor where the mouse is and inserts the system clipboard  (not the VS internal clipboard) at the cursor.  This command was designed to be natural for X Windows users but may make no sense to other users.  This command is more useful when the macro variable "def_autoclipboard" is set to 1 (use menu item "Macro", "Set Macro Variable...").  When this variable is on, selecting text with the mouse automatically creates a system clipboard but not a Visual SlickEdit internal clipboard.

Return	Returns 0 if successful.  Other a non-zero number is returned.


mou_release

void [wid_expression.]mou_release()

Applies To	All objects

Remarks	Cancels last mou_capture so that mouse messages can be sent to all windows.


mou_select_line

_command void [wid_expression.]mou_select_line()

Lbutton-triple-click

Remarks	Selects the current line with a line type selection.

See Also	mou_click, mou_click_block, mou_select_line, mou_click_line, mou_select_word, mou_select_word


mou_select_word

_command void [wid_expression.]mou_select_word()

Lbutton-double-click

Applies To	Edit Window, Editor Control, Text Box

Remarks	Selects the current line with a character type selection.

See Also	mou_click, mou_click_block, mou_select_line, mou_click_line, mou_select_word, mou_select_line


mou_set_xy

void mou_set_xy(int x, int y)

Remarks	Sets the mouse cursor position to the pixel screen coordinates (x,y).

See Also	mou_get_xy


mou_show_menu

long mou_show_menu(_str menu_name)

Remarks	If last_event was a mouse event, menu specified is display at the mouse cursor position.  Otherwise menu is displayed at center of screen.

Return	Returns 0 if successful.

See Also	on_init_menu, _menu_add_filehist, _menu_add_hist, _menu_add_prjhist, _menu_bind, _menu_destroy, _menu_find, _menu_get_state, _menu_info, _menu_insert, _menu_load, _menu_match, _menu_move, _menu_set, _menu_set_state, _menu_show, alt_menu, insert_object, menu_mdi_bind_all, show


mouse_move

event mouse_move

Remarks	Occurs when the mouse pointer moves within the window.


move

_command int (_str text )

Remarks	Passes text to the operating system rename (UNIX: mv) command.  See your operating system manual for argument syntax.

In ISPF emulation, this command is not called when invoked from the command line.  Instead ispf_move is called.  Use dos_move to explicitly invoke the move command.

Return	Return code depends on operating system.


move_edge

_command void move_edge()

Alt+F2

Applies To	Edit Window

Remarks	Moves the edge of a window.  The window edge to move is specified with the cursor keys.  The new edge position is specified by moving the cursor to the new edge position and pressing ENTER.


_move_selected

void _move_selected([_str option_ch [,int &handle_i [,int &Nofselected [,int &click_wid [,int color ]]]]] )

Remarks	Moves selected windows or finds a selected window or provides information about selected windows within the current form.  Selected windows have a non-zero value for p_selected.  Setting the p_selected property for an object that is not being edited (p_edit==0) has no visual effect on screen.

option_ch may be one of the following:

'I'	Initialize and get information about the selected windows.  Last mouse position is recorded.  This option is usually used after an lbutton_down event.

'M'	Draw new position rectangles.  Move the selected windows or current window based on the amount the mouse has moved since this function was called with the 'I' option.  If, when the 'I' option is called, the window that was clicked in is not selected, the current window is moved and not the selected windows.   The rectangles drawn are affected by the p_draw_width, p_draw_style, and p_draw_mode properties.

'T'	Permanently move the selected windows to the new  position rectangles drawn by the 'M' option.

'C'	Cancel moving windows.  Erase all new position rectangles and do not move any windows.

handle_i is set to a number between 1 and 8 which indicates which selection handle the mouse was in.  1 is the top, left.  Continue clockwise counting selection handles around the rectangle to determine the selection handle numbers.

Nofselected is set to the number of selected windows within the current window.

click_wid is set to the window id of the window which was clicked in or whose selection handles were clicked in.

color is the color which should be used to draw the new position rectangles when this function is called with the 'M' option.

Example

// This example moves the current window only and not all selected windows because

// its p_selected property was not set to 1 before calling _move_selected with the 'I' option.

#include 'slick.sh'

defeventtab form1

picture1.lbutton_down()

{

   _move_selected('I',handle_i,Nofselected,selected_wid,_rgb(0x80,0x80,0x80));

   if (handle_i) {

      // This can't happen since this form is not being edit (p_edit==0)

      return(1);

   }

   mou_capture();

   // Control(s) are being moved

   orig_wid=p_window_id;

   p_window_id=p_parent;

   // Really only need to mess with p_object_modify property if the form is being edited.

   form_modify=p_active_form.p_object_modify;

   parent_modify=p_object_modify;

   _save_draw_setup(draw_setup);

   p_draw_width=2;p_draw_style=PSDS_INSIDE_SOLID;

   p_draw_mode=PSDM_XORPEN;

   mou_mode(1);

   done=0;

   mou_x=mou_last_x();mou_y=mou_last_y();

   old_x=orig_wid.p_x;old_y=orig_wid.p_y;

   p_window_id=orig_wid.p_parent;

   mou_limit(0,0,p_client_width,p_client_height);

   movsel_called=0;

   for (;;) {

      event=get_event()

      switch (event) {

      case MOUSE_MOVE:

         if (abs(mou_x-mou_last_x())>1 || abs(mou_y-mou_last_y())>1){

              movsel_called=1;

             _move_selected()

         }

         break;

      case LBUTTON_UP:

      case ESC:

         done=1;

      }

      if (done) break;

   }

   mou_limit(0,0,0,0);

   mou_mode(0);

   mou_release();

   if (movsel_called) {

      if (event==ESC) {

         // Erase the rectangles.

         _move_selected('C');

         _restore_draw_setup(draw_setup);

         p_object_modify=parent_modify;

      } else {

         // Erase the rectangles and move the controls.

         _move_selected('T');

         _restore_draw_setup(draw_setup);

      }

   } else {

      _restore_draw_setup(draw_setup);

   }

   //  IF the controls did not actually move and the form was not originally modified

   if (orig_wid.p_x==old_x && orig_wid.p_y==old_y && !form_modify) {

       p_active_form.p_object_modify=0;

   }

   p_window_id=orig_wid;

   return(0);

}


move_text_backtab

_command void [wid_expression.]move_text_backtab()

Shift+TAB

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Remarks	Moves text, from cursor to end of line, to previous indent level or tab stop.  To set the tab stops see gui_tabs or tabs command.


move_text_tab

_command void move_text_tab()

TAB

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Remarks	If Indent With Tabs is on and the cursor is on or before the first non-blank character, one more indent level is added to the line.

If indent with tabs is on and the cursor is after the first non-blank character, a tab character is inserted.

If indent with tabs is off, enough spaces are inserted to move the text, from the cursor to the end of the line, to the next indent level.

The Indent With Tabs option ("Document", "Indent With Tabs") toggles indenting with tabs for the current buffer.  Use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...") to set the default Indent With Tabs for an extension.

See Also	indent_with_tabs, tabs, gui_tabs


_move_to_cursor

int [wid_expression.]_move_to_cursor(_str mark_id="" )

"Edit", "Move"

Applies To	Edit Window, Editor Control

Remarks	Moves the selection to the cursor.  For block and character selections, the text is inserted at the cursor position.    In the case of a line selection, the lines are inserted before or after the current line depending upon the Line insert style ("Tools", "Configuration", "More Options...", "Line Insert Style").  Lines are inserted after the current line by default.  Resulting selection is placed on the inserted text.  Text may be marked with one of the commands select_char (F8), select_line (Ctrl+L), or select_block (Ctrl+B).

Return	Returns 0 if successful.  Common return values are TEXT_NOT_SELECTED_RC, SOURCE_DEST_CONFLICT_RC, and INVALID_SELECTION_HANDLE_RC.  On error, message is displayed.


move_to_cursor

_command void [wid_expression.]move_to_cursor()

"Edit", "Move"

Applies To	Edit Window, Editor Control

Remarks	Moves selection specified to the cursor.  For block and character selections, the text is inserted at the cursor position.  In the case of a line selection, the lines are inserted after the current line.  Resulting selection is placed on the inserted text.

Return	Returns 0 if successful.  Common return codes are TEXT_NOT_SELECTED_RC, and SOURCE_DEST_CONFLICT_RC.  On error, message is displayed.


move_mdi

_command void move_mdi()

Alt+F7

Remarks	Allows you to move the MDI window with the keyboard.  Not supported by UNIX version.


move_window

_command void [wid_expression.]move_window()

Ctrl+F7

Applies To	Edit Window

Remarks	Allows you to move an MDI child window with the keyboard.  Not supported by UNIX version.


_move_window

void [wid_expression.]_move_window(int x, int y, int width, int height , _str option='C', int icon_x=MAXINT, int icon_y=MAXINT)

Applies To	All objects except the Command Line

Remarks	Moves and sizes the current window to the position and size specified.  The input position and size parameters are specified in the parent scale mode (p_xyscale_mode).  Use the 'N' option to move and size the normalized information for the window when the window is iconized or maximized.  The 'C' option is the default, and specifies that the current window position and size be changed.  The 'N' option currently has no effect on any control except an MDI edit window.  However, in the future it is likely that forms will support the 'N' option.

See Also	_get_window


mprintf

void mprintf(char *s, ...)

Note	This function is a DLL API function.  It does not have a vs prefix or have the VSAPI attribute because it is not a portable function.  It is compiler dependant. This function is only support under Windows and will likely only work for you if you are using Microsoft Visual C++.  This function is NOT callable from Slick-C.

Remarks	This functions parameters are identical to the C run-time printf function.  Displays a debug message in a message box.

See Also	xprintf, mprintf, dfprintf


msg_ro

_command void msg_ro()

Remarks	Displays a message box indicating that the key pressed is not allowed in "Read only" mode.

See Also	read_only_mode


mt_match

_str mt_match(_str name, int find_first)

Return	Returns next Slick-C tag name which is a prefix match of name.  find_first must be non-zero to initialize matching.  Returns '' when no more matches are found.


name

int name(  [_str filename] )

Remarks	Changes the name of the current buffer to filename.  If no filename is specified the current value is displayed on the command line for editing.

Return	Returns 0 if successful.

See Also	gui_save_as, save


name_file

int name_file(_str filename)

Remarks	Renames current buffer to filename specified.  filename is converted to absolute (exact path specification).

Return	Returns 0 if successful.  Otherwise a non-zero return code is returned.


name_index2funptr

boolean name_index2funptr(int index)

Return	Returns equivalent pointer to a function for index which must be either 0 or a valid index to a global function or command.  A pointer to a function can be called in the Slick-C syntax (*pfn)(...).


name_info

_str name_info(int index)

Remarks	This function is used when defining a command to return the information string specified in the command definition.  See name_info Attributes for more information.

Return	Returns name information corresponding to name table index.  If index is not an index to a valid name or name has no information, '' is returned.  For commands, the name information is a list of the types of arguments the command accepts and objects for which the command is valid.

Example

_command mycommand() name_info(','VSARG2_REQUIRES_EDITORCTL |

                                   VSARG2_READ_ONLY)

{

   index= find_index("mycommand", COMMAND_TYPE);

   message('Name info for this command is 'name_info(index));

}

See Also	find_index, name_match, name_name, name_type, call_index, insert_name, set_name_info, delete_name, name_info_arg2, replace_name


name_info_arg2

_str name_info_arg2(_str index)

Return	Returns VSARG2_??? flags name information corresponding to name table index.  If index is not an index to a valid name or name has no VSARG2_??? information, '' is returned.

Example

_command mycommand()

      name_info(','VSARG2_REQUIRES_EDITORCTL |VSARG2_ICON)

{

   index= find_index("mycommand", COMMAND_TYPE);

   // Get the name information after the ','

   message('arg2 Name info for this command is 'name_info_arg2(index));

}

See Also	name_info


name_match

int name_match( _str name_prefix,  int find_first ,int name_t=~0&~IGNORECASE_TYPE)

Return	Returns name table index of the name with prefix matching name_prefix and where (name_t & name_type(index)) is true.  A non-zero value for find_first, begins a new search.  If find_first is zero, the next matching index is returned. 0 is returned  if no match is found.  Search is case sensitive unless one of the flags MODULE_TYPE, PICTURE_TYPE, or IGNORECASE_TYPE is given.  When one of the flags MODULE_TYPE or PICTURE_TYPE is given, search is case sensitive for file systems like UNIX which is case sensitive.  The search is always case insensitive when the IGNORECASE_TYPE flag is given.  Underscores in name_prefix are translated to dashes before search takes place.

Example

      // COMMAND_TYPE is defined in "slick.sh"

      name_t= COMMAND_TYPE;

      name_prefix='p';           // Find names that start with p

      index= name_match(name_prefix,1,name_t);   // Find first

      // Press Ctrl-Break to break a macro during a messageNwait

      for (;;) {

          if (!index ) break;

          messageNwait(''name found='name_name(index));

          index= name_match(name_prefix,0,name_t) // Find next

      }

See Also	find_index, buf_match, file_match


name_name

_str name_name(int index)

Return	Returns name corresponding to name table entry index.  If index is not an index to a valid name, '' is returned.  Names are returned in lower case.

Example

      index= name_match("repeat_se")

      message 'possible match of repeat_se is 'name_name(index)

See Also	find_index, name_match, name_type, name_info, call_index, insert_name, set_name_info, delete_name, replace_name


name_on_key

_str name_on_key(_str key)

Return	Returns the name of the command bound to key in the root event table.


name_type

int name_type(int index)

Return	Returns an integer name type corresponding to name table entry index.  If index is not an index to a valid name, 0 is returned.  All valid types are defined in "slick.sh"

Example

      index= find_index("find_next");

      message('find_next name type is 'name_type(index));

See Also	find_index, name_match, name_name, name_info, call_index, insert_name, set_name_info, delete_name, replace_name


name2event

_str name2event(_str string_constant)

Return	Returns the binary string representation of the key named string_constant.  The binary key string returned is the same as the binary key string returned by the GET_EVENT and TEST_EVENT built-in functions.

Example

      key=get_event();

      if (key:==name2event('C-S')) {

          ...

      }

See Also	get_event, test_event, last_event, event2name, event2index, index2event, list_bindings, name2event, call_key, eventtab_index


nb

_command void nb()...

Remarks	Same as next_bookmark command except requires less typing.


_need_to_save

int [wid_expression.]_need_to_save()

Applies To	Edit Window, Editor Control

Return	Returns non-zero if the current buffer needs to be saved.  The p_modify property should be checked as well.  A non-zero p_modify property indicates the buffer has been modified.  However, certain special buffer names and buffers with the (p_buf_flags & (THROW_AWAY_CHANGES|HIDE_BUFFER)) true, do not need to be saved.  An example, will better describe the correct usage of this function.

Example

if (p_modify && _need_to_save()) {

    // Prompt the user here or automatically save this file.

}


_negative2dec

long _negative2dec(long negative_number, int base, _str &msg)

Return	Returns non-decimal negative_number converted to a 16, 32, or 64 bit number.  This function is useful for displaying negative hexadecimal typed numbers (long, int, short).  The msg variable is set to the number of bits required to represent the negative number.

Example

defmain()

{

   result=_negative2dec('-f',16,msg);

   result=dec2hex(result,16);

   message(msg' result='result);

}


new

_command void new()

"File", "New"

Applies To	Edit Window

Remarks	Displays the New dialog box.  Allows you to create files, projects, and workspaces.  The File tab is initially active.


new_form

_command int new_form()

Remarks	Creates an empty dialog box form for editing with the dialog editor.

Return	Returns 0 if new form successfully created.


next_bookmark

_command void next_bookmark()

Applies To	Edit Window

Remarks	Goes to the next bookmark set by one of the commands set_bookmark, push_bookmark, or push_tag.

See Also	prev_bookmark, pb


_next_buffer

void [wid_expression.]_next_buffer( _str options="" )

Applies To	Edit Window, Editor Control

Remarks	Switches to the next buffer.

options is a string of zero or more of the following:

'H'	Allow switching to the hidden window.

'N'	Don't update the active buffer's non-active view information.

'R'	Don't do any screen updating.

The active view information is saved in the active buffer's non-active view unless the 'N' option is specified.  Each buffer maintains ONE non-active view (cursor position) which is updated when you switch to a buffer within the same window using one of the built-ins _next_buffer, _prev_buffer, _delete_buffer, load_files, _begin_select, and _end_select.  When the non-active buffer becomes active, the non-active view information is copied into the windows view.  Switching windows DOES NOT update the buffers non-active view.

The 'H' option determines whether buffers with (p_buf_flags&HIDE_BUFFER) true may be selected.

The 'R' options specifies that the screen should not be refreshed.

See Also	_prev_buffer, _delete_buffer


next_buffer

_command void next_buffer()

Ctrl+N or "Document", "Next Buffer"

Applies To	Edit Window

Remarks	Switches to view of the next buffer within the current window.


_next_button_state

void [wid_expression.]_next_button_state()

Applies To	Check Box

Remarks	Switches to the next check box button state by setting the p_value property.  The next state depends on the p_style property.


_next_control

void _next_control()

Applies To	Text Box (not Command Line), Check Box, Command Button, Radio Button, Frame, Label, List Box, Editor Control, File List Box, Directory List Box, Hscroll Bar, Vscroll Bar, Combo Box, Picture Box, Image, Gauge, Spin

Remarks	Switches to the next control in a dialog box.  Identical to pressing the TAB key in a dialog box except text in text box and combo box controls is not selected.

See Also	_prev_control


next_doc

_command void next_doc()

Applies To	Edit Window

Remarks	Switches to the next window if One File per Window is on.  Otherwise, switches to the next buffer.

Return	prev_doc


next_error

_command void next_error()

Ctrl+Shift+Down or "Build", "Next Error"

Applies To	Edit Window

Remarks	The next_error command ("Build", "Next error") places the cursor on the line and column of the file referred to by the next error message.

For more information, see help on project_build.

See Also	start_process, stop_process, cursor_error, exit_process, set_next_error, reset_next_error, clear_pbuffer


next_level

_command int [wid_expression.]next_level()

Applies To	Edit Window, Editor Control

Remarks	Used in EMACS emulation.  Searches for an open parenthesis character '(', '[', or '{' and places   the cursor after the matching close parenthesis.  Cursor position is unchanged if matching close parenthesis is not found.  Comment or string literals may cause this command to match parenthesis incorrectly.

Return	Returns 0 if successful.  Common return value is TOO_MANY_MARKS_RC.  On error, message displayed.

See Also	prev_level, cut_level, cut_prev_level


next_paragraph

_command void [wid_expression.]next_paragraph()

Applies To	Edit Window, Editor Control

Remarks	Used in EMACS emulation.  Places the cursor in column one of the first line after the paragraph at or after the cursor.  Paragraphs are separated with lines containing just the characters tab, space, and form feed or blank lines.

See Also	prev_paragraph, next_sentence, select_paragraph, cut_sentence, center_within_margins, reflow_region, margins


next_proc

_command int next_proc( [_str quiet] )

Applies To	Edit Window, Editor Control

Remarks	Places cursor on next function heading.  If the quiet argument is given an is not "", no error message is displayed.

Return	Returns 0 if successful.  Otherwise, a non-zero value is returned.

See Also	prev_proc


next_sentence

_command void [wid_expression.]next_sentence()

Applies To	Edit Window, Editor Control

Remarks	Used in EMACS emulation.  Places the cursor after the end of the current sentence.  End of sentence is defined to be one of the character ., !, or ?  followed by any number of the characters ., !, ?, ", ', ), or ] followed by end of line or two spaces.  Cursor is placed at the end of the line or at the first space at the end of sentence.

See Also	next_paragraph, prev_paragraph, prev_sentence, select_paragraph, cut_sentence, center_within_margins, reflow_region, margins


next_tag

_command int next_tag( [_str quiet] )

Applies To	Edit Window, Editor Control

Remarks	Places cursor on next tag definition, skipping any tags filtered out by the Procs tab.  If the quiet argument is given an is not "", no error message is displayed.

Return	Returns 0 if successful.  Otherwise, a non-zero value is returned.

See Also	next_proc, prev_proc, prev_tag


_next_view

void _next_view()

Remarks	For an explanation of how windows, views, and buffers are related, see section Windows Structure.

A view holds the information necessary for the editor to remember your location and scroll position in a buffer.  When you have more than one window looking at the same buffer, the windows have different views of that buffer.  _next_view switches to the next view in the current window.

See Also	get_view_id, activate_view, _prev_view, _quit_view, load_files, _next_window, _prev_window


next_window

_command void next_window();

Ctrl+TAB or Ctrl+F6 or  "Window", "Next"

Applies To	Edit Window

Remarks	Switches to next window.

See Also	prev_window, window_left, window_right, window_above, window_below


_next_window

void _next_window(_str option="")

Remarks	Switches to the next window.  Hidden windows are skipped unless the 'H' is specified for option (used for debugging).  By default, the next window is the window that was created after the current window.

See Also	get_view_id, activate_view, _next_view, _prev_view, _quit_view, load_files, _prev_window


next_word

_command void [wid_expression.]next_word()

Ctrl+RIGHT

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Remarks	Moves the cursor to the beginning of the next word.  If you want the cursor placed on the beginning of the next word, change the next word style ("Tools", "Configuration", "More...", "Next Word Style...").  To change the word characters for a specific extension, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").

See Also	prev_word


_nextel

typeless &ArrayOrHashTable._nextel(typeless &index)

Return	Returns reference to next element in array or hash table.  If index is empty (see _makeempty()), the first element is returned.  If there are no more elements, index is set to empty.  See example below.

Example

t:["a"]=1;

t:["b"]=2;

t:["c"]=3;

// Traverse the elements in hash table

for (i._makeempty();;) {

    t._nextel(i);

    if (i._isempty()) break;

    messageNwait("index="i" value="t:[i]);

}

See Also	_el, _makeempty, _isempty, _deleteel, _varformat, _indexin, _sort


nls

_str nls(_str string [,_str arg1 [,_str arg2 [...]]])

Return	Returns string with '%s' values replaced with arg1, arg2, etc.  The first parameter must be a string constant.

Note that the Slick-C Translator optimizes the case where the nls procedure is called with a simple string constant.  In this case, the code generation is equivalent to just specifying the string constant (i.e. the nls procedure is not called.).


_nrseek

_str [wid_expression.]_nrseek( [int file_offset] )

Applies To	Edit Window, Editor Control

Remarks	If file_offset is given, the cursor is placed in the file offset specified.  Otherwise, the current file offset is returned.  0 is the first character of the file.

IMPORTANT:  This function includes lines with NOSAVE_LF set which means that these file offsets will not match what is on disk if the file has non-savable lines.  Use the _GoToROffset and _QROffset for dealing with disk seek positions.

If a file offset is given, it can not be past the end of the file.  Negative file offsets are possible due to Visual SlickEdit's implementation of line 0.

Example

       /* Get the current seek position. */

       p =_nrseek();

       /* Seek to offset 1000 */

       _nrseek(1000);

Return	If a valid file offset is given, 0 is returned.  If an invalid file offset is given '' is returned.

If no file offset is given, the current seek position is returned.

See Also	goto_point, point, _GoToROffset, _QROffset


_no_child_windows

int _no_child_windows()

Return	Returns non-zero value if there are no non-hidden MDI edit windows available.


_Nofbuffers

int _Nofbuffers()

Return	Returns the number of non-hidden buffers.  The active MDI edit window buffer is always counted even if it is hidden.


Nofwindows

int Nofwindows()

Return	Returns the number of MDI edit windows not including hidden windows.


normal_character

_command void normal_character()

Remarks	Inserts or overwrites the last key pressed depending upon the insert state.


nosplit_insert_line

_command void [wid_expression.]nosplit_insert_line()

Applies To	Edit Window, Editor Control, Command Line

Remarks	If the visible cursor is on the command line, the command is executed.  Otherwise a blank line is inserted after the current line and the cursor is aligned with the first non blank character of the current line.  The current line will not be split.  See split_insert_line.


nothing

_command void nothing()

Remarks	Affects nothing


number2onoff

_str number2onoff(_str number)

Return	Returns 'off' if number=="0".  Otherwise 'on' is returned.


number2yesno

_str number2yesno(_str number)

Return	Returns 'N' if number=="0".  Otherwise 'Y' is returned.


oi2type

int oi2type()

Return	Returns object constant converted to an object type.  The return value of this function is used as input into the name_match, find_index, and other name table functions which accept a name type argument.

Example

index=find_index('form1',oi2type(OI_FORM));


on_change

event on_change

Applies To	Text Box, Combo Box, List Box,  Directory List Box, File List Box, Drive List, Vscroll Bar, Hscroll Bar, Spin, Tree View

Remarks	Text Box - Occurs when the p_text property changes.

Combo Box - Occurs when the p_text property changes.   The on_change event is called with a reason argument which may be one the following constants defined in "slick.sh":

CHANGE_OTHER	Change probably caused by typing.

CHANGE_CLINE	Change occurred because selected line in list box changed and the list was visible.

CHANGE_CLINE_NOTVIS

Change occurred  because a key was pressed which scrolls the list (Up, Down, PgUp, PgDn) while the list was invisible.

CHANGE_CLINE_NOTVIS2

Same as CHANGE_CLINE_NOTVIS.  Sent to user level 2 inheritance only.  User level 2 inheritance will receive the CHANGE_CLINE_NOTVIS reason as well if the user level 1 inheritance does not catch the on_change event.

List Box -   The on_change event is called with a reason argument set to CHANGE_SELECTED.  Occurs when items are selected or deselected because of a key press or mouse event.  None of the _lb??? functions cause a list box on_change event.

Directory List Box -     The on_change event is called with a reason argument which may be one of the following reason constants defined in "slick.sh":

CHANGE_SELECTED

Occurs when items are selected or deselected because of a key press or mouse event.  None of the _lb??? functions cause an on_change event.

CHANGE_PATH	_dlpath function was called which changed the directory displayed.

File List Box - The on_change event is called with a reason argument which may be one of the following reason constants defined in "slick.sh":

CHANGE_SELECTED

Occurs when items are selected or deselected because of a key press or mouse event.  None of the _lb??? functions cause an on_change event.

CHANGE_FILENAME

_flfilename function was called which changed the file names listed.

Drive List -  The on_change event is called with a reason argument which may be one the following constants defined in "slick.sh":

CHANGE_OTHER	p_text property changed probably because of key press.

CHANGE_CLINE	p_text property changed because selected line in list box changed and the list was visible.

CHANGE_CLINE_NOTVIS

p_text property changed because a key was pressed which scrolls the list (Up, Down, PgUp, PgDn) while the list was invisible.

CHANGE_CLINE_NOTVIS2

Same as CHANGE_CLINE_NOTVIS.  Sent to user level 2 inheritance only.  Use level 2 inheritance will receive the CHANGE_CLINE_NOTVIS reason as well if the user level 1 inheritance does not catch the on_change event.

CHANGE_DRIVE	The drive changed by selecting a different drive from the combo list box.

Vscroll Bar, Hscroll Bar - Sent after dragging the thumb box is completed.  The p_value property has the new scroll position.

Spin -  The on_change event is called with a reason set to CHANGE_NEW_FOCUS.  This event occurs before an on_spin_up or on_spin_down event to allow you to return the window id of the control you want to get focus after spinning is completed.  Return '' if you don't care.

Tree View -  The on_change event is called with a reason argument which may be one the following constants defined in "slick.sh":

CHANGE_EXPANDED

Occurs when you expand a level of the tree.  During this event you can fill in the children at this level of the tree. arg(2) is the tree item index.

CHANGE_COLLAPSED

Occurs when you collapse a level of the tree. arg(2) is the tree item index.

CHANGE_LEAF_ENTER

User pressed Enter key while on leaf tree item.  arg(2) is the tree item index.

SSTab -  The on_change event is called with a reason argument which may be one the following constants defined in "slick.sh":

CHANGE_TABACTIVATED

Occurs when a different tab is activated.  arg(2) is the tab order (p_ActiveTab).

CHANGE_TABDEACTIVATED

Occurs before a different tab is activated. arg(2) is the tab order (p_ActiveTab).


on_change2

event on_change2

Applies To	Combo Box

Remarks	Combo Box - Occurs when the p_text property changes.  No arguments are passed.


on_close

event on_close

Applies To	Form

Remarks	Occurs when dialog box is closed via the system menu of the form or when the user cancels the dialog box (ESC or Alt+F4).  When this event falls through to the dialog manager, the dialog manager looks to see if the form has this event.  If the form has a handler for this event, the form on_close is called.  If the form does not have an on_close event, the dialog manager executes the lbutton_up event handler for the command button with the p_cancel property set to true.  If no such button exists, the dialog managers closes the dialog box.


on_create

event on_create

Applies To	Text Box, Combo Box, List Box,  Directory List Box, File List Box, Drive List, Command Button, Check Box, Radio Button, Frame, Hscroll Bar, Vscroll Bar, Spin, Gauge, Image, Form, Tree View

Remarks	All objects are sent an on_create event when a dialog box template is loaded with the show or _load_template function.  The show and _load_template function can be given a variable number of arguments to pass to the on_create event.  The on_create event can not be used to change the focus.  Use the on_load function to set the initial focus of a dialog box.

Example

#include 'slick.sh'

_command mycommand()

{

    show('form1','first argument', 'second argument');

}

defeventtab form1

command1.on_create()

{

   arg1=arg(1);

   arg2=arg(2);

   message('arg1='arg1' arg2='arg2);

}


on_create2

event on_create2

Applies To	Text Box, Combo Box, List Box,  Directory List Box, File List Box, Drive List, Command Button, Check Box, Radio Button, Frame, Hscroll Bar, Vscroll Bar, Spin, Gauge, Image, Form, Tree View

Remarks	All objects are sent an on_create2 event when a dialog box template is loaded with the show or _load_template function.  No parameters are passed to the on_create2 event.  We recommend that only user level 2 inheritance catch this event.  User level 1 inheritance should catch the on_create event instead.


on_destroy

event on_destroy

Applies To	Text Box, Combo Box, List Box,  Directory List Box, File List Box, Drive List, Command Button, Check Box, Radio Button, Frame, Hscroll Bar, Vscroll Bar, Spin, Gauge, Image, Form, Tree View

Remarks	All objects are sent an on_destroy event when the object is deleted with the _delete_window function.


on_destroy2

event on_destroy2

Applies To	Text Box, Combo Box, List Box,  Directory List Box, File List Box, Drive List, Command Button, Check Box, Radio Button, Frame, Hscroll Bar, Vscroll Bar, Spin, Gauge, Image, Form, Tree View

Remarks	All objects are sent an on_destroy2 event when the object is deleted with the _delete_window function.  We recommend that only user level 2 inheritance catch this event.  User level 1 inheritance should catch the on_destroy event.


on_drop_down

event on_drop_down

Applies To	Combo Box

Remarks	The on_drop_down event is sent to a combo box with a reason argument.  The reason argument specifies one of the following conditions:

DROP_UP	After combo list box is made invisible.

DROP_DOWN	Before combo list box is made visible.

DROP_INIT	Before retrieve next/previous.  Used to initialize list box before it is accessed.

DROP_UP_SELECTED	Mouse released while on valid selection in list box and list is visible

Example

#include "slick.sh"

defeventtab form1

combo1.on_drop_down(reason)

{

    if (reason==DROP_INIT) {

       if (p_user=='') {

           p_user=1;   // Indicate that the list box has been filled.

           // Insert one heck of a lot of items

           p_cb_list_box._insert_name_list(COMMAND_TYPE);

           p_cb_list_box._lbsort();

           p_cb_list_box._lbtop();

       }

    }

}


on_got_focus

event on_got_focus

Applies To	Text Box, Combo Box, List Box,  Directory List Box, File List Box, Drive List, Command Button, Check Box, Radio Button, Frame, Hscroll Bar, Vscroll Bar, Spin, Gauge, Form, Tree View

Remarks	The on_got_focus event is sent to an object when it receives the input focus.


on_hsb_bottom

event on_hsb_bottom

Applies To	Edit Window, Editor Control

Remarks	The on_hsb_bottom event is sent to an Edit Window when the horizontal thumb is placed in the farthest right position.


on_hsb_line_down

event on_hsb_line_down

Applies To	Edit Window, Editor Control

Remarks	The on_hsb_line_down event is sent when the right arrow of a horizontal scroll bar is pressed.


on_hsb_line_up

event on_hsb_line_up

Applies To	Edit Window, Editor Control

Remarks	The on_hsb_line_up event is sent when the left arrow of a horizontal scroll bar is pressed.


on_hsb_page_down

event on_hsb_page_down

Applies To	Edit Window, Editor Control

Remarks	The on_hsb_page_down event is sent when the you click on the area between thumb box and right arrow of a horizontal scroll bar.


on_hsb_page_up

event on_hsb_page_up

Applies To	Edit Window, Editor Control

Remarks	The on_hsb_page_up event is sent when the you click on the area between the left arrow and the thumb box of a horizontal scroll bar.


on_hsb_thumb_pos

event on_hsb_thumb_pos

Applies To	Edit Window, Editor Control

Remarks	The on_hsb_thumb_pos event is sent when you click and drag the thumb box of a horizontal scroll bar.  The hsb_pos argument is a number between 0 and 32000 and corresponds to the far left and right positions.


on_hsb_thumb_track

event on_hsb_thumb_track

Applies To	Edit Window, Editor Control

Remarks	The on_hsb_thumb_track event is sent when you finish dragging the thumb box of a horizontal scroll bar.  The hsb_pos argument is a number between 0 and 32000 and corresponds to the far left and right positions.


on_hsb_top

event on_hsb_top

Applies To	Edit Window, Editor Control

Remarks	The on_hsb_top event is sent to an Edit Window when the horizontal thumb is placed in the farthest left position.


on_init_menu

event on_init_menu

Applies To	MDI Window, Form

Remarks	The on_init_menu event is sent to a Form or MDI Window which has a menu bar just before the user activates the menu.  This event is typically used to gray out menu items just before the user sees the drop-menus.

#include "slick.sh"

// Create a form called form1 and set the border style to anything BUT

// BDS_DIALOG BOX.  Windows does not allow forms with a dialog

// box style border to have menu bars.

defeventtab form1

form1.on_load()

{

    // Find index of Visual SlickEdit MDI menu resource

    index=find_index(def_mdi_menu,oi2type(OI_MENU));

    // Load this menu resource

    menu_handle=p_active_form._menu_load(index);

    // _set_menu will fail if the form has a dialog box style border.

    // Put a menu bar on this form.

    _menu_set(menu_handle);

    // You DO NOT need to call _menu_destroy.  This menu is destroyed when the form

    // window is deleted.

}

form1.on_init_menu()

{

    // Gray out all menu items which are not allowed when there no child windows.

    _menu_set_state(p_menu_handle,"!ncw",MF_GRAYED,'C');

}

See Also	_menu_add_filehist, _menu_add_hist, _menu_add_prjhist, _menu_bind, _menu_destroy, _menu_find, _menu_get_state, _menu_info, _menu_insert, _menu_load, _menu_match, _menu_move, _menu_set, _menu_set_state, _menu_show, alt_menu, insert_object, menu_mdi_bind_all, mou_show_menu, show


on_keystatechange

event on_keystatechange

Remarks	The on_keystatechange event is returned by the get_event function to indicate that a shift key has been pressed or released.  You must call the mou_mode function with a one for this event to be returned by the get_event function.

Example

defmain()

{

     mou_mode(1);

OuterLoop:

     for (;;) {

         event=get_event();

         switch( event ) {

         case ESC:

              break OuterLoop;

          case ON_KEYSTATECHANGE:

              if (_IsKeyDown(CTRL) ){

                   message("CTRL is down");

               } else {

                    message("CTRL is not down");

               }

           }

      }

      mou_mode(0);

        }


on_load

event on_load

Applies To	Form

Remarks	The on_load event is sent to a form (after the on_create and on_create2 events) when a dialog box template is loaded with the show or _load_template function.  The on_load event is intended to be used to set the control which has the initial focus.  Use the on_create event unless you need to set the initial focus.

Example

#include 'slick.sh'

defeventtab form1

form1.on_load()

{

    // Change the focus to the text2 control

    p_window_id=_control text2;

}


on_lost_focus

event on_lost_focus

Applies To	Text Box, Combo Box, List Box,  Directory List Box, File List Box, Drive List, Command Button, Check Box, Radio Button, Frame, Hscroll Bar, Vscroll Bar, Spin, Gauge, Form, Tree View

Remarks	The on_lost_focus event is sent to an object when it loses input focus.


on_resize

event on_resize

Applies To	Text Box, Combo Box, List Box,  Directory List Box, File List Box, Drive List, Command Button, Check Box, Radio Button, Frame, Hscroll Bar, Vscroll Bar, Spin, Gauge, Form, Tree View

Remarks	The on_resize event is sent to an object when the window position or size is changed.  Use the p_x, p_y, p_width, and p_height properties to get the position and size.


on_scroll

event on_scroll

Applies To	Hscroll Bar, Vscroll Bar

Remarks	The on_scroll event is sent when you click and drag the thumb box of a scroll bar.  The on_change event is sent after dragging the thumb box is completed.

Example

#include 'slick.sh'

defeventtab form1

hscroll1.on_scroll()

{

   message('on_scroll p_value='p_value);

}

hscroll1.on_change()

{

   message('on_change p_value='p_value);

}

See Also	on_change


on_scroll_lock

event on_scroll_lock

Applies To	Editor Window, Editor Control

Remarks	The on_scroll_lock event is sent when the scroll lock key is pressed.  The value parameter is 1 if scroll lock is on.  Otherwise, value is 0.


on_select

event on_select

Applies To	Editor Window, Editor Control

Remarks	The on_select event is sent before a key press event when the current buffer has a selection.  User level 1 and user level 2 inheritance can not catch this event.  Only the default_keys event table can process this event.  This event will not occur if the user level 1 or user level 2 inheritance has an event handler for the key.


on_spin_down

event on_spin_down

Applies To	Spin

Remarks	The on_spin_down event is sent to a spin control if the p_increment property is 0.  When the p_increment property is non-zero, the number in the previous control in the tab order (which must be a text box) is decremented.


on_spin_up

event on_spin_up

Applies To	Spin

Remarks	The on_spin_up event is sent to a spin control if the p_increment property is 0.  When the p_increment property is non-zero, the number in the previous control in the tab order (which must be a text box) is incremented.


on_timer

event on_timer

Remarks	The on_timer event is returned by the get_event function when _set_timer is called with only the first argument.


on_vsb_bottom

event on_vsb_bottom

Applies To	Edit Window, Editor Control

Remarks	The on_vsb_bottom event is sent to an Edit Window when the horizontal thumb is placed in the bottom position.


on_vsb_line_down

event on_vsb_line_down

Applies To	Edit Window, Editor Control

Remarks	The on_vsb_line_down event is sent when the down arrow of a horizontal scroll bar is pressed.


on_vsb_line_up

event on_vsb_line_up

Applies To	Edit Window, Editor Control

Remarks	The on_vsb_line_up event is sent when the up arrow of a horizontal scroll bar is pressed.


on_vsb_page_down

event on_vsb_page_down

Applies To	Edit Window, Editor Control

Remarks	The on_vsb_page_down event is sent when the you click on the area between thumb box and down arrow of a horizontal scroll bar.


on_vsb_page_up

event on_vsb_page_up

Applies To	Edit Window, Editor Control

Remarks	The on_vsb_page_up event is sent when the you click on the area between the up arrow and the thumb box of a horizontal scroll bar.


on_vsb_thumb_pos

event on_vsb_thumb_pos

Applies To	Edit Window, Editor Control

Remarks	The on_vsb_thumb_pos event is sent when you click and drag the thumb box of a vertical scroll bar.  The vsb_pos argument is a number between 0 and 32000 and corresponds to the far left and right positions.


on_vsb_thumb_track

event on_vsb_thumb_track

Applies To	Edit Window, Editor Control

Remarks	The on_vsb_thumb_track event is sent when you finish dragging the thumb box of a vertical scroll bar.  The vsb_pos argument is a number between 0 and 32000 and corresponds to the far left and right positions.


on_vsb_top

event on_vsb_top

Applies To	Edit Window, Editor Control

Remarks	The on_vsb_top event is sent to an Edit Window when the vertical scroll bar thumb box is placed in the top position.


one_tile

void one_tile()

Applies To	Edit Window

Remarks	If the current window is maximized (p_window_state=='M'), all windows with the same tile id (p_tile_id) as the current window (not including the current window) are deleted.

See Also	one_window


one_window

_command void one_window()

"Window", "One Window"

Applies To	Edit Window

Remarks	Deletes all windows accept the current window which is zoomed.

See Also	one_tile


_open_form

_form _open_form

Syntax	_str show('-modal _open_form', title, initial_wildcards, file_type_list,

      ofn_flags, default_ext, initial_filename, initial_directory [,retrieve_name [,help_item] ] )

Input

title	Title of dialog box.

initial_wildcards	Semicolon delimited wildcards (Ex.  "*.c;*.h").  The File list box will initially display files matching these wildcards.  This string should exist within parenthesis in the file_type_list string.

file_type_list	List of comma delimited strings to be inserted into the List Files of Type combo box.  Each item must contain a parenthesized wildcard list.  For example, "All File (*.*), C Files (*.c;*.h)".

ofn_flags	May a combination of the following flag constants defined in "slick.sh":

      OFN_ALLOWMULTISELECT

 	Allow multiple file selection.  When set, caller must process a return value which may have spaces delimited filenames some of which are double quoted.

      OFN_FILEMUSTEXIST

File(s) selected must exist.

      OFN_CHANGEDIR

Don't restore original directory on exit

      OFN_NOOVERWRITEPROMPT

Don't prompt user with overwrite existing dialog.

      OFN_SAVEAS	File list box does not select files and user is prompted whether to overwrite an existing file.

      OFN_DELAYFILELIST

Display dialog box before displaying file list.  Can speed up display of dialog box.

      OFN_READONLY	Show read only button.    See OFN_PREFIXFLAGS flag.

      OFN_KEEPOLDFILE	Show keep old name button.    See OFN_PREFIXFLAGS flag.

      OFN_PREFIXFLAGS

Prefix return value with -r if OFN_READONLY flag given and -n if OFN_KEEPOLDFILE flag given.

default_ext	Usually '' is specified for this parameter.  This extension is used if the file the user has selected does not have an extension.

initial_filename	Filename that initially appears in the File Name combo box.

initial_directory	Current directory is switched to this directory when the dialog box is displayed.

retrieve_name	Retrieve name used keep track of the previous typed file names in the File Name combo box.  Typically this is the name of the command or function that invoked the dialog box or the extension on the files being opened.

help_item	Specifies help displayed when F1 is pressed or the help button is pressed.  If the help_item starts with a '?' character, the characters that follow are displayed in a message box.  The help string may also specify a unique keyword in the "vslick.hlp" (UNIX: "uvslick.hlp") help file.  The unique keywords for the help file are contained in the file "vslick.lst" (UNIX: "uvslick.lst").  In addition, you may specify a unique keyword for any windows help file by specifying a string in the format:  keyword:help_filename.

Remarks	Displays the Open dialog box used for opening files other than for edit windows.

Example

#include "slick.sh"

defmain()

{

      result=show("-modal _open_form",

                            "Open",	// title

                             "*.bmp",	// Initial wildcards

                             "Bitmap Files (*.bmp),All Files (*.*)",	// File type list

                             OFN_READONLY|OFN_PREFIXFLAGS,

                             "",	// Default extension

                             "",	// Initial filename

                             "",	// Initial directory

                             "bmp"	//Retrieve name

                         );

       if (result == '') {

           return(COMMAND_CANCELLED_RC);

       }

       message('result='result);

}

Return	Returns '' if  the dialog box is cancelled.  Otherwise, the file names selected are returned separated with spaces.  If a file name contains spaces, it is placed in double quotes.  Only one file name is returned if the OFN_ALLOWMULTISELECT flag is not given.  If the OFN_PREFIXFLAGS flag is given, the return value is prefixed with -r if OFN_READONLY flag given and -n if OFN_KEEPOLDFILE flag given.

See Also	_edit_form


open_form

_command int open_form([_str cmdline[)

"Macro", "Open Form..."

cmdline is a string in the following format:  [-new] form1 [form2 [form3 ...]]

Remarks	Opens one or more dialog boxes (forms) specified for editing with the dialog editor.  If a form is already opened for editing, it is brought to the foreground and given focus.  The -new option specifies that a new form with the given name be created if it does not already exist.  If no arguments are given or cmdline is "", a selection list of existing forms is displayed.

Return	Returns 0 if there are no errors.


open_menu

_command void open_menu([_str cmdline])

"Macro", "Open/New Menu..."

cmdline is a  string in the format: [-show menu_name| -new [menu_name]]

Remarks	If no parameters are specified, the Open Menu dialog box is displayed.  Existing menus may be edited and new menus may be created.  Use the -show option followed by the menu name to run a menu as a pop-up menu.  The -new option allows you to create a new menu and optional specify the name of the new menu.


_open_temp_view

int _open_temp_view(_str filename, int &temp_view_id, int &orig_view_id [,_str load_options])

Remarks	Opens filename specified and creates a buffer and view to hold it.  No window is created.  The HIDE_BUFFER flag is added to the p_buf_flags property of the buffer so that the buffer will not be display in a user buffer list.  temp_view_id is set to the id of the new view created.  orig_view_id is set to the previously active view id.  If load_options are specified, these options are used to load the file.  See load_options method for more information.

Return	Returns 0 if successful.


or_re

void or_re(_str &pattern, _str error_re)

Remarks	Adds a new regular expression to pattern by ORing them.  This procedure assumes that error_re starts with a '^' character.   Typically used for adding compiler error message recognition.

See Also	search_for_error, parse_error


overlay_block_selection

_command void [wid_expression.]overlay_block_selection()

"Edit", "Other...", "Overlay Block"

Applies To	Editor Control, Edit Window

Remarks	Overwrites block selection at cursor position.  No clipboard is created.  Resulting selection is placed on inserted text.  A block of text may be selected with the select_block command (Ctrl+B).  You need to lock the selection for this command to be useful.  Invoke the select_block command again to lock a selection.


_overlay_block_selection

int _overlay_block_selection(_str mark_id="" )

Applies To	Editor Control, Edit Window

Remarks	Overwrites block selection specified at cursor position.  No clipboard is created.  Resulting selection is placed on inserted text.

Return	Returns 0 if successful.  Common return codes are TEXT_NOT_SELECTED_RC, BLOCK_SELECTION_REQUIRED_RC.  On error, message is displayed.


overwrite_existing

int overwrite_existing(filename , title)

Remarks	Displays a dialog box which prompts the user whether to replace the existing file, filename.  The title of the dialog box is set to title given.

Return	Returns 0 if the user has selected to replace the existing file.


p_ActiveCaption

property _str p_ActiveCaption

Applies To	SSTab

Remarks	Determines the caption for the active tab.


p_ActiveEnabled

property boolean p_ActiveEnabled

Applies To	SSTab

Remarks	Determines whether the active tab is enabled.  When a tab is disabled, the user can not switch to this tab via keyboard or mouse. Use the _setEnabled method instead of this property when setting enabled state of a non-active tab.


p_active_form

property int p_active_form

Applies To	All objects.

Return	Returns the window id of the active form.   You can not use the name (p_name) of the form to access properties of the active form.  You must use the p_active_form property.  This property is not available when the form is not displayed.

Example

defeventtab form1

command1.lbutton_up()

{

   // Close the active dialog box.

   p_active_form._delete_window();

}


p_ActiveHelp

property _str p_ActiveHelp

Applies To	SSTab

Remarks	Determines the help for the active tab.  See p_help property for syntax of help string.


p_ActiveOrder

property int p_ActiveOrder

Applies To	SSTab

Remarks	Determines the order in which the tabs are displayed.  The first tab is 0.


p_ActivePicture

property int p_ActivePicture

Applies To	SSTab

Remarks	Determines the picture displayed to the left of the caption for the active tab.  Set this to 0 for no picture.


p_ActiveTab

property int p_ActiveTab

Applies To	SSTab

Remarks	Determines the which tab is the active.


p_ProtectReadOnlyMode

property int p_ProtectReadOnlyMode

Applies To	Edit Window, Editor Control

Remarks	Determines whether how read only mode should be protected.  Unlike the p_readonly_mode property which is per buffer, this property is per window.

VSPROTECTREADONLYMODE_OPTIONAL

If the buffer is in read only mode and the user has selected to protect read only mode (_default_option (VSOPTION_PROTECT_READONLY_MODE) )

VSPROTECTREADONLYMODE_ALWAYS

If the buffer is in read only mode, the buffer is protected.

VSPROTECTREADONLYMODE_NEVER

Read only mode is never protected.


p_adefault

property boolean p_adefault

Applies To	Command Button

Return	Returns non-zero value if the current command button is the active default button.  The active default button does not have to be a button with (p_default!=0).  This property is not available when the control is not displayed.


p_after_pic_indent_x

property int p_after_pic_indent_x

Applies To	List Box, Combo Box, Text Box

Remarks	Gets or sets the amount to indent in twips after a bitmap in a list box, text box, or combo box (text box not list).  This property is not available when the control is not displayed.

Example

#include 'slick.sh'

defeventtab form1

combo1.on_create()

{

   p_picture=_pic_drremov;

   // Set indent before picture.

   p_pic_indent_x=100;

   // Set indent after picture.

   p_text='A:';

   p_after_pic_indent_x=200;

   // Extra y spacing. Half displayed above and half below picture

   p_pic_space_y=100;

}


p_alignment

property int p_alignment

Applies To	Label, Radio Button, Check Box

Remarks	Gets or sets the alignment.   Radio buttons and check boxes do not support this property under UNIX.

Label - Determines where p_caption text gets displayed.  The p_alignment property has no effect if p_auto_size is non-zero.  p_alignment is  one of the following constants defined in "slick.sh":

AL_LEFT	Display caption left justified.

AL_RIGHT	Display caption right justified.

AL_CENTER	Display caption horizontally centered at top.

AL_VCENTER	Display caption vertically centered at left.

AL_VCENTERRIGHT	Display caption vertically centered at right.

AL_CENTERBOTH	Display caption centered vertically and horizontally.

Radio Button, Check Box - Determines whether p_caption text gets displayed on left or right.  We use the same conventions as Visual Basic (which are backwards).  p_alignment is  one of the following constants defined in "slick.sh":

AL_LEFT	Display caption right justified.

AL_RIGHT	Display caption left justified.


p_AllowSave

property boolean p_AllowSave

Applies To	Editor Control

Remarks	Determines whether the buffer displayed in an editor control may be saved.  When on, the buffer will be Auto Saved or Reloaded.


p_auto_select

property boolean p_auto_select

Applies To	Text Box, Combo Box

Remarks	Gets or sets the auto selection when tabbing between controls.  When p_auto_select is non-zero, and you tab from a text box or combo box, the selection is removed.  In addition, when you tab to a text box or combo box, the text is selected.  If you do not want a text selection to change, set the p_auto_select property to zero.


p_AutoSelectExtension

property int p_AutoSelectExtension

Applies To	Edit Window, Editor Control

Remarks	Determines whether the extension type of the current file needs to be changed based on the contents of  the first non-blank line of the file.  At the moment this property only effects dataset files of the form "//datasetname" or "//pds(member)".  This property was intended for use with mainframe source files which no extension.  However, it is likely that this property will be useful for determining the extension type of UNIX shell script files which typically have no extension.

See Also	p_TruncateLength, p_MaxLineLength, trunc, p_AutoSelectExtension


p_auto_size

property boolean p_auto_size

Applies To	Label, Text Box, Editor Control, List Box, File List Box, Directory List Box, Hscroll Bar, Vscroll Bar, Picture Box, Image

Remarks	Determines whether a control automatically sizes its window based on its contents.

Label - Determines whether the window size is determined by the font and the p_caption property.   When p_auto_size is non-zero, the p_alignment property has no effect.

Text Box - Determines whether the window size is determined by the fond and the p_text property.

Editor Control, List Box, File List Box, Directory List Box - Determines whether the window height is rounded to an integral of the font height.

Hscroll Bar- Determines whether the window height is set to the default system scroll bar height.

Vscroll Bar- Determines whether the window width is set to the default system scroll bar width.

Picture Box, Image - Determines whether the window size is set to the size of the picture defined by the

p_picture property.  If the p_picture property is zero, the p_auto_size property has no effect.


p_backcolor

property int p_backcolor

Applies To	Label, Spin, Text Box, Editor Control, Frame, Radio Button, Check Box, Combo Box, List Box, File List Box, Directory List Box, Picture Box, Image, Gauge,  Drive List, Tree View

Remarks	Determines the background color of a control.

Form, Label, Spin, Text Box, Editor Control, Frame, Radio Button, Check Box, List Box, File List Box, Directory List Box, Gauge, Tree View - Determines the background color of the window.

Combo Box - Determines the background color of the text box and list box.

Drive List -  Determines the background color of the text box and list box.

Picture Box, Image - Determines the background color of the window.  No background of the window is seen if the p_auto_size property is non-zero and the p_picture property has a valid picture.


p_binary

property boolean p_binary

Applies To	Edit Window, Editor Control

Remarks	Determines the binary mode of the buffer attached to this window.  Affects _save_file() function.  When on, all reformatting options given to _save_file function are ignored.  This property is initialized by the load_files function.  The "+lb" load_files switch turns this buffer property on.  This property is only available when the control is displayed.


p_border_style

property int p_border_style

Applies To	Form, Label, Text Box, Editor Control, List Box, File List Box, Directory List Box, Picture Box, Image

Remarks	Determines the border of a control.

Form - Border style may be one of the following constants defined in "slick.sh":

BDS_NONE	No border.

BDS_FIXED_SINGLE	Thin non-sizable border.

BDS_SIZABLE	Thick sizable border.

BDS_DIALOG_BOX	Standard non-sizable dialog box border.

Text Box, Editor Control, List Box, File List Box, Directory List Box, Picture Box, Image, Tree View - Border style may be one of the following constants defined in "slick.sh":

BDS_NONE	No border.

BDS_FIXED_SINGLE	Thin non-sizable border.

Label - Border style may be one of the following constants defined in "slick.sh":

BDS_NONE	No border.

BDS_FIXED_SINGLE	Thin non-sizable border.

BDS_SUNKEN	Sunken border.   The exact look of this border style OS dependent.


p_buf_flags

property int p_buf_flags

Applies To	Editor Control, Edit Window, List Box, File List Box, Directory List Box

Remarks	Determines buffer flags.  This property is only available when the control is displayed.  The buffer flags may be zero or more of the following constant flags defined in "slick.sh":

HIDE_BUFFER	Affects Edit Window only.  next_buffer and prev_buffer commands won't switch to this buffer.

THROW_AWAY_CHANGES	Affects Edit Window only. Allow quit without prompting for save when this buffer is modified.

KEEP_ON_QUIT	Affects Edit Window only.  Don't delete buffer on quit.

REVERT_ON_THROW_AWAY	Affects Edit Window only.  Replace buffer with copy on disk when the buffer is deleted with the quit command.

PROMPT_REPLACE_BFLAG	Indicates whether to prompt when replacing existing file on save.

DELETE_BUFFER_ON_CLOSE	Indicates whether the buffer should be deleted when a list box or editor control is deleted.


p_buf_id

property int p_buf_id

Applies To	Editor Control, Edit Window, List Box, File List Box, Directory List Box

Remarks	Determines buffer displayed in current window.  This property is only available when the control is displayed.

Example

// Remember the original buffer

orig_buf_id=p_buf_id;

// Create a new buffer.  -q is a quit option

status=load_files('-q main.e');

if (status) {

   first_line='';

   if (status== NEW_FILE_RC) {

       _delete_buffer();

   }

} else {

   top();	// Just in case the file was already loaded.

   get_line(first_line);

   _delete_buffer();

}

// Make sure were are back to the original buffer.

p_buf_id=orig_buf_id;

message('first_line='first_line);


p_buf_name

property _str p_buf_name

Applies To	Editor Control, Edit Window, List Box, File List Box, Directory List Box

Remarks	Determines buffer name.  The buffer name is used as the default name when a file is saved.  You should not need to change the buffer name for a list box.


p_buf_size

property int p_buf_size

Applies To	Editor Control, Edit Window

Remarks	Returns number of bytes in buffer.  This property includes lines with NOSAVE_LF set which means that this size will not match what is on disk if the file has non-savable lines.  Use p_RBufSize to retrieve the number of bytes which would be saved on disk.


p_buf_width

property int p_buf_width

Applies To	Editor Control, Edit Window

Remarks	Determines the record width of the current buffer.  Typically, the p_buf_width property is zero when displaying ASCII files.  When the p_buf_width property is non-zero, new line characters no longer split a line, saving does not add new lines characters at the end of each line, saving does not append an EOF character, tab character are not expanded when displayed, and all characters in the buffer including new line characters are displayed.


p_buser

property typeless p_buser

Applies To	Editor Control, Edit Window

Remarks	Gets/sets buffer specific information.  Currently this property is reserved for used by MicroEdge Inc.  It may be removed in the future.


p_button_bar

property int p_button_bar

Applies To	MDI Window

Remarks	Determines the button bar form.  The p_button_bar property is set to an index into the names table of a dialog box template.   However, this property returns the form window id of the button bar and not the original index used to load the button bar.

Example

index=find_index('form1',oi2type(OI_FORM));

if (!index) {

   message('Did not find form1');

   return(1);

}

// The existing button bar (if there is one) is destroyed, and the new button bar is loaded.

_mdi.p_button_bar=index;

// Note that _mdi.p_button_bar returns the window id (instance handle) of the new button bar

message('index='index' _mdi.p_button_bar='_mdi.p_button_bar);


p_cancel

property boolean p_cancel

Applies To	Command Button

Remarks	Determines the command button whose lbutton_up event handler gets executed when ESC or Alt+F4 is pressed or the dialog box is closed by the system menu.  If the cancel button does not have an lbutton_up event handler, the dialog box is closed and '' is returned to _modal_wait.


p_caption

property _str p_caption

Applies To	Form, Label, Frame, Command Button, Radio Button, Check Box, Menu, Menu Item

Remarks	Determines the title or text displayed.

Menu, Menu Item -  Determines the title of a submenu or menu item.  When menus are displayed, there is no instance handle.  Menu and menu item properties can only be accessed in menu resources.    The _menu_get_state and _menu_set_state function maybe be used to get and set menu properties of displayed menus.  IMPORTANT:  For menu items, set the p_caption property to "-" if you want a line separating menu items which follow.

Form, Frame -  Determines the title of the window.

Label, Command Button, Radio Button, Check Box - Determines the text displayed in the window.

Example

#include "slick.sh"

defmain()

{

   // Find menu resource in names table

   tindex=find_index("menu1",oi2type(	OI_MENU));

   if (!tindex){

        messageNwait("menu1 not found");

        return('');

   }

   // Get resource handle to first child of this menu

   // The first child of a menu designed to be a menu bar is typically the File menu

   child=tindex.p_child;

   // Display the caption of the first child of this menu.

   messageNwait("caption="child.p_caption);

}


p_caps

property boolean p_caps

Applies To	Editor Control, Edit Window

Remarks	Returns true if capitalization mode is on.

See Also	p_extension, caps


p_CaptionClick

property boolean p_CaptionClick

Applies To	Form

Remarks	Determines when clicking in the forms caption sends button down and up events to the form.  Typically the operating system window manager takes for handling mouse click events.  However, this property is useful for dragging and dropping toolbars.  This property is ignored under X windows.


p_case_sensitive

property boolean p_case_sensitive

Applies To	Combo Box

Remarks	Determines case sensitivity for searching in a Combo Box.


p_categories

property _str p_categories

Applies To	Menu, Menu Item

Remarks	This property is a string of categories.  Each category is separated with a vertical bar character ('|').  Categories are typically used to define a group of menu and/or menu items that are to be enabled/disabled at the same time.  For example, Visual SlickEdit defines the "ab-sel" category.  All menu items which contain this category are enabled when the active buffer has a selection and disabled when it does not.  The _menu_set_state function allows you to enable/disable menus or menu items by category or command (only menu items have a p_command property).  For sub-menus, the p_categories property is also used to uniquely identify the menu.   For example, if you wanted to maintain a history of files recently opened on a File menu, insert a menu item line with the p_categories property set to "filehist".  Then use the _menu_find function to quickly find the menu item.  This is how the _menu_add_hist function maintains File and Project menu history.  The _menu_add_hist is a general purpose function for maintaining history on a menu.


p_cb

property int p_cb

Applies To	Combo Box, Drive List

Returns	Returns the window id of a combo box.  A combo box consists of 4 controls: the root window, text box, picture box, and list box.  The properties and methods of the text box, picture box, and list box may be accessed individually with the p_cb_text_box, p_cb_picture, p_cb_list_box instance handle properties.  The p_cb property provides a way to make sure you are accessing the root window properties and is only available when the control is displayed.

Example

defeventtab form1

combo1.on_create()

{

   // Activate the list box of the combo box control

   p_window_id=p_cb_list_box;

   for (i=1;i<=100;++i){

      _lbadd_item('line='i)

   }

   p_window_id=p_cb;

}


p_cb_active

property int p_cb_active

Applies To	Combo Box, Drive List

Returns	Returns the window id of the sub-control of a combo box that was clicked in.  A combo box consists of 4 controls: the root window, text box, picture box, and list box.  The properties and methods of the sub-controls may be accessed individually with the p_cb, p_cb_text_box, p_cb_picture, p_cb_list_box instance handle properties.  When the combo box receives the lbutton_down event, you may want to determine which of the sub-controls was actually clicked in.  Compare the p_cb_active property to the individual instance handles p_cb, p_cb_text_box, p_cb_picture, and p_cb_list_box.

Example

defeventtab form1

combo1.lbutton_down()

{

   if (p_cb_active==p_cb_picture) {

       message('clicked in picture box');delay(100);

       if (p_cb_list_box.p_visible) {

            p_cb_list_box.p_visible=0;

       } else {

           p_cb_list_box.p_visible=1;

       }

       return('');

   }

    //  Skip user level 1 inheritance and execute the default event handler.

    call_event(p_window_id,lbutton_down,'2');

}


p_cb_extendedui

property boolean p_cb_extendedui

Applies To	Combo Box, Drive List

Remarks	When non-zero a key that scrolls the combo box list makes the list box visible if it is not already visible.

Example

defeventtab form1

combo1.lbutton_down()

{

   if (p_cb_active==p_cb_picture) {

       message('clicked in picture box');delay(100);

       if (p_cb_list_box.p_visible) {

            p_cb_list_box.p_visible=0;

       } else {

           p_cb_list_box.p_visible=1;

       }

       return('');

   }

    //  Skip user level 1 inheritance and execute the default event handler.

    call_event(p_window_id, lbutton_down,'2');

}


p_cb_list_box

property int p_cb_list_box

Applies To	Combo Box, Drive List

Returns	Returns the window id of a list box sub-control of a combo box.  A combo box consists of 4 controls: the root window, text box, picture box, and list box.  The properties and methods of the sub-controls may be accessed individually with the p_cb, p_cb_text_box, p_cb_picture, p_cb_list_box instance handle properties.  The p_cb_list_box property is only available when the control is displayed.

Example

defeventtab form1

combo1.on_create()

{

   // Active the list box of the combo box control

   p_window_id=p_cb_list_box;

   for (i=1;i<=100;++i){

      _lbadd_item('line='i)

   }

   p_window_id=p_cb;

}


p_cb_picture

property int p_cb_picture

Applies To	Combo Box, Drive List

Returns	Returns the window id of a picture box sub-control of a combo box.  A combo box consists of 4 controls: the root window, text box, picture box, and list box.  The properties and methods of the sub-controls may be accessed individually with the p_cb, p_cb_text_box, p_cb_picture, p_cb_list_box instances handle properties.  The p_cb_picture property is only available when the control is displayed.

Example

#include "slick.sh"

defeventtab form1

combo1.on_create()

{

   // Show a picture which indicates that click on the picture box button displays a dialog box.

   p_cb_picture.p_picture=_pic_cbdots;

}

combo1.lbutton_down()

{

   if (p_cb_active==p_cb_picture) {

       result=show('-modal form2')

       // process result

       return('');

   }

    //  Skip user level 1 inheritance and execute the default event handler.

    call_event(p_window_id, lbutton_down,'2');

}


p_cb_text_box

property int p_cb_text_box

Applies To	Combo Box, Drive List

Returns	Returns the window id of a text box sub-control of a combo box.  A combo box consists of 4 controls: the root window, text box, picture box, and list box.  The properties and methods of the sub-controls may be accessed individually with the p_cb, p_cb_text_box, p_cb_picture, p_cb_list_box instances handle properties.  The p_cb_text_box property is only available when the control is displayed.  Since all properties of p_cb and p_cb_text access the same values except for the window position and size properties, there is little need for the p_cb_text_box property other than to check if it was clicked in.

Example

defeventtab form1

combo1.lbutton_down()

{

   if (p_cb_active==p_cb_text_box) {

       message('clicked in text box');delay(50);

   }

    //  Skip user level 1 inheritance and execute the default event handler.

    call_event(p_window_id, lbutton_down, '2');

}


p_char_height

property int p_char_height

Applies To	Editor Control, Edit Window, List Box, File List Box, Directory List Box

Return	Returns the maximum number of lines that can be displayed in the window.  This property is currently only useful if all lines have the same font height.


p_char_width

property int p_char_width

Applies To	Editor Control, Edit Window, List Box, File List Box, Directory List Box

Return	Returns the maximum number of characters that can be displayed on a line in the window.  This property is currently only useful if all characters have the same font width.


p_child

property int p_child

Applies To	All objects

Return	If the control is displayed, the window id of the first child is returned.  Otherwise, an encoded number is returned which can be used to get/set some property values.  Although all objects have this property, some objects such as Text Box and Menu Item can not have any child objects.  For these objects 0 is always returned.


p_client_height

property int p_client_height

Applies To	All objects except image control

Return	Returns the client height of the window in pixels.  This property may only be accessed when the control is displayed.


p_client_width

property int p_client_width

Applies To	All objects except Image control

Return	Returns the client width of the window in pixels.  This property may only be accessed when the control is displayed.

Example

// Determine the width of both borders of the current control.

both_width=p_width- _dx2lx(p_xyscale_mode,p_client_width);


p_clip_controls

property boolean p_clip_controls

Applies To	Form, Picture Box, Frame

Remarks	Determines whether the child controls are clipped when the control is painted.  When this property is off, dialogs sometimes have problems repainting.  Painting a dialog box is slightly faster when p_clip_controls is off.  However, the machines and video performance get faster, this property will become useless.  This property is not yet supported under UNIX.


p_col

property int p_col

Applies To	Editor Control, Edit Window

Remarks	Determines the character column position.  The first column position is 1.  If there are tab characters in the line, p_col represents the expanded column position and not the byte offset within the line.  This property is only available when the control is displayed.


p_CollapsePicture

property boolean p_CollapsePicture

Applies To	Tree View

Remarks	Determines the picture which is diplayed at the far left of a all tree items with children that are not currently displayed.

See Also	p_ExpandPicture


p_color_flags

property int p_color_flags

Applies To	Editor Control, Edit Window

Remarks	Determines coloring styles for a buffer.  Color flags are defined in "slick.sh" and may be one or more of the following constants:

LANGUAGE_COLOR_FLAG

Color language specific elements.

MODIFY_COLOR_FLAG

Color modified lines.

CLINE_COLOR_FLAG

Color the current line.

See Also	_clex_find, _clex_load, _clex_skip_blanks


p_command

property _str p_command

Applies To	Picture Box, Image, Menu Item

Remarks	Determines the editor command which gets invoked when a two state picture button is pressed.  If p_command is a valid editor command and p_style is PSPIC_FLAT_BUTTON, PSPIC_BUTTON, or PSPIC_AUTO_BUTTON, the command is executed on the active MDI edit window.

Remarks	Determines the background color of a control.

Picture Box, Image - Determines the editor command which gets invoked when a two state picture button is pressed.  If p_command is a valid editor command and p_style is PSPIC_FLAT_BUTTON (Image control only), PSPIC_BUTTON (image control only), or PSPIC_AUTO_BUTTON, the command is executed on the active MDI edit window.

Menu Item - Determines command which gets executed when a menu item is selected.  When menus are displayed, there is no instance handle.  Menu and menu item properties can only be accessed in menu resources.  The _menu_get_state and _menu_set_state function may be used to get and set  menu properties of displayed menus.


p_completion

property _str p_completion

Applies To	Combo Box, Text Box

Remarks	Determines the completion which occurs when the space bar or question mark keys are pressed.  Valid p_completion constants are:

NONE_ARG	No completion

FILE_ARG	One filename

MULTI_FILE_ARG	Multiple filenames

BUFFER_ARG	Buffer name

COMMAND_ARG	Slick-C command function

PICTURE_ARG	Already loaded picture

FORM_ARG	Dialog box template

MODULE_ARG	Loaded Slick-C module

MACRO_ARG	User recorded Slick-C command function

MACROTAG_ARG	Slick-C tag name

VAR_ARG	Slick-C global variable

ENV_ARG	Environment variable

MENU_ARG	Menu name

TAG_ARG	Tag name


p_cursor_x

property int p_cursor_x

Applies To	Editor Control, Edit Window

Remarks	Determines the pixel position of the cursor relative to the beginning of the window.  When this property is set, the actual value is rounded down to the closed character.  This property is available only when the control is displayed.


p_cursor_y

property int p_cursor_y

Applies To	Editor Control, Edit Window

Remarks	Determines the pixel position of the cursor relative to the top of the window.  When this property is set, the actual value is rounded down to the closest line.  This property is available only when the control is displayed.


p_default

property boolean p_default

Applies To	Command Button

Remarks	Determines the command button whose lbutton_up event handler gets executed when the ENTER key is pressed.  Also determines which command appears visually as the default button (double border), when a control other than a command button has focus.

See Also	p_adefault


p_delay

property int p_delay

Applies To	Spin

Remarks	Determines the delay in milliseconds for incrementing or decrementing while you click and hold a spin control arrow.


p_display_xlat

property _str p_display_xlat

Applies To	Editor Control, Edit Window

Remarks	Determines 256 byte display translation table.  Use this property to make characters look better in a particular font with out modifying the editor buffer data.  For example, your buffer can contain EBCDIC characters and with the proper display translation table the data can look meaningful on screen.  This property is available only when the control is displayed.


p_DocumentName

property _str p_DocumentName

Applies To	Editor Control, Edit Window

Remarks	Determines the document name.  Unlike p_buf_name, this string does not have to be a valid filename.  When the document name is not "", this name shown to user instead of the p_buf_name (the output filename) except when the Save As dialog box is used.


p_draw_mode

property int p_draw_mode

Applies To	All objects except Image control

Remarks	Determines the draw mode which effects drawing functions.  p_draw_mode may be one of the following constants defined in "slick.sh"

PSDM_XORPEN	XOR rectangle border with screen pixels and color.

PSDM_COPYPEN	Write rectangle border

Example

#include 'slick.sh'

defmain()

{

    p_fill_style=PSFS_TRANSPARENT;

    p_draw_width=1;p_draw_style=PSDS_DOT;

    p_draw_mode= PSDM_COPYPEN;

    color=_rgb(0x80,0x80,0x80);  /* Gray */

    x1=10;y1=10;x2=200;y2=100;

    _draw_rect(x1,y1,x2,y2,color,'e');

}

See Also	_draw_rect


p_draw_style

property int p_draw_style

Applies To	All objects except Image control

Remarks	Determines the draw style which effects drawing functions.  p_draw_style may be one of the following constants defined in "slick.sh"

PSDS_SOLID	Draw solid line.

PSDS_DASH	Draw dashed line.  Solid line is drawn if p_draw_width>1.

PSDS_DOT	Draw dotted line.  Solid line is drawn if p_draw_width>1.

PSDS_INSIDE_SOLID

Draw solid line inside rectangle specified.  Use this to resize a window frame.

Example

#include 'slick.sh'

defmain()

{

    p_fill_style=PSFS_TRANSPARENT;

    p_draw_width=1;p_draw_style=PSDS_DOT;

    p_draw_mode= PSDM_COPYPEN;

    color=_rgb(0x80,0x80,0x80);  /* Gray */

    x1=10;y1=10;x2=200;y2=100;

    _draw_rect(x1,y1,x2,y2,color,'e');

}

See Also	_draw_rect


p_draw_width

property int p_draw_width

Applies To	All objects except Image control

Remarks	Determines the draw width which effects line drawing functions.  p_draw_width may be one of the following constants defined in "slick.sh"

Example

#include 'slick.sh'

defmain()

{

    p_fill_style=PSFS_TRANSPARENT;

    p_draw_width=3;p_draw_style=PSDS_SOLID;

    p_draw_mode= PSDM_COPYPEN;

    color=_rgb(0x80,0x80,0x80);  /* Gray */

    x1=10;y1=10;x2=200;y2=100;

    _draw_rect(x1,y1,x2,y2,color,'e');

}

See Also	_draw_rect


p_edit

property boolean p_edit

Applies To	All objects

Return	Returns non-zero value if the object is being edited in the dialog editor.  This property is only available when the control is displayed.


p_enabled

property boolean p_enabled

Applies To	All objects except Image control

Remarks	Determines whether the object is enabled.  When an object is disabled (p_enabled=0), the object can not receive focus.  The font foreground color for a Label, Text Box, and Combo Box is gray (the system disabled color) when the control is disabled.  Objects may receive focus when disabled if they are being edited (p_edit!=0).

Example

// This example illustrates how to disable a list box and make the items in the list box

// appear grayed (not so obvious)

#include "slick.sh"

defeventtab form1

list1.on_create()

{

   _lbadd_item('item1');

   _lbadd_item('item2');

   p_no_select_color=1;

   p_enabled=0;

   p_forecolor=_rgb(80,80,80);

}


p_eventtab

property int p_eventtab

Applies To	All objects

Remarks	Determines the event table used for user level 1 inheritance.  This property is automatically set when a Slick-C module is loaded which defines an event table that identifies the object.

Example

index=find_index('eventtab_name',EVENTTAB_TYPE);

if (index) {

    p_eventtab=index;

}


p_eventtab2

property int p_eventtab2

Applies To	All objects

Remarks	Determines the event table used for user level 2 inheritance.  When a control is created with the dialog editor, the p_eventtab2 property is set to a default value.

Example

index=find_index('eventtab_name',EVENTTAB_TYPE);

if (index) {

    // link the event table "eventtab_name" in front of the default user level 2 inheritance.

    eventtab_inherit(index,p_eventtab2);

    p_eventtab2=index;

}


p_extension

property _str p_extension

Applies To	Edit Window, Editor Control

Remarks	Determines extension file type support.

See Also	p_LangCaseSensitive


p_ExpandPicture

property int p_ExpandPicture

Applies To	Tree View

Remarks	Determines the picture which is diplayed at the far left of a all tree items with children that are currently displayed.

See Also	p_CollapsePicture


p_file_date

property _str p_file_date

Applies To	Edit Window, Editor Control

Remarks	Binary string date which can be compared with binary dates returned by the _file_date function.  This property is initialized by load_files (all functions including edit which open files call load_files). This property can only be accessed when the object is displayed.


p_fill_style

property int p_fill_style

Applies To	All objects except Image control

Remarks	This property is not fully supported yet.  Its value should always be PSFS_TRANSPARENT.


p_fixed_font

property boolean p_fixed_font

Applies To	Edit Window, List Box, File List Box, Directory List Box

Return	Returns non-zero value if the font is a fixed font.  This property can only be accessed when the object is displayed.


p_font_bold

property boolean p_font_bold

Applies To	Label, Text Box, Edit Window, Editor Control, Frame, Command Button, Radio Button, Check Box, Combo Box, List Box, Drive List, File List Box, Directory List Box

Remarks	Determines whether the font is bold.   Command buttons, radio buttons, check boxes, and frame controls do not support this property under UNIX.


p_font_height

property int p_font_height

Applies To	Edit Window, Editor Control, List Box, File List Box, Directory List Box

Return	Returns height of font in pixels.  This property can only be accessed when the object is displayed.


p_font_italic

property boolean p_font_italic

Applies To	Label, Text Box, Edit Window, Editor Control, Frame, Command Button, Radio Button, Check Box, Combo Box, List Box, Drive List, File List Box, Directory List Box

Remarks	Determines whether the font is italic.   Command buttons, radio buttons, check boxes, and frame controls do not support this property under UNIX.


p_font_name

property _str p_font_name

Applies To	Label, Text Box, Edit Window, Editor Control, Frame, Command Button, Radio Button, Check Box, Combo Box, List Box, Drive List, File List Box, Directory List Box

Remarks	Determines the font name.  Be sure to set the p_font_printer property if you want to choose from printer fonts.

Example

p_font_name="Helvetica";

p_font_size=18;	// 18 point size.


p_font_printer

property boolean p_font_printer

Applies To	Label, Text Box, Edit Window, Editor Control, Frame, Command Button, Radio Button, Check Box, Combo Box, List Box, Drive List, File List Box, Directory List Box

Remarks	Determines whether the font is chosen from screen fonts or printer fonts.


p_font_size

property int p_font_size

Applies To	Label, Text Box, Edit Window, Editor Control, Frame, Command Button, Radio Button, Check Box, Combo Box, List Box, Drive List, File List Box, Directory List Box

Remarks	Determines the font point size.

Example

p_font_name="Helvetica";

p_font_size=18;	// 18 point size.


p_font_strike_thru

property boolean p_font_strike_thru

Applies To	Label, Text Box, Edit Window, Editor Control, Frame, Command Button, Radio Button, Check Box, Combo Box, List Box, Drive List, File List Box, Directory List Box

Remarks	Determines whether the font has strike through.   Command buttons, radio buttons, check boxes, and frame controls do not support this property under UNIX.


p_font_underline

property boolean p_font_underline

Applies To	Label, Text Box, Edit Window, Editor Control, Frame, Command Button, Radio Button, Check Box, Combo Box, List Box, Drive List, File List Box, Directory List Box

Remarks	Determines whether the font is underlined.   Command buttons, radio buttons, check boxes, and frame controls do not support this property under UNIX.


p_font_width

property boolean p_font_width

Applies To	Edit Window, Editor Control, List Box, File List Box, Directory List Box

Return	Returns width of font in pixels.  This property can only be accessed when the object is displayed.


p_forecolor

property int p_forecolor

Applies To	Label, Text Box, Editor Control, Frame, Radio Button, Check Box, Combo Box, List Box, File List Box, Directory List Box, Gauge,  Drive List

Remarks	Determines the background color of a control.

Form, Label, Text Box, Editor Control, Frame, Radio Button, Check Box, List Box, File List Box, Directory List Box - Determines the background color of the window.

Gauge - Determines color of filled portion.

Combo Box - Determines the foreground text color used in text box and list box.

Drive List - Determines the foreground text color used in text box and list box.


p_height

property int p_height

Applies To	All objects except Command Line

Remarks	Determines the height of a window in the scale mode of p_xyscale_mode.


p_help

property _str p_help

Applies To	All objects except Command Line, MDI Window, Edit Window, Application Window

Remarks	Menu, Menu Item -   Gets or sets help command.  The help command is executed when F1 is pressed while the menu/menu item is selected.  The help command is typically a help or popup_imessage command.  When menus are displayed, there is no instance handle.  Menu and menu item properties can only be accessed in menu resources.  The _menu_get_state and _menu_set_state function may be used to get and set  menu properties of displayed menus.

Other objects - Gets or sets a help string.  Help is displayed when F1 is pressed or when a command button with a help string defined (p_help!='') that does not have an lbutton_up event handler is pressed.   If the help string starts with a '?' character, the characters that follow are displayed in a message box.  The help string may also specify a unique keyword in the "vslick.hlp" (UNIX: "uvslick.hlp") help file.  The unique keywords for the help file are contained in the file "vslick.lst" (UNIX: "uvslick.lst").  In addition, you may specify a unique keyword for any windows help file by specifying a string in the format:  keyword:help_filename.

When F1 is pressed the dialog manager performs the following search to find the help to display:

1.	If the active control has help defined, display the help.

2.	If the active form has help defined, display the help.

3.	Search for any control with help defined.


p_hex_field

property boolean p_hex_field

Applies To	Edit Window, Editor Control

Remarks	When in hex mode (p_hex_mode), determines whether cursor is display in hex nibbles or ASCII data.  false indicates that the cursor is in the ASCII data.  This property is available only when the control is displayed.


p_hex_mode

property boolean p_hex_mode

Applies To	Edit Window, Editor Control

Remarks	Determines whether text is displayed in hex or ASCII lines.  You need to use the hex function do switch into or out of hex display mode because the function does more than just set this property.  This property is available only when the control is displayed.


p_hex_nibble

property boolean p_hex_nibble

Applies To	Edit Window, Editor Control

Remarks	When in hex mode (p_hex_mode), determines whether cursor is currently on before left or right nibble.  true indicates that the cursor is on the right nibble.  This property is available only when the control is displayed.


p_hex_Nofcols

property int p_hex_Nofcols

Applies To	Edit Window, Editor Control

Remarks	When in hex mode (p_hex_mode), determines number or 4 byte columns of hex data.


p_hex_toppage

property int p_hex_toppage

Applies To	Edit Window, Editor Control

Remarks	When in hex mode (p_hex_mode), determines start seek position of the top line of the page displayed.  When you use the vertical scroll bars to scroll, this value does not represent the start seek position of the top line of the page displayed.


p_increment

property int p_increment

Applies To	Spin

Remarks	Determines the amount the spin control should increment the text box.   If p_increment is non-zero, there must be a text box with a tab index one less than the spin control.  This allows the spin control to spin the previous window which can be located with the p_prev property.  The value in the text box may be a floating pointer number (sorry, p_increment is only an int).  If p_increment is 0, the spin control will call the on_spin_up and on_spin_down events.


p_indent_style

property int p_indent_style

Applies To	Edit Window, Editor Control

Remarks	Determines the indent style for the current buffer.  This effects what happens when you press the ENTER key.  The indent style may be one of the following constants defined in "slick.sh":

INDENT_NONE	Go to column one.

INDENT_AUTO	Go the same column as the first non-blank character of the previous line or column one if there isn't one.

INDENT_SMART	Indent based on the current language syntax.

This property is available only when the control is displayed.


p_indent_with_tabs

property boolean p_indent_with_tabs

Applies To	Edit Window, Editor Control

Remarks	Determines whether to indent with tabs or spaces.  In addition, this effects the reflow_paragraph command.  This property is available only when the control is displayed.


p_index

property int p_index

Applies To	Edit Window, Editor Control

Remarks	Determines a name table index for the current buffer.  The name_info(index) is a string of syntax expansion an indenting options for the current language.  This property was defined so that a buffer variable was not required.  This property is available only when the control is displayed.


p_init_style

property int p_init_style

Applies To	Form

Remarks	Determines the initialization style.  The p_init_style property is one or more of the following flags:

IS_SAVE_XY	Indicates that the form x and y values should be saved in the ".command" buffer when the form is closed.  The show function maybe given the -xy option to display the form in its previous position.

IS_REINIT	Indicates that when _delete_window is called to delete a form window, the form window should be made invisible instead of destroyed.  The destroy events and all other side effects of the _delete_window function still take place.

IS_HIDEONDEL	Same as IS_REINIT.


p_isbutton_bar

property int p_isbutton_bar

Applies To	All objects

Return	Returns non-zero value if the current object is a button bar.  Currently, this can only be true for FORM objects.  This property is available only when the object is displayed.


p_LangCaseSensitive

property boolean p_LangCaseSensitive

Applies To	Edit Window, Editor Control

Remarks	Returns true if language is case sensitive.  This property is read only.

See Also	p_extension


p_large_change

property int p_large_change

Applies To	Hscroll Bar, Vscroll Bar

Remarks	Determines the amount to change p_value when the mouse is clicked between the thumb box and the arrow.


p_left_edge

property int p_left_edge

Applies To	Edit Window, Editor Control, List Box

Remarks	Determines the left edge scroll position in pixels or characters.  If the p_fixed_font property is true, this property is in characters.  A scroll position of zero means the first character of every line can be seen.  This property is available only when the control is displayed.


p_LevelIndent

property int p_LevelIndent

Applies To	Tree View

Remarks	Determines the spacing in twips to indent to the right for each level of the tree.


p_lexer_name

property _str p_lexer_name

Applies To	Editor Control, Edit Window

Remarks	Determines lexer name which defines the language coloring elements for a buffer.  This property is set to one of the lexer names in square brackets in the file "vslick.vlx".  See Color Coding for more information.


p_line

property int p_line

Applies To	Edit Window, Editor Control, List Box

Remarks	Determines the current line number.  Note that p_line includes lines which are non-savable (lines with NOSAVE_LF flag set).  Use the p_RLine property to only count lines which will be saved in your file.  The Top of File line is line 0.  A list box has a line 0, but is never displayed.  If the current line number is not already known, it is determined.  Use the point function if you want to optimize.  If the p_line property is set to a value greater than the number of lines in the buffer, the cursor is placed on the last line.  This property is available only when the control is displayed.

See Also	p_RLine


p_line_numbers_len

property int p_line_numbers_len

Applies To	Edit Window, Editor Control

Remarks	Determines the numbers of bytes used to display line numbers to the left of each line.  When this is 0, line numbers are not displayed to the left of each line.


p_LineStyle

property int p_LineStyle

Applies To	Tree View

Remarks	Determines the line style used to draw lines between children and siblings.  p_LineStyle may be one of the following constants defined in "slick.sh":

TREE_NO_LINES

TREE_DOTTED_LINES

TREE_SOLID_LINES


p_margins

property _str p_margins

Applies To	Edit Window, Editor Control

Remarks	Determines the margins for the current buffer.  This property is available only when the control is displayed.  p_margins is a string in the format: left_ma right_ma [new_paragraph_ma ].  If new_paragraph_ma is not given, it defaults to left_ma.

Example

parse p_margins with left_ma right_ma new_para_ma;

++left_ma;++right_ma;++new_para_ma;

p_margins=left_ma' 'right_ma' 'new_para_ma;


p_max

property int p_max

Applies To	Hscroll Bar, Vscroll Bar

Remarks	Determines the maximum scroll range.  The scroll range is determined by p_min and p_max.  The p_value property is set to a number between p_min and p_max when an on_scroll or on_change event occurs.


p_MaxLineLength

property int p_MaxLineLength

Applies To	Edit Window, Editor Control

Remarks	Determines the maximum line length.  At the moment this option is only used by the _save_file built-in when the +CL option is specified and the destination file does not already have a strict record length.  This property was intended for use with mainframe source files which have line length restrictions. At the moment only the physical line length is checked as if tab characters count as 1 character.  We may change this in the future.

See Also	p_TruncateLength, p_MaxLineLength, trunc, p_AutoSelectExtension


p_mdi_child

property int p_mdi_child

Applies To	All objects

Return	Returns non-zero value if the current object is an MDI edit window.


p_menu_handle

property int p_menu_handle

Applies To	Form, MDI Window

Return	Returns the menu bar menu handle.  Use the _menu_set property to set the menu bar for a form.  This property can only be accessed when the form is displayed.


p_message

property _str p_message

Applies To	Picture Box, Image, Menu, Menu Item

Remarks	Picture Box, Image - Determines the message that gets displayed when the mouse is moved within the window.  Message is displayed in message line.

Menu, Menu Item -  Determines the message displayed when this menu item is selected.  Currently this property is only supported by the MDI menu bar.  In the future, we will add an event (maybe called on_menu_select) so that forms can display menu messages any where they want.   When menus are displayed, there is no instance handle.  Menu and menu item properties can only be accessed in menu resources.  The _menu_get_state and _menu_set_state function may be used to get and set  menu properties of displayed menus.


p_min

property int p_min

Applies To	Hscroll Bar, Vscroll Bar

Remarks	Determines the minimum scroll range.  The scroll range is determined by p_min and p_max.  The p_value property is set to a number between p_min and p_max when an on_scroll or on_change event occurs.


p_modal

property int p_modal

Applies To	Form

Return	Returns non-zero value if the current form is a modal form.  When the _modal_wait function is called with a specified form, the p_modal property for the form is set to a non-zero value.  This property may only be accessed when the control is displayed.


p_mode_eventtab

property int p_mode_eventtab

Applies To	Edit Window, Editor Control

Remarks	Determines the mode event table for the current buffer.  This property is available only when the control is displayed.


p_mode_name

property _str p_mode_name

Applies To	Edit Window, Editor Control

Remarks	Determines the mode name for the current buffer.  The mode name for an edit window appears to the right of the command line.  The mode name for an editor control is not displayed.  This property is available only when the control is displayed.


p_modify

property boolean p_modify

Applies To	Edit Window, Editor Control

Remarks	Determines whether the current buffer is modified.  This property is available only when the control is displayed.

See Also	p_ModifyFlags


p_ModifyFlags

property int p_ModifyFlags

Applies To	Edit Window, Editor Control

Remarks	Determines whether the current buffer is modified and provides additional bits you can use to track whether a change has been made to a buffer since the last time you processed the buffer.  Any time a modification is made to a buffer this property is set to 1 which clears all high bits.  Note that the p_modify propert is equivelent to the first bit of this property.  Make sure the high bit you use isn't already being used by another macro feature like AutoSave.  Currently, the modify flags are stored as 32 bits of which 3 (modify+AutoSave+Delphi Support) are already being used.  MicroEdge reserves the first 16 bits of this for its own internal use.  Users can uses the high 16 bits to track buffer modifications.

Example

     // This code would be executed within a timer call back.  See _set_timer.

     // IF the current buffer is modified and some edits have been performed since the

     //     the last time we autosaved this file.

     if  (p_modify && (pModifyFlags& MODIFYFLAG_AUTOSAVE_DONE)) {

          AutoSaveCurrentBuffer();

          p_ModifyFlags|=MODIFYFLAG_AUTOSAVE_DONE;

     }

See Also	p_modify


p_mouse_pointer

property int p_mouse_pointer

Applies To	All objects except the MDI Window

Remarks	Determines the mouse pointer displayed when the mouse is within the window.  This property may be one of the following constants defined in "slick.sh":

MP_DEFAULT	Shape of mouse pointer depends on control.

MP_ARROW

MP_CROSS

MP_IBEAM

MP_ICON	Not supported yet.

MP_SIZE

MP_SIZENESW

MP_SIZENS

MP_SIZENWSE

MP_SIZEWE

MP_UP_ARROW

MP_HOUR_GLASS

Try the above constants to see what they look like.

Example

#include "slick.sh"

defmain()

{

   p_mouse_pointer=MP_HOUR_GLASS;

}

Note:  The UNIX version translates MP_UP_ARROW to MP_ARROW.


p_MultiRow

property int p_MultiRow

Applies To	SSTab

Remarks	Determines whether how tabs are displayed.

p_MultiRow may be one of the following:

SSTAB_MULTIROW_NONE	If tabs don't fit, display a scroll bar.

SSTAB_MULTIROW_MULTIROW	If tabs don't fit, make another row.  Use the p_TabsPerRow property to set the number of tabs displayed on each row.

SSTAB_MULTIROW_BESTFIT	If tabs don't fit, try to reduce space taken by each tab.  If tabs still don't fit, display a scroll bar.


p_multi_select

property int p_multi_select

Applies To	List Box, Tree View

Remarks	Determines whether the list box allows multiple items to be selected and the user interface style.  In addition, when the p_multi_select property is set to MS_EDIT_WINDOW, the list box becomes an editor control.  The p_multi_select property may be one of the following constants defined in "slick.sh":

MS_NONE	Allow only one item to be selected.

MS_SIMPLE_LIST	Allow multiple items to be selected.

MS_EXTENDED	(List Box only)Allow multiple items to be selected.


p_name

property _str p_name

Applies To	All objects

Remarks	Determines the name of the current object.  Control names are looked up relative to the current form (p_active_form).


p_newline

property _str p_newline

Applies To	Edit Window, Editor Control

Return	Returns the new line characters used for the current buffer.  This string is one or two characters long.  This property is available only when the control is displayed.


p_next

property int p_next

Applies To	All objects

Return	If the control is displayed, the window id of the next window is returned.  Otherwise, an encoded number is returned which can be used to get/set some property values.  When menus are displayed, there is no instance handle.  Menu and menu item properties can only be accessed in menu resources.


p_no_select_color

property int p_no_select_color

Applies To	List Box

Remarks	Determines whether selected items should be displayed in a different color than non-selected items.  This property is only available when the control is displayed.


p_Nofhidden

property int p_Nofhidden

Applies To	Edit Window, Editor Control

Return	Returns the total number of hidden lines in the current buffer.  Visual SlickEdit uses this property to quickly determine when special processing is needed for changing the cursor position and correctly scrolling.


p_Noflines

property int p_Noflines

Applies To	Edit Window, Editor Control, List Box

Return	Returns the number of lines in the current buffer.  This property includes lines non-saveable lines (lines with the NOSAVE_LF flag set).  Use the p_RNoflines property to get the number of saveable lines ("real lines").

See Also	p_RNoflines


p_NofNoSave

property int p_NofNoSave

Applies To	Edit Window, Editor Control

Return	Returns the number of lines with the NOSAVE_LF line flag set.  Use the _lineflags() function to change the line flags.


p_NofSelDispBitmaps

property int p_NofSelDispBitmaps

Applies To	Edit Window, Editor Control

Return	Returns the number of selective display bitmaps in the current buffer.


p_Nofselected

property int p_Nofselected

Applies To	List Box

Remarks	Determines the number of selected items in the list box.


p_Nofstates

property _str p_Nofstates

Applies To	Picture Box, Image

Remarks	Determines how many times the pictures width should be sub-divided.  The p_value property may be set between 0 and p_Nofstates-1, to display a particular state of the picture.

Example

// For this example, create a picture or image control and

// set the p_picture property to "_arrow.bmp" or any two

// state bitmap.  Also set the p_Nofstates property to 2.

#include 'slick.sh'

defeventtab form1

image1.on_create()

{

   index=_update_picture(-1,bitmap_path_search("_arrow.bmp"));

   if (index<0) {

       if (index==FILE_NOT_FOUND_RC) {

          _message_box("Picture bbfind.bmp was not found");

       } else {

          _message_box("Error loading picture bbfind.bmp\n\n":+

                       get_message(index));

       }

       return("");

   }

   p_picture=index;

   p_Nofstates=2;

   p_message="Searches for a string you specify";

   p_style=PSPIC_AUTO_BUTTON;

}

picture1.lbutton_down()

{

   mou_mode(1)

   mou_capture();

   done=0;

   for (;;) {

      event=get_event();

      switch (event) {

      case MOUSE_MOVE:

         // 'm' specifies mouse position in current scale mode

         mx=mou_last_x('m');

         my=mou_last_y('m');

         if (mx>=0 && my>=0 && mx<p_width && my<p_height) {

            if (!p_value) {

               // Show the button pushed in.

               p_value=1;

            }

         } else {

            if (p_value) {

               // Show the button up.

               p_value=0;

            }

         }

         break;

      case LBUTTON_UP:

      case ESC:

         p_value=1;

         done=1;

      }

      if (done) break;

   }

   mou_mode(0);

   mou_release();

   return('')

}


p_NofTabs

property int p_NofTabs

Applies To	SSTab

Remarks	Determines the number of tabs.  You may not use this property to delete tabs.  However, you may use this property to add tabs.  Use the _deleteActive method to delete the active tab.


p_object

property _str p_object

Applies To	All objects

Return	Returns the object type of the current window.  The p_object property can be one of the following constants defined in "slick.sh":

OI_MDI_FORM

OI_FORM

OI_TEXT_BOX

OI_CHECK_BOX

OI_COMMAND_BUTTON

OI_RADIO_BUTTON

OI_FRAME

OI_LABEL

OI_LIST_BOX

OI_HSCROLL_BAR

OI_VSCROLL_BAR

OI_COMBO_BOX

OI_PICTURE_BOX

OI_IMAGE

OI_GAUGE

OI_SPIN

OI_MENU

OI_MENU_ITEM

When menus are displayed, there is no instance handle.  Menu and menu item properties can only be accessed in menu resources.  The _menu_get_state function can be used to get the menu flags.  These flags indicate whether the menu item is a submenu which contains other menu items.


p_object_modify

property int p_object_modify

Applies To	All objects

Remarks	Determines whether the current object has been modified.  A non-zero value indicates the object has been modified.  This property is available only when the object is displayed.


p_old_height

property int p_old_height

Applies To	Edit Window

Remarks	Determines the old height in pixels before the height of the window was changed.  This property is used to determine what other tiled edges need to be adjusted to keep the tiled windows tiled.  The editor sets this property when _move_window, _tile_windows, or _cascade_windows is called.  This property is available only when the object is displayed.


p_OldLineNumber

property int p_OldLineNumber

Applies To	Edit Window, Editor Control

Remarks	Returns the old line number stored for the current line.  Use the _SetAllOldLineNumbers method to set the old line numbers for all lines in the current buffer.


p_old_width

property int p_old_width

Applies To	Edit Window

Remarks	Determines the old width in pixels before the width of the window was changed.  This property is used to determine what other tiled edges need to be adjusted to keep the tiled windows tiled.  The editor sets this property when _move_window, _tile_windows, or _cascade_windows is called.  This property is available only when the object is displayed.


p_old_x

property int p_old_x

Applies To	Edit Window

Remarks	Determines the old x position in pixels before the x position of the window was changed.  This property is used to determine what other tiled edges need to be adjusted to keep the tiled windows tiled.  The editor sets this property when _move_window, _tile_windows, or _cascade_windows is called.  This property is available only when the object is displayed.


p_old_y

property int p_old_y

Applies To	Edit Window

Remarks	Determines the old y position in pixels before the y position of the window was changed.  This property is used to determine what other tiled edges need to be adjusted to keep the tiled windows tiled.  The editor sets this property when _move_window, _tile_windows, or _cascade_windows is called.  This property is available only when the object is displayed.


p_on_event

property int p_on_event

Applies To	Edit Window, Editor Control

Remarks	Determines name table index to hook function to call before each key is pressed.  This hook function is used to implement read only mode.  This property is available only when the object is displayed.


p_Orientation

property int p_Orientation

Applies To	SSTab

Remarks	Determines whether the tabs or displayed on the top, bottom of the SSTab control.  This property may be one of the following:

SSTAB_OTOP

SSTAB_OBOTTOM


p_parent

property int p_parent

Applies To	All objects except Command Line

Return	Returns the parent window id.  When a form has a parent, the form is not clipped within the parent window except in the case of an edit window form which is clipped with the MDI window.  Controls are always clipped to the parent window.  Often the parent window id is used to determine what object a dialog box should act on.  Due to our implementation of the MDI window, p_parent will be 0 if you show a dialog box with the -mdi option.

See Also	_form_parent


p_pic_indent_x

property int p_pic_indent_x

Applies To	Combo Box, Text Box

Remarks	Determines the amount to indent in twips before a picture displayed text box, or combo box (text not list).

Example

#include 'slick.sh'

defeventtab form1

combo1.on_create()

{

   p_picture=_pic_drremov;

   // Set indent before picture.

   p_pic_indent_x=100;

   // Set indent after picture.

   p_text='A:';

   p_after_pic_indent_x=200;

   // Extra y spacing. Half displayed above and half below picture

   p_pic_space_y=100;

}


p_pic_point_scale

property int p_pic_point_scale

Applies To	List Box, Combo Box, Text Box

Remarks	Determines the scaling (in points) of a picture with respect to the font size (p_font_size).  If p_pic_point_scale is 0, the picture (p_picture) is not scaled.  The height and width of the picture are multiplied by  (p_font_size/p_pic_point_scale).

Example

#include 'slick.sh'

defeventtab form1

combo1.on_create()

{

   // Let this picture be scaled based on an 8 point font

   p_pic_point_scale=8;

   p_font_size=18;

   p_picture=_pic_drremov;

   // Set indent before picture.

   p_pic_indent_x=100;

   // Set indent after picture.

   p_text='A:';

   p_after_pic_indent_x=200;

   // Extra y spacing. Half displayed above and half below picture

   p_pic_space_y=100;

}


p_pic_space_y

property int p_pic_space_y

Applies To	List Box, Combo Box, Text Box

Remarks	Determines the amount of extra line spacing in twips for a list box, text box, or combo box (text not list).  This property effects the line spacing even when there is not a picture in the control.  However, the line spacing is more typically changed when a picture is present.

Example

#include 'slick.sh'

defeventtab form1

combo1.on_create()

{

   p_picture=_pic_drremov;

   // Set indent before picture.

   p_pic_indent_x=100;

   // Set indent after picture.

   p_text='A:';

   p_after_pic_indent_x=200;

   // Extra y spacing. Half displayed above and half below picture

   p_pic_space_y=100;

}


p_picture

property int p_picture

Applies To	List Box, Combo Box, Text Box, Picture Box, Image

Remarks	The p_picture property is an index to a picture in the names table.

List Box - Determines the of scaling picture and whether the list should display pictures.

Text Box, Combo Box - Determines the picture displayed to the left of the text.

Picture Box, Image - Determines the picture displayed.

Here's how you can create a tool bar for the editor without writing any code at all:

1.	Create a new form for editing ("Macro", "New").

2.	Create an image control.  Double click on the image control (bottom right.  Looks like slanted rectangle) in the dialog editor.

3.	Set the p_picture property to bbfind.bmp.  Make sure you specify the full path (c:\vslick\bitmaps is the default path used by installation program).

4.	Set the p_command property to gui-find.  Notice that the down arrow of the combo box displays all the editor commands.

5.	Set the p_message property to "Searches for a string you specify".

6.	Set the p_style property to PSPIC_FLAT_BUTTON.

7.	Repeat the steps 2-6 to add more tool bar buttons.

Save your tool bar.  To run it such that is stays on top of the MDI Window, type the command "show -mdi form-name" on the Visual SlickEdit command line where form-name is the name of the tool bar form you created.  If you want to bind it to a key, use macro recording to record typing the command on the command line.  The mouse may be used during macro recording to place your cursor on the command line.

Example

#include 'slick.sh'

#define PIC_LSPACE_Y 60    // Extra line spacing for list box.

#define PIC_LINDENT_X 60   // Indent before for list box bitmap.

defeventtab form1

list1.on_create()

{

   p_pic_space_y=PIC_LSPACE_Y;

   _lbadd_item('a:',PIC_LINDENT_X,_pic_drremov);

   _lbadd_item('b:',PIC_LINDENT_X,_pic_drremov);

   _lbadd_item('c:',PIC_LINDENT_X,_pic_drfixed);

   // The p_picture property must be set to indicate that this list box

   // is displaying pictures and to provide a scaling picture for

   // the p_pic_point_scale property.  The p_pic_point_scale property allows the picture to

   // resized for fonts larger or smaller that the value of the p_pic_point_scale point size.

   p_picture=picture;

   p_pic_point_scale=8;

}

Example

#include 'slick.sh'

defeventtab form1

combo1.on_create()

{

   p_picture=_pic_drremov;

   // Set indent before picture.

   p_pic_indent_x=100;

   // Set indent after picture.

   p_text='A:';

   p_after_pic_indent_x=200;

   // Extra y spacing. Half displayed above and half below picture

   p_pic_space_y=100;

}


p_PictureOnly

property boolean p_PictureOnly

Applies To	SSTab

Remarks	Determines whether the tabs only display pictures and not captions.  When true, captions are display as tool tip help.


p_prev

property int p_prev

Applies To	All objects

Return	The window id of the previous window is returned.  This property is available only when the control is displayed.


p_RBufSize

property int p_RBufSize

Applies To	Editor Control, Edit Window

Remarks	Returns number of bytes in buffer.  This property does not include lines with NOSAVE_LF set which means that this size will match what will be saved on disk.


p_readonly_mode

property boolean p_readonly_mode

Applies To	Edit Window, Editor Control, Text Box

Remarks	This property is identical to the p_ReadOnly property.

Edit Window, Editor Control: Determines whether the current buffer is read only.  This property may have no effect depending on the setting of p_ProtectReadOnlyMode and_default_option(VSOPTION_PROTECT_READONLY_MODE).  Use the _QReadOnly() method to test whether you should allow editing because it test all necessary options.

Text Box: Determines whether the text in a text box can be modified.  This is some times more useful than disabling the control because the user can still make a selection and copy the text to the clipboard.  In addition, the color of the text is more readable when the text box is read only (p_ReadOnly=true) than when it is disabled (p_enabled=false).

See Also	p_readonly_set_by_user, p_ReadOnly, p_readonly_mode, p_ProtectReadOnlyMode, _QReadOnly, vsQReadOnly


p_ReadOnly

property boolean p_ReadOnly

Applies To	Edit Window, Editor Control, Text Box

Remarks	This property is identical to the p_readonly_mode property.

Edit Window, Editor Control: Determines whether the current buffer is read only. This property may have no effect depending on the setting of p_ProtectReadOnlyMode and_default_option(VSOPTION_PROTECT_READONLY_MODE).  Use the _QReadOnly() method to test whether you should allow editing because it test all necessary options.

Text Box: Determines whether the text in a text box can be modified.  This is some times more useful than disabling the control because the user can still make a selection and copy the text to the clipboard.  In addition, the color of the text is more readable when the text box is read only (p_ReadOnly=true) than when it is disabled (p_enabled=false).

See Also	p_readonly_set_by_user, p_ReadOnly, p_readonly_mode, p_ProtectReadOnlyMode, _QReadOnly, vsQReadOnly


p_readonly_set_by_user

property boolean p_readonly_set_by_user

Applies To	Edit Window, Editor Control

Remarks	Determines whether the p_readonly_mode property was set by the user or automatically by the editor.  This property is available only when the control is displayed.

The editor has an option to automatically set and reset read only mode based on the read only attribute (UNIX: permissions) of  the file on disk.  We added this property so we could tell when the user has overridden the automatic processing.  The read_only_mode and read_only_mode_toggle commands turn this property on.

See Also	p_readonly_mode


p_redraw

property boolean p_redraw

Applies To	Label, Text Box, Edit Window, Editor Control, Frame, Command Button, Radio Button, Check Box, Combo Box, List Box, Drive List Box, File List Box, Directory List Box, Picture Box, Image

Remarks	Determines whether updating font and picture properties immediately cause the control to be redrawn.  This property can only be accessed when the control is displayed.  Use this property only when you are trying to update several properties at once and want to the control to be redrawn only once.

Example

command1.lbutton_up()

{

  // Change the font of a text box control and redraw the control only once.

   text1.p_redraw=0;  // Don't redraw the control

   text1.p_font_name="Courier";

   text1.p_font_size=10;

   text1.p_redraw=1;  // Redraw the control now

}


p_RLine

property int p_RLine

Applies To	Edit Window, Editor Control, List Box

Remarks	Determines the current line number.  Note that p_RLine (short for "real line") does not include lines which are non-savable (lines with NOSAVE_LF flag set).  Use the p_line property to count lines which will not be saved in your file.  The Top of File line is line 0.  A list box has a line 0, but is never displayed.  If the current line number is not already known, it is determined.  If the p_RLine property is set to a value greater than the number of lines in the buffer, the cursor is placed on the last line.  This property is available only when the control is displayed.

See Also	p_line


p_RNoflines

property int p_RNoflines

Applies To	Edit Window, Editor Control, List Box

Return	Returns the number of lines in the current buffer.  This property does not count non-saveable lines (lines with the NOSAVE_LF flag set).  Use the p_Noflines property to count all lines.

See Also	p_Noflines


p_scale_mode

property int p_scale_mode

Applies To	All objects

Remarks	Determines the scale mode and may be SM_PIXEL or SM_TWIP.  1440 twips represent one inch on the display.  The scale mode determines unit of measure used by some properties and methods.  The dialog editor does not yet allow you set the initial value of the scale mode property.  The scale mode for the MDI Window and Edit Windows must be SM_PIXEL.  The primary purpose of a scale mode is to allow you to create dialog box templates that can easily be adjusted for different screen resolutions.  If there were only one screen resolution, you could always use a pixel scale mode.


p_scroll_bars

property int p_scroll_bars

Applies To	Editor Control, List Box, File List Box, Directory List Box

Remarks	Determines the scroll bars displayed for the current window.  The p_scroll_bar property may be one of the following constants defined in "slick.sh":

SB_NONE	No scroll bars.

SB_HORIZONTAL	Display horizontal scroll bar.

SB_VERTICAL	Display vertical scroll bar.  May only appear when there are enough items in the list.

SB_BOTH.	Display horizontal and vertical scroll bars.


p_scroll_left_edge

property int p_scroll_left_edge

Applies To	Edit Window, Editor Control, List Box

Remarks	Determines the left edge scroll position in pixels when the window is scrolled.  A scroll position of zero means the first character of every line can be seen.  A negative scroll position means the window is not scrolled and the p_left_edge property determines the left edge scroll position.  This property is available only when the control is displayed.


p_sel_length

property int p_sel_length

Applies To	List Box, Combo Box, Text Box

Remarks	Determines the length of a selection in bytes.  A value of 0 indicates that no characters are selected.  This property is available only when the control is displayed.

See Also	_get_sel, _set_sel, p_sel_start


p_sel_start

property int p_sel_start

Applies To	List Box, Combo Box, Text Box

Remarks	Determines the position of the left most character of the selection.  A value of 1 indicates the first character.  This property is available only when the control is displayed.

See Also	_get_sel, _set_sel, p_sel_length


p_selected

property int p_selected

Applies To	All objects except Command Line, MDI Window, Edit Window

Remarks	Determines whether the object is selected.  If the p_edit property of the object is non-zero, selection handles are displayed around the object.  This property is available only when the object is displayed.


p_showeof

property int p_showeof

Applies To	Editor Control, Edit Window

Remarks	Determines whether the _save_file function (used by save command) inserts or removes the EOF character that may be appended to the end of DOS format ASCII files.


p_ShowRoot

property int p_ShowRoot

Applies To	Tree View

Remarks	Determines the picture which is diplayed at the far left of a all tree items with children.


p_ShowSpecialChars

property int p_ShowSpecialChars

Applies To	Editor Control, Edit Window

Remarks	Determines what special characters are displayed for the current buffer.  This property is only available when the object is displayed.  The p_ShowSpecialChars property is one or more of the following flags defined in "slick.sh":

SHOWSPECIALCHARS_NLCHARS

SHOWSPECIALCHARS_TABS

SHOWSPECIALCHARS_SPACES

SHOWSPECIALCHARS_EOF

SHOWSPECIALCHARS_ALL


p_show_tabs

property int p_show_tabs

Applies To	Editor Control, Edit Window

Remarks	This property is being dropped.  Use the p_ShowSpecialChars property instead.


p_small_change

property int p_small_change

Applies To	Hscroll Bar, Vscroll Bar

Remarks	Determines the amount to change p_value when the mouse is clicked on a scroll bar arrow.


p_SourceRecording

property boolean p_SourceRecording

Applies To	Editor Control, Edit Window

Remarks	Determines whether macro source code is generated when macro recording is on and this editor control has focus.


p_SpaceY

property int p_SpaceY

Applies To	Tree View

Remarks	Determines the extra spacing in twips between each line.


p_stretch

property boolean p_stretch

Applies To	Picture Box, Image

Remarks	Determines whether the picture is scaled to fit the size of the window.  The p_auto_size and p_picture properties must be non-zero for this property to have any effect.


p_style

property int p_style

Applies To	Check Box, Combo Box, Gauge, Picture Box, Image

Remarks	Determines the style of an object.

Check Box - Style may be one of the following constants defined in "slick.sh":

PSCH_AUTO2STATE	Two state check box.

PSCH_AUTO3STATEA	Three state check box.  Gray, check, unchecked.

PSCH_AUTO3STATEB	Three state check box.  Gray, unchecked, check.

Combo Box - Style may be one of the following constants defined in "slick.sh":

PSCBO_EDIT	Standard.  List drops down.

PSCBO_LIST_ALWAYS	List is always present. Can edit.

PSCBO_NOEDIT	Must select item from list box. Can't edit.

Gauge - Style may be one of the following constants defined in "slick.sh":

PSGA_HORZ_WITH_PERCENT	Fill gauge from left to right and show percentage of completion.

PSGA_VERT_WITH_PERCENT	Fill gauge from bottom to top and show percentage of completion.

PSGA_HORIZONTAL	Fill gauge from left to right.

PSGA_VERTICAL	Fill gauge from bottom to top.

Image - Style may be one of the following constants defined in "slick.sh":

PSPIC_DEFAULT	No default handling for lbutton_down event.

PSPIC_FLAT_BUTTON	Set the p_picture property to a 1 state picture without a border to get a 3 state toolbar button (0-normal, 1-pushed, 2-mouse over button).  This style supports the p_enabled property on all platforms.  lbutton_down event calls lbutton_up event or executes command in p_command property.  p_value property is restored to its original value.

PSPIC_ BUTTON	Set the p_picture property to a 1 state picture without a border to get a 2 state push button. This style supports the p_enabled property on all platforms.  If you set the p_caption property, the control will display and act like a command button.  lbutton_down event calls lbutton_up event or executes command in p_command property.  p_value property is restored to its original value.

PSPIC_AUTO_BUTTON	Set the p_picture property to a 1 state picture without a border to get a 2 state push button.  lbutton_down event calls lbutton_up event or executes command in p_command property.  p_value property is restored to its original value.

PSPIC_AUTO_CHECK	Picture is a 2 or more state picture.  lbutton_down event calls lbutton_up after p_value property has be incremented (or set to 0 if past last state).

PSPIC_SIZEVERT	Draws a thick vertical line which is grabbed when sizing a docked toolbar.

PSPIC_SIZEHORZ	Draws a thick horizontal line which is grabbed when sizing a docked toolbar.

PSPIC_GRABBARVERT	Draws two thick vertical lines which are used to grab and dock/undock a toolbar.

PSPIC_GRABBARHORZ	Draws two thick horizontal lines which are used to grab and dock/undock a toolbar.

PSPIC_TOOLBAR_DIVIDER_VERT	Draws a vertical toolbar divider line.

PSPIC_TOOLBAR_DIVIDER_HORZ	Draws a horizontal toolbar divider line.

Picture Box - Style may be one of the following constants defined in "slick.sh":

PSPIC_DEFAULT	No default handling for lbutton_down event.

PSPIC_PARTIAL_BUTTON	Picture is a 1 state picture which needs button up and down borders drawn around it.  The lbutton_down event calls the lbutton_up event or executes the command in the p_command property.  The p_value property is restored to its original value.

PSPIC_AUTO_BUTTON	Set the p_picture property to a 2 or more state picture and set the p_Nofstates property to indicate the number of picture states.  lbutton_down event calls lbutton_up event or executes command in p_command property.  p_value property is restored to its original value.

PSPIC_ BUTTON	Set the p_picture property to a 1 state picture without a border to get a 2 state push button. This style supports the p_enabled property on all platforms.  If you set the p_caption property, the control will display and act like a command button.  lbutton_down event calls lbutton_up event or executes command in p_command property.  p_value property is restored to its original value.

PSPIC_AUTO_CHECK	Picture is a 2 or more state picture.  lbutton_down event calls lbutton_up after p_value property has be incremented (or set to 0 if past last state).


p_SyntaxIndent

property int p_SyntaxIndent

Applies To	Editor Control, Edit Window

Remarks	Determines the amount to indent when the tab key is pressed.  This property is ignored in "Fundamental" and "Cobol" modes.


p_tab_index

property int p_tab_index

Applies To	All objects except MDI Window, Application Window, Form

Remarks	Determines the tab order and/or creation order of controls within a dialog box.  Effects which control gets focus when you press the Tab and Shift+Tab keys when the dialog box is displayed.  The creation order of controls is based on the tab order.  This is why the spin control can rely on the p_prev property getting to the text box previous in tab order.


p_tab_stop

property int p_tab_stop

Applies To	Text Box, Editor Control, Command Button, Radio Button, Check Box, Combo Box, List Box, Hscroll Bar, Vscroll Bar, Drive List, File List Box, Directory List Box, Gauge, Tree View

Remarks	Determines whether Tab and Shift+Tab keys switch focus to the control.


p_tabs

property _str p_tabs

Applies To	Edit Window, Editor Control

Remarks	Determines the tabs for the current buffer.  This property is available only when the control is displayed.  p_tabs is a string in the format: t1 t2 t3 ... tN.  Where t1... tN represent tab stop column positions in increasing order.  When setting this property, you may specify a string of the format "+number" to set tab stops in increments of a number.  Tab stops continue past the last tab stop by repeating the difference of the last two tab stop values.

Example

p_tabs="+3";  // Set the tab stops in increments of 3.  "1 4 "

parse p_tabs with t1 t2

message('t1='t1' t2='t2);


p_TabsPerRow

property int p_TabsPerRow

Applies To	SSTab

Remarks	Determines the number of tabs per row.  This property is ignored if p_MultiRow is false.


p_template

property int p_template

Applies To	Form

Return	Returns the index in the names table which was used to load or update the form.  This property is set by the _load_template and _update_template functions.  The purpose of this property is to allow you to determine the name of the form (name_name(p_template)) which should be opened for editing when the user selects to edit the current dialog box (Shift+Space).  This property is available only when the form is displayed.


p_text

property _str p_text

Applies To	Combo Box, Text Box

Remarks	Determines the text of a combo box or text box.  When this property is set, an on_change event will occur.


p_tile_id

property int p_tile_id

Applies To	Edit Window

Remarks	Determines the tile id of the window.  This property is used to keep track of tile groups.  Windows with the same tile id don't overlap (unless a macro did something wrong).  In addition, when the editor sets the focus to an edit window, all windows with the same tile id are moved in front in the Z order.  This property is only available when the object is displayed.


p_tool_window

property int p_tool_window

Applies To	Form

Remarks	When this property is true, the caption at the top of a form is smaller.  This property is typically used for floating tool bar forms.  This property is not supported when the object is displayed and is ignored on all platforms except Windows 95/98 and Windows NT version >=4.0.


p_TruncateLength

property int p_TruncateLength

Applies To	Edit Window, Editor Control

Remarks	If non-zero, this determines how text gets inserted/deleted and how lines are truncated.  Tab characters are not expanded when this property is set.  This property was added to support mainframe legacy code which is very column oriented and is typically set to 72.  When source code is written using ISPF, the last 8 columns (usually columns 73-80) are used for line numbers.  ISPF tries to make sure that when text is inserted or deleted in columns 1-72 that the line numbers stay in the same column.  This property has allows you to ensure that data to the right of the truncation length does not change position.  In addition, newly inserted lines are truncated at the length specified by this property.  This property has no effect when saving a file.

The following built-in functions (and any command which accesses these built-ins) are effected by this property:

_reflow_selection

Only text at or before the truncation length is reflowed.

insert_line, vsInsertLine

Lines longer than the truncation length are truncated.

replace_line, vsReplaceLine

Lines longer than the truncation length are truncated and a error message is displayed.

_split_line, vsSplitLine

The text to the right of the truncation length stays on the current line and is not inserted into the next line.

_join_line, vsJoinLine

The join is aborted if the join will create a line longer than the truncation length.   An error status is returned if the join is aborted.

_JoinLineToCursor, vsJoinLineToCursor

The join is aborted if the join will create a line longer than the truncation length.   An error status is returned if the join is aborted.

_insert_text, vsInsertText

Any resulting lines longer than the truncation length are truncated.  In addition, the text to the right of the truncation length on the current line is not effected.  If the cursor is past the truncation length, the text is inserted into the next line.

_delete_text, vsDeleteText

The text to the right of the truncation length on the current line is not effected.

_delete_selection,vsDeleteSelection

The text to the right of the truncation length on the current line is not effected.

vsTruncQLineLength

Returns the length of the current line as if the text to the right of the truncation length does not exist.  In addition, trailing blanks (tab characters count) are not included in the length.

_SearchInitSkipped,vsSearchInitSkipped

Call this function before performing search and replace operation to reset NofSkipped and Skipped lines data returned by the _SearchQSkipped and _SearchQNofSkipped functions.

_SearchQSkipped, vsSearchQSkipped

Call this function after performing search and replace operation to determine the line numbers where the replace operation was skipped to avoid line truncation.

_SearchQNofSkipped,vsSearchQNofSkipped

Call this function after performing search and replace operation to determine how many replace operations were skipped to avoid line truncation.

keyin, vsKeyin

Text to the right of the truncation length on the current line is not effected.

search, search_replace, vsSearch, vsSearchReplace, vsRepeatSearch

Multi-line search or replace is not supported.  Search is performed as if the data to the right of the truncation length is not there.  Unfortunately, using regular expressions to match the end of line ($) does not work as if the data to the right of the truncation length is not there.  After a replace, the text to the right truncation length is not effected.

_overlay_block_selection, _adjust_block_selection, _fill_selection

Text to the right of the truncation length is not effected.

_shift_selection_left, vsShiftSelectionLeft

Text to the right of the truncation length is not effected.

_shift_selection_right, vsShiftSelectionRight

Text to the right of the truncation length is not effected.

_copy_to_cursor, vsCopyToCursor

Text to the right of the truncation length is not effected.  Any resulting lines longer than then truncation length are truncated.

_move_to_cursor

Text to the right of the truncation length is not effected.  Any resulting lines longer than then truncation length are truncated.

The following built-in functions have been enhanced to support the truncation length:

_expand_tabsc, vsExpandTabsC

A width value of -2 specifies that the vsTruncQLineLength be used instead of the real line length.

_text_colc, vsTextColC

A new 'E' option specifies that the vsTruncQLineLength be used instead of the real line length.

The following built-in functions have been enhanced to support maximum line length:

_save_file, vsSaveFile

A new +CL option (Check Line length option) was added.  When specified, the new vsCheckLineLengths function is called if the output file has a required record length or if the source file has a non-zero p_MaxLineLength property.

_CheckLineLengths, vsCheckLineLengths

Allows you to get a list of lines longer than a specified line length.  Usually, p_MaxLineLength is specified.

See Also	p_TruncateLength, p_MaxLineLength, trunc, p_AutoSelectExtension


p_undo_steps

property int p_undo_steps

Applies To	Edit Window, Editor Control

Remarks	Determines the maximum number of undo steps stored for the current buffer.  This property may not be set to a value less than 0.  This property is only available when the object is displayed.


p_undo_visible

property int p_undo_visible

Applies To	All objects except MDI Window, Edit Window, Form

Remarks	Determines whether the control is visible when p_edit!=0.  This property is used to implement undelete in the dialog editor.  When we add full undo to the dialog editor, this property will be removed.  This property is only available when the control is displayed.


p_user

property typeless p_user

Applies To	All objects

Remarks	Determines user defined value.  This property should only be used by user level 1 inheritance and not by user level 2 inheritance.  This property is only available when the object is displayed.


p_user2

property typeless p_user2

Applies To	All objects

Remarks	Determines user defined value.  This property should only be used by user level 2 inheritance and not by user level 1 inheritance.  This property is only available when the object is displayed.


p_value

property int p_value

Applies To	Radio Button, Check Box, Hscroll Bar, Vscroll Bar, Picture Box, Image, Gauge

Remarks	Radio Button - Value of 1 turns on radio button.  Value of 0 turns off radio button.

Check Box - Value may be one of the following:

0	Not checked.

1	Checked.

2	Grayed.

Hscroll Bar, Vscroll Bar - Indicates the scroll amount where p_min>= p_value <=p_max.  Setting the p_value property has no effect.

Gauge - Indicates a portion of a total where p_min>= p_value <=p_max.

Picture Box, Image - Determines which state of a picture gets displayed where 0>= p_value <p_Nofstates.

Here's how you can create a tool bar for the editor without writing any code at all:

1.	Create a new form for editing ("Macro", "New").

2.	Create an image control.  Double click on the image control (bottom right.  Looks like slanted rectangle) in the dialog editor.

3.	Set the p_picture property to bbfind.bmp.  Make sure you specify the full path (c:\vslick\bitmaps is the default path used by installation program).

4.	Set the p_command property to gui-find.  Notice that the down arrow of the combo box displays all the editor commands.

5.	Set the p_message property to "Searches for a string you specify".

6.	Set the p_style property to PSPIC_FLAT_BUTTON.

7.	Repeat the steps 2-6 to add more tool bar buttons.

Save your tool bar.  To run it such that is stays on top of the MDI Window, type the command "show -mdi form-name" on the Visual SlickEdit command line where form-name is the name of the tool bar form you created.  If you want to bind it to a key, use macro recording to record typing the command on the command line.  The mouse may be used during macro recording to place your cursor on the command line.

Example

// For this example, create a picture or image control and

// set the p_picture property to "_arrow.bmp" or any two

// state bitmap.  Also set the p_Nofstates property to 2.

#include 'slick.sh'

defeventtab form1

image1.on_create()

{

   index=_update_picture(-1,bitmap_path_search("_arrow.bmp"));

   if (index<0) {

       if (index==FILE_NOT_FOUND_RC) {

          _message_box("Picture bbfind.bmp was not found");

       } else {

          _message_box("Error loading picture bbfind.bmp\n\n":+

                       get_message(index));

       }

       return("");

   }

   p_picture=index;

   p_Nofstates=2;

   p_message="Searches for a string you specify";

   p_style=PSPIC_AUTO_BUTTON;

}

picture1.lbutton_down()

{

   mou_mode(1)

   mou_capture();

   done=0;

   for (;;) {

      event=get_event();

      switch (event) {

      case MOUSE_MOVE:

         // 'm' specifies mouse position in current scale mode

         mx=mou_last_x('m');

         my=mou_last_y('m');

         if (mx>=0 && my>=0 && mx<p_width && my<p_height) {

            if (!p_value) {

               // Show the button pushed in.

               p_value=1;

            }

         } else {

            if (p_value) {

               // Show the button up.

               p_value=0;

            }

         }

         break;

      case LBUTTON_UP:

      case ESC:

         p_value=1;

         done=1;

      }

      if (done) break;

   }

   mou_mode(0);

   mou_release();

   return('')

}


p_view_id

property int p_view_id

Remarks	Determines the current window and view displayed.  Do not use this property as a method.  This property performs the same functions as the get_view_id and activate_view functions.

Example

orig_view_id=p_view_id;

show('-modal form1');

// Make sure we have not switched from the current window or view.

p_view_id=orig_view_id;


p_visible

property boolean p_visible

Remarks	Determines whether the control is visible.  This property has no effect if the object is being edited (p_edit!=0).

See Also	_ShowWindow


p_width

property int p_width

Applies To	All objects except Command Line

Remarks	Determines the width of a window in the scale mode of p_xyscale_mode.


p_windent_x

property int p_windent_x

Applies To	Edit Window, Editor Control, List Box

Returns	Returns the spacing in pixels between the left edge of the window and text displayed in the window.  This property is available only when the object is displayed.


p_windent_y

property int p_windent_y

Applies To	List Box

Returns	Returns the spacing in pixels between the top of the window and text displayed in the window.  This property is available only when the object is displayed.


p_window_flags

property int p_window_flags

Applies To	Edit Window

Returns	Returns the window flags.  The only window flag is HIDE_WINDOW_OVERLAP which indicates the window is a hidden window which should not get focus.  The hidden window stores many views of system buffers such as ".command", ".clipboards", and ".process-command",  Currently there can only be one hidden window.  This property is available only when the object is displayed.


p_window_id

property int p_window_id

Applies To	All objects

Remarks	Determines the current object/current window.  This property is one of the more important properties to understand.  Visual SlickEdit keeps track of objects by instance handles also called window id's.  All objects have a window id.  The terms current object or current window mean the same thing.  Changing the active object does NOT change the focus.  Use the _set_focus method to change the focus.  Using this property as a method has no different effect than when it is not used as a method.  Be sure to carefully look at the examples below.

Example

#include "slick.sh"

defmain()

{

   //  Calling a function as a method like below

   _mdi.p_child.myproc();

   // is identical to the code below

   new_wid= _mdi.p_child;

   orig_wid=p_window_id;

   p_window_id=new_wid;

   myproc();

   p_window_id=orig_wid;

}

static myproc()

{

}


p_window_state

property _str p_window_state

Applies To	MDI Window, Edit Window

Remarks	Determines the window state.  This property is available only when the object is displayed.  The p_window_state property may be one of the following:

'I'	Iconized window

'M'	Maximized window.

'N'	Normalized window.


p_word_chars

property boolean p_word_chars

Applies To	Edit Window, Editor Control

Remarks	Determines the word characters for a buffer.  This value must be a valid regular expression when placed in square braces.  These word characters are used for word searches and word oriented commands such as next_word, prev_word, and cap_word.


p_word_wrap

property boolean p_word_wrap

Applies To	Label

Remarks	Determines whether a label caption (p_caption) is word wrapped when it does not fit within the window.  This property has no effect if the object is not displayed.


p_word_wrap_style

property int p_word_wrap_style

Applies To	Edit Window, Editor Control

Remarks	Determines the word wrap style for the current buffer.  The p_word_wrap_style is a combination of the following flags defined in "slick.sh":

STRIP_SPACES_WWS	Determines whether the paragraph reformatting functions such as reflow_paragraph reformat spaces between words.  This flag should not be used with the JUSTIFY_WWS flag.

WORD_WRAP_WWS	Determines whether word wrap is on.  When word wrap is on text is word wrapped as it moves past the right margin.

JUSTIFY_WWS	Determines whether the paragraph reformatting functions such as reflow_paragraph left and right justify the text.  This flag should not be used with the STRIP_SPACES_WWS flag.

ONE_SPACE_WWS	Determines whether one or two spaces are placed after punctuation characters.

See Also	p_margins, gui_justify, justify, gui_margins, margins


p_x

property int p_x

Applies To	All objects except Command Line

Remarks	Determines the x position of a window in the scale mode of p_xyscale_mode.


p_xyparent

property int p_xyparent

Applies To	All objects

Return	Returns the window id that the window is clipped to.  0 is returned if the window is clipped to the screen.


p_xyscale_mode

property int p_xyscale_mode

Applies To	All objects

Return	Returns the parent scale mode.  May be SM_PIXEL or SM_TWIP.  1440 twips represent one inch on the display.  The parent scale mode is the scale mode used by the properties and methods which get or set the size and position of the current objects window.  This property is available only when the object is displayed.

Example

// Determine the width of both borders of the current control.

both_width=p_width - _dx2lx(p_xyscale_mode,p_client_width);


p_y

property int p_y

Applies To	All objects except Command Line

Remarks	Determines the y position of a window in the scale mode of p_xyscale_mode.


page_down

_command void [wid_expression.]page_down()

PGDN

Applies To	Edit Window, Editor Control

Remarks	Moves cursor to next page of text.

See Also	page_up, page_left, page_right


_page_down

int [wid_expression.]_page_down()

Applies To	Edit Window, Editor Control

Remarks	Moves text under the cursor p_char_height - 1 lines up.  If the bottom line of the buffer is reached and it is not visible, the cursor is placed at the last row of the window.  _page_down is not affected by the scroll style.

Return	If bottom of buffer is reached, BOTTOM_OF_FILE_RC is returned.  Otherwise 0 is returned.

Example

       status=_page_down();

       if (status==BOTTOM_OF_FILE_RC then

          // BOTTOM centers last line of buffer if scroll style is CENTER.

          bottom();

          message(get_message(rc));

       }

See Also	_page_up


page_left

_command void [wid_expression.]page_left()

Applies To	Edit Window, Editor Control

Remarks	Changes the left edge scroll position by half the window width to the left.  The cursor is moved half the window width to the left as well.

See Also	page_up, page_down, page_right


page_right

_command void [wid_expression.]page_right()

Applies To	Edit Window, Editor Control

Remarks	Changes the left edge scroll position by half the window width to the right.  The cursor is moved half the window width to the right as well.

See Also	page_up, page_down, page_left


page_up

_command void [wid_expression.]page_up()

PGUP

Applies To	Edit Window, Editor Control

Remarks	Moves cursor to previous page of text.

See Also	page_down, page_left, page_right


_page_up

int [wid_expression.]_page_up()

Applies To	Edit Window, Editor Control

Remarks	Moves text under the cursor p_char_height - 1 lines down.  The scroll style has no effect on this function.

Return	If top of buffer is hit, TOP_OF_FILE_RC is returned.  Otherwise, 0 is returned.

See Also	PAGE_DOWN


parse

parse string with template

Remarks	When we converted our REXX style language to C-style, we had to leave the syntax of this statement alone because there was no reasonable way to represent this statement as a function.

This statement parses string as specified by template.

Template may contain

variable_name	Output variable

.	Null output variable

nnn	Number specifying new parse column

+nnn	Amount to increment parse column relative to start of last string found or last column setting.

-nnn	Amount to decrement parse column relative to start of last string found or last column setting.

'text'[,search_options]

String constant to search for.  If found, parse column becomes first character after text.  Otherwise parse column becomes first character after length of string being parsed.  search_options is an optional expression that may evaluate to a string of one or more of the option letters U, R, I, and Y.  U specifies UNIX regular expressions.  R specifies MicroEdge regular expressions.  B specifies Brief regular expressions.  I specifies a case insensitive search.  Y specifies a binary which search allows positions in the middle of a DBCS character (only effects Japanese operating systems).  See Regular Expressions.

(expression)[,search_options]

String expression to search for.  If found, parse column becomes first character after text.  Otherwise parse column becomes first character after length of string being parsed.  See above for a description of the search options.

Rules for parse column

•	The parse column is initialized to column 1

•	If a column or column increment specifies a column greater than the length of the string being parsed, the parse column is set to the length of the string being parsed plus one.

•	If a column decrement specifies a column less than the length of the string being parsed, the parse column is set to column 1.

Rules for setting output variables

•	Output variables are set in groups.  An output variable group is defined to be consecutive variables with no search or column specifiers between them.

•	Before variables of an output variable group can be set, the end parse column within the source string must be found.  In the case the end parse column is set by a search, the end parse column for this output variable group becomes the first character to the left of the text found.  In the case the end parse column is set by a column or column increment the end parse column becomes the first character to the left of the column.  The start parse column is the current parse column as specified by the template.

•	A word parse of the text between the start and end columns is performed to set the variables in an output variable group if the group contains more that one variable.  Otherwise the one output variable is set to the text between the start and end columns of the source string.  Each variable set by a word parse will have no leading or trailing tabs/spaces except for the last output variable which is set to the rest of the sub-string.

•	If the start column is greater than the end column the variables in the output group are set to null.

Examples

      parse '1 2 3' with a b c;

      // Results are  a=='1', b=='2', c=='3'

      parse '1 '\t' 2 '\t' 3' with a b c;

      // Results are  a=='1', b=='2', c=='3'.  Note that tab and space characters are stripped.

      parse '1 2 3' with a . b;

      // Results are  a=='1', b=='3'

      parse 'xxx1 2 3yyy 4 5' with 'xxx' a b c 'yyy' d e;

      // Results are  a=='1', b=='2', c=='3', d=='4', e=='5'

      parse 'xxx1 2 3yyy 4 5' with 'xxx' a  'yyy' b;

      // Results are  a=='1 2 3', b==' 4 5'

      parse 'xxx1 2 3yyy 4 5' with 'xxx' +0 a  'yyy' +0 b;

      // Results are  a=='xxx1 2 3', b=='yyy 4 5'

      parse 'c/x/y' with  1 delim +1 s1 (delim) s2 (delim) options;

      // Results are delim=='/', s1=='x', s2=='y', options==''


parse_error

void parse_error(_str &filename, typeless &line, typeless &col, _str &err_msg)

Remarks	Parses compiler or grep (UNIX: sgrep) error message at current line of current buffer placing parts into filename, line, col, and err_msg.   line or col may be set to "" if they can't be found.  The current line must have been found by the search_for_error procedure.   Typically used for adding compiler error message recognition.

See Also	search_for_error, or_re


parse_file

_str parse_file(var string)

Return	Parses first filename from string.


_parse_line

_str _parse_line(_str &string [, _str delimiter] )

Return	Returns the first line/item of string.  The first line/item is deleted from string so that this function may be called again to get the next line.  By default, the line delimiters may be (13,10), (10), or (13).  The optional delimiter argument is a single character used as the item delimiter instead of the default delimiters.

Example

line='First,Second,Third';

for (;;){

   item=_parse_line(line, ',');

   messageNwait('item='item);

}

line="First\nSecond\nThird";

for(;;){

   item=_parse_line(line);

   messageNwait('item='item);

}


_parse_project_command

_str _parse_project_command(_str command, _str buf_name, _str project_name, _str cword)

Remarks	Used to generate a compile command which needs parts of the buffer name (buf_name), the project name (project_name), or the current word (cword) inserted.  The rules for substituting these parts into the command are:

%E	File extension with dot

%F	Filename

%N	Name without extension

%R	Insert project_name

%V	Drive with :.  This is not very useful under UNIX.

%W	Insert cword

%(envvar)	Value of environment variable envvar

%% 	percent character

Return	The resulting command is returned.

Example

       defmain()

       {

            // The message displayed is the same as 'cc -c':+p_buf_name

            message(_parse_project_command('%f',_project_current(p_buf_name),'');

       }


parsecommand

_str parsecommand(_str command, _str fileman_line)

Return	Returns command with parts of fileman_line in the format of the file manager list parsed into command.  See help on for_all command for information on parse parts of fileman_line into command.


parseoption

int parseoption(_str &cmdline, _str option_letter)

Remarks	Strips option words starting with '-' or '+' followed by option_letter from cmdline.

Return	Returns non-zero number if option_letter was found.  Otherwise, 0 is returned.


_pas_extform

_form _pas_extform

Syntax	void show('_pas_extform')

Remarks	Displays Pascal Options dialog box which is used for modifying the extension specific options for the Pascal language.


pas_proc_search

int [wid_expression.]pas_proc_search(_str &proc_name, int find_first)

Applies To	Edit Window, Editor Control

Remarks	If proc_name is '', then this procedure searches for the first or next occurrence of a PASCAL language function definition.  Search always starts from the cursor position.  The find_first parameter indicates whether this is the first or next call.  proc_name is set to the name of the function found.

If proc_name is not '', then a search for a PASCAL language function definition with name proc_name is performed.  Searching begins at the cursor position.  find_first must be non-zero if proc_name is not ''.  The cursor is placed on the function definition, if one is found.

Return	Returns 0 if successful.  Otherwise a non-zero value is returned.

command void [wid_expression.]pascal_enter()

(Pascal mode only) ENTER

Applies To	Edit Window, Editor Control

Remarks	New binding of ENTER key when in PASCAL mode.  Handles syntax expansion and indenting for files with PAS extension.  Use Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...") to change the syntax expansion/indenting options.


pascal_mode

_command void [wid_expression.]pascal_mode()

Applies To	Edit Window, Editor Control

Remarks	Activates PASCAL file editing mode.  The ENTER and SPACE BAR bindings are changed as well as the tab and margin settings.


pascal_space

_command void pascal_space()

(Pascal mode only) SPACE BAR

Applies To	Edit Window, Editor Control

Remarks	New binding of SPACE key when in PASCAL mode.  Handles syntax expansion and indenting for files with PAS extension.  Use Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...") to change the syntax expansion/indenting options.


paste

_command int [wid_expression.]paste( [_str cbname] )

Ctrl+V

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Remarks	Inserts the clipboard at the cursor.  If cbname is given, then the internal clipboard with name cbname is inserted.  LINE type clipboards are inserted before or after the current line depending upon the Line insert style ("Tools", "Configuration", "More Options...", "Line Insert Style").  By default, they are inserted after the cursor.  By default, BLOCK type clipboards are inserted even when the cursor is in replace mode.  If you want BLOCK type clipboards to overwrite the destination text when your cursor is in replace mode, invoke the command "set-var def-modal-paste 1".

IMPORTANT:  cbname needs to start with an alphabetic character (a-z).  numeric values for cbname are reserved for VI emulation.

In ISPF emulation, this command is not called when invoked from the command line.  Instead ispf_paste is called.  Use ("Edit", "Paste") to explicitly invoke the paste command.

Return	Returns 0 if successful.  Common return code is 1 (clipboard empty, or clipboard text too long for command line).  On error, message is displayed.


path_search

_str path_search(_str filename, _str env_var="PATH", _str options="")

Remarks	Searches the path specified for a file or program.  The path given with the filename is searched first.  Then the directories specified by the environment variable env_var are searched.

options is a string of zero or more of the following:

'P'	Program search.  Does not effect UNIX.

'M'	Program search including search for .e and .ex Slick-C batch macros.

'S'	Don't search in current directory.  Does not effect UNIX.

non-UNIX platforms:  The search order for a program or macro is:

.com

.exe

.e	(if M option specified)

.ex	(if M option specified)

.bat	(Windows and Windows 95/98 only)

.cmd	(Windows NT only)

UNIX:  The search order for a program or macro is:

filename	(No changes to filename)

.e	(if M option specified)

.ex	(if M option specified)

Return	If successful, a complete file specification for a filename is returned.  Otherwise '' is returned.

Example

name=path_search('vs','PATH','P');	// Find vs.exe

name=path_search('draw','PATH','M');	// Find external draw macro

name=path_search('vslick.ini');	// Find ini file


pathlen

int pathlen(_str filename)

Return	Returns length of the path in the string filename including trailing backslash.


pause_recording

_command void pause_recording()

Remarks	Temporarily turns off macro recording so that some editor functions may be used before continuing macro recording.


pb

_command void pb()...

Applies To	Edit Window

Remarks	Same as prev_bookmark command except requires less typing.


pc_match

_str pc_match(_str name, int find_first)

Return	Returns next procedure or command name which is a prefix match of name.  find_first must be non-zero to initialize matching.


pcb_match

_str pcb_match(_str name, _str find_first)

Return	Returns next procedure, command, or built-in name which is a prefix match of name.  find_first must be non-zero to initialize matching.


pcextension

_str pcextension(_str fileman_line)

Return	Returns extension from fileman_line without the dot.  fileman_line must be in the column format of the file manager.


pcfile

_str pcfile(_str fileman_line)

Return	Returns name with extension, but without path of fileman_line.  fileman_line must be in the column format of the file manager.


pcfilename

_str pcfilename(_str fileman_line)

Return	Returns filename field of fileman_line.  fileman_line must be in the column format of the file manager.


pcname

_str pcname(_str fileman_line)

Return	Returns name without extension or path of fileman_line.  fileman_line must be in the column format of the file manager.


pcpath

_str pcpath(_str fileman_line)

Return	Returns path of fileman_line.  fileman_line must be in the column format of the file manager.


pgetkey

_str pgetkey([int get_flags [,_str root_keys [,_str mode_keys] ]])

Remarks	If the "prefix.e" module copied with the EMACS emulation files has not been installed this function performs a simple get_event(getkey_flags) call, returns the key value, and sets the global variable _key to the returned key value.

If "prefix.e" is installed this function performs a normal get_event and translates the alt_prefix, ctrl_prefix, and case_indirect key bindings into the appropriate key.  The translated key is returned and the global variable _key is set to the returned key value.

INPUT

get_flags	Used as first parameter passed to get_event built-in.  See get_event built-in for description of first parameter.  Defaults to ''.

root_keys	Name table index of root event table.  Defaults to index of "root_keys" event table.

mode_keys	index of mode specific event table.

See Also	get_event


_pic_match

_str _pic_match(_str name, int find_first)

Return	Returns next already loaded picture name which is a prefix match of name.  find_first must be non-zero to initialize matching.  Returns '' when no more matches are found.


_pixels_per_inch_x

int _pixels_per_inch_x()

Return	Returns the number of pixels per inch in the x direction on the display.


point

_str [wid_expression.]point(_str option='P')

Applies To	Edit Window, Editor Control

Return	Returns the text position of the beginning of the current line or the current line number.

When invoked with no parameters the text position of the beginning of the current line is returned.  If the length of the current line is 0, the point function returns the seek position of the first previous non-blank line concatenated to a down scroll amount.  Otherwise, the seek position of the beginning of line is returned.  0 length lines are only possible for buffers edited in Visual SlickEdit's binary width mode.  Lines of ASCII buffers always terminate with one or more line separation characters.

Specify 'L' for option to get the current line number.  Unlike the p_line property which determines the current line number when it is not known, a line number of -1 is return to indicate that the line number is not known.

IMPORTANT:  This function includes lines with NOSAVE_LF set which means that these file offsets and line numbers will not match what is on disk if the file has non-savable lines.  Use _GoToROffset, _QROffset, p_RLine, and p_RNoflines for dealing with disk seek positions and line numbers.

Example

     parse point() with seek_pos down_scroll;

     message('seek_pos='seek_pos'  down_scroll='down_scroll);

See Also	goto_point, _QROffset, _GoToROffset


point_on_edge

int point_on_edge(int x, int y, int x1, int y1, int x2, int y2)

Return	Returns non-zero value if  (x, y) is a point on the edge (x1, y1) to (x2, y2).


pop_bookmark

_command int pop_bookmark()

Ctrl+Comma   or "Search", "Pop Bookmark..."

Applies To	Edit Window

Remarks	Places the cursor at the buffer cursor position stored in the top bookmark of the bookmark stack and pops the bookmark off the bookmark stack.  The push_bookmark and push_tag commands add bookmarks to the bookmark stack.

Return	Returns 0 if successful.

See Also	push_bookmark, set_bookmark, sb, goto_bookmark, gb, push_tag


popup_imessage

_command void popup_imessage( _str message_text )

Remarks	Displays message_text in message box with an information icon displayed to the left of the message.  This function is typically used to display help information messages.

See Also	popup_message, _message_box, help, message, messageNwait, sticky_message, clear_message


popup_message

_command void popup_message( _str message_text )

Remarks	Displays message_text in message box with an exclamation point displayed to the left of the message.  Use the new and more powerful _message_box function instead of this function.  This function is typically used with the _post_call function to display an error message box during on_got_focus or on_lost_focus events.

See Also	popup_imessage, _message_box, help, message, messageNwait, sticky_message, clear_message


pos

int pos(_str needle [,_str haystack [,int start [,_str options]]])

Return	Returns the position of needle in haystack.  If needle is not found, 0 is returned.  start specifies the position at which the search should begin.  start defaults to 1.  Multiple options may be specified with the following meaning:

'I'	Ignore case.

'R'	Interpret search string needle as a regular expression.  See section MicroEdge Regular Expressions for syntax of regular expressions.

'U'	Interpret search string as a UNIX regular expression.  See UNIX Regular Expressions.

'B'	Interpret string as a Brief regular expression.   See section Brief Regular Expressions.

'Y'	Binary search.  This allows start positions in the middle of a DBCS character (only effects Japanese operating systems).  This option is useful search binary data which may contain characters which look like DBCS but are not.

Example

pos('a','zzz')	== 0

pos('a','zzza')	== 4

pos('a,'zzzA',1,'I')	== 4

pos('a','zzza',5)	== 0

pos('[a-z]','%$?a',1,'R')	== 4

Calling the pos function with one parameter allows you to retrieve tagged expression information.  Specifying 'S' followed by a tagged expression number 0-9 (i.e. 'S0') will return the start position of that tagged expression.  1 is returned if that tagged expression was not found.  If 'S' is not followed by a number, the start position of the entire string found is returned.  Specifying a tagged expression number 0-9 will return the match length of the group.  For 'R' and 'B' option regular expressions, the first tagged expression is 0 and the last is 9.  For 'U' option regular expressions, the first tagged expression is 1 and the last is 0.  0 is returned if that tagged expression was not found.  A value of '' will return the match length of the entire string found.

Example

    get_line(line);

    word_sep='([~a-zA-Z0-9_$]|^|$)';

    i=pos(word_sep'{if|then|while}'word_sep,line,1,'r');

    if (!i ) {

        message('Match not found');

        return(1);

    }

    word=substr(line,pos('S0'),pos('0'));


_post_call

void _post_call(int proc_index , _str arg1=null)

Remarks	Posts a calls to the Slick-C function corresponding to name table index, proc_index, and optional passes the first argument, arg1.  The call is made after the editor returns to a message loop.  This function should only be used under circumstances where an operation can not be performed immediately.  The dialog editor uses this function to display error message boxes during on_lost_focus events.  During the on_got_focus and on_lost_focus events you can not display a dialog box.  Use find_index to get an index to a global function.


_post_paint

void [wid_expression.]_post_paint()

Applies To	Edit Window, Editor Control, List Box

Remarks	Posts a paint message to an object.  This function is intended to increase/change performance.  Normally when a Slick-C macro finishes, all edit windows, editor controls, and list boxes are updated.  If a paint message is posted to the window, the window is not updated until all key presses have been processed.  One purpose of this function could be to more rapidly update a text box while simultaneously modifying items in a list box.


prepeat_search

int [wid_expression.]prepeat_search()

Remarks	Repeat search function used as input to the process_list procedure.

Return	Returns 0 if search string found.


preprocess

_command void [wid_expression.]preprocess([_str define_names])

Applies To	Edit window, Editor control

Remarks	Preprocesses current buffer based on define_names specified.  Lines of code which have no effect based on the preprocessing are hidden.  Currently this command only supports C, C++, and Slick-C.

The syntax for define_names is:

[+w | -w]  name1[=value1]  name2[=value2] ...

The -w option indicates that no warning should be given if a define name does not have a value in a preprocessor expression.  The +w option currently has no effect.

Command Line Example

preprocess  NT386=1  WIN32S  UNIX=0

See Also	all, hide_code_block, hide_all_comments, show_all, hide_selection, allnot, show_procs, show_col1, _lineflags, selective_display, show_braces, show_indent, show_paragraphs


pretrieve_next

_str pretrieve_next(int retrieve_view_id, _str &first_retrieve)

Return	Returns the next command in the retrieve_view_id buffer.  If end of buffer is reached the first command is returned.  first_retrieve is set to zero.

See Also	pretrieve_prev, insert_retrieve


pretrieve_prev

_str pretrieve_prev(int retrieve_view_id, _str &first_retrieve)

Return	Returns the previous command in the retrieve_view_id buffer.  The last command is returned if first_retrieve is zero.  If top of buffer is reached the last command is returned. first_retrieve is set to zero.

See Also	pretrieve_next, insert_retrieve


prev_bookmark

_command void prev_bookmark()

Applies To	Edit Window

Remarks	Goes to the previous bookmark set by one of the commands set_bookmark, push_bookmark, or push_tag.

See Also	next_bookmark, nb


_prev_buffer

void [wid_expression.]_prev_buffer(_str options="")

Applies To	Edit Window, Editor Control

Remarks	Switches to the previous buffer.

options is a string of zero or more of the following:

'H'	Allow switching to the hidden window.

'N'	Don't update the active buffer's non-active view information.

'R'	Don't do any screen updating.

The active view information is saved in the active buffer's non-active view unless the 'N' option is specified.  Each buffer maintains ONE non-active view (cursor position) which is updated when you switch to a buffer within the same window using one of the built-ins _next_buffer, _prev_buffer, _delete_buffer, load_files, _begin_select, and _end_select.  When the non-active buffer becomes active, the non-active view information is copied into the window's view.  Switching windows DOES NOT update the buffers non-active view.

The 'H' option determines whether buffers with (p_buf_flag&HIDE_BUFFER) true may be selected.

See Also	_next_buffer,_delete_buffer


prev_buffer

_command void [wid_expression.]prev_buffer()

Ctrl+P or "Document", "Previous Buffer"

Applies To	Edit Window, Editor Control

Remarks	Switches to view of the previous buffer within the current window.


_prev_control

void [wid_expression.]_prev_control()

Applies To	Text Box (not Command Line), Check Box, Command Button, Radio Button, Frame, Label, List Box, Editor Control, File List Box, Directory List Box, Hscroll Bar, Vscroll Bar, Combo Box, Picture Box, Image, Gauge, Spin

Remarks	Switches to the previous control in a dialog box.  Identical to pressing the Shift+Tab key in a dialog box except text in text box and combo box controls are not selected.

See Also	_next_control


prev_doc

_command void [wid_expression.]prev_doc()

Applies To	Edit Window

Remarks	Switches to the previous window if One File per Window is on.  Otherwise, switches to the previous buffer.

Return	next_doc


prev_error

_command void prev_error()

Ctrl+Shift+Up or "Build", "Previous Error"

Applies To	Edit Window

Remarks	The prev_error command ("Build", "Previous error") places the cursor on the line and column of the file referred to by the previous error message.

For more information, see help on project_build.

See Also	start_process, stop_process, cursor_error, exit_process, set_next_error, reset_next_error, clear_pbuffer


prev_index

int prev_index([_str new_value [,'C']])

Return	Returns index of previous command executed by a key or the built-in function call_key. If new_value is specified and not '', the index of the previous command is set to new_value.

When the second parameter is 'C', this command returns (and sets if new_value not '') the index of the previous command executed by any mechanism.

See Also	last_index


prev_level

_command int [wid_expression.]prev_level()

Applies To	Edit Window, Editor Control

Remarks	Used in EMACS emulation.  Searches for close parenthesis character ')', ']', or '}' and places   the cursor on the matching open parenthesis.  Searching for close parenthesis starts at character before cursor.  Cursor position is unchanged if matching open parenthesis is not found.  Comment or string literals may cause this command to match parenthesis incorrectly.

Return	Returns 0 if successful.  Common return values is TOO_MANY_MARKS_RC.  On error, message displayed.

See Also	next_level, cut_level, cut_prev_level


prev_paragraph

_command int [wid_expression.]prev_paragraph()

Applies To	Edit Window, Editor Control

Remarks	Used in EMACS emulation.  Places the cursor on the first non-blank character of the paragraph at or before the cursor.  If the cursor is already at or before the first non-blank character of the current paragraph, the cursor is placed on the first non-blank character of the previous paragraph.  Paragraphs are separated with lines containing just the characters tab, space, and   form feed or blank lines.

See Also	next_paragraph, next_sentence, select_paragraph, cut_sentence, center_within_margins, reflow_region, margins


prev_proc

_command int prev_proc( [_str quiet] )

Applies To	Edit Window, Editor Control

Remarks	Places cursor on previous function heading.  If the quiet argument is given an is not "", no error message is displayed.

Return	Returns 0 if successful.  Otherwise, a non-zero value is returned.

See Also	next_proc


prev_tag

_command int _tag( [_str quiet] )

Applies To	Edit Window, Editor Control

Remarks	Places cursor on previous tag definition, skipping any tags filtered out by the Procs tab.  If the quiet argument is given an is not "", no error message is displayed.

Return	Returns 0 if successful.  Otherwise, a non-zero value is returned.

See Also	next_proc, prev_proc, next_tag


prev_sentence

_command void [wid_expression.]prev_sentence()

Applies To	Edit Window, Editor Control

Remarks	Used in EMACS emulation.  Places the cursor after the end of the current sentence.  End of sentence is defined to be one of the character ., !, or ?  followed by any number of the characters ., !, ?, ", ', ), or ] followed by end of line or two spaces.  Cursor is placed at the first non-blank character of the sentence.

See Also	next_paragraph, prev_paragraph, next_sentence, select_paragraph, cut_sentence, center_within_margins, reflow_region, margins


_prev_view

void _prev_view()

Remarks	For an explanation of how windows, views, and buffers are related, see section Windows Structure.

A view holds the information necessary for the editor to remember your location and scroll position in a buffer.  When you have more than one window looking at the same buffer, the windows have different views of that buffer.  _prev_view switches to the previous view in the current window.

See Also	get_view_id, activate_view, _next_view, _quit_view, load_files, _next_window, _prev_window


_prev_window

void _prev_window(_str option="")

Remarks	For an explanation of how windows, views, and buffers are related, see section Windows Structure.

Switches to the previous window.  The hidden window is skipped unless the 'H' is specified for option (used for debugging).

See Also	get_view_id, activate_view, _next_view, _prev_view, _quit_view, load_files, _next_window


prev_window

_command void prev_window()

Ctrl+Shift+TAB or Ctrl+Shift+F6 or "Window", "Previous"

Remarks	Switches to previous window.  Hidden windows are skipped.

See Also	next_window, window_left, window_right, window_above, window_below


prev_word

_command void [wid_expression.]prev_word()

Ctrl+LEFT

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Remarks	Moves the cursor to the beginning of the previous word.   To change the word characters for a specific extension, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").

See Also	next_word


_prg_extform

_form _prg_extform

Syntax	void show('_prg_extform')

Remarks	Displays dBASE Options dialog box which is used for modifying the extension specific options for the dBASE language.


print

_command int print( [_str font [,_str lheader [,_str lfooter [,_str options [,_str cheader [,_str cfooter [,_str rheader [,_str rfooter]]]]]]]] )

Remarks	non-UNIX platforms: The print command prints the contents of the current buffer according to the options given.  If a parameter is not specified, the default printer options set by the Print Setup dialog box are used.

It is much easier to create input parameters to this function by using macro recording.  Use the Print Setup dialog box to set your options.  Then print a document while macro recording is on.

See _print function for information on input parameters.

UNIX: Under UNIX, this function calls the tprint command with no arguments.  All arguments are ignored.  The default printer options set by the Text Mode Print dialog box are used.

Return	Returns 0 if successful.

See Also	gui_print


_print

int _print( _str sysmessage="", _str reserved="", void (*pfnCallback)(int reason,_str caption="")=0, int font="", _str lheader="", _str lfooter="", _str options="", _str cheader="", _str cfooter="", _str rheader="", _str rfooter="")

Applies To	Edit Window

Remarks	Prints the contents of the current buffer according to the options given.  This function is not supported by the UNIX version.

It is much easier to create input parameters to this function by using macro recording.  Use the Print Setup dialog box to set your options.  Then print a document while macro recording is on.

sysmessage is a description given to the operating system which identifies this particular print job.  Usually this is the buffer name.

reserved should be '' to avoid compatibility problems.

callback_index is an pointer to a function or an names table index to a global function which is called with PRINT_ONINIT to initialize, and PRINT_ONEXIT to uninitialize.  The callback function can cancel printing by calling the _print_cancel function.

font is a string in the format  font_name, font_size, font_flags[,]

font_flags is a combination of the flags below:

      F_BOLD

      F_ITALIC

      F_STRIKE_THRU

      F_UNDERLINE

      F_PRINTER

lheader, lfooter, cheader, cfooter, rheader, and rfooter are strings which may have escape sequences with the following meaning embedded into them:

%f	Buffer name

%p	Page number

%d	Date

the letters 'l', 'c', and 'r' correspond to the header or footer at the left, center, and right of the page.

The header is printed at the top of each page.  The footer is printed at the bottom of each page.

options is a string in the format:

       left_ma, AfterHeader_ma, right_ma, BeforeFooter_ma, space_between_ma, print_flags, linenums_every ,top_ma, bottom_ma

Windows: The left_ma, top_ma, right_ma, and bottom_ma parameters are margin space from the outside edge of the paper to the printed text.  AfterHeader_ma is the space in inches between the header and the first line on the page.  BeforeFooter_ma is the space in inches between the last line on a page and the footer.

space_between_ma is the spacing in twips between columns.  This parameter is only used if the print_flags have the PRINT_TWO_UP flag.

print_flags is a combination of the flags below:

PRINT_LEFT_HEADER

PRINT_RIGHT_HEADER

PRINT_CENTER_HEADER

PRINT_LEFT_FOOTER

PRINT_RIGHT_FOOTER

PRINT_CENTER_FOOTER

PRINT_TWO_UP

The PRINT_LEFT_HEADER, PRINT_RIGHT_HEADER, and PRINT_CENTER_HEADER flags have no effect if the cheader, cfooter, rheader, and rfooter parameters are given.

Return	Returns 0 if successful.


_print_cancel

void _print_cancel()

Remarks	Cancels printing.  This function is intended to be called during printing started with the _print function.


_print_form

_form _print_form

Syntax	_str show('_print_form')

Remarks	Displays Print dialog box.  This form is not supported by the UNIX version.

Return	Returns '' if the dialog box is cancelled.  Returns 0 if the user has specified to print the selection and sets the global variables _param1, _param2, _param3, and _param4.   The _param1-_param4 variables may be passed as arguments 1-4 to the print_selection function to perform the printing.  1 is returned if the user has selected to print the current buffer and the global variables _param1-_param4 are set.   The _param1-_param4 variables may be passes as arguments 1-4 to the _print function to perform the printing


print_selection

_command int print_selection( [_str font [,_str lheader [,_str lfooter [,_str options [,_str cheader [,_str cfooter [,_str rheader [,_str rfooter]]]]]]]] )

Remarks	non-UNIX Platforms: Prints the selection according to the options given.  If a parameter is not specified, the default printer options set by the Print Setup dialog box are used.

It is much easier to create input parameters to this function by using macro recording.  Use the Print Setup dialog box to set your options.  Then print a document while macro recording is on.

See _print function for information on input parameters.

UNIX: Prints the selection according to the options set by the Text Mode Print dialog box.  The arguments to this function are ignored.

Return	Returns 0 if successful.


printer_setup

_command void printer_setup()

"File", "Print...", press "Setup..." button

Remarks	Runs the operating system Print Setup dialog box.

See Also	_printer_setup


_printer_setup

int _printer_setup()

Remarks	Runs the operating system Print Setup dialog box.

Return	Returns 0 if successful.

See Also	printer_setup


process_begin_line

_command void process_begin_line()

(Process mode only) HOME

Remarks	New binding of HOME key when in process mode.  When invoked while the cursor is on the last line of the concurrent process buffer, the cursor is moved to column one or the "read point" column if the cursor is on the line containing the "read point".  Otherwise the fundamental mode HOME key binding is executed.  Process output is inserted at the character before the "read point".


_process_cd

void _process_cd(_str path)

Remarks	Changes current drive and directory in the concurrent process buffer.


process_down

_command void process_down()

(Process mode only) DOWN

Remarks	New binding of DOWN key when in process mode.  When invoked while the cursor is on the last line of the concurrent process buffer, the next command is retrieved from the "process-buffer".  Otherwise the fundamental mode key DOWN key binding is executed.


process_enter

_command void process_enter()

(Process mode only) ENTER

Remarks	New binding of ENTER key when in process mode.  When invoked while the cursor is on the last line of the concurrent process buffer, a blank line is inserted after the current line and the contents of the current line after the "read point" is inserted in the ".process-command" retrieve buffer for latter use by the process_up or process_down command.  Otherwise the fundamental mode ENTER key binding is executed.  Process output is inserted at the character before the "read point".


process_events

void process_events(boolean &cancel_message_loop)

Remarks	Reads and dispatches all system messages until there are no more messages or the variable cancel_message_loop becomes non-zero.

Example

#include "slick.sh"

static  typeless gcancel

_command test()

{

    // Show the form modeless so there is no modal wait

    form1_wid=show('form1');

    disabled_wid_list=_enable_non_modal_forms(0,form1_wid);

    gcancel=0;

    for (;;) {

          // Read mouse, key, and all other events until none are left

          // or until the variable gcancel becomes true

          process_events(gcancel);

          if (gcancel) break;

    }

    _enable_non_modal_forms(1,0,disabled_wid_list);

    form1_wid._delete_window();

}

defeventtab form1

cancel.lbutton_up()

{

     gcancel=1;

}


_process_info

int _process_info(_str option="")

Remarks	This function returns information about the process running depending upon the input given as follows:

INPUT	OUTPUT

""	Returns 1 if the concurrent process is running.  Otherwise 0.

'C' 	Returns start column of process request for input.  If the current line is not reading input for a concurrent process, 0 is returned.

'B' 	Returns 1 if the current buffer has a concurrent process.  Otherwise 0 is returned.

'R'	Returns 1 if the concurrent process is running.  Otherwise 0 is returned.  A delay is performed and pending concurrent process output is read into the concurrent process buffer.

See Also	concur_shell, _stop_process


process_list

typeless [wid_expression.]process_list(_str search_fun, _str search_string, _str search_options,   _str repeat_search_fun, _str action_fun)

Applies To	Edit Window, Editor Control

Remarks	process_list is a generic list processing function.  The file manager uses this function to delete or select entries from the file list.

INPUT

search_fun	Name of procedure to perform first search.  The call looks like this:

       search_fun(search_string, search_options)

Search function must return non-zero status if string is not found.  Use a pre-existing search function such as "psearch" if possible.

search_string	Search string given as argument to search_fun and repeat_search_fun.

search_options	Options given as argument to search_fun and repeat_search_fun.  The character 'm' must mean searching within a marked area.  The character '*' means perform action without prompting.  By default, the user is prompted with "Yes/No/Last/Go/Quit?" before the action is performed.

repeat_search_fun	Name of procedure to perform subsequent searching.  The call looks like this:

       repeat_search_fun(search_string, search_options)

Search function must return non-zero status if string is not found.  Use a pre-existing search function such as "psearch" or "prepeat_search" if possible.

action_fun	Name of procedure which operates on lines found by search functions.  Use a pre-existing action function such as "zap_line" or "_fselect_line" if possible.

The cursor position is left at the position after the last call to the action_fun or repeat_search_fun.

Return	Returns 0 if successful.  Otherwise a non-zero value is returned.  On error, message is displayed.

Example

       defmain()

       {

          // Remove all lines in the current buffer containing the word

          //  junk in any case without prompting.

          top();

          process_list('psearch','junk','I*','prepeat_search','zap_line');

       }


process_make_rc

void process_make_rc(_str error_code, _str module_name)

Remarks	Processes error codes during rebuild of the state file.  error_code is either a negative number corresponding to one of the error constants in "rc.sh" or 1 which indicates error is from the Slick-C translator trying to compile the file module_name.  module_name is the name of the file during which the error occurred.

When a compilation error occurs and the st command has not been loaded, a message is displayed and the editor is exited.  Otherwise, a message is displayed and the editor remains resident.


process_rubout

_command void process_rubout()

(Process mode only) BACKSPACE

Remarks	New binding of BACKSPACE key when in process mode.  When invoked while the cursor is on the last line of the concurrent process buffer, deletes character to the left of the cursor unless cursor is in column 1 or at "read point".  Otherwise the fundamental mode BACKSPACE key binding is executed.  Process output is inserted at the character before the "read point".


process_up

_command void process_up()

(Process mode only) UP

Remarks	New binding of UP key when in process mode.  When invoked while the cursor is on the last line of the concurrent process buffer, the previous command is retrieved from the ".process-buffer".  Otherwise the fundamental mode UP key binding is executed.


project_add_file

_command int project_add_file( _str newfilename="",boolean quiet=false)

Parameters	Description

newfilename	Name of file or buffer to add to the project.  If "" is given, the current buffer is added to the project.

quiet	When false, messages are displayed.

Remarks	Adds a file or buffer to the current project.

Return	Returns 0 if successful.

See Also	project_add_file, project_build, project_rebuild, project_debug, project_execute, project_user1, project_user2, workspace_open, project_compile, project_edit, project_load, new, workspace_insert, workspace_dependencies, workspace_set_active, workspace_properties, workspace_close


project_build

_command int project_build()

Ctrl+M, or "Build", "Build"

Remarks	All of the compiling from within the editor commands may be accessed from the Project menu.  Be sure to try the ("Build", "Activate Process") menu item.

Visual SlickEdit provides the commands project_compile and project_build for compiling.  The project_compile command (Shift+F10 or "Build", "Compile") compiles the current buffer based on a compile command you specify.  Alternately, the project_build command (Ctrl+M or "Build", "Build") executes a build command you specify.  Both of these commands may be specified per project or per file extension.  Before you can execute the build or compile commands you must set the current project or define an extension based project.  To define an extension based project command, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...") select the extension and press the Project button.   You will probably want your build command based on the current project and not the current extension. Use the workspace_new command ("Project", "New...") to create a new workspace or project.  Once a project is open, you can use the Tools Tab ("Project", "Project Properties...", select Tools Tab) to modify project commands, files, and other project setup information.  If the current project has a compile command defined, the extension specific project compile command will be ignored.

By default, the compile or build command is executed in Visual SlickEdit's concurrent process buffer.  This allows you to continue editing while your compiler runs.    You can process the error messages as they appear in the ".process" concurrent process buffer instead of waiting until the compile(s) finish.  The stop_process command ("Project", "Break Process") may be used to send a control break signal to stop your compiler or program running in the concurrent process buffer.

Execute the next_error command (Ctrl+Shift+Down,  or "Build", "Next Error") to place your cursor on the line of the file containing the next error.  Click on the Build Tab of the Output toolbar (docked on the bottom by default) to view all your compilers error messages.  You may use the cursor_error command (Alt+1, Double-click or "Build", "Go to Error/Include") to set the next error starting search position and go to a specific error.

The cursor_error, next_error, and prev_error commands may also be used to process messages from the grep (UNIX: sgrep) program we provide.  For example, activate the concurrent process buffer ("Build", "Activate Process") and type "grep main *.c" and press enter.  You may now press Ctrl+Shift+Down to cursor through the located occurrences.   Press the PgUp key to move the cursor off the concurrent process buffer command prompt so you may use the cursor_error command (Alt+1 or Double-click) on a specific occurrence.

The reset_next_error command sets the invisible bookmark of the next_error command to the end of the concurrent process buffer so that no error messages will be found.

Returns	Returns 0 if command queued successfully.  However, this does not mean that the command will execute successfully.  A non-zero return code means that the concurrent process buffer was not created.  Common error codes are: TOO_MANY_SELECTIONS_RC, TOO_MANY_FILES_RC, CANT_FIND_INIT_PROGRAM_RC, ERROR_CREATING_SEMAPHORE_RC, TOO_MANY_OPEN_FILES_RC, NOT_ENOUGH_MEMORY_RC, ERROR_CREATING_QUEUE_RC, INSUFFICIENT_MEMORY_RC, and ERROR_CREATING_THREAD_RC. On error, message is displayed.

See Also	project_add_file, project_build, project_rebuild, project_debug, project_execute, project_user1, project_user2, workspace_open, project_compile, project_edit, project_load, new, workspace_insert, workspace_dependencies, workspace_set_active, workspace_properties, workspace_close


project_compile

_command int project_compile()

Shift+F10 or "Build", "Compile"

Remarks	Executes a user defined compile command.    The compile command may be specified per project or per file extension.  Parts of the buffer name may be parsed into the compile command before it is executed.    To define an extension based project command, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...") select the extension and press the Project button.   You will probably want your build command based on the current project and not the current extension. Use the new command ("Project", "New...") to create a new workspace or project.  Once a project is open, you can use the Tools Tab ("Project", "Project Properties...", select Tools Tab) to modify project commands, files, and other project setup information.  If the current project has a compile command defined, the extension specific project compile command will be ignored.

The compile command is executed in Visual SlickEdit's concurrent process buffer by default.

Returns	Returns 0 if command queued successfully.  However, this does not mean that the command will execute successfully.  A non-zero return code means that the concurrent process buffer was not created.  Common error codes are: TOO_MANY_SELECTIONS_RC, TOO_MANY_FILES_RC, CANT_FIND_INIT_PROGRAM_RC, ERROR_CREATING_SEMAPHORE_RC, TOO_MANY_OPEN_FILES_RC, NOT_ENOUGH_MEMORY_RC, ERROR_CREATING_QUEUE_RC, INSUFFICIENT_MEMORY_RC, and ERROR_CREATING_THREAD_RC. On error, message is displayed.

See Also	project_add_file, project_build, project_rebuild, project_debug, project_execute, project_user1, project_user2, workspace_open, project_compile, project_edit, project_load, new, workspace_insert, workspace_dependencies, workspace_set_active, workspace_properties, workspace_close


project_debug

_command int project_debug()

"Project", "Debug"

Remarks	Executes a user defined debug command.    The debug command may be specified per project or per file extension.  Parts of the buffer name may be parsed into the debug command before it is executed.    To define an extension based project command, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...") select the extension and press the Project button. Use the new command ("Project", "New...") to create a new workspace or project.  Once a project is open, you can use the Tools Tab ("Project", "Project Properties...", select Tools Tab) to modify project commands, files, and other project setup information.  If the current project has a debug command defined, the extension specific project compile command will be ignored.

The debug command is executed asynchronously by default.

Returns	Returns 0 if command queued successfully. On error, message is displayed.

See Also	project_add_file, project_build, project_rebuild, project_debug, project_execute, project_user1, project_user2, workspace_open, project_compile, project_edit, project_load, new, workspace_insert, workspace_dependencies, workspace_set_active, workspace_properties, workspace_close


project_edit

_command void project_edit()

"Project", "Project Properties..."

Remarks	Allows you to add files to project, change project commands, working directory and other project properties.  Displays Project Properties dialog box

See Also	project_add_file, project_build, project_rebuild, project_debug, project_execute, project_user1, project_user2, workspace_open, project_compile, project_edit, project_load, new, workspace_insert, workspace_dependencies, workspace_set_active, workspace_properties, workspace_close


project_execute

_command int project_execute()

"Project", "Execute"

Remarks	Executes a user defined execute command.    The execute command may be specified per project or per file extension.  Parts of the buffer name may be parsed into the execute command before it is executed.    To define an extension based project command, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...") select the extension and press the Project button. Use the new command ("Project", "New...") to create a new workspace or project.  Once a project is open, you can use the Tools Tab ("Project", "Project Properties...", select Tools Tab) to modify project commands, files, and other project setup information.  If the current project has a execute command defined, the extension specific project compile command will be ignored.

The execute command is executed asynchronously by default.

Returns	Returns 0 if command queued successfully. On error, message is displayed.

See Also	project_add_file, project_build, project_rebuild, project_debug, project_execute, project_user1, project_user2, workspace_open, project_compile, project_edit, project_load, new, workspace_insert, workspace_dependencies, workspace_set_active, workspace_properties, workspace_close


_project_properties_form

_form _project_properties_form

Syntax	_str show('_project_form')

Remarks	Displays the Project Properties dialog box.  The project's values are updated before the dialog box is closed unless the user cancels the dialog box.

Return	Returns '' if the dialog box is cancelled.  Otherwise, 1 is returned.


_project_get_filename

_str _project_get_filename()

Return	Returns currently open project filename.  If no project file is open, the extension specific project file "project.slk" (UNIX: "uproject.slk")  is returned.

See Also	project_add_file, project_build, project_rebuild, project_debug, project_execute, project_user1, project_user2, workspace_open, project_compile, project_edit, project_load, new, workspace_insert, workspace_dependencies, workspace_set_active, workspace_properties, workspace_close


_project_get_section

_str _project_get_section( [_str default_value])

Return	Returns default_value specified if a project file is open.  If no project file is open, the extension of the MDI child edit window with leading '.' is returned.

See Also	project_build, project_rebuild, project_debug, project_execute, project_user1, project_user2, workspace_open, project_compile, project_edit, project_load, new, workspace_insert, workspace_dependencies, workspace_set_active, workspace_properties, workspace_close


project_load

_command void project_load()

"Project", "Load Files..."

Remarks	List files in the current project and lets you quickly edit one or more.

See Also	project_add_file, project_build, project_rebuild, project_debug, project_execute, project_user1, project_user2, workspace_open, project_compile, project_edit, project_load, new, workspace_insert, workspace_dependencies, workspace_set_active, workspace_properties, workspace_close


project_make

_command int project_make()

Ctrl+M, or "Build", "Build"

Remarks	This command is exactly the same as the project_build command.


project_user1

_command int project_user1()

"Project", "User", "User 1"

Remarks	Executes a user defined command.    The command may be specified per project or per file extension.  Parts of the buffer name may be parsed into the command before it is executed.    To define an extension based project command, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...") select the extension and press the Project button. Use the new command ("Project", "New...") to create a new workspace or project.  Once a project is open, you can use the Tools Tab ("Project", "Project Properties...", select Tools Tab) to modify project commands, files, and other project setup information.  If the current project has a rebuild command defined, the extension specific project compile command will be ignored.

Returns	Returns 0 if command queued successfully.  On error, message is displayed.

See Also	project_add_file, project_build, project_rebuild, project_debug, project_execute, project_user1, project_user2, workspace_open, project_compile, project_edit, project_load, new, workspace_insert, workspace_dependencies, workspace_set_active, workspace_properties, workspace_close


project_user2

_command int project_user2()

"Project", "User", "User 2"

Remarks	Executes a user defined command.    The command may be specified per project or per file extension.  Parts of the buffer name may be parsed into the command before it is executed.    To define an extension based project command, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...") select the extension and press the Project button. Use the new command ("Project", "New...") to create a new workspace or project.  Once a project is open, you can use the Tools Tab ("Project", "Project Properties...", select Tools Tab) to modify project commands, files, and other project setup information.  If the current project has a resource editor command defined, the extension specific project compile command will be ignored.

Returns	Returns 0 if command queued successfully. On error, message is displayed.

See Also	project_add_file, project_build, project_rebuild, project_debug, project_execute, project_user1, project_user2, workspace_open, project_compile, project_edit, project_load, new, workspace_insert, workspace_dependencies, workspace_set_active, workspace_properties, workspace_close


project_rebuild

_command int project_rebuild()

Shift+F10 or "Project", "Rebuild"

Remarks	Executes a user defined rebuild command.    The rebuild command may be specified per project or per file extension.  Parts of the buffer name may be parsed into the compile command before it is executed.    To define an extension based project command, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...") select the extension and press the Project button.   You will probably want your build command based on the current project and not the current extension. Use the new command ("Project", "New...") to create a new workspace or project.  Once a project is open, you can use the Tools Tab ("Project", "Project Properties...", select Tools Tab) to modify project commands, files, and other project setup information.  If the current project has a compile command defined, the extension specific project compile command will be ignored.

The rebuild command is executed in Visual SlickEdit's concurrent process buffer by default.

Returns	Returns 0 if command queued successfully.  However, this does not mean that the command will execute successfully.  A non-zero return code means that the concurrent process buffer was not created.  Common error codes are: TOO_MANY_SELECTIONS_RC, TOO_MANY_FILES_RC, CANT_FIND_INIT_PROGRAM_RC, ERROR_CREATING_SEMAPHORE_RC, TOO_MANY_OPEN_FILES_RC, NOT_ENOUGH_MEMORY_RC, ERROR_CREATING_QUEUE_RC, INSUFFICIENT_MEMORY_RC, and ERROR_CREATING_THREAD_RC. On error, message is displayed.

See Also	project_add_file, project_build, project_rebuild, project_debug, project_execute, project_user1, project_user2, workspace_open, project_compile, project_edit, project_load, new, workspace_insert, workspace_dependencies, workspace_set_active, workspace_properties, workspace_close


project_usertool

_command int project_usertool(_str ToolName)

Remarks	Executes a user defined project command.  User tools start with "usertool_".  Check the project file (.vpj) for the exact name of a particular tool.

Returns	Returns 0 if command queued successfully.  On error, message is displayed.

See Also	project_add_file, project_build, project_rebuild, project_debug, project_execute, project_user1, project_user2, workspace_open, project_compile, project_edit, project_load, new, workspace_insert, workspace_dependencies, workspace_set_active, workspace_properties, workspace_close


prompt

_str prompt(_str immed_return_value [,_str msg [,_str default_value [_str cursor_placement]]]])

immed_return_value	Defaults to ''

msg	Defaults to the name of the last command (_command) called

default_value	Defaults to ''

cursor_placement	Defaults to ''

Remarks	If the value of the macro variable "def_prompt" is not 0, this function displays msg and prompts for a single argument to a command.  default_value may be specified as the user's default input response.  The users response is returned.  If the user has selected to abort, execution is stopped unless a menu is currently displayed on screen.  If immed_return_value is given and not '', its value is immediately returned.

If the value of the macro variable "def_prompt" is 0, this function places msg followed by default_value on the command line and stops.  If immed_return_value is given and not '', its value is immediately returned.

See Also	letter_prompt, get_string


prompt_cd

_command void prompt_cd()

Remarks	Used in EMACS emulation.  Displays the current directory and prompts for a directory to change to using the command line.

See Also	gui_cd


prompt_dir

_command void prompt_dir()

Remarks	Used in EMACS emulation.  This command is identical to the dir command except that no arguments are accepted and this command always prompts for a directory on the command line.

See Also	fileman


prompt_for_key

int prompt_for_key(_str prompt, int &keytab_used, _str &k, _str &keyname [,'R'|'M'])

Remarks	Prompts the user on the command line for a key sequence.  Returns non-zero number if the user presses a cancel key.  keytab_used is set to the index of the last key table referenced.  k is set to the last key of the sequence.  keyname is set to the displayable sequence of keys pressed.  The 'R' and 'M' options force the root or mode key table to be used.

Return	Returns 0 if successful.  Otherwise COMMAND_CANCELLED_RC is returned.


prompt_load

_command void prompt_load()

Remarks	Prompts for a Slick-C macro module to compile (if necessary) and load.  If the module is already loaded, it is replaced.  Used in Brief emulation.

See Also	unload, load, gui_load


psearch

int [wid_expression.]psearch(_str string, _str options)

Applies To	Edit Window, Editor Control

Remarks	Search function used as input to the process_list procedure.  Uses search built-in to search for string in specified search options.  See search built-in for options allowed.

Return	Returns 0 if the search string specified is found.  Common return codes are STRING_NOT_FOUND_RC, INVALID_OPTION_RC, and INVALID_REGULAR_EXPRESSION_RC.  On error, message is displayed.


pselect_word

int [wid_expression.]pselect_word(_str mark )

Applies To	Edit Window, Editor Control

Remarks	Sets the mark specified to contain the text from the cursor position to the end of the current or next word.

Return	Returns 0 if successful.  Non-zero value indicates that there is no word at the cursor.


ptab

void [wid_expression.]ptab('-' )

Applies To	Edit Window, Editor Control

Remarks	Moves the cursor to the next tab stop, or the previous tab stop if the '-' option is specified.  If the current buffer has a Syntax Indent amount, this amount is used for tabbing.  Otherwise, the tab stops are used (see tabs command).  The Syntax Indent can be modified with the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").


push_bookmark

_command int [wid_expression.]push_bookmark()

"Edit", "Push Bookmark"

Applies To	Edit Window

Remarks	Creates a book mark at the cursor and places it on a stack.  After calling this command you may move the cursor within the same file or another file and restore your original cursor position by invoking the pop_bookmark command (Ctrl+, or "Search", "Pop Bookmark").  The name of the new bookmark created is displayed.  You may use the goto_bookmark command ("Search", "Go to bookmark...") to go to any book mark created by this command.

Return	Returns 0 if successful.

See Also	pop_bookmark, set_bookmark, sb, goto_bookmark, gb


_push_button

int [wid_expression.]_push_button( [int Nofstates [,_str new_value]] )

Applies To	Picture Box, Image

Remarks	Called after an lbutton_down event to give the effect of pushing a command button.  The p_value property is temporarily set to the next state.  You can specify the new_value to select the temporary button state.  This function is typically called for 2 state pictures (p_Nofstates==2).  You can specify a different number of states than the p_Nofstates property by specifying the Nofstates parameter.

Return	Returns 1 if the button is pressed and released while the mouse pointer was within the window.  Otherwise, 0 is returned.


push_clipboard_itype

int push_clipboard_itype(_str mark_kind )

Remarks	Starts a new clipboard entry of type mark_kind.  mark_kind may be 'LINE', 'BLOCK', or 'CHAR'.

Return	Returns 0 if successful.


push_tag

_command int push_tag( _str tag_name )

Ctrl+.

Applies To	Edit Window

Remarks	The push_tag command pushes a bookmark at the cursor position and places the cursor on the source code for tag_name.  Use the pop_bookmark command (Ctrl+,) to return to the previous bookmark.  If tag_name is not specified, the word at the cursor is used.  To create or modify a tag file, use the Tag Files dialog box ("Search", "Tag Files...").  Your tag files will automatically be updated when you make edits.  The SPACE BAR and '?' keys may be used to complete the tag name.  For those of you working in case sensitive languages, you may (we like it the ways it is) want to make tag name searching case sensitive.  The command "set-var def-ignore-tcase 0" will force all tag name searching to be case insensitive.  Currently the C, C++, Pascal, REXX, AWK, Modula-2, dBASE, COBOL, FORTRAN, Ada, and Assembly languages are supported.  Use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...") to install support for Modula-2, dBASE, COBOL, FORTRAN, and Ada.  See "tags.e" for information on adding support for other languages.

See Also	make_tags, find_proc, gui_make_tags, f, list_tags


_push_tag_form

_form _push_tag_form

Syntax	_str show('_pushtag_form')

Remarks	Displays Go To Definition dialog box which allows you to select a tag to go to.

Return	Returns '' if the dialog box was cancelled.  Otherwise, the tag selected is returned.  Use the push_tag function to go to the tag.


put

int put(_str filename | '-p' )

Applies To	Edit Window

Remarks	Writes selection to filename specified.  The -p option selects to write the selection to the print using the default print options.  The default printer options may be set with the Print Setup dialog box ("File", "Print...", press "Setup..." button) and the Print dialog box ("File", "Print...").

Return	Returns 0 if successful.  Common return codes are TEXT_NOT_SELECTED_RC, and TOO_MANY_SELECTIONS_RC.  On error, message is displayed.

See Also	gui_write_selection, get, gui_append_selection, append


q

_command q()

See quit command.


qreplace

int qreplace(_str search_string, _str replace_string, _str options [,_str orig_cursor_pos_mark])

Applies To	Edit Window

Remarks	Searches from cursor position for search_string and replaces matches with replace_string.  This procedure supports the same options as the replace command.  Unlike the replace command, this procedure does not use any default options not specified by the options parameter and requires the search_string, replace_string, and options parameters to be given.  The options argument is a string of one or more of the following:

E	Exact case.

I	Ignore case.

-	Reverse search.

M	Limit search to marked area.

V	Preserve case. When specified, each occurrence found is checked for all lower case, all upper case, first word capitalized or mixed case.  The replace string is converted to the same case as the occurrence found excepted when the occurrence found is mixed case (possibly mulltiple capitalized words).  In this case, the replace string is used without modification.

<	If found, position cursor at beginning of word.

>	If found, position cursor at end of word.

*	Make changes without prompting.

R	Interprets string1 to be a MicroEdge regular expression.  String2 may specify tagged expressions with a pound followed by a group number 0-9.  Count the left braces '{' to determine a group number.  The first tagged expression is "#0".  See MicroEdge Regular Expressions.

U	Interpret string as a UNIX regular expression.   See section UNIX Regular Expressions. String2 may specify tagged expressions with a backslash followed by a group number 0-9.  Count the left parenthesis '(' to determine a group number.  The first tagged expression is "\1" and the last tagged expression is "\9".  See UNIX Regular Expressions.

B	Interpret string as a Brief regular expression.   See section Brief Regular Expressions. String2 may specify tagged expressions with a backslash followed by a group number 0-9.  Count the left braces '{' to determine a group number.  The first tagged expression is "\0".  See Brief Regular Expressions.

H	Search through hidden lines.

N	Do not interpret search string as a regular search string.

P	Wrap to beginning/end when string not found.

W	Limits search to words.  Used to search and replace variable names.

W=MicroEdge-regular-expression

Specifies the valid characters in a word.  The default value is [A-Za-z0-9_$]

W:P	Limits search to word prefix.  For example, searching for "pre" matches "pre" and "prefix" but not "supreme" or "supre".

W:PS	Limits search to strict word prefix.  For example, searching for "pre" matches "prefix" but not "pre", "supreme" or "supre".

W:S	Limits search to word suffix.  For example, searching for "fix" matches "fix" and "sufix" but not "fixit".

W:SS	Limits search to strict word suffix.  For example, searching for "fix" matches "sufix" but not "fix" or "fixit".

Y	Binary search.  This allows start positions in the middle of a DBCS character (only effects Japanese operating systems).  This option is useful when editing binary files which may contain characters which look like DBCS but are not.

,	Delimeter to separate ambiguous options.

XCCLetters	Requires the first character of search string NOT be one of the color coding elements specified. For example, "XCS" requires that the first character not be in a comment or string. CCLetters is a string of one or more of the following color coding element letters:

O	Other

K	Keyword

N	Number

S	String

C	Comment

P	Preprocessing

L	Line number

1	Symbol 1

2 	Symbol 2

3 	Symbol 3

4 	Symbol 4

F	Function color

V	No save line

CCCLetters	Requires the first character of search string to be one of the color coding elements specified. See CCLetters above.

If the '*' option is not specified, you will be prompted with the message "Yes/No/Last/Go/Quit/Suspend?" for each occurrence of string1.   Press one of the following keys to take an action:

'Y' or SPACE	Make change and continue searching.

'N' or BACKSPACE	No change and continue searching.

'L' or .	Make change and stop searching.

'G' or !	Make change and change the rest without prompting.

'Q' or ESC	Exits command.  By default, the cursor is NOT restored to its original position.  If you want the cursor restored to its original position, invoke the command "set-var def-restore-cursor 1" and save the configuration.  Quit searching.

'S'	Suspend change and replace.  Invoke the resume command to re-invoke the change and replace starting from the new cursor position.  Only one level of suspend is allowed.  Therefore you must issue the resume command before you can use the suspend option in a new search and replace command.  This is an advanced option which allows you to edit the area where the string that was found any way you like, and then resume the command.

Ctrl+G	Exits command and restores cursor to its original position.

Ctrl+R	Searches in reverse for next occurrence of search string.

Ctrl+S	Searches forward for next occurrence of search string.

Ctrl+T	Toggles regular expression pattern matching on/off.  The key bound to the BRIEF emulation command re_toggle will also toggle regular expression pattern matching.  See section Regular Expressions for more information.

Ctrl+W	Toggles word searching on/off.  To change the word characters for a specific extension, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").

Ctrl+C	Toggles case sensitivity.  The key bound to the BRIEF emulation command CASE_TOGGLE will also toggle the case sensitivity.

Ctrl+M	Toggles searching within mark.

F1 or '?'	Displays help on C command.

The optional orig_cursor_pos_mark argument is a selection handle which specifies the text position where the cursor position should be restored if Ctrl+G is pressed to terminate the search.

Return	Returns 0 if search string found and search & replace not cancelled.  Common return codes are COMMAND_CANCELLED_RC, STRING_NOT_FOUND_RC, TOO_MANY_SELECTIONS_RC, INVALID_REGULAR_EXPRESSION_RC, and INVALID_OPTION_RC.  On error, message displayed.  The global variable "_Nofchanges" is set to the number of occurrences changed.

See Also	qsearch, find, replace, gui_find, gui_replace, find_next, find_prev


_QROffset

long [wid_expression.]_QROffset()

Applies To	Edit Window, Editor Control

Return	Returns the number of bytes before the cursor.  Non-savable lines (lines with the NOSAVE_LF flag set) are not included. This method is intended for dealing with disk seek position. However, if you have changed the load options to translate files when they are openned, these offsets will not match what is on disk.

See Also	goto_point, point, _QROffset, _GoToROffset


_QReadOnly

boolean [wid_expression.]_QReadOnly()

Applies To	Edit Window, Editor Control

Return	Returns the 1 if the editing is allowed for this buffer.

See Also	p_readonly_set_by_user, p_ReadOnly, p_readonly_mode, p_ProtectReadOnlyMode, _QReadOnly, vsQReadOnly


qsearch

int qsearch(_str options [,_str incremental])

Applies To	Edit Window

Remarks	Prompts for a string to search for.  The options are the same as those supported by the find command and are displayed in a more English-like form in the message prompt.  Unlike the find command, this function does not use any default options not specified by the options parameter and always prompts for the search string argument so that no delimiters are required.  The options argument is a string of one or more of the following:

E	Exact case.

I	Ignore case.

-	Reverse search.

M	Limit search to marked area.

<	If found, place cursor at beginning of word.

>	If found, place cursor at end of word.

R	Interpret string as a MicroEdge regular expression.  See section MicroEdge Regular Expressions for syntax of regular expression.

U	Interpret string as a UNIX regular expression.   See section UNIX Regular Expressions.

B	Interpret string as a Brief regular expression.   See section Brief Regular Expressions.

H	Search through hidden lines.

N	Do not interpret search string as a regular search string.

P	Wrap to beginning/end when string not found.

W	Limits search to words.  Used to search for variables.

W=MicroEdge-regular-expression

Specifies the valid characters in a word.  The default value is [A-Za-z0-9_$].  To change the word characters for a specific extension, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").

W:P	Limits search to word prefix.  For example, searching for "pre" matches "pre" and "prefix" but not "supreme" or "supre".

W:PS	Limits search to strict word prefix.  For example, searching for "pre" matches "prefix" but not "pre", "supreme" or "supre".

W:S	Limits search to word suffix.  For example, searching for "fix" matches "fix" and "sufix" but not "fixit".

W:SS	Limits search to strict word suffix.  For example, searching for "fix" matches "sufix" but not "fix" or "fixit".

Y	Binary search.  This allows start positions in the middle of a DBCS character (only effects Japanese operating systems).  This option is useful when editing binary files which may contain characters which look like DBCS but are not.

,	Delimeter to separate ambiguous options.

XCCLetters	Requires the first character of search string NOT be one of the color coding elements specified. For example, "XCS" requires that the first character not be in a comment or string. CCLetters is a string of one or more of the following color coding element letters:

O	Other

K	Keyword

N	Number

S	String

C	Comment

P	Preprocessing

L	Line number

1	Symbol 1

2 	Symbol 2

3 	Symbol 3

4 	Symbol 4

F	Function color

V	No save line

CCCLetters	Requires the first character of search string to be one of the color coding elements specified. See CCLetters above.

While you enter the string parameter the following keys take on a new meaning:

Ctrl+R	Searches in reverse for the next occurrence of the search string

Ctrl+S	Searches forward for the next occurrence of the search string.

Ctrl+T	Toggles regular expression pattern matching on/off.  See section Regular Expressions for information on regular expressions.  The key bound to the BRIEF emulation command re_toggle will also toggle regular expression pattern matching.

Ctrl+W 	Toggles word searching on/off.  To change the word characters for a specific extension, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").

Ctrl+C	Toggles case sensitivity.  The key bound to the BRIEF emulation command case_toggle will also toggle the case sensitivity.

Ctrl+O	Toggles incremental search mode.

Ctrl+Q	Quotes the next character typed.

A non-null value for incremental argument may be specified if you want searching to take place as the search string is entered.

Return	Returns 0 if the search string specified is found.  Common return codes are STRING_NOT_FOUND_RC, INVALID_OPTION_RC, and INVALID_REGULAR_EXPRESSION_RC.  On error, message is displayed.

See Also	qreplace, find, replace, gui_find, gui_replace


query_replace

_command void query_replace()

Applies To	Edit Window, Editor Control

Remarks	Used in EMACS emulation.

For help on regular expression, see Regular Expressions.

Prompts for search string and replace string arguments and prompts whether to replace occurrences of search with replace string.  A long search may be stopped by pressing Ctrl+Alt+Shift.  The following keys take on a different definition while entering the search string argument.

Ctrl-R	Searches in reverse for next occurrence of search string

Ctrl-S	Searches forward for next occurrence of search string

Ctrl-T	Toggles regular expression pattern matching on/off.

Ctrl-W	Toggles word searching on/off.  To change the word characters for a specific extension, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").

Ctrl-C	Toggles case sensitivity.

Ctrl-M	Toggles searching within selection.

Ctrl-Q	Quotes the next character typed.

Ctrl-O	Toggles incremental search mode.

You will be prompted with the message "Yes/No/Last/Go/Suspend?" for each occurrence of the search string.  Type the letter of the action you want to take.  The actions are:

Y or SPACE	Make change and continue searching.

N or BACKSPACE	No change and continue searching.

L or .	Make change and stop searching.

G or !	Make change and change the rest without prompting.

Q or ESC	Exits command.  By default, the cursor is NOT restored the to its original position.  If you want the cursor restored to its original position, invoke command "set-var def-restore-cursor 1" and save the configuration.

S	Suspend change and replace.  Invoke the RESUME command to reinvoke the change and replace starting from the new cursor position.  Only one level of suspend is allowed.  Therefore, you must issue the RESUME command before you can use the suspend option in a new search and replace command.  This is an advanced option which allows you edit the area where the string that was found any way you like and then resume the command.

Ctrl-G	Exits command and restore cursor to its original position.

Ctrl-R	Searches in reverse for next occurrence of search string

Ctrl-S	Searches forward for next occurrence of search string

Ctrl-T	Toggles regular expression pattern matching on/off.

Ctrl-W	Toggles word searching on/off.  To change the word characters for a specific extension, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").

Ctrl-C	Toggles case sensitivity.

Ctrl-M	Toggles searching within mark.

F1 or ?	Displays help on replace command.

See Also	reverse_regex_search, replace_string, reverse_i_search, find, replace, gui_find, gui_replace, find_next, find_prev


quick_search

int quick_search()

Applies To	Edit Window, Editor Control

Remarks	Search for word at cursor or selection.

Return	Returns 0 if the search string is found.  Otherwise, STRING_NOT_FOUND_RC is returned..  On error, message is displayed.

See Also	qreplace, find, replace, gui_find, gui_replace


quit

_command quit()

F3 or "File", "Close"

Applies To	Edit Window

Remarks	The quit or q command, closes the current file.  When one file per window is on (default), the buffer is closed if the current window is last window displaying the buffer.  When one file per window is off, the current buffer is always closed and all windows are closed if there are no buffers left to display.  Before a buffer is deleted,  you will be prompted whether you wish to save changes to the buffer if necessary.

Return	Returns 0 if successful.  Possible return codes are 1 (concurrent process buffer must be exited), and COMMAND_CANCELLED_RC.  On error, message is displayed.


quit_error_file

void quit_error_file()

Remarks	Quits Visual SlickEdit's temporary compiler error message output file. This procedure is called before compiler error messages are redirected.


quit_file

void quit_file()

Applies To	Edit Window

Remarks	Deletes the current buffer.  This function is a hook function and may be replaced.


quit_view

_command void [wid_expression.]quit_view()

Applies To	Edit Window, Editor Control

Remarks	For an explanation of how windows,  views, and buffers are related, see section Windows Structure.

WARNING:  This command  intended only for debugging macros.  Do not bind this command to a key.

Removes view of current buffer from active window.  If there are no more views in the active window, it is deleted and the previous window becomes active.  quit_view does not delete buffers.  Use the _delete_buffer function to delete a buffer.


_quit_view

void [wid_expression.]_quit_view()

Applies To	Edit Window, Editor Control

Remarks	For an explanation of how windows,  views, and buffers are related, see section Windows Structure.

Removes view of current buffer from active window.  If there are no more views in the active window, it is deleted and the previous window becomes active.  _quit_view does not delete buffers any more.  Use the _delete_buffer function to delete a buffer.

See Also	get_view_id, activate_view, _next_view, _prev_view, load_files, _next_window, _prev_window


_quote

_str _quote(_str string)

Returns	Quotes input string quoted in Slick-C syntax.  This function is intended to be used in macros which generate Slick-C source code.

See Also	maybe_quote_filename


quote_key

_command void quote_key()

Ctrl+Q

Remarks	Quotes the next character typed.  If a non-ASCII key is typed, a Visual SlickEdit binary key string is inserted.  Useful for entering printer codes into a file such as Ctrl+L into a file.


rbutton_double_click

event rbutton_double_click

Remarks	Occurs when the right mouse button is double clicked.


rbutton_down

event rbutton_down

Remarks	Occurs when the right mouse button is pressed.  The rbutton_up event occurs when the right button is released.


rbutton_triple_click

event rbutton_triple_click

Remarks	Occurs when the right mouse button is triple clicked.


rbutton_up

event rbutton_up

Remarks	Occurs when the right button is released.


rc

typeless rc

Remarks	rc is a global variable that is automatically defined by the Slick-C translator.  We have shifted the Slick-C language away from needing this variable.  However, there are still a few functions such as buf_match, and get_env which requires its use for error checking.  Many other functions set the rc variable, but we have not documented them to prevent unnecessary use of the rc variable.  See also Error handling and the RC Variable.


_rc_keys_form

_form _rc_keys_form

Syntax	_str show('_rc_keys_form')

Remarks	Displays the Redefine Common Keys dialog box.

Return	Returns '' if the dialog box is cancelled.  Otherwise 1 is returned.


re_toggle

_command void re_toggle()

Applies To	Edit window, Editor control

Remarks	Toggles regular expression searching on/off.  Effects command line style BRIEF emulation search commands.    Used in BRIEF emulation.

See Also	case_toggle


re_search

_command void re_search( ["on"|"off"] )

Applies To	Edit window, Editor control

Remarks	Sets the default search pattern sensitivity to regular or non-regular expression for command line search commands.  Does not affect the i_search or reverse_i_search commands.  If no argument is given the current setting is displayed on the command line for editing.  Used in BRIEF emulation.

See Also	replace, find, i_search, reverse_i_search, search_case, re_toggle, case_toggle, search_forward, search_backward, translate_forward, translate_backward, translate_again, search_again.


read_ahead

void read_ahead()

Applies To	Edit Window

Remarks	Reads the number of lines specified in the variable "def_read_ahead_line" after the cursor when the disk is read.


read_ahead_flush_repeats

void read_ahead_flush_repeats(_str key)

Applies To	Edit Window

Remarks	Avoids excessive key stroke type ahead when scrolling down by flushing repeats of key, and anticipating read ahead when disk is read.


read_behind

void read_behind()

Applies To	Edit Window

Remarks	Reads the number of lines specified in the variable "def_read_ahead_line" before the cursor when the disk is read.


read_behind_flush_repeats

void read_behind_flush_repeats(_str key)

Applies To	Edit Window

Remarks	Avoids excessive key stroke type ahead when scrolling up by flushing repeats of key, and anticipating read ahead when disk is read.


read_format_line

int [wid_expression.]read_format_line()

Applies To	Edit Window

Return	Returns non-zero value and sets tab and word wrap options if format line is present.  See section Format Line for more information.

See Also	update_format_line


read_list

int read_list(_str filename)

Applies To	Edit Window

Remarks	Appends the list specified to the current file.  All columns are updated to the current file info.  Files read by this command can be written using write_list, put, or any save command.  A file list of absolute or relative file names starting in column one is accepted.  This command is intended to be used when in fileman mode.

Return	Returns 0 if successful.  Common return codes are FILE_NOT_FOUND_RC, and PATH_NOT_FOUND_RC.  On error, message is displayed.


read_only_mode

_command void [wid_expression.]read_only_mode( [_str off] )

Applies To	Edit Window, Editor Control

Remarks	Switches to read only mode.  While in read only mode, you will not be able to modify the current buffer by a command which modifies text.  If the off  parameter is specified and not "", read only mode is turned off.

See Also	fundamental_mode, c_mode, pascal_mode, slickc_mode, fileman_mode, read_only_mode_toggle


read_only_mode_toggle

_command void [wid_expression.]read_only_mode_toggle()

"Document", "Read Only Mode"

Applies To	Edit Window, Editor Control

Remarks	Toggles read only mode on/off.  While in read only mode, you will not be able to modify the current buffer with a command which modifies text.

See Also	fundamental_mode, c_mode, pascal_mode, slickc_mode, fileman_mode, read_only_mode


record_macro_end_execute

_command void record_macro_end_execute()

Ctrl+F12

Remarks	Ends macro recording if currently recording and executes the last recorded macro.

Displays message if a macro was defined.

See Also	start_recording, end_recording, record_macro_toggle, save_macro, gui_save_macro


record_macro_toggle

_command void record_macro_toggle()

Ctrl+F11 or "Macro", "Record Macro"

Remarks	Starts or ends definition of a keyboard macro.

Displays a message that a keyboard macro is being recorded or terminated.

See Also	start_recording, end_recording, save_macro, gui_save_macro, record_macro_end_execute


redo

_command int redo()

Ctrl+Y or "Edit", "Redo"

Remarks	If the current buffer allows more than 0 undoable steps, the last undo operation is redone.  Use the undo command to undo mistakes made while using redo.

If the current buffer has 0 undoable steps, the current line is restored to its original value before the cursor moved onto it.

Return	On successful completion, a descriptive message of what was redone is displayed and a number greater than or equal to zero is returned.  Common negative error codes are NOTHING_TO_UNDO_RC, and NOTHING_TO_REDO_RC.  On error, message is displayed.

See Also	undo, undo_steps, undo_cursor


refer_ext

_str refer_ext(_str extension)

Remarks	Returns the extension given translated or unchanged.  The Extension Options dialog box allows you to create an extension that refers to the setup of another extension.  This function performs that translation.


reflow_paragraph

_command int [wid_expression.]reflow_paragraph()

"Document", "Format Paragraph"

Applies To	Edit Window, Editor Control

Remarks	Reflows the text of the current paragraph according to the margin settings.  Paragraphs are assumed to be separated by at least one blank line.  By default, the cursor position within the paragraph is preserved.  If you want this command to place the cursor on the next paragraph after completing, invoke the command "set-var def-reflow-next 1".

Return	Returns 0 if successful.  Common return codes are 1 (buffer with mark must be active), and TOO_MANY_SELECTIONS_RC.  On error, message is displayed.

See Also	margins, gui_margins, reflow_selection, gui_justify, justify


reflow_region

_command void [wid_expression.]reflow_region()

Applies To	Edit Window, Editor Control

Remarks	Used in EMACS emulation.  Reflows the paragraphs within the highlighted text according to the left, right, and new-paragraph margin settings.  Paragraphs are assumed to be separated by at least one blank line or line containing just the characters tab, space, and form feed.

See Also	margins, reflow_paragraph


reflow_selection

_command int reflow_selection()

"Document", "Format Selection"

Applies To	Edit Window, Editor Control

Remarks	Reflows the text within the selection according to the margin settings.  Character selection is not supported.

Return	Returns 0 if successful.  Common return codes are 1 (buffer mark must be active), TOO_MANY_SELECTIONS_RC, TEXT_NOT_SELECTED_RC, and LINE_OR_BLOCK_SELECTION_REQUIRED_RC.  On error, message is displayed.

See Also	margins, gui_margins, reflow_paragraph, gui_justify, justify


_reflow_selection

int _reflow_selection(_str mark_id="" )

Applies To	Edit Window, Editor Control

Remarks	Reformats the selection specified according to the current margin settings.  If the buffer containing the specified selection is active when this function is invoked, the resulting lines are inserted after the end of the selection.  Otherwise the resulting lines are inserted after the cursor.  Character mark is not supported.    mark_id is a handle to a selection returned by one of the built-ins _alloc_selection or _duplicate_selection.  A mark_id of '' or no mark_id parameter identifies the active selection.

Return	Returns 0 if successful.  Common return codes are TEXT_NOT_SELECTED_RC, and LINE_OR_BLOCK_SELECTION_REQUIRED_RC.  On error, message is displayed.

See Also	_get_reflow_pos


refresh

void [wid_expression.]refresh( _str option='A')

Applies To	All Objects

Remarks	We recommend you call this function with no parameters unless this does not meet your needs.  This function acts as a method by forcing immediate display update of the current object.

option may be one of the following:

'A'	Update all editor controls.  This does not flush paint messages.

'W'	Flush paint messages to the current window.

'F'	This options is ignored and is present only for backward compatibility.


_refresh_scroll

void [wid_expression.]_refresh_scroll()

Applies To	Edit Window, Editor Control

Remarks	Updates p_left_edge and p_cursor_y property to make sure the cursor is in view.


regex_search

_command void [wid_expression.]regex_search()

Applies To	Edit Window

Remarks	Used in EMACS emulation.

Starts a regular expression search.  Prompts for the search string on the command line.  A long search may be stopped by pressing Ctrl+Alt+Shift.  For syntax of regular expressions see Regular Expressions.  The following keys take on a different definition while entering the regular expression argument.

Ctrl+R	Searches in reverse for next occurrence of search  string.

Ctrl+S	Searches forward for next occurrence of search string.

Ctrl+T	Toggles regular expression pattern matching on/off.

Ctrl+W	Toggles word searching on/off.  To change the word characters for a specific extension, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").

Ctrl+C	Toggles case sensitivity.

Ctrl+M	Toggles searching within mark.

Ctrl+Q	Quotes the next character typed.

Ctrl+O	Toggles incremental search mode.

See Also	reverse_regex_search, replace_string, query_replace, reverse_i_search, find, replace, gui_find, gui_replace, find_next, find_prev


regex_replace

_command void [wid_expression.]regex_replace()

Applies To	Edit Window

Remarks	Used in EMACS emulation.

Performs a regular expression search and replace.  Prompts for the search string and replace string on the command line.  A long search may be stopped by pressing Ctrl+Alt+Shift.  For syntax of regular expressions see Regular Expressions.  The following keys take on a different definition while entering the regular expression argument.

Ctrl+R	Searches in reverse for next occurrence of search  string.

Ctrl+S	Searches forward for next occurrence of search string.

Ctrl+T	Toggles regular expression pattern matching on/off.

Ctrl+W	Toggles word searching on/off.  To change the word characters for a specific extension, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").

Ctrl+C	Toggles case sensitivity.

Ctrl+M	Toggles searching within mark.

Ctrl+Q	Quotes the next character typed.

Ctrl+O	Toggles incremental search mode.

You will be prompted with the message "Yes/No/Last/Go/Suspend?" for each occurrence of the search string.  Type the letter of the action you want to take.  The actions are:

Y or SPACE	Make change and continue searching.

N or BACKSPACE	No change and continue searching.

L or .	Make change and stop searching.

G or !	Make change and change the rest without prompting.

Q or ESC	Exits command.  By default, the cursor is NOT restored the to its original position.  If you want the cursor restored to its original position, invoke command "set-var def-restore-cursor 1" and save the configuration.

S	Suspend change and replace.  Invoke the RESUME command to reinvoke the change and replace starting from the new cursor position.  Only one level of suspend is allowed.  Therefore, you must issue the RESUME command before you can use the suspend option in a new search and replace command.  This is an advanced option which allows you edit the area where the string that was found any way you like and then resume the command.

Ctrl-G	Exits command and restore cursor to its original position.

Ctrl-R	Searches in reverse for next occurrence of search string

Ctrl-S	Searches forward for next occurrence of search string

Ctrl-T	Toggles regular expression pattern matching on/off.

Ctrl-W	Toggles word searching on/off.  To change the word characters for a specific extension, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").

Ctrl-C	Toggles case sensitivity.

Ctrl-M	Toggles searching within mark.

F1 or ?	Displays help on replace command.

See Also	reverse_regex_search, regex_search, replace_string, query_replace, reverse_i_search, find, replace, gui_find, gui_replace, find_next, find_prev


reindent_line

_str [wid_expression.]reindent_line(_str line, int syntax_indent)

Applies To	Edit Window, Editor Control

Return	Returns line with leading spaces and/or tabs reformatted to adhere precisely to the users indent_with_tabs style (See indent_with_tabs command).


relative

_str relative(_str filename, _str toDir=null)

Return	Returns filename with relative path specification as if the current directory was toDir.  If toDir is null, the current directory is used.

Example

      /* Assuming current working directory is 'c:\vslick' */

      relative('c:\vslick\vs.exe') == 'vs.exe'

      relative('d:\vslick\vs.exe','d:\vslick') == 'vs.exe'

      relative('c:\autoexec.bat') == 'c:\autoexec.bat'

See Also	absolute


renumber

_command int [wid_expression.]renumber()

Applies To	Edit Window, Editor Control

Remarks	Renumbers all lines, starting with 100 and incrementing by 100.  It uses the extension specific numbering options to determine where line numbers should be placed.  In ISPF emulation, this command is not called when invoked from the command line.  Instead ispf_renumber is called.

See Also	ispf_renumber, unnumber


_remove_duplicates

void [wid_expression.]_remove_duplicates()

Applies To	Edit Window, Editor Control

Remarks	Removes duplicate adjacent lines from the current buffer.  Usually the buffer is sorted before calling this function.


repeat_search

int [wid_expression.]repeat_search( [SearchOptions, int start_col=0 )

Applies To	Edit Window, Editor Control

Remarks	Repeats a search initiated by one of the built-ins, SEARCH, or REPEAT_SEARCH.  This built-in will not repeat a search initiated with one of the search commands find, or replace (see find_next command).  SearchOptions is a string of one or more of the following option letters:

+ 	Forward search.

-	Reverse search.

<	Place cursor at beginning of string found.

>	Place cursor after end of string found.

E 	Case sensitive search.

I  	Case insensitive search.

M 	Search within visible mark.

R 	Search for regular expression.  Syntax of regular expression is described in section "MicroEdge Regular Expressions".

U	Interpret string as a UNIX regular expression.   See section UNIX Regular Expressions.

B	Interpret string as a Brief regular expression.   See section Brief Regular Expressions.

N	Do not interpret search string as a regular expression search string.

@	No error message.

W	Limits search to words.  Used to search and replace variable names.  The default word characters are [A-Za-z0-9_$].  To change the word characters for a specific extension, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").

W=MicroEdge-regular-expression

Specifies a word search and sets the default word characters to those matched by the MicroEdge-regular-expression given.

W:P	Limits search to word prefix.  For example, searching for "pre" matches "pre" and "prefix" but not "supreme" or "supre".

W:PS	Limits search to strict word prefix.  For example, searching for "pre" matches "prefix" but not "pre", "supreme" or "supre".

W:S	Limits search to word suffix.  For example, searching for "fix" matches "fix" and "sufix" but not "fixit".

W:SS	Limits search to strict word suffix.  For example, searching for "fix" matches "sufix" but not "fix" or "fixit".

Y	Binary search.  This allows start positions in the middle of a DBCS character (only effects Japanese operating systems).  This option is useful when editing binary files which may contain characters which look like DBCS but are not.

,	Delimeter to separate ambiguous options.

XCCLetters	Requires the first character of search string NOT be one of the color coding elements specified. For example, "XCS" requires that the first character not be in a comment or string. CCLetters is a string of one or more of the following color coding element letters:

O	Other

K	Keyword

N	Number

S	String

C	Comment

P	Preprocessing

L	Line number

1	Symbol 1

2 	Symbol 2

3 	Symbol 3

4 	Symbol 4

F	Function color

V	No save line

CCCLetters	Requires the first character of search string to be one of the color coding elements specified. See CCLetters above.

Any search option not specified takes on the same value as the last search executed.  The exact start column of the search may be specified by start_col.  If start_col is not given, searching continues so that the string found by the last search command is not found again.

Return	Returns 0 if successful.  Possible return codes are INVALID_OPTION_RC and STRING_NOT_FOUND_RC.  On error, message is displayed.

Example

      // While we could use a regular expression to do what this loop does, this example

      // is easy to understand.

       status=search('_command');

       for (;;) {

           if (status) break;

           if (p_col==1) {

               status=0;break;   // Found _command in column 1 */

           }

           status=repeat_search();

       }

See Also	search, _select_match, match_length, search_replace,  save_search, restore_search, _search_case


replace

_command int [wid_expression.]replace(_str string1, _str string2 [,_str options])

Applies To	Edit Window, Editor Control

Syntax	c/string1/string2[/options] or replace /string1/string2[/options]

In ISPF emulation, the replace or c command is not called when invoked from the command line.  Instead ispf_replace or ispf_c (short for ispf_change) command is invoked, respectively.  Use ("Edit", "Replace...") to explicitly invoke the replace or c command.

Remarks	The replace or c command changes occurrences of string1 with string2.  If no parameters are specified, you are prompted for the string1 and string2 parameters.  From a macro, the string1, string2, and options parameters may be passed as separate arguments which do not require any delimiters.  While you enter the string1 parameter the following keys take on a new meaning:

Ctrl+R	Searches in reverse for the next occurrence of the search string

Ctrl+S	Searches forward for the next occurrence of the search string.

Ctrl+T	Toggles regular expression pattern matching on/off.  See section Regular Expressions for information on regular expressions.  The key bound to the BRIEF emulation command re_toggle will also toggle regular expression pattern matching.

Ctrl+W 	Toggles word searching on/off.  To change the word characters for a specific extension, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").

Ctrl+C	Toggles case sensitivity.  The key bound to the BRIEF emulation command case_toggle will also toggle the case sensitivity.

Ctrl+M	Toggles searching within mark.

Ctrl+O	Toggles incremental search mode.

Ctrl+Q	Quotes the next character typed.

The First non blank character is used as the delimiter.  The options argument is a string of one or more of the following:

E	Exact case.

I	Ignore case.

-	Reverse search.

M	Limit search to marked area.

V	Preserve case. When specified, each occurrence found is checked for all lower case, all upper case, first word capitalized or mixed case.  The replace string is converted to the same case as the occurrence found excepted when the occurrence found is mixed case (possibly mulltiple capitalized words).  In this case, the replace string is used without modification.

<	If found, position cursor at beginning of word.

>	If found, position cursor at end of word.

*	Make changes without prompting.

R	Interprets string1 to be a MicroEdge regular expression.  In addition, the characters \ and # take on new meaning in the replace string.  See MicroEdge Regular Expressions.

U	Interpret string as a UNIX regular expression.   See section UNIX Regular Expressions.

B	Interpret string as a Brief regular expression.   See section Brief Regular Expressions.

H	Search through hidden lines.

N	Do not interpret search string as a regular search string.

P	Wrap to beginning/end when string not found.

W	Limits search to words.  Used to search and replace variable names.  To change the word characters for a specific extension, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").

W=MicroEdge-regular-expression

Specifies the valid characters in a word.  The default value is [A-Za-z0-9_$]

W:P	Limits search to word prefix.  For example, searching for "pre" matches "pre" and "prefix" but not "supreme" or "supre".

W:PS	Limits search to strict word prefix.  For example, searching for "pre" matches "prefix" but not "pre", "supreme" or "supre".

W:S	Limits search to word suffix.  For example, searching for "fix" matches "fix" and "sufix" but not "fixit".

W:SS	Limits search to strict word suffix.  For example, searching for "fix" matches "sufix" but not "fix" or "fixit".

Y	Binary search.  This allows start positions in the middle of a DBCS character (only effects Japanese operating systems).  This option is useful when editing binary files which may contain characters which look like DBCS but are not.

,	Delimeter to separate ambiguous options.

XCCLetters	Requires the first character of search string NOT be one of the color coding elements specified. For example, "XCS" requires that the first character not be in a comment or string. CCLetters is a string of one or more of the following color coding element letters:

O	Other

K	Keyword

N	Number

S	String

C	Comment

P	Preprocessing

L	Line number

1	Symbol 1

2 	Symbol 2

3 	Symbol 3

4 	Symbol 4

F	Function color

V	No save line

CCCLetters	Requires the first character of search string to be one of the color coding elements specified. See CCLetters above.

If the '*' option is not specified, you will be prompted with the message "Yes/No/Last/Go/Quit/Suspend?" for each occurrence of string1.   Press one of the following keys to take an action:

'Y' or SPACE	Make change and continue searching.

'N' or BACKSPACE

No change and continue searching.

'L' or .	Make change and stop searching.

'G' or !	Make change and change the rest without prompting.

'Q' or ESC	Exits command.  By default, the cursor is NOT restored to its original position.  If you want the cursor restored to its original position, invoke the command "set-var def-restore-cursor 1" and save the configuration.

'S'	Suspend change and replace.  Invoke the resume command to re-invoke the change and replace starting from the new cursor position.  Only one level of suspend is allowed.  Therefore you must issue the resume command before you can use the suspend option in a new search and replace command.  This is an advanced option which allows you to edit the area where the string that was found any way you like and then resume the command.

Ctrl+G	Exits command and restores cursor to its original position.

Ctrl+R	Searches in reverse for next occurrence of search string.

Ctrl+S	Searches forward for next occurrence of search string.

Ctrl+T	Toggles regular expression pattern matching on/off.  The key bound to the BRIEF emulation command re_toggle will also toggle regular expression pattern matching.  See section Regular Expressions for more information.

Ctrl+W	Toggles word searching on/off.

Ctrl+C	Toggles case sensitivity.  The key bound to the BRIEF emulation command case_toggle will also toggle the case sensitivity.

Ctrl+M	Toggles searching within mark.

F1 or '?'	Displays help on replace command.

Default search options may be set by the Search Tab ("Tools", "Configuration", "General...", select Search Tab).

No space character is needed between the 'C' and the '/' delimiter UNLESS you use a delimiter other than '/'.  You may use any character except space as the delimiter.  For example, "c $/$\$" replaces occurrences of forward slashes to back slashes.

Command Line Examples

c/x/y/m	Replace occurrences of x in the marked area with y using default search case sensitivity.

c $x$y$m	Replace occurrences of x in the marked area with y using default search case sensitivity.  The string delimiter $ has been used requiring a space character after the C.

c/x/y/e*	Replace lower case occurrences of x with y without prompting.

c/i/something_more_meaningful/w

Replace occurrences of the variable i with something_more_meaningful

c/i/j/w=[A-Za-z]	Replace occurrences of the word i with j and specify valid characters in a word to be alphabetic.

c/{if|while}/x\0y\1/r

Replaces occurrences of if and while with xify and xwhiley.  Unmatched groups are null.  Note the \1 is replaced with null.

c $/$\\$r	Replace forward slash with backslash.  Two backslashes represent single backslash for regular expression search and replace.

Return	Returns 0 if search string and replace not cancelled.   Common return codes are COMMAND_CANCELLED_RC, STRING_NOT_FOUND_RC, TOO_MANY_SELECTIONS_RC, INVALID_REGULAR_EXPRESSION_RC, and INVALID_OPTION_RC.  On error, message is displayed.  The universal scope variable "_Nofchanges" is set to the number of occurrences changed.

See Also	i_search, reverse_i_search, gui_replace, gui_find, find


_replace_form

_form _replace_form

Syntax	_str show('-modal _replace_form')

Remarks	Displays the Replace dialog box.

Return	Returns '' if dialog box is cancelled.   Otherwise, 1 is returned and the global variables _param1-_param5 are set as follows:

_param1	Search string

_param2	Replace string

_param3	Search options.

_param4	Files to search through.

_param5	Buffers to search through.

Example

_command gui_replace()

        name_info(','VSARG2_ EDITORCTL)

{

   _macro_delete_line()

   result=show('-modal _replace_form',arg(1))

   if (result=='') {

      return(COMMAND_CANCELLED_RC);

   }

   _macro('m',_macro('s'))

   if (_param4=='' && _param5=='') {

      _macro_call('replace2', _param1, _param2, _param3)

      return(gui_replace2(_param1, _param2, _param3))

   } else {

      if (substr(_param5,1,1)=='@' && _macro()) {

         _message_box(nls("Sorry, can't generate macro code for this operation."));

      } else {

         _macro_call('_mfreplace', _param1, _param2, _param3, _param4, _param5)

      }

      return(_mfreplace(_param1, _param2, _param3, _param4, _param5));

   }

}


replace_line

void [wid_expression.]replace_line(_str line)

Applies To	Edit Window, Editor Control

Remarks	Sets the current line of the current buffer to line.

See Also	get_line, insert_line, _delete_line


replace_name

int replace_name(int index, _str name ,_str info="", int copy_index=0)

Remarks	Replaces information for a name in the names table.  Valid types are listed in "slick.sh" and have the suffix "_TYPE".  Internal name types may not be inserted except for PICTURE_TYPE and EVENTTAB_TYPE.  If the type given is PICTURE_TYPE, name should be a filename.

Return	If successful, the index of the name table entry is returned.  Otherwise a negative error code is returned.

See Also	find_index, name_match, name_name, name_type, name_info, call_index, set_name_info, delete_name, _insert_name_list, insert_name


replace_string

_command void [wid_expression.]replace_string()

Applies To	Edit Window

Remarks	Used in EMACS emulation.

Performs a search and replace without prompting to replace each occurrence.  Prompts for the search and replace string arguments on the command line.  A long search may be stopped by pressing Ctrl+Alt+Shift.  For syntax of regular expressions see Regular Expressions.  The following keys take on a different definition while entering the regular expression argument.

Ctrl+R	Searches in reverse for next occurrence of search  string.

Ctrl+S	Searches forward for next occurrence of search string.

Ctrl+T	Toggles regular expression pattern matching on/off.

Ctrl+W	Toggles word searching on/off.  To change the word characters for a specific extension, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").

Ctrl+C	Toggles case sensitivity.

Ctrl+M	Toggles searching within mark.

Ctrl+Q	Quotes the next character typed.

Ctrl+O	Toggles incremental search mode.

See Also	reverse_regex_search, regex_replace, query_replace, reverse_i_search, find, replace, gui_find, gui_replace, find_next, find_prev


reset_next_error

_command void reset_next_error()

Remarks	Sets the next_error command's start search position to the end of the concurrent process buffer (".process").

See Also	set_next_error


_reset_retrieve

void _reset_retrieve()

Remarks	Places the cursor at the end of the ".command" retrieve buffer.


restore

_command void restore()

Remarks	Resumes the last edit session which was terminated by the safe_exit command.  The safe_exit command will save the window/buffer configuration only if auto restore is set to on.  When auto restore is on and the editor is invoked with no file or command parameters, the restore command is automatically invoked.  Use the General Tab ("Tools", "Configuration", "General...", select General Tab) to change the auto restore settings.  Visual SlickEdit stores auto restore information in the file "vrestore.slk".  You may define an environment variable called VSLICKRESTORE and assign it a path where you want Visual SlickEdit to look for this file.

See Also	auto_restore, save_window_config


_restore_draw_setup

void [wid_expression.]_restore_draw_setup(typeless setup)

Applies To	All objects except Image control

Remarks	Restores draw related properties to the values when _save_draw_setup was called.  Using a function such as _draw_rect usually requires several draw related properties to be temporarily modified.   Call the _save_draw_setup function before modifying the draw related properties and then call _restore_draw_setup to restore the original values.

See Also	_save_draw_setup


_restore_form_xy

int [wid_expression.]_restore_form_xy()

Applies To	Form

Remarks	Restores x, y window position saved by the _save_form_xy function.

Return	Returns 0 if the old (x, y) position information is found.


restore_path

_str restore_path()

Return	Returns the directory used to store auto restore files (see auto_restore command).


restore_pos

void [wid_expression.]restore_pos(typeless p)

Applies To	Edit Window, Editor Control

Remarks	Restores buffer position saved by save_pos procedure.

See Also	_restore_pos2, save_pos, _save_pos2


_restore_pos2

void _restore_pos2(typeless p)

Applies To	Edit Window, Editor Control

Remarks	Restores buffer position saved by _save_pos2 procedure.

See Also	restore_pos, _save_pos2


restore_search

void restore_search(_str search_string, int flags, _str word_re ,_str ReservedMore=null, int flags2=0)

Remarks	Restores the current search data.  The built-in function save_search may be called to return the current search data which is used by the built-in functions repeat_search, _select_match, and match_length.  Flags is a combinations of the search flags constants below (defined in "slick.sh"):

VSSEARCHFLAG_IGNORECASE

VSSEARCHFLAG_MARK

VSSEARCHFLAG_POSITIONONLASTCHAR

VSSEARCHFLAG_REVERSE

VSSEARCHFLAG_RE

VSSEARCHFLAG_WORD

VSSEARCHFLAG_UNIXRE

VSSEARCHFLAG_NO_MESSAGE

VSSEARCHFLAG_GO

VSSEARCHFLAG_INCREMENTAL

VSSEARCHFLAG_WRAP

VSSEARCHFLAG_HIDDEN_TEXT

VSSEARCHFLAG_SCROLL_STYLE

VSSEARCHFLAG_BINARYDBCS

VSSEARCHFLAG_BRIEFRE

VSSEARCHFLAG_PRESERVE_CASE

VSSEARCHFLAG_WORDPREFIX

VSSEARCHFLAG_WORDSUFFIX

VSSEARCHFLAG_WORDSTRICT

flags2 currently contains flags for color coding.  Constants are not yet defined for this.

See Also	repeat_search, _select_match, match_length, search_replace, save_search, search, _search_case


restore_selection

void restore_selection(_str mark )

Remarks	Restores the active mark (mark showing) to mark.  mark is freed.

See Also	save_selection


restore_mdi

_command void restore_mdi()

Remarks	Restores the MDI window to its size before being iconized.


restore_window

_command void [wid_expression.]restore_window()

Applies To	Edit Window

Remarks	Restores an MDI child window.


_resume

void _resume()

Remarks	Returns execution to the statement after the last _suspend.  This function is used in conjunction with _suspend to check for critical errors which halt the interpreter.  Critical errors which halt the interpreter automatically issue a _resume.  If a _suspend was issued, the following statement receives control and can check the rc variable to determine the reason for the _resume.  Before executing the _resume statement you will want to set the rc variable to a positive value to distinguish your resume codes from internal error codes which are negative.

Example

_suspend();	// rc is set to 0 by _suspend in first pass.

if (rc ) {

     if (rc==1) {	// normal return?

         return(0);

     }

     message('Please specify floating point number');

     return(1);

}

// If arg(1) is not a valid number, run time error will occur which cause _resume

f=arg(1);

++f;

// Indicate normal return

rc=1;

_resume();

See Also	_suspend


resume

_command void resume()

Remarks	Continues the last suspended search and replace.


resync

_command void resync()

Shift+F6 or "Tools", "File Compare...", "Resync"

Applies To	Edit Window

Remarks	Attempts to adjust the cursor position in two windows starting from the current cursor position of each window to the next reasonable match of buffer text.  Requires that there be exactly two windows on the screen.  Used after the compare command detects a mismatch.

See Also	compare, compare_options


retrieve_command_results

void retrieve_command_results()

Remarks	A command that operates on a single line in the text area may be extended to operate on the command line by calling init_command_op before, and retrieve_command_results after the command.  Calls to this function may not be nested.


_retrieve_list

void [wid_expression.]_retrieve_list( [_str cmdline] )

Applies To	Combo Box, List Box

cmdline is a string in the format: form_name[.ctl_name]

Remarks	Inserts text box history into list box.  When no argument is given, the history is retrieved based on the active form name and active control name (p_name).  If the cmdline argument does not contain a '.', the history is based on the active form name and cmdline specifies an alternate control name.

Example

defeventtab form1

ok.lbutton_up()

{

    // When OK button is pressed, you will want to save combo box retrieve information.

    _append_retrieve(_control combo1,combo1.p_text);

}

ok.on_create()

{

     // Fill in the combo box list

     combo1._retrieve_list();

}

See Also	_append_retrieve


retrieve_next

_command void retrieve_next()

Remarks	Moves the line position of the retrieve buffer ".command", one line down and places the contents of the line on the command line.  If the current line is the last line of the buffer, the cursor is placed on the first line and the contents of the first line are placed on the command line.  When a command is executed, the current line of the retrieve buffer becomes the last line.

See Also	retrieve_prev


_retrieve_next

void [wid_expression.]_retrieve_next()

Applies To	Command Line

Remarks	Moves the line position of the retrieve buffer ".command", one line down and places the contents of the line on the command line.  If the current line is the last line of the buffer, the cursor is placed on the first line and the contents of the first line are placed on the command line.  When execute is issued, the current line of the retrieve buffer becomes the last line.

 See Also	_retrieve_prev


_retrieve_next_form

void [wid_expression.]_retrieve_next_form()

Applies To	Form

Remarks	Retrieves the next response to check boxes, radio buttons, text boxes, and combo boxes, for the active form.  This function is used to perform dialog box retrieval and is called by the dialog manager when you press F8.

 See Also	_retrieve_prev_form, _save_form_response


retrieve_prev

_command void retrieve_prev()

Remarks	Moves the line position of the retrieve buffer ".command", one line up and places the contents of the line on the command line.  If the current line is the first line of the buffer, the cursor is placed on the last line and the contents of the last line are placed on the command line.  When a command is executed, the current line of the retrieve buffer becomes the last line.  However, the first execution of retrieve_prev after the command is executed will place the contents of the last line on the command line and not move the line position.

See Also	retrieve_next


_retrieve_prev

void [wid_expression.]_retrieve_prev()

Applies To	Command Line

Remarks	Moves the line position of the retrieve buffer ".command", one line up and places the contents of the line on the command line.  If the current line is the first line of the buffer, the cursor is placed on the last line and the contents of the last line are placed on the command line.  When the execute function is issued, the current line of the retrieve buffer becomes the last line.  However, the first execution of retrieve_prev after execute is issued will place the contents of the last line on the command line without moving the line position.

See Also	_retrieve_next


_retrieve_prev_form

void _retrieve_prev_form()

Applies To	Form

Remarks	Retrieves the previous response to check boxes, radio buttons, text boxes, and combo boxes, for the active form.  This function is used to perform dialog box retrieval and is called by the dialog manager when you press F9.

Example

#include "slick.sh"

// Create a text box with an OK command button on the form for this example

defeventtab form1

ok.on_create()

{

   _retrieve_prev_form();

}

ok.lbutton_up()

{

   _save_form_response();

   p_active_form._delete_window(0);

}

 See Also	_retrieve_next_form, _save_form_response


_retrieve_value

void [wid_expression.]_retrieve_value( [_str cmdline] )

Applies To	Combo Box, Text Box

cmdline is a string in the format: form_name[.ctl_name]

Remarks	Sets text box p_text property to value saved by  the _append_retrieve function.  When no argument is given, the history is retrieved based on the active form name and active control name (p_name).  If the cmdline argument does not contain a '.', the history is based on the active form name and cmdline specifies an alternate control name.

Example

defeventtab form1

combo1.on_destroy()

{

    // When OK button is pressed, you will want to save combo box retrieve information.

    _append_retrieve(_control combo1,combo1.p_text);

}

combo1.on_create()

{

     // Fill in the combo box list

     _retrieve_value();

}

See Also	_append_retrieve


return

return [expression]

Remarks	Returns expression to caller via global rc variable or interpreter stack.

Functions that are defined by definit and defload may not have the expression parameter.  Functions defined with a void return value may not specify the expression parameter.  See Defining a Procedure for more information.


reverse_i_search

_command void reverse_i_search()

Ctrl+Shift+I

Applies To	Edit Window

Remarks	Starts a reverse incremental search.  Searching takes place as characters are typed.  Press Ctrl+Break to terminate a long search.  The following keys take on a different definition during an incremental search:

Ctrl+R	Searches in reverse for the next occurrence of the search string

Ctrl+S	Searches forward for the next occurrence of the search string.

Ctrl+T	Toggles regular expression pattern matching on/off.  See section Regular Expressions for information on regular expressions.  The key bound to the BRIEF emulation command re_toggle will also toggle regular expression pattern matching.

Ctrl+W 	Toggles word searching on/off.  The default word characters are "A-Za-z0-9_$".  To change the word characters for a specific extension, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").

Ctrl+C	Toggles case sensitivity.  The key bound to the BRIEF emulation command case_toggle will also toggle the case sensitivity.

Ctrl+O	Toggles incremental search mode.

Ctrl+Q	Quotes the next character typed.

See Also	i_search


reverse_regex_search

_command void [wid_expression.]reverse_regex_search()

Applies To	Edit Window

Remarks	Used in EMACS emulation.

Starts a reverse regular expression search.  Prompts for the search string on the command line.  A long search may be stopped by pressing Ctrl+Alt+Shift.  For syntax of regular expressions see Regular Expressions.  The following keys take on a different definition while entering the regular expression argument.

Ctrl+R	Searches in reverse for next occurrence of search  string.

Ctrl+S	Searches forward for next occurrence of search string.

Ctrl+T	Toggles regular expression pattern matching on/off.

Ctrl+W	Toggles word searching on/off.  To change the word characters for a specific extension, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").

Ctrl+C	Toggles case sensitivity.

Ctrl+M	Toggles searching within mark.

Ctrl+Q	Quotes the next character typed.

Ctrl+O	Toggles incremental search mode.

See Also	regex_search, replace_string, query_replace, reverse_i_search, find, replace, gui_find, gui_replace, find_next, find_prev


rexx_mode

_command void [wid_expression.]rexx_mode()

Applies To	Edit Window, Editor Control

Remarks	Activates REXX file editing mode.


_rgb

int _rgb(int red, int green, int blue)

Return	Returns an RGB color used by several Slick-C functions.  The red, green, and blue parameters are numbers between 0 and 255.   The return value is ((blue<<16)|(green<<8)|red).


right

void [wid_expression.]right()

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Remarks	Moves the text cursor one position to the right.

See Also	left


right_side_of_window

void [wid_expression.]right_side_of_window()

Applies To	Edit Window, Editor Control

Remarks	Moves the cursor to the right side of the window.

See Also	left_side_of_window


rmdir

int rmdir(_str path)

Remarks	Removes directory specified by path.

Return	Returns 0 if successful.  Common return codes are PATH_NOT_FOUND_RC and ACCESS_DENIED_RC.


root_keydef

_command void root_keydef()

Remarks	Temporarily switches to fundamental mode for the next key press.  Useful for getting to a fundamental mode key binding when the current mode has changed the binding of that key.


_rubout

void [wid_expression.]_rubout()

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Remarks	Deletes character if any to left of text area cursor and moves cursor to left.  When left edge is hit, text area is smooth scrolled or center scrolled depending on the scroll style.


rubout

_command void [wid_expression.]rubout()

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Remarks	Deletes the character to left of cursor.  For an edit window or editor control, if word wrap is on, the cursor will wrap to the previous line when the left margin is hit.


run_selected

_command int run_selected()

Shift+Space

Remarks	Runs the form that is selected in the dialog editor.

Return	Returns 0 if successful.


safe_exit

_command int safe_exit()

Alt+F4 or "File", "Exit"

Remarks	Exits editor.  If any files need to be saved, the number of buffers which need to be saved is displayed and you are asked whether you want to exit any way or write them all.

Return	Exits editor if successful.  Common return codes are COMMAND_CANCELLED_RC, ACCESS_DENIED_RC, and INSUFFICIENT_DISK_SPACE_RC.  On error, message is displayed.


_safe_hidden_window

void _safe_hidden_window()

Remarks	Helps to ensure that buffer cursor positions are not lost.  Buffer positions can be lost when you switch buffers when a hidden window is active.  Before you switch buffers when the hidden window is active, call this function.


save

_command int save(_str command_line)

Ctrl+S or F2 or "File", "Save"

Applies To	Edit Window

Remarks	Writes contents of the active buffer to the file name specified.  If no file name is specified, the current buffer is used.  The save_options command may be used to specify default options for the save command.

command_line may contain an output filename and any of the following switches:

+ or -O	Overwrite destination switch (no backup).  Useful for writing a file to a device such as the printer.  Default is off.

+ or -R	UNIX only.  Save to read only file and keep file read only.

+ or -Z	Add end of file marker Ctrl+Z.  Default is on.

+ or -T	Compress saved file with tabs.  Quoted strings are left unchanged.  Always uses tab increments of 8.  Default is off.

+ or -E	Turn on/off expand tabs to spaces switch.  Default is off.

+ or -B	Binary.  Save file without carriage return, line feeds, or end of file marker.  Defaults to off.

+ or -A	Convert destination filename to absolute.  Default is on.  This option is used to write files to device names such as PRN.  For example, "save +o -a prn" sends the current buffer non-laser printer.

+DB, -DB, +D,-D,+DK,-DK

These options specify the backup style.  The default backup style is +D.  The backup styles are:

+DB, -DB	Write backup files into the same directory as the destination file but change extension to ".bak".

+D	When on, backup files are placed in a single directory.  The default backup directory is "\vslick\backup\" (UNIX: "$HOME/.vslick/backup") . You may define an alternate backup directory by defining an environment variable called VSLICKBACKUP.  The VSLICKBACKUP environment variable may contain a drive specifier. The backup file gets the same name part as the destination file.  For example, given the destination file "c:\project\test.c" (UNIX: "/project/test.c") , the backup  file will be "c:\vslick\backup\test.c" (UNIX: "$HOME/.vslick/backup/test.c").

non-UNIX platforms: For a network, you may need to create the backup directory with appropriate access rights manually before saving a file.

-D	When on, backup file directories are derived from concatenating a backup directory with the path and name of the destination file.  The default backup directory is "\vslick\backup\" (UNIX: "$HOME/.vslick").  You may define an alternate backup directory by defining an environment variable called VSLICKBACKUP.  The VSLICKBACKUP environment variable may contain a drive specifier.  For example, given the destination file "c:\project\test.c", the backup file will be "c:\vslick\backup\project\test.c" (UNIX: "$HOME/.vslick/backup/project/test.c").

non-UNIX platforms: For a network, you may need to create the backup directory with appropriate access rights manually before saving a file.

+DK,-DK	When on, backup files are placed in a directory off the same directory as the destination file.  For example, given the destination file "c:\project\test.c" (UNIX: "$HOME/.vslick"), the backup file will be "c:\project\backup\test.c" (UNIX: "/project/backup/test.c").  This option works well on networks.

The internal variable p_modify is turned off if the output filename is the same as the current file name.  If no filename is specified the current buffer name is used.

Command Line Example

save +O	Save this file but don't create a backup this one time

save +O -A +E PRN	Save a tabbed file to the printer

Return	Returns 0 if successful.  Common return codes are: INVALID_OPTION_RC, ACCESS_DENIED_RC, ERROR_OPENING_FILE_RC, ERROR_WRITING_FILE_RC, PATH_NOT_FOUND_RC, INSUFFICIENT_DISK_SPACE_RC, and DRIVE_NOT_READY_RC.  On error, message is displayed.

See Also	file, ispf_save, print, save_as


save_all

_command int save_all()

"File", "Save All"

Remarks	Saves all modified buffers.

Return	Returns 0 if successful.  Common return codes are INVALID_OPTION_RC, ACCESS_DENIED_RC, ERROR_OPENING_FILE_RC, ERROR_WRITING_FILE_RC, INSUFFICIENT_DISK_SPACE_RC, DRIVE_NOT_READY_RC, and PATH_NOT_FOUND_RC.  On error, message box is displayed.

See Also	save_all_forms


save_all_forms

_command int save_all_forms()

Remarks	Saves all modified forms currently being edited.

Return	Returns 0 if successful.  Common return codes are ACCESS_DENIED_RC, ERROR_OPENING_FILE_RC, ERROR_WRITING_FILE_RC, INSUFFICIENT_DISK_SPACE_RC, DRIVE_NOT_READY_RC, and PATH_NOT_FOUND_RC.  On error, message box is displayed.

See Also	save_all


save_as

_command int save_as(_str cmdline)

Applies To	Edit Window

cmdline is a string in the format: [-n] [-r] filename

Remarks	Saves current buffer under a name you specify.  If the -n option is not given, the buffer name is changed to the new name.  The -r option allows you to save to a file which is read only and is only supported by the UNIX version.

Return	Returns 0 if successful.  Common return codes are INVALID_OPTION_RC, ACCESS_DENIED_RC, ERROR_OPENING_FILE_RC, ERROR_WRITING_FILE_RC, INSUFFICIENT_DISK_SPACE_RC, DRIVE_NOT_READY_RC, and PATH_NOT_FOUND_RC.  On error, message box is displayed.

See Also	gui_save_as, save, name


save_config

_command int save_config()

Remarks	Updates source code representing your configuration changes.    Source code representing your configuration changes is saved in the files "vusrdefs.e" (UNIX: "vunxdefs.e"), "vusrobjs.e" (UNIX: "vunxobjs.e"), and "vusrsNNN.e" (UNIX: "vunxsNNN.e").  The state file will be saved to "vslick.sta" (UNIX: "vslick.stu") if you loaded new macro modules.  When the editor is invoked, the state file is loaded and then the source code representing your configuration changes are applied.

Return	Returns 0 if successful.  Common return codes are: COMMAND_CANCELLED_RC, ACCESS_DENIED_RC, ERROR_OPENING_FILE_RC, INSUFFICIENT_DISK_SPACE_RC, ERROR_READING_FILE_RC, ERROR_WRITING_FILE_RC, DRIVE_NOT_READY_RC, and PATH_NOT_FOUND_RC.  On error, message box displayed.

See Also	write_state, gui_save_config


_save_draw_setup

void [wid_expression.]_save_draw_setup(typeless &setup)

See Also	All objects except Image control

Remarks	Saves draw related properties.  Using a function such as _draw_rect usually requires several draw related properties to be temporarily modified.   Call the _save_draw_setup function before modifying the draw related properties and then call _restore_draw_setup to restore the original values.

See Also	_restore_draw_setup


save_exit

_command int save_exit()

Applies To	Edit Window

Remarks	Saves all modified buffers and exits the editor.

Return	Returns 0 if successful.  Common return values are 1 (must exit concurrent process buffer) COMMAND_CANCELLED_RC, ACCESS_DENIED_RC, ERROR_OPENING_FILE_RC, INSUFFICIENT_DISK_SPACE_RC, ERROR_CREATING_DIRECTORY_RC, ERROR_READING_FILE_RC, ERROR_WRITING_FILE_RC, DRIVE_NOT_READY_RC, and PATH_NOT_FOUND_RC.  On error, message is displayed.

See Also	gui_save_as, save, name


_save_file

int _save_file( _str command_line="" )

Applies To	Edit Window

Remarks	Writes current buffer to file name specified.  If no name is specified, the buffer name is used.

pszCmdLine may contain an output filename in double quotes and any of the following switches delimited with a space:

Note that since record files are saved in binary (always with the +B switch), many options have no effect.

+ or -E	Turn on/off expand tabs to spaces switch.  Default is off.

+ or -G	Turn on/off setting of all old numbers.  Default is off.  Visual SlickEdit uses old line numbers to better handle going to an error line after lines have been inserted or deleted.  We don't recommend setting the old line numbers on every save because this requires that you do not save the file until you have performed edits for all compile or multi-file search messages.  See _SetAllOldLineNumbers method for more information.

+ or -S	Strip trailing spaces on each line.  The buffer is modified if the output file name matches the buffer name.  Default is off.

+ or -CL	Check maximum line length.  Default is off.  If the destination file is requires a record length (an OS/390 data set member), lines are checked against this record length.  Otherwise, line lengths are checked against the p_MaxLineLength property.  If there are any lines that are too long, an error code is returned and a message box is displayed with a list of the offending line numbers.  At the moment only the physical line length is checked as if tab characters count as 1 character.  We may change this in the future.

+FU	Save file in UNIX ASCII format (Lines ending with just 10 character).  The buffer is modified if the output file name matches the buffer name.

+FD	Save file in DOS  ASCII format (Lines ending with 13,10).  The buffer is modified if the output file name matches the buffer name.

+FM	Save file in Macintosh ASCII format (Lines ending with just 13 character).  The buffer is modified if the output file name matches the buffer name.

+ddd	Save file without line end characters and pad or truncate lines so that each line is ddd characters in length.  Use this option to generate of fixed length record file.

+FR	Save file without line end characters.

+Fddd	Save file using ASCII character ddd as the line end character.  The buffer is modified if the output file name matches the buffer name.

+ or -B	Binary switch.  Save file exactly byte per byte as it appears in the buffer.  This option overrides all save options which effect bytes in the input or output.  This option is always on for record buffers.  Defaults to value of p_binary property for other buffers.

+ or -O	Overwrite destination switch (no backup).  Default is off.  Useful for writing a file to a device such as the printer.

+ or -T	Compress saved file with tab increments of 8.  Default is off.

+ or -ZR	Remove end of file marker (Ctrl+Z).  This option is ignored if the current buffer is not a DOS ASCII file.  The buffer is modified if the p_showeof is true and the output file name matches the buffer name.  Default is off.

+ or -Z	Add end of file marker (Ctrl+Z).  Note that if a buffer has a visible EOF character, the output file will still have an EOF character.  Use +ZR to ensure that the output file does not have and EOF character.  Default is off.

+ or -L	Reset line modify flags.  Default is off.

+ or -N	Don't save lines with the NOSAVE_LF bit set.  When the editor keeps track of whether a buffer has lines with the NOSAVE_LF bit set, we will not need this option.

+ or -A	Convert destination filename to absolute.  Default is on.  This option is currently used to write files to device names such as PRN.  For example, "_save_file +o -a +e prn" sends the current buffer to the printer.

+DB, -DB, +D,-D,+DK,-DK

These options specify the backup style.  The default backup style is +D.  The backup styles are:

+DB, -DB	Write backup files into the same directory as the destination file but change extension to ".bak".

+D	When on, backup files are placed in a single directory.  The default backup directory is "\vslick\backup\" (UNIX: "$HOME/.vslick/backup") . You may define an alternate backup directory by defining an environment variable called VSLICKBACKUP.  The VSLICKBACKUP environment variable may contain a drive specifier. The backup file gets the same name part as the destination file.  For example, given the destination file "c:\project\test.c" (UNIX: "/project/test.c") , the backup  file will be "c:\vslick\backup\test.c" (UNIX: "$HOME/.vslick/backup/test.c").

non-UNIX platforms: For a network, you may need to create the backup directory with appropriate access rights manually before saving a file.

-D	When on, backup file directories are derived from concatenating a backup directory with the path and name of the destination file.  The default backup directory is "\vslick\backup\" (UNIX: "$HOME/.vslick").  You may define an alternate backup directory by defining an environment variable called VSLICKBACKUP.  The VSLICKBACKUP environment variable may contain a drive specifier.  For example, given the destination file "c:\project\test.c", the backup file will be "c:\vslick\backup\project\test.c" (UNIX: "$HOME/.vslick/backup/project/test.c").

non-UNIX platforms: For a network, you may need to create the backup directory with appropriate access rights manually before saving a file.

+DK,-DK	When on, backup files are placed in a directory off the same directory as the destination file.  For example, given the destination file "c:\project\test.c" (UNIX: "$HOME/.vslick"), the backup file will be "c:\project\backup\test.c" (UNIX: "/project/backup/test.c").  This option works well on networks.

The p_modify property is turned off if the output filename is the same as the current file name.

Return	Returns 0 if successful.  Common return codes are: INVALID_OPTION_RC, ACCESS_DENIED_RC, ERROR_OPENING_FILE_RC, INSUFFICIENT_DISK_SPACE_RC, ERROR_READING_FILE_RC, ERROR_WRITING_FILE_RC, DRIVE_NOT_READY_RC, and PATH_NOT_FOUND_RC. On error, message displayed.

Example

      // Save the current file.

      _save_file();

      // Write current file to printer.  Compress file with tabs.

      _save_file('+o -a +e prn');


save_file

int save_file(_str filename ,_str options)

Applies To	Edit Window

Remarks	Writes current buffer to filename.  This function is a hook function that the user may replace.  Options allowed by _save_file built-in may be specified.


_save_form

_command int _save_form()

Remarks	Saves the form selected in the dialog editor.

Return	Returns 0 if successful.


_save_form_response

void [wid_expression.]_save_form_response()

Applies To	Form

Remarks	Saves the response to check boxes, radio buttons, text boxes, and combo boxes, for the active form.  Values are placed in the ".command" buffer which is saved in the auto restore file ("vrestore.slk" by default) when you exit the editor with auto restore turned on.  Call the _retrieve_prev_form function during the on_create event to initialize the form to the users previous response.  This function is used to perform dialog box retrieval.  The dialog manager automatically calls the _retrieve_prev_form and _retrieve_next_form function when you press F7 and F8 respectively.

Example

#include "slick.sh"

// Create a text box with an OK command button on the form for this example

defeventtab form1

ok.on_create()

{

   _retrieve_prev_form();

}

ok.lbutton_up()

{

   _save_form_response();

   p_active_form._delete_window(0);

}

 See Also	_retrieve_next_form, _retrieve_prev_form


_save_form_xy

void [wid_expression.]_save_form_xy()

Applies To	Form

Remarks	Saves x, y window position in the ".command" buffer.  This buffer is saved in the auto restore file ("vrestore.slk" by default) when auto restore is on.  The _restore_form_xy method may be used to restore the previous window position saved by this function.


save_macro

_command int save_macro(_str cmdline)

cmdline is a string in the format: name flag_names

Remarks	Saves the last macro recorded under the command name you specify.  The Slick-C source for the macro is appended to the "vusrmacs.e" file.  The name and flag_names strings are used to create the following command definition:

     _command name() name_info(','flag_names)

Return	Returns 0 if successful.

See Also	gui_save_macro, start_recording, end_recording, record_macro_toggle, record_macro_end_execute


save_options

_command void save_options( [_str cmdline] )

cmdline is a string in the format: [+O|-O] [+DB|-DB|+D|-D|+DK|-DK] [+Z|-Z] [+E|-E] [+S|-S]

Remarks	If you don't like using the command line, use the File Options dialog box ("Tools", "Configuration", "File Options...", select Save Tab) instead of this command.  The save_options command specifies the default options for the commands save and file.

non-UNIX platforms: If you want different save_options for different disk drives, define an environment variable called VSLICKSAVE and specify each drive followed by the options.  For example, "set VSLICKSAVE= a: +O b:+O" specifies no backup for floppy drives A and B.

The option letters have the following meaning:

+ or -O	Overwrite destination.  When on, no backup of destination file is created.  Normally a backup of the destination file is created the first time the destination file is overwritten.

+ or -Z	Add EOF character.

+ or -E	Expand tabs to spaces.

+ or -S	Strip trailing spaces on each line.

+DB, -DB, +D,-D,+DK,-DK

These options specify the backup style.  The default backup style is +D.  The backup styles are:

+DB, -DB	Write backup files into the same directory as the destination file but change extension to ".bak".

+D	When on, backup files are placed in a single directory.  The default backup directory is "\vslick\backup\" (UNIX: "$HOME/.vslick/backup") . You may define an alternate backup directory by defining an environment variable called VSLICKBACKUP.  The VSLICKBACKUP environment variable may contain a drive specifier. The backup file gets the same name part as the destination file.  For example, given the destination file "c:\project\test.c" (UNIX: "/project/test.c") , the backup  file will be "c:\vslick\backup\test.c" (UNIX: "$HOME/.vslick/backup/test.c").

non-UNIX platforms: For a network, you may need to create the backup directory with appropriate access rights manually before saving a file.

-D	When on, backup file directories are derived from concatenating a backup directory with the path and name of the destination file.  The default backup directory is "\vslick\backup\" (UNIX: "$HOME/.vslick").  You may define an alternate backup directory by defining an environment variable called VSLICKBACKUP.  The VSLICKBACKUP environment variable may contain a drive specifier.  For example, given the destination file "c:\project\test.c", the backup file will be "c:\vslick\backup\project\test.c" (UNIX: "$HOME/.vslick/backup/project/test.c").

non-UNIX platforms: For a network, you may need to create the backup directory with appropriate access rights manually before saving a file.

+DK,-DK	When on, backup files are placed in a directory off the same directory as the destination file.  For example, given the destination file "c:\project\test.c" (UNIX: "$HOME/.vslick"), the backup file will be "c:\project\backup\test.c" (UNIX: "/project/backup/test.c").  This option works well on networks.


save_pos

void [wid_expression.]save_pos(typeless &p)

Applies To	Edit Window, Editor Control

Remarks	Used for saving and restoring location within a buffer.  DO NOT use this function if you plan to modify the buffer before calling the restore_pos function.  Use the _save_pos2 function instead.  Saves buffer location information into p.  Use the restore_pos procedure to restore the location within a buffer.

See Also	restore_pos, _save_pos2, _restore_pos2


_save_pos2

void [wid_expression.]_save_pos2(typeless &p)

Applies To	Edit Window, Editor Control

Remarks	Used for saving and restoring location within a buffer.  Saves buffer location information into p.  Use the _restore_pos2 procedure to restore the location within a buffer.

See Also	restore_pos, save_pos, _restore_pos2


save_search

void save_search(_str &search_string, int &flags, _str &word_re,_str &ReservedMore="",int flags2=0)

Remarks	Saves the current search data we recommend using the ReservedMore variable to ensure all search data is restored.  For backward compatibility, the ReservedMore parameter is optional.  The built-in function restore_search is called with the same data to restore the search which is used by the built-in functions repeat_search, _select_match, and match_length.

Flags is a combination of the search flag constants below (defined in "slick.sh"):

VSSEARCHFLAG_IGNORECASE

VSSEARCHFLAG_MARK

VSSEARCHFLAG_POSITIONONLASTCHAR

VSSEARCHFLAG_REVERSE

VSSEARCHFLAG_RE

VSSEARCHFLAG_WORD

VSSEARCHFLAG_UNIXRE

VSSEARCHFLAG_NO_MESSAGE

VSSEARCHFLAG_GO

VSSEARCHFLAG_INCREMENTAL

VSSEARCHFLAG_WRAP

VSSEARCHFLAG_HIDDEN_TEXT

VSSEARCHFLAG_SCROLL_STYLE

VSSEARCHFLAG_BINARYDBCS

VSSEARCHFLAG_BRIEFRE

VSSEARCHFLAG_PRESERVE_CASE

VSSEARCHFLAG_WORDPREFIX

VSSEARCHFLAG_WORDSUFFIX

VSSEARCHFLAG_WORDSTRICT

flags2 currently contains flags for color coding.  Constants are not yet defined for this.

Example

search('test');

save_search(string, options, word_re);

status=search('xyz');

if (status) {

    messageNwait("Can't find xyz");

}

restore_search(string, options, word_re);

// Repeats search for 'test' */

repeat_search();

See Also	repeat_search, _select_match, match_length, search_replace, restore_search, search, _search_case


save_selection

int save_selection(_str &mark )

Return	Saves the active selection in the variable mark.  Returns non-zero value if a selection can not be allocated for saving the active selection.


save_view

void save_view(int &view_id)

Remarks	Stores the active view id in view_id and activates the view corresponding to the view id HIDDEN_VIEW_ID (defined in "slick.sh").  This allows macros to switch buffers without affecting the original view's cursor position information.


save_window_config

int save_window_config()

Remarks	Saves the auto restore information.  All auto restore information is stored in the "vrestore.slk" file.

Return	Returns 0 if successful.

See Also	restore, auto_restore


sb

_command int sb() ...

Applies To	Edit Window

Remarks	This function is identical to the set_bookmark command except it requires less typing.

See Also	push_bookmark, pop_bookmark, set_bookmark, gb, goto_bookmark


_screen_height

int _screen_height()

Return	Returns the pixel height of the display.


_screen_width

int _screen_width()

Return	Returns the pixel width of the display.


scroll_down

_command void [wid_expression.]scroll_down()

Applies To	Edit Window, Editor Control

Remarks	Scrolls the text page one line up.


scroll_left

_command void [wid_expression.]scroll_left()

Applies To	Edit Window, Editor Control

Remarks	Scrolls the text page one column to right.


scroll_right

_command void [wid_expression.]scroll_right()

Applies To	Edit Window, Editor Control

Remarks	Scrolls the text page one column to left.


scroll_style

_command void scroll_style( [cmdline] )

cmdline is a string in the format: [ C |S [number] ]

Remarks	Sets scroll style to center or smooth scrolling.  If no argument is given, the current value is placed on the command line for editing.  number specifies how close the cursor may get to the top or bottom of the window before scrolling occurs, default is 0.

Example

C	Specifies center scrolling when top or bottom of window is reached.

C 0	Specifies center scrolling when top or bottom of window is reached.

C 3	Specifies center scrolling when cursor is within 4 lines of the top or bottom of the window.

S 2	Specifies smooth scrolling when cursor is within 3 lines of the top or bottom of the window.


_scroll_style

_str _scroll_style( cmdline=null )

cmdline is a string in the format: C | S  [number]

Remarks	If the 'C' argument is specified the scroll style is set to center scrolling.  Otherwise, it is set to smooth scrolling.  The scroll style affects the position of the cursor for primitives which cause the cursor to move to text that is not in view.  number specifies how close the cursor may get to the top or bottom of the window before scrolling occurs.   For the bottom primitive, center scrolling style will also cause the bottom line of the buffer to be centered when the end of the bottom line is within view.  Scrolls style affects: left, right, up, down, _rubout, tab, backtab, insert_line, keyin and any macro procedure or command which executes one of these primitives.


scroll_up

_command void [wid_expression.]scroll_up()

Applies To	Edit Window, Editor Control

Remarks	Scrolls the text page one line down.


search

int [wid_expression.]search(_str search_string ,_str options="E" ,_str replace_string=null, int &Nofchanges=0 )

Applies To	Edit Window, Editor Control

Remarks	Searches for search_string specified.  If replace_string is specified, a search and replace without prompting is performed.  The number of changes is returned in the optional Nofchanges variable.  Press and hold Ctrl+Alt+Shift to terminate a long search.  Multiple search options having the following meaning may be specified:

'+' 	(Default) Forward search.

'-'	Reverse search.

'<'	(Default) Place cursor at beginning of string found.

'>'	Place cursor after end of string found.

'E' 	(Default) Case sensitive search.

'I'  	Case insensitive search.

'M' 	Search within visible mark.

'H' 	Find text in hidden lines.   Only the line contain the first character of the search string is checked.

'R' 	Search for MicroEdge regular expression.  See MicroEdge Regular Expressions.

'U'	Interpret string as a UNIX regular expression.   See section UNIX Regular Expressions.

'B'	Interpret string as a Brief regular expression.   See section Brief Regular Expressions.

'N'	(Default) Do not interpret search string as a regular search string.

'P'	Wrap to beginning/end when string not found.  Flag is set.  However, this option has no effect on this function.

'@'	No error message.

'*'	This option is ignored.

'W'	Limits search to words.  Used to search and replace variable names.  The default word characters are [A-Za-z0-9_$].  To change the word characters for a specific extension, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").

'W=MicroEdge-regular-expression'

Specifies a word search and sets the default word characters to those matched by the MicroEdge-regular-expression given.

W:P	Limits search to word prefix.  For example, searching for "pre" matches "pre" and "prefix" but not "supreme" or "supre".

W:PS	Limits search to strict word prefix.  For example, searching for "pre" matches "prefix" but not "pre", "supreme" or "supre".

W:S	Limits search to word suffix.  For example, searching for "fix" matches "fix" and "sufix" but not "fixit".

W:SS	Limits search to strict word suffix.  For example, searching for "fix" matches "sufix" but not "fix" or "fixit".

'Y'	Binary search.  This allows start positions in the middle of a DBCS character (only effects Japanese operating systems).  This option is useful when editing binary files which may contain characters which look like DBCS but are not.

','	Delimeter to separate ambiguous options.

'XCCLetters'	Requires the first character of search string NOT be one of the color coding elements specified. For example, "XCS" requires that the first character not be in a comment or string. CCLetters is a string of one or more of the following color coding element letters:

O	Other

K	Keyword

N	Number

S	String

C	Comment

P	Preprocessing

L	Line number

1	Symbol 1

2 	Symbol 2

3 	Symbol 3

4 	Symbol 4

F	Function color

V	No save line

'CCCLetters'	Requires the first character of search string to be one of the color coding elements specified. See CCLetters above.

Return	Returns 0 if the search specified is found.  Common return codes are STRING_NOT_FOUND_RC, INVALID_OPTION_RC, and INVALID_REGULAR_EXPRESSION_RC.  On error, message is displayed.

Example

     // Search and replace without prompting.

     search( 'pathsearch', '*', 'path_search', Nofchanges);

     messageNwait(Nofchanges' changes');

     // Search and replace without prompting within the marked area.

     search('pathsearch', '*M', 'path_search');

See Also	qreplace, repeat_search, _select_match, match_length, search_replace, save_search, restore_search, _search_case, _SearchInitSkipped, _SearchQSkipped, _SearchQNofSkipped


search_again

void [wid_expression.]search_again()

Applies To	Edit Window, Editor Control

Remarks	Used in BRIEF emulation.  Repeats the last search performed by any search command.  The string found is highlighted for 4 seconds or until a key is pressed.

See Also	replace, find, i_search, reverse_i_search, search_case, case_toggle, re_search, re_toggle, search_forward, translate_forward, translate_backward, translate_again, search_backward


search_backward

void [wid_expression.]search_backward()

Applies To	Edit Window

Remarks	For help on regular expressions see Regular Expressions.

Used in BRIEF emulation.  Prompts for a string to search backward for.  The case_toggle and re_toggle commands may be used to set the default case sensitivity and pattern sensitivity for the next search.  You may toggle regular expression searching, the case sensitivity, searching within mark, incremental searching, and the searching direction while you are being   prompted for the search argument.  The following keys change there meaning when you are being prompted for the search string:

Ctrl-R	Searches in reverse for next occurrence of search string

Ctrl-S	Searches forward for next occurrence of search string

Ctrl-T	Toggles regular expression pattern matching on/off. The key bound to the command re_toggle will also toggle regular expression pattern matching.

Ctrl-W	Toggles word searching on/off.  To change the word characters for a specific extension, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").

Ctrl-C	Toggles case sensitivity.  The key bound to the command case_toggle will also toggle the case sensitivity.

Ctrl-M	Toggles searching within selection.

Ctrl-Q	Quotes the next character typed.

Ctrl-O	Toggles incremental search mode.

See Also	replace, find, i_search, reverse_i_search, search_case, case_toggle, re_search, re_toggle, search_forward, translate_forward, translate_backward, translate_again, search_again


search_case

_command void search_case( ['E'|'I'] )

Remarks	Sets the default search case sensitivity used by all search commands to exact or ignore case.  If no argument is given, the current setting is displayed on the command line for editing.  'E' specifies case sensitive searching by default. 'I' specifies case insensitive searching by default.


_search_case

_str _search_case(['E'|'I'])

Remarks	Gets and/or sets the default search case sensitivity to exact or ignore case and returns current case sensitivity.  'E' specifies case sensitive searching by default.  'I' specifies case insensitive searching by default.  The built-in search command will default to this case unless the 'E' or 'I' is specified to override the default.

See Also	repeat_search, _select_match, match_length, search_replace, save_search, restore_search, search


search_for_error

int search_for_error()

Remarks	Searches the current buffers for lines that match one of the regular expressions contained in the variables "def_error_re" or "def_error_re2".  The procedure parse_error parses out parts of the match found by this procedure.  Create your own search_for_error and parse_error procedures to enhance error message recognition and place them in a new module.   Creating a new module avoids problems when updating to new versions of Visual SlickEdit.

Return	Returns 0 if error found in current buffer.

See Also	parse_error, or_re


search_for_proc

_str search_for_proc(_str module_name, _str proc_name)

Applies To	Edit Window

Remarks	Performs a path search for module_name, loads module, and searches for procedure or command with name proc_name placing the cursor on the definition

Return	Returns 0 if successful.  Otherwise a string message is returned explaining the reason for failure.


_search_form_xy

void _search_form_xy(int form_wid, int buf_wid)

Remarks	Used to position the Prompt Replace dialog box and Spelling dialog box so that it does not overlap the line with an occurrence found.  If you have a similar dialog box, use this function.  form_wid is the window id of the dialog box form.  buf_wid is the window id of the window which displays the buffer.


search_forward

void [wid_expression.]search_forward()

Applies To	Edit Window

Remarks	For help on regular expressions see Regular Expressions.

Used in BRIEF emulation.  Prompts for a string to search forward for.  The case_toggle and re_toggle commands may be used to set the default case sensitivity and pattern sensitivity for the next search.  You may toggle regular expression searching, the case sensitivity, searching within mark, incremental searching, and the searching direction while you are being   prompted for the search argument.  The following keys change there meaning when you are being prompted for the search string:

Ctrl-R	Searches in reverse for next occurrence of search string

Ctrl-S	Searches forward for next occurrence of search string

Ctrl-T	Toggles regular expression pattern matching on/off. The key bound to the command re_toggle will also toggle regular expression pattern matching.

Ctrl-W	Toggles word searching on/off.  To change the word characters for a specific extension, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").

Ctrl-C	Toggles case sensitivity.  The key bound to the command case_toggle will also toggle the case sensitivity.

Ctrl-M	Toggles searching within selection.

Ctrl-Q	Quotes the next character typed.

Ctrl-O	Toggles incremental search mode.

See Also	replace, find, i_search, reverse_i_search, search_case, case_toggle, re_search, re_toggle, search_backward, translate_forward, translate_backward, translate_again, search_again


_SearchInitSkipped

void _SearchInitSkipped(int MustBeZero)

Applies To	Edit Window

Remarks	When the p_TruncateLength is non-zero, replace operations are skipped in the resulting line becomes longer than the truncation length.  This function is used in conjunction with _SearchQNofSkipped and _SearchQSkipped to return information about what was skipped.  Call this function before performing a search and replace operation to reset NofSkipped and Skipped lines data returned by the _SearchQNofSkipped and _SearchQSkipped functions.


_SearchQNofSkipped

int _SearchQNofSkipped()

Applies To	Edit Window

Remarks	When the p_TruncateLength is non-zero, replace operations are skipped in the resulting line becomes longer than the truncation length.  The _SearchInitSkipped function is used in conjunction with _SearchQNofSkipped and _SearchQSkipped to return information about what was skipped.  Call this function before performing a search and replace operation to reset NofSkipped and Skipped lines data returned by the _SearchQNofSkipped and _SearchQSkipped functions.

Returns	Returns the number of replace operations that were skipped.


_SearchQSkipped

_str _SearchQSkipped()

Applies To	Edit Window

Remarks	When the p_TruncateLength is non-zero, replace operations are skipped in the resulting line becomes longer than the truncation length.  The _SearchInitSkipped function is used in conjunction with _SearchQNofSkipped and _SearchQSkipped to return information about what was skipped.  Call this function before performing a search and replace operation to reset NofSkipped and Skipped lines data returned by the _SearchQNofSkipped and _SearchQSkipped functions.

Returns	Returns a space delimited list of line numbers where the replace operation that was skipped.


search_replace

int [wid_expression.]search_replace(_str replace_string [,'R'])

Applies To	Edit Window, Editor Control

Remarks	Replaces the match found by the last search or repeat_search with replace_string.  If the 'R' option is specified, a search for the next string is performed with the same options and direction specified by the last search or repeat_search call.

Return	Returns 0 if successful.  Possible return codes are INVALID_OPTION_RC, and STRING_NOT_FOUND_RC.  On error, message is displayed.

See Also	repeat_search, _select_match, match_length, search, save_search, restore_search, _search_case


seek

_command void [wid_expression.]seek([_str expression])

Applies To	Edit Window, Editor Control

Remarks	The seek command places the cursor on the seek position given or displays the current seek position.  A seek position is a character position relative to the beginning of the file.  The first character of the file is seek position 0.  If an expression is given, the cursor is placed on the seek position given.  Otherwise, the current seek position is displayed in hex and decimal.  Any expression accepted by the math command may be specified.  See math command for syntax of expression.

If a seek position is given, it can not be past the end of the file.  Negative seek positions are possible due to Visual SlickEdit's implementation of line 0.

You may use the seek command to determine the number of bytes in a file.  However, keep in mind that if your load options are set to expand tabs when loading, the seek file size will not match the disk file size.  In addition, for ASCII files, Visual SlickEdit strips the EOF (character 27) if there is one at the end of the file.

Command line examples

seek x1000	-Go to seek position 1000 hex

seek xff+xff	-Go to seek position 1fe hex

See Also	gui_seek, _QROffset, _GoToROffset


_seek_form

_form _seek_form

Syntax	_str show('-modal _seek_form')

Remarks	Displays the Seek dialog box which lets you specify a seek position to go to.

Return	Returns '' if dialog box is cancelled.  Otherwise, a decimal seek position is returned which may be used as input to the seek function.


select_active

int select_active()

Applies To	Edit Window

Return	Returns MARK_SEARCH (constant defined in 'slick.sh')  if the current buffer has a visible marked area.  Otherwise 0 is returned.


select_all

_command void select_all()

Ctrl+A or "Edit", "Select...", "All"

Remarks	If the current mode is fileman mode, a '>' character is placed in column one of all lines of the current buffer.   Otherwise,  all lines in the current buffer are selected with a LINE selection.

See Also	dir, list, fileman


select_attr

_command void select_attr( ['R'|'H'|'S'|'A'|'D'])

Remarks	Places the character '>' in column one for all files that have the attribute(s) specified.  If more than one file attribute is given, they must appear in the same order as the attributes column with dashes present if necessary so that a column search match can be performed.  Used in fileman mode.

See Also	dir, list, fileman


select_mode

_command void [wid_expression.]select_mode()

Click on Mode Name

Applies To	Edit Window, Editor Control

Remarks	Displays a list of commands which change modes and allow you to execute one to change the current mode.  Modes are typically used for language specific editing features such as syntax expansion when space bar is pressed.  However, they are also used for changing key bindings in other ways (fileman mode, grep mode, read only mode).


select_block

_command void [wid_expression.]select_block()

Ctrl+B or "Edit", "Select...", "Block"

Applies To	Edit Window, Editor Control

Remarks	Starts, extends, or locks a block selection.  Used for processing columns of text.  The first select_block becomes the pivot point.  Most select styles allow the selection to be extended as the cursor moves.  For these styles, you can invoke this command again to lock the selection so that is does not extend as the cursor moves.  In SlickEdit emulation, the selection does not extend as the cursor moves.  For this selection style, subsequent calls to this command will select the text between the pivot point and the cursor.   Use the Select Styles Tab ("Tools", "Configuration", "General...", select Select Styles Tab) to set the select style.

See Also	select_char, select_line


_select_block

int [wid_expression.]_select_block( _str mark_id="", _str options="E")

Applies To	Edit Window, Editor Control

Remarks	Starts or extends the block selection specified.  Used for processing columns of text.  The first _select_block becomes the pivot point.  Subsequent _select_block calls will select the area between the pivot point and the cursor.

mark_id is a selection handle allocated by the _alloc_selection built-in.  A mark_id of '' specifies the active selection or selection showing and is always allocated.

options is a string of zero or more of the following:

'C'	Specifies that the selection extend as the cursor moves.

'E'	(Default) Requires that _select_block be executed to end the text selection.

'P'	specifies a persistent select style.  Macros use this to help determine if a selection should be unhighlighted when the cursor moves.

Return	Returns 0 if successful.  Possible returns are TEXT_NOT_SELECT_RC.  and TEXT_ALREADY_SELECTED_RC.

See Also	_select_char, _select_line, _show_selection


select_buffer

_command void select_buffer()

Applies To	Edit Window

Remarks	Used in EMACS emulation.  Prompts for the name of a buffer to switch to using the command line.  Each window has a default buffer name to switch which is set to the last buffer active in the window before the current buffer.

See Also	emacs_quit, edit


select_char

_command void [wid_expression.]select_char()

F8 or "Edit", "Select...", "Char"

Applies To	Edit Window, Editor Control

Remarks	Starts, extends, or locks a character selection.  Used for processing sentences of text.  The first select_char becomes the pivot point.  Most select styles allow the selection to be extended as the cursor moves.  For these styles, you can invoke this command again to lock the selection so that is does not extend as the cursor moves.  In SlickEdit emulation, the selection does not extend as the cursor moves.  For this selection style, subsequent calls to this command will select the text between the pivot point and the cursor.   Use the Select Styles Tab ("Tools", "Configuration", "General...", select Select Styles Tab) to set the select style.

See Also	select_block, select_line


_select_char

int [wid_expression.]_select_char( _str mark_id="", _str option_letters="EN")

Applies To	Edit Window, Editor Control

Remarks	Starts or extends the character selection specified.  Used for processing sentences of text which do not start and end on line boundaries.  The first _select_char becomes the pivot point.  Subsequent select_char calls will extend the selection between the pivot point and the cursor.

mark_id is a selection handle allocated by the _alloc_selection built-in.  A mark_id of '' specifies the active selection or selection showing and is always allocated.

option_letters may be zero or more of the following letters:

'E'	Specifies that selecting an area of text requires _select_char be executed to select the end of the text area as well as the beginning.  If the 'C' letter is not specified, this select style is used.

'C'	Specifies that the selection extend as the cursor moves.

'I'	Specifies an inclusive selection.  Currently only character selections are affected by this option.

'N'	Specifies a non-inclusive selection.  Currently only character selections are affected by this option.  If the 'I' letter is not specified, the character selection will be non-inclusive selection.

'P'	A value of 'P' specifies a persistent select style and may be specified in addition to the other options above.  Macros use this to help determine if a selection should be unhighlighted when the cursor moves.

Return	Returns 0 if successful.  Possible returns are TEXT_NOT_SELECT_RC.  and TEXT_ALREADY_SELECTED_RC.

See Also	_select_block, _select_line, _show_selection


select_code_block

_command void [wid_expression.]select_code_block()

"Edit", "Select...", "Code Block"

Applies To	Edit Window, Editor Control

Remarks	Selects lines in current code block.  The definition of the current block depends on the language.  Invoking this command from a key, menu, or button bar multiple times in succession hides larger code blocks.


select_edit_mode

void [wid_expression.]select_edit_mode([_str extension])

Applies To	Edit Window, Editor Control

Remarks	Sets tab options, word wrap options, and mode key table for current buffer.  The current buffer's extension or extension given determines what mode information created by the "File extension setup" menu is used.  If a procedure called "suffix-extension" exists, it is called to set up the mode information.


select_ext

_command void select_ext(_str extension)

Remarks	Places the character '>' in column one for all files that have the extension specified.  Used in fileman mode.

See Also	dir, list, fileman


select_it

void select_it(_str mark_name, _str mark)

Remarks	Invokes one of the built-ins _select_char, _select_block, or _select_line corresponding to the mark_name values 'CHAR', 'BLOCK', and 'LINE'.  The mark parameter specifies the mark id.


select_line

_command void [wid_expression.]select_line()

Ctrl+L or "Edit", "Select...", "Line"

Applies To	Edit Window, Editor Control

Remarks	Starts, extends, or locks a line selection.  Used for processing complete lines of text.  The first select_line becomes the pivot point.  Most select styles allow the selection to be extended as the cursor moves.  For these styles, you can invoke this command again to lock the selection so that is does not extend as the cursor moves.  In SlickEdit emulation, the selection does not extend as the cursor moves.  For this selection style, subsequent calls to this command will select the text between the pivot point and the cursor.   Use the Select Styles Tab ("Tools", "Configuration", "General...", select Select Styles Tab) to set the select style.

See Also	select_block, select_char


_select_line

int [wid_expression.]_select_line( _str mark_id="",_str options="E")

Applies To	Edit Window, Editor Control

Remarks	Starts or extends the line mark specified.  Used for processing complete lines of text.  The first _select_line becomes the pivot point.  Subsequent _select_line calls will mark the area between the pivot point and the cursor.

mark_id is a selection handle allocated by the _alloc_selection built-in.  A mark_id of '' specifies the active selection or selection showing and is always allocated.

options is a string of zero or more of the following:

'C'	Specifies that the selection extend as the cursor moves.

'E'	(Default) Requires that _select_line be executed to end the text selection.

'P'	specifies a persistent select style.  Macros use this to help determine if a selection should be unhighlighted when the cursor moves.

Return	Returns 0 if successful.  Possible returns are TEXT_NOT_SELECT_RC.  and TEXT_ALREADY_SELECTED_RC.

See Also	_select_block, _select_char, _show_selection


select_mark

_command void select_mark()

(fileman mode only) "File", "File Manager...", "Select...", "Highlight"

Remarks	Places the character '>' in column one for all the selected lines.  Used in fileman mode.

See Also	dir, list, fileman


_select_match

void [wid_expression.]_select_match( _str mark_id="" )

Applies To	Edit Window, Editor Control

Remarks	Uses the selection id specified to select the last string matched by one of the built-in functions search or repeat_search.

mark_id is a selection handle allocated by the _alloc_selection built-in.  A mark_id of '' specifies the active selection or selection showing and is always allocated.

See Also	match_length, search, repeat_search, search_replace, save_search, restore_search, _search_case


select_paragraph

_command void [wid_expression.]select_paragraph()

Applies To	Edit Window, Editor Control

Remarks	Used in EMACS emulation.  Highlights the paragraph at or before the cursor and places the cursor in column one of the first line after the paragraph at or after the cursor.  If the cursor is already at or before the first non-blank character of the current paragraph, the cursor is placed on the first non-blank character of the previous paragraph.  Paragraphs are separated with lines containing just the characters tab, space, and form feed or blank lines.

See Also	prev_paragraph, prev_sentence, next_paragraph, cut_sentence, center_within_margins, reflow_region, margins, gui_margins


select_proc

_command int [wid_expression.]select_proc()

Ctrl+B or "Edit", "Select...", "Procedure"

Applies To	Edit Window, Editor Control

Return	Selects current function contents and function heading.  Returns 0 if successful.


select_reverse

_command void select_reverse()

(fileman mode only) "File", "File Manager...", "Select...", "Reverse Select"

Remarks	Places the character '>' in column one for each line of the current buffer which does not have a '>' in column one.  For each line of the current buffer which does have the character '>' in column, a space is entered in column one.  Used in fileman mode.

See Also	dir, list, fileman


select_tag_file

_command void [wid_expression.]select_tag_file()

Applies To	Edit Window, Editor Control

Remarks	Used in EMACS emulation.  Sets the tag file used by the goto_tag, gui_push_tag, push_tag, and find_tag commands by setting the VSLICKTAGS environment variable.  If this environment variable does not exist, the project tag file (extension  ".vtg") is used if a project is open.  Otherwise the "tags.vtg" (UNIX: "utags.vtg") file is used.


_select_type

_str _select_type(_str mark_id="", _str option='T' , new_type=null)

Return	Returns the type or style information about the selection specified.

Remarks	mark_id is a selection handle allocated by the _alloc_selection built-in.  A mark_id of '' specifies the active selection or selection showing and is always allocated.  The third parameter is only supported by the 'T' option.

option may be 'T', 'S', 'P', 'I', or 'U'.

If a value of 'T' is specified for option, one of the selection types "BLOCK", "CHAR", "LINE" or "" is returned.  If the third parameter is specified, the selection style is set to new_type which must be "BLOCK", "CHAR", or "LINE".  A null string is returned if the selection specified has not been set.

When a value of 'S' is specified for option, the select style is returned.  Select styles are 'C' or 'E' which correspond to cut/paste (selection extends as the cursor moves) or begin/end respectively.  A null string is returned if the selection specified has not been set.

If a value of 'P' is specified for option, selection anchor (pivot point) information is returned.  The selection anchor information is a two letter string and is used to determine how the selected area moves as the cursor moves.  This option is only useful for cut/paste style selections which extend the selection as the cursor moves.  The first letter is 'B' if the begin mark is the line anchor or 'E' if it is not.  The second letter is 'B' if the begin mark is the column anchor or 'E' if it is not.  The null string is returned if the selection specified has not been set.

If a value of 'I' is specified for option, a '1' is returned if the selection specified is an inclusive selection.  A '0' is returned if the selection specified is non-inclusive.  A null string is returned if the selection specified has not been set.  Currently this style affects only character selections.

When a value of 'U' is specified for option, a 'P' is returned if the selection specified is a persistent mark.  Otherwise, '' is returned.


select_whole_word

_command void [wid_expression.]select_whole_word()

Applies To	Edit Window, Editor Control

Remarks	Selects the text from the beginning to the end of the current word at the cursor.  To change the word characters for a specific extension, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").

See Also	select_word


select_word

_command void [wid_expression.]select_word()

Applies To	Edit Window, Editor Control

Remarks	Selects the text from the cursor to the end of the word at the cursor or the next word.  To change the word characters for a specific extension, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").

See Also	select_whole_word


selective_display

_command void [wid_expression.]selective_display()

Applies To	Edit window, Editor control

Remarks	Displays Selective Display dialog box which lets you selectively display lines of the current buffer.

See Also	all, hide_code_block, hide_all_comments, preprocess, hide_selection, allnot, show_procs, show_all, _lineflags, show_col1, show_braces, show_indent, show_paragraphs


_sellist_form

_form _sellist_form

Syntax	_str show('_sellist_form', title, flags, input_data [, buttons [,help_item [,font [,callback_name

        [, item_separator [,retrieve_name [, combo_completion [,min_list_width [,initial_value ]]]]]]]]] )

Remarks	Displays a selection list.

Input

title	Title of dialog box.

flags	Combination of the following flags defined in "slick.sh":

    SL_ALLOWMULTISELECT	Allow multiple items to be selected.  Multiple items are separated with space characters.  If an item contains spaces, double quotes are placed around the item.  Currently this function does not support items which contain double quotes.  If the return string is longer than 200 characters, an "@buffer_name" string is returned.  The buffer buffer_name contains the items selected.

    SL_NOTOP	Don't position cursor at top of list.

    SL_VIEWID	Indicates that input_data is a view id.  View is always deleted.  Can preserve buffer with SL_NODELETELIST flag.

    SL_FILENAME	Indicates that input_data is a filename that should be loaded and placed in the list box.  File must contain blanks in column one.

    SL_BUFID	Indicates that input_data is a buffer id.  Buffer is deleted unless SL_NODELETELIST flag given.

    SL_NOISEARCH	Indicates whether typing characters while list box is active performs incremental searching in the list.

    SL_NODELETELIST	Don't delete list box buffer when the dialog box is closed.

    SL_SELECTCLINE	Select the current line in the list box when initializing.

    SL_MATCHCASE	Case sensitive incremental searching in list box.  Has no effect if SL_NOISEARCH flag is given.

    SL_INVERT	Display Invert button

    SL_SELECTALL	Display Select All button.

    SL_HELPCALLBACK	Call the callback routine when the help button is invoked.

    SL_DEFAULTCALLBACK	Call the callback routine when default button invoked.

    SL_COMBO	Display combo box above list box

    SL_MUSTEXIST	Selected item must exist.  Has no effect if SL_ALLOWMULTISELECT given.

    SL_DESELECTALL	Deselect all items in list box when initializing.

input_data	Array of strings, hash table of strings, or delimited string of items.  The interpreter method _varformat() is used to test whether an array or hash table was given.  The default delimiter for a string of items is new line (ex. "item1\nitem2\nitem3").  Use the item_separator parameter to specify a different string delimiter.  The SL_VIEWID, SL_FILENAME, and SL_BUFID flags change the meaning of this parameter.

buttons	Comma delimited string of button captions (p_caption).  The buttons appear to the right of the list box. Cancel, and Help button are inserted after the first button in the list.  The first button is the default button.  If buttons is '', a default button of OK is used.  A button may be given a control name (p_name) by appending colon and the control name.  This allows for easier access to the control in the call back function.  The control name for the default button is always "_sellistok" and may not be changed.   This parameter may be '' to specify OK, Cancel, and Help buttons.

help_item	Specifies help displayed when F1 is pressed or the help button is pressed.  If the help_item starts with a '?' character, the characters that follow are displayed in a message box.  The help string may also specify a unique keyword in the "vslick.hlp" (UNIX: "uvslick.hlp") help file.  The unique keywords for "vslick.hlp" (UNIX: "uvslick.hlp") are contained in the file "vslick.lst" (UNIX: "uvslick.lst").  In addition, you may specify a unique keyword for any windows help file by specifying a string in the format:  keyword:help_filename.

font	Font string of the form "font_name,font_size, font_flags".  The font flags are defined in "slick.sh" and have the prefix "F_".  font_size is in points.  May be '' to specify default list box font.

callback_name	Address of function to call.  For backward compatibility, this parameter can be a global function name.  Specify "" to specify no call back function.  See below for more information about call back function

item_separator	Alternate separator character for parsing multiple items from input_data.  May be ''.

retrieve_name	Usually the name of the command which invoked this function or the type of item being prompted form.  May be ''. Useful only if the combo box is displayed.

combo_completion	Completion string for combo box p_completion property.  May be ''.

min_list_width	Can be '' to specify default value.  Specifies the minimum width of the list box in twips.  The list box is expanded to fit the largest item in the list box.

initial_value	Initial value displayed in combo box.   Useful only if combo box is displayed.

callback_function.  The prototype for the callback function is as follows:

      _str callback(int sl_event,_str &result,_str info);

The call back function is called as follows:

result=callback(sl_event,return_value, data)

For any sl_event, the selection list form is closed if result!=''.  When this occurs, the return value of selection list is return_value.

Since there may be new call back events in the future, make sure you test for the correct call back event.  The following are possible values for sl_event:

SL_ONINIT	Dialog box being initialized

SL_ONDEFAULT	Enter pressed and SL_DEFAULTCALLBACK flag was specified

SL_ONLISTKEY	Key was pressed while the list box had focus and SL_NOISEARCH flag was specified.

SL_ONUSERBUTTON	User button pressed.  data is set to the number of the button.  The buttons are numbered starting at one for the default button, and preceding in the order they are displayed in the dialog box from top to bottom.

SL_ONSELECT	Selected item(s) changed.

The control name of the list box is "_sellist".  The control name for the combo box is "_sellistcombo".  The control name for the default button is always "_sellistok".

Example

#include 'slick.sh'

defmain()

{

   result=show('-modal _sellist_form',

            'Title of Dialog Box',

            0,	// flags

            "item\nitem2\nitem3",	// input_data

            "",	// buttons

            '?This is a help message',	// help item

            '',	// font

            '',	// Call back function

            '',	// Item separator for list_data

            '',	// Retrieve form name

            '',	// Combo box. Completion property value.

            '',	// minimum list width

            ''	// Combo Box initial value

           );

  message('result='result);

}

Example

#include 'slick.sh'

// Prototype of call back function.

static _str sellist_callback(int sl_event,_str &result,_str info);

defmain()

{

   orig_view_id=_create_temp_view(temp_view_id);

   if (orig_view_id=='') {

      return(1);

   }

   _lbadd_item('item1');

   _lbadd_item('item2');

   _lbadd_item('item3');

   //IMPORTANT.  We must activate the original view so that the hidden

   // window is not active when we show the dialog box.  Otherwise,

   // strange things happen.

   activate_view(orig_view_id);

   result=show('-modal _sellist_form',

            'Title of Dialog Box',

            SL_VIEWID|SL_DEFAULTCALLBACK|SL_COMBO, // flags

            temp_view_id,	// input_data

            "OK,&Delete:delbutton",	// buttons

            '?This is a help message',	// help item

            '',	// font

            sellist_callback,	// Call back function

            '',	// Item separator for list_data

            '',	// Retrieve form name

            MACROTAG_ARG,	// Combo box. Completion property value.

            '',	// minimum list width

            'Bad item??!!'	// Combo Box initial value

           );

   message('result='result);

}

static _str sellist_callback(int sl_event,_str &result,_str info)

{

   if (sl_event==SL_ONSELECT || sl_event==SL_ONINIT) {

      if (!_sellist.p_Nofselected) {

         delbutton.p_enabled=0;

      } else if (!delbutton.p_enabled){

         delbutton.p_enabled=1;

      }

      return('');

   }

   if (sl_event==SL_ONDEFAULT) {

      // check that the item in the combo box is a valid Slick-C identifier

      if (!isid_valid(_sellistcombo.p_text)) {

         p_window_id=_sellistcombo;

         _set_sel(1, length(_sellistcombo.p_text)+1);

         _message_box('Invalid Slick-C identifier');

         return('');

      }

      result=_sellistcombo.p_text;

      return(1);

   }

   return('');

}

Return	Returns '' if the dialog box is cancelled.  Otherwise, the selected item is returned or the value specified by the call back function is returned.


set

_command void set( [_str cmdline] )

cmdline is a string in the format: env_var [=] value

Applies To	Edit Window

Remarks	If no arguments are given, a new buffer is created and the current environment is inserted.  The current value of a single environment variable may be retrieved by specifying name of the environment variable without the '=' or value parameter.  To remove an environment variable, specify the name of the environment variable followed by '=' and omit the value parameter.  To replace or insert a value for an environment variable specify all parameters.  'set ?' will list the names of the environment variables.


_SetAllOldLineNumbers

int [wid_expression.]_SetAllOldLineNumbers()

Applies To	Edit Window, Editor Control

Remarks	Sets all old line numbers for the current buffer to the line number.  Use the _GoToOldLineNumber method to go to an old line number. Visual SlickEdit uses old line numbers to better handle going to an error line after lines have been inserted or deleted.


set_bookmark

_command int set_bookmark( [_str cmdline ] )

Ctrl+Shift+J or "Search", "Set Bookmark..."

Applies To	Edit Window

cmdline is a string in the format: -r bookmark_name

Remarks	When no arguments are given, the Bookmarks dialog box is displayed, which displays the existing bookmarks and allows you to add, remove, and go to bookmarks.  If the bookmark_name argument is given, the bookmark is set at the cursor position of the current buffer.  The Bookmarks dialog box is displayed if the bookmark_name argument is given and there is an existing bookmark with the same name.  Bookmark names must consist of alpha-numeric characters and are limited to 100 characters in length.  You may later go back to this cursor location by specifying this bookmark name to one of the commands goto_bookmark or gb.

If cmdline is not given or is '', a list of the current bookmarks are displayed for reference and you are prompted to enter a bookmark name or select a bookmark to replace.

If the -r (replace) option is used, the bookmark is replaced without prompting.

An automark function, which sets the next available bookmark, is enabled by entering a '#' or '##' as the bookmark name.

Examples

sb	Pop up the Bookmarks dialog box.

sb 5	Sets a bookmark with an id of 5 at the cursor

sb ##	Sets a bookmark using the next 2 digit number available as the bookmark name

Return	Returns 0 if successful.  Otherwise, a non-zero value is returned.  Message always displayed on message line indicating bookmark set or error.

See Also	push_bookmark, pop_bookmark, goto_bookmark, sb, gb


set_command

void [wid_expression.]set_command(_str command_text ,int start_sel=-1, int end_sel=-1, _str prompt=null )

Applies To	Text Box, Combo Box

Remarks	Be sure to look at the macro function get_string which allow a macro to read command line input from the user.

set_command changes current setting of the command line.  Text of command line is set to command_text.   The selection columns (1.. MAXINT) are set if start_sel is >=0.  If end_sel<0, end_sel is set to start_sel.  The prompt parameter sets the command prompt.  The prompt may only be modified by the set_command primitive.

Example

       command_text='dir ';

       set_command(command_text, length(command_text)+1);

See Also	command_state, command_toggle, left, right, _delete_char, _rubout, execute, get_command


_setEnabled

void  [wid_expression.]_setEnabled(int ActiveTab, boolean Enabled)

Applies To	SSTab

Remarks	Enables a specific tab.  Used this method instead of the p_ActiveEnabled property when setting enabled state of a non-active tab.


set_env

int set_env(_str name [,_str value] )

Remarks	Assigns value to the environment variable name.  If value is not given, the environment variable is removed from the environment.

Return	Returns 0 if successful.  Otherwise, INTERPRETER_OUT_OF_MEMORY_RC is returned.

See Also	env_match, get_env


set_eventtab_index

void set_eventtab_index( int eventtab_index, int key_index, int index)

Remarks	eventtab_index is an index to an event table which is simply an array of integers.  This function sets the element at position key_index to index.  This has the effect of binding a key to a command or event table.

Example

     index=find_index('CMDLINE_TOGGLE');

     root_eventtab_index=find_index('default_keys',EVENTTAB_TYPE);

     // Bind the fundamental mode escape key to command toggle.  Root and mode key tables

     // both point to the "default_keys" key table when in fundamental mode.

     set_eventtab_index(root_eventtab_index,event2index(ESC),index);

     // the above statement might make more sense if it look like this

     // root_eventtab[event2index(ESC)]=index


_set_foreground_syswindow

int _set_foreground_syswindow(_str class_name,_str title="")

Remarks	Searches and activates if found, the operating system window with the class class_name.  The title of the window is checked as well if the title parameter is given.

Return	Returns 0 if successful.


_set_foreground_window

void [wid_expression.]_set_foreground_window([int reserved])

Applies To	Form, MDI Window

Remarks	Brings a window to the top in the Z order and gives the window or a control wihin the window focus.


set_mark_select

void set_mark_select(_str ch)

Remarks	Replaces the first character of each line of the marked text with ch.


_SetListColCaption

void  [wid_expression.]_SetListColCaption(int index, _str caption)

Applies To	Label

Remarks	This method along with the _SetListColInfo method allows you to create multiple labeled columns at the top of a list box and separate tabed delimited list box data into columns.

Example

#include "slick.sh"

defeventtab form1

void list1.on_change(reason)

{

   if (reason==CHANGE_BUTTON_PRESS) {

      index=arg(2);

      _GetListColInfo(index,width,style,state);

      say('state='state);

      if (state) {

         _SetListColCaption(index,"Caption2 A");

      } else {

         _SetListColCaption(index,"Caption2");

      }

   }

}

list1.on_create()

{

     _lbadd_item("style\t"p_style);

     _lbadd_item("width\t"p_width);

     _lbadd_item("caption\tcaption");

     _SetListColInfo(0,1000,LBCOLSTYLE_LABEL);

     _SetListColCaption(0,"Caption1");

     _SetListColInfo(1,1000,LBCOLSTYLE_2STATE,0);

     _SetListColCaption(1,"Caption2");

     _lbtop();

}

See Also	_GetListColInfo, _GetListColCaption, _SetListColInfo


_SetListColInfo

void  [wid_expression.]_SetListColInfo(int index, int twWidth,int Style, int InitialState)

Applies To	Label

Remarks	This method along with the _SetListColCaption method allows you to create multiple labeled columns at the top of a list box and separate tabed delimited list box data into columns.

index starts at 0 and indicates which column you are setting values for.  You must initialially create multiple columns in order (that is 0,1,2... etc.).

twWidth is the width of the column in twips.

The Style argument may be one of the following:

LBCOLSTYLE_LABEL	Display the caption as a text that the user may not click on.

LBCOLSTYLE_BUTTON	Treat the caption as a command button.   The on_change event will be sent with the reason argument set to CHANGE_BUTTON_PRESS when a column button is pressed.  arg(2) is set to the index of the column.

LBCOLSTYLE_2STATE	Treat the caption like a 2 state push button where the button stays down after you click. The on_change event will be sent with the reason argument set to CHANGE_BUTTON_PRESS when a column button is pressed.  arg(2) is set to the index of the column.

The InitialState argument specifies whether the button is initially up or down (0 or 1 respectively).  The paremeter is ignored if Style is LBCOLSTYLE_LABEL or LBCOLSTYLE_BUTTON.

Example

#include "slick.sh"

defeventtab form1

void list1.on_change(reason)

{

   if (reason==CHANGE_BUTTON_PRESS) {

      index=arg(2);

      _GetListColInfo(index,width,style,state);

      say('state='state);

      if (state) {

         _SetListColCaption(index,"Caption2 A");

      } else {

         _SetListColCaption(index,"Caption2");

      }

   }

}

list1.on_create()

{

     _lbadd_item("style\t"p_style);

     _lbadd_item("width\t"p_width);

     _lbadd_item("caption\tcaption");

     _SetListColInfo(0,1000,LBCOLSTYLE_LABEL);

     _SetListColCaption(0,"Caption1");

     _SetListColInfo(1,1000,LBCOLSTYLE_2STATE,0);

     _SetListColCaption(1,"Caption2");

     _lbtop();

}

See Also	_GetListColInfo, _GetListColCaption, _SetListColCaption


_set_menu_state

void _set_menu_state(int menu_handle ,_str command_or_category, int mf_flags, _str option="C", _str item_text="", _str command="", _str category="", _str help_command="",_str help_message="")

Remarks	This function is identical to the _menu_set_state function and is present only for backward compatibility with Visual SlickEdit Version 1.0x.


_SetMultiLabelProp

void  [wid_expression.]_SetMultiLabelProp(int index, _str caption, int twMaxWidth,int twMinWidth, int Percent,int AutoSizeStyle, int Styles,int Allignment)

Applies To	Label

Remarks	This method allows you to subdived a single label control into multiple labels with borders and various options.  index starts at 0 and indicates which label you are setting the width, flags, and state for.  You must initialially create multiple labels in order (that is 0,1,2... etc.).

Example

// Create a form with a label control named label1

void label2.on_create()

{

}


set_name_info

int set_name_info(int index, _str info )

Remarks	Replace info, corresponding to name table index.  If index is not a valid index, the interpreter is halted.  Info may be changed for any name type.

Return	Returns 0 if successful.  Otherwise, INTERPRETER_OUT_OF_MEMORY_RC is returned.  Pending message set.

See Also	find_index, name_match, name_name, name_type, name_info, call_index, insert_name, delete_name, replace_name


set_next_error

_command void [wid_expression.]set_next_error()

Applies To	Edit Window, Editor Control

Remarks	Sets the next_error commands start search position to the cursor.  This command is no longer very useful since the cursor_error command also sets the start search position.

See Also	reset_next_error, cursor_error, next_error


set_scroll_pos

void [wid_expression.]set_scroll_pos(int left_edge, int cursor_y)

Applies To	Edit Window, Editor Control

Remarks	Sets the left edge scroll position and the cursor y position for viewing the current line.  The current line is unchanged.  left_edge and cursor_y are in pixels.  The p_cursor_y property may also set the cursor y position. However, the current line will not remain the same.


_set_sel

void _set_sel( int start_pos, int end_pos=start_pos)

Applies To	Text Box, Combo Box

Return	Sets the cursor position or selection.  If end_pos is not given, the new cursor position is set to start_pos and no text is selected.  If end_pos is given, the selection starts from start_pos and ends at the cursor which is set to end_pos.  The first text position is 1.

See Also	_get_sel, p_sel_start, p_sel_length


set_select

void set_select(_str ch)

Remarks	Replaces the first character of each line of the current buffer with ch.


_SetTextColor

void [wid_expression.]_SetTextColor(int ColorIndex, int Nofbytes)

Applies To	Edit window, Editor control

Remarks	Sets the text color for the number of bytes specified starting from the cursor.

Example

int gColorIndex;

definit()

{

     if (arg(1)=='L' && gColorIndex) return;

     gColorIndex=_AlocColor();

     _default_color(gColorIndex,0xffffff,0xFF0000);

}

defmain()

{

     // Change the color of 5 bytes of text starting from cursor

     _SetTextColor(gColorIndex,5);

}

See Also	_FreeColor, _AllocColor, _GetTextColor, _default_color


_set_timer

int _set_timer( int interval ,typeless callback=null, typeless arg1=null )

Remarks	Creates a timer and optionally calls a function you specify.  interval is specified in milliseconds.  callback is a pointer to a function or names table index to a global function returned by find_index.  arg1 is a an optional argument to pass to the call back function.  If only one argument is given, a get_event timer is created.  This allows you to use get_event in a loop and wait for a key or mouse event, or until the on_timer event occurs.  When the callback argument is not null, get_event is not effected.  Instead, the callback function is called with the arg1 argument if given at intervals specified by interval.

Return	Returns a timer handler >=0.  On error, negative error code is returned.

Example

_set_timer(1000);

for(;;){

   event=get_event();

   if (event==on_timer){

       message("on_timer event");

   } else {

       message(event2name(event));

   }

}

_kill_timer();

See Also	_kill_timer


_set_focus

void [wid_expression.]_set_focus( )

Applies To	All Objects except Image

Remarks	Sets focus to the object.  If you are trying to set the focus when a dialog box is being created, call _set_focus during the on_load event of the form.

See Also	_get_focus


set_var

_command void set_var( [_str cmdline] )

cmdline is a string in the format: variable [new_value]

Remarks	Retrieves or sets the value of a global variable.  The current value is displayed on the command line if the new_value parameter is omitted.

See Also	gui_set_var, _set_var, _get_var


_set_var

void _set_var(int index,typeless value)

Remarks	Sets the contents of the variable corresponding to the name table index to value.  index is an index into the names table returned by one of the functions find_index or name_match.

Example

      // VAR_TYPE is defined in "slick.sh"

      index=find_index("rc",VAR_TYPE)

      _set_var(index,"anything");

      message('rc='_get_var(index));

See Also	_get_var


_set_var_form

_form _set_var_form

Syntax	void show('_set_var_form')

Remarks	Displays Set Variable dialog box.  This dialog box sets a global Slick-C variable.


_setext

void _setext(_str extension, _str option, _str value)

Remarks	Sets default extension specific options.  Use the _update_buffers function to change extension specific options for buffers already loaded.

option may be one of the following:

p_mode_name or MN

Value specifies mode name.

p_tabs or TABS

Value specifies tab settings.

p_margins or MA

Value specifies margins.

p_mode_eventtab or KEYTAB

Value specifies mode event table.

p_word_wrap_style or WW

Value specifies word wrap style.

p_indent_with_tabs or IWT

Value specifies indent with tabs.

p_indent_style or IN

Value specifies indent style.

p_word_chars or WC

Value specifies word chaacters.

p_lexer_name or LN

Value specifies lexer name.

p_color_flags or CF

Value specifies color flags.

For the above options, value may be not contain a comma character.

Additional option values:

BEGINEND	Value specifies begin/end pairs.

OPTIONS	Value specifies extension specific options.  We recommend that you use macro recording to correctly generate calls that set this option.

SETUP	Value specifies miscellaneous extension specific options.  This option is very sensitive to the order of the options.  We recommend that you use macro recording to correctly generate calls that set this option.

ALIAS	Value specifies alias filename.

Example

#include "slick.sh"

defmain()

{

   // Can specify "" instead of "fundamental" to refer to buffers with no extension

   //Change the default margins for fundamental mode.

    _setext("fundamental","p_margins","1 70 1");

   // Update buffers already being edited

    _update_buffers("fundamental","p_margins=1 70 1");

}

See Also	_update_buffers


setonoff

boolean setonoff(typeless &name,_str value)

Remarks	Sets name to 1 or 0 corresponding to value='on' or value='off'.

Return	Returns false if input value is valid.  Displays message if value is not 'on' or 'off'.


setyesno

boolean setyesno(typeless &name,_str value)

Remarks	Sets name to 1 or 0 corresponding to value='Y','Yes' or value='N','No'.

Return	Returns false if input value is valid.  Displays message if value is not 'Y', 'Yes','N', or 'No'.


setupext

void setupext()

"Tools","Configuration", "File Extension Setup..."

Remarks	The setupext command ("Tools", "Configuration", "File extension setup...") displays the Extension Options dialog box.


shell

int shell(_str program[, _str options [,_str shell_processor]] )

Remarks	Runs the external program specified.  The program parameter should include arguments to be passed to the program as well.

A positive or 0 return code indicates the return code is from the program executed (Windows 3.x version returns 0 for all programs except DOS programs).  A negative return code indicates one of the OS or Visual SlickEdit return codes listed in "rc.sh".

options defaults to '' and may be one or more of the following:

'Q'	Run program without clearing the screen.

'P'	Do not search for Visual SlickEdit batch programs.

'A'	Run program asynchronously.

'W'	Run slkwait program to wait for a key press before closing application.  Under UNIX, this argument is ignored if shell_processor is specified.

'N'	No command processor.  Use this option when you notice an extra command shell window is created when you are trying to run a windows program.  By default, if any command shell special characters  (ex.  '>', '<',  '|'.  There are others.) are found in the program argument, the command processor is used to process the program argument.  This can cause a command shell window to be created when you are trying to run a windows program.

IMPORTANT: Under Windows 3.x, Visual SlickEdit is only able to retrieve return codes of DOS programs and not Windows programs.  When fixes/enhancements are made to Windows/WIN32s, we will correct this limitation.

For UNIX, the shell_processor argument allows you to specify an alternate shell command line to parse the command string specified.  For non-UNIX platforms, this argument is ignored.  shell_processor defaults to  "$SHELL -c".  For backward compatibility with SlickEdit, if shell_processor does not contain a space, " -c" is concatenated on to the end of the string.

Example

       shell("cl -c test.c >$errors.tmp");

       shell("man cc","","xterm -T "man" -e /bin/sh -c");


shift_prefix

_command void shift_prefix()

Remarks	Defines an alternative SHIFT key.  For example, after binding this command to the '~' key, pressing '~' F1 is identical to Shift+F1.

See Also	ctrl_prefix, alt_prefix, esc_alt_prefix


shift_selection_left

_command void shift_selection_left([shift_count])

"Edit", "Other...", "Shift Left"

Applies To	Edit Window, Editor Control

Remarks	Shifts selection left the number of character specified.  Character selections are treated the same as line selections.


_shift_selection_left

int _shift_selection_left( _str mark_id="" )

Applies To	Edit Window, Editor Control

Remarks	Deletes characters at left edge of marked area specified.  mark_id is a handle to a selection returned by one of the built-ins _alloc_selection or _duplicate_selection.  A mark_id of '' or no mark_id parameter identifies the active selection.

Return	Returns 0 if successful.  Common return codes are TEXT_NOT_SELECTED_RC, and LINE_OR_BLOCK_SELECTION_REQUIRED_RC.  On error, message is displayed.


shift_selection_right

_command void shift_selection_right([int shift_count])

"Edit", "Other...", "Shift Right"

Applies To	Edit Window, Editor Control

Remarks	Shifts selection right the number of characters specified.  Character selections are treated the same as line selections.


_shift_selection_right

int _shift_selection_right( _str mark_id="")

Applies To	Edit Window, Editor Control

Remarks	Inserts space character at left edge of marked area specified.  mark_id is a handle to a selection returned by one of the built-ins _alloc_selection or _duplicate_selection.  A mark_id of '' or no mark_id parameter identifies the active selection.

Return	Returns 0 if successful.  Common return codes are TEXT_NOT_SELECTED_RC, and LINE_OR_BLOCK_SELECTION_REQUIRED_RC.  On error, message is displayed.


show

_command _str [wid_expression.]show(_str cmdline [,arg1 [,arg2 ... [,argN]]] )

cmdline is a string in the format: [option] object_name

Applies To	All objects

Remarks	Displays a dialog box or menu you specify.

option may be one of following:

-mdi	Keep the form on top of the MDI Window.

-app	Keep the form on top of the Visual SlickEdit Application Window.  This allows the MDI Window to be displayed on top of the form.

-xy	Restore the previous x, y position of the dialog box.  If the old position can not be found, the dialog box is centered.  When the dialog box is closed, the x, y position is automatically saved (the dialog manager calls _save_form_xy).

-hidden	Do not make the form visible.

-modal	Run the form modally.  All other forms are disabled.  Control returns to the caller when the form window is deleted with _delete_window.

-nocenter	Do not center the form.

-new	Normally when a form is already displayed, the existing form is given focus.  This option allows for multiple instances of a form to be displayed.

-reinit	UNIX only. Ignored by other platforms.  Causes _delete_window function to make the form invisible instead of deleting the form.  The destroy events are dispatched even though no windows are actually destroyed.  Next time show is called for the same dialog box, the invisible dialog box is made visible, some properties are reinitialized, and the create events are sent.  Be careful when using this option.  Not all dialog boxes can use this option without minor modifications.  The form_parent() function will not work because the next time the form is used, the parent is not changed to the new parent specified.

-hideondel	UNIX only.  Same as -reinit option except no properties are reinitialized when the invisible dialog box is shown again.

object_name specifies a form or menu resource.  If it is an integer, it must be a valid index into the names table of a form or menu.  Otherwise, it should be the name of an existing form or menu that can be found in the names table.

Currently, all cmdline arguments except object_name is ignored if object_name corresponds to a menu.

When a dialog box and all its objects are created, each object receives an on_create event.  The on_create event receives the arg1, arg2...argN arguments given to this function.  After the on_create events are sent, the form receives an on_load event.  You CAN NOT set the initial focus in an on_create event.  Use the on_load event to set the initial focus to a control other than the control with lowest tab index (p_tab_index) that is enabled and visible.

Return	If the -modal option is given, the return value given to _delete_window is returned.  '' is returned if the dialog box is edited or destroyed during an on_create event.

                      If the -modal option is not given, the int form window id is returned if successful.  Otherwise, a negative error code is returned.

Example

// This example requires that you create a form called form1

// with a command button and load this file.

#include "slick.sh"

_command mytest()

{

    show('-modal form1',

         'param1 to on_create',

         'param2 to on_create');

}

defeventtab form1

command1.on_create(_str arg1="", _str arg2="")

{

    // Could get the arguments with the arg built-in

    //arg1=arg(1);

    //arg2=arg(2);

    messageNwait('arg1='arg1' arg2='arg2);

}

Example

#include "slick.sh"

defmain()

{

    index=find_index('form1',oi2type(OI_FORM));

    if (!index) {

         messageNwait("form1 not found");

         return(1);

    }

    form_wid=show('-hidden -nocenter form1',

                  'param1 to on_create',

                  'param2 to on_create');

    if (form_wid<0) {

         return(1);

    }

    // Place the form at the top left corner of the display.

    form_wid.p_x=form_wid.p_y=0;

    // Make the form visible

    form_wid.p_visible=1;

}


show_all

_command void [wid_expression.]show_all()

"View", "Show All"

Applies To	Edit window, Editor control

Remarks	Displays all lines in the current buffer.  Resets selective display.

See Also	all, hide_code_block, hide_all_comments, preprocess, hide_selection, allnot, show_procs, show_col1, _lineflags, selective_display, show_braces, show_indent, show_paragraphs


_showbuf

typeless _showbuf(int buf_or_view_id [,_str show_options])

Remarks	Displays the view or buffer id specified modally in a dialog box.  This function is intended for debugging macros.  The default show options used to display the dialog box are "-new -modal".  Specify the show_options arguments to override the default show options.  See show function information on show options.

Return	Returns the return value from the show function which is used to display the dialog box.


show_braces

_command void [wid_expression.]show_braces([int MaxNestLevel])

Applies To	Edit window, Editor control

Remarks	Creates nested selective display based on the braces {}. MaxNestLevel must be at least one and optionally specifies a limit on the nesting.

See Also	all, hide_code_block, hide_all_comments, preprocess, hide_selection, allnot, show_procs, show_all, _lineflags, selective_display, show_col1, show_indent, show_paragraphs


show_col1

_command void [wid_expression.]show_col1()

Applies To	Edit window, Editor control

Remarks	Hides lines in the current buffer which do not contain a non-blank (space or tab) character in column one.

See Also	all, hide_code_block, hide_all_comments, preprocess, hide_selection, allnot, show_procs, show_all, _lineflags, selective_display


_show_entire_form

void [wid_expression.]_show_entire_form()

Applies To	Form

Remarks	Makes sure that the entire form can be seen on the display.


show_indent

_command void [wid_expression.]show_indent([int MaxNestLevel])

Applies To	Edit window, Editor control

Remarks	Creates nested selective display based on leading spaces on lines.  MaxNestLevel must be at least one and optionally specifies a limit on the nesting.

See Also	all, hide_code_block, hide_all_comments, preprocess, hide_selection, allnot, show_procs, show_all, _lineflags, selective_display, show_col1, show_braces, show_paragraphs


show_point

_command void [wid_expression.]show_point()

Applies To	Edit Window

Remarks	Used in EMACS emulation.  Displays the cursor seek position, buffer size, decimal character code at cursor, and hexadecimal character code at cursor.


show_paragraphs

_command void [wid_expression.]show_paragraphs()

Applies To	Edit window, Editor control

Remarks	Show first line of each paragraph.

See Also	all, hide_code_block, hide_all_comments, preprocess, hide_selection, allnot, show_procs, show_all, _lineflags, selective_display, show_col1, show_braces, show_indent


show_procs

_command void [wid_expression.]show_procs()

"View", "Function Headings"

Applies To	Edit window, Editor control

Remarks	Hides lines in the current buffer which are not part of a function definition heading.

See Also	all, hide_code_block, hide_all_comments, preprocess, hide_selection, allnot, show_col1, show_all, _lineflags, selective_display, show_braces, show_indent, show_paragraphs


show_properties

_command void show_properties()

"Window", "Properties"

Remarks	Displays the dialog editor properties form.  If  the dialog editor properties form is already displayed, it is brought to the front of the window Z-order and given input focus.


show_selected

_command void show_selected()

"Window", "Show Selected"

Remarks	Brings the selected form being edited with the dialog editor to the front of the window Z-order and gives it the input focus.


_show_selection

int _show_selection(_str mark_id="")

Remarks	Makes the mark corresponding to mark_id visible.  Currently only one mark may be showing at a time.  mark_id is a handle to a selection returned by one of the built-ins _alloc_selection or _duplicate_selection.  A mark_id of '' or no mark_id parameter identifies the active selection.

Return	Returns 0 if successful.  Otherwise INVALID_SELECTION_HANDLE_RC is returned.  On error, message is displayed.


_ShowWindow

void _ShowWindow(int swOption)

Applies To	All objects except Image control.

Remarks	Hides or show a window in a number of ways.  Use _ShowWindow with the SW_SHOWNOACTIVATE constant instead of the p_visible property to make a window visible without changing it Z order.  swOption may be one of the following constants defined in "slick.sh".

SW_HIDE	// Make window invisible

SW_SHOWMINIMIZED	// Show window iconized

SW_SHOWMAXIMIZED	// Show window maximized

SW_SHOWNOACTIVATE	// Make window visible without changing Z order

SW_SHOW	// Make window visible and change Z order

SW_RESTORE	// Restore window

See Also	p_visible


shrink_window

_command void shrink_window()

Applies To	Edit Window

Remarks	Shrinks the current window by one row by lowering the top window border.  If there is no window above the current buffer window, the bottom window border is raised by one row.

See Also	expand_window, move_edge, delete_tile, create_tile, kill_window, hsplit_window, vsplit_window, change_window, window_left, window_right, window_above, window_below, next_window, prev_window


_ShrinkFilename

_str [wid_expression.]_ShrinkFilename(_str filename, int width)

Applies To	Label, Text Box, Combo Box and any object which has a _text_width() method like the Text Box or Label control.

Return	Returns filename reduced in length to be less than width in _text_width units.  ".." is used to indicate missing path information.  The scale mode used depends on the _text_width method.


signal_handler

int signal_handler(_str option='B',int index=-1)

Return	Returns index of current signal handler for specified signal.  Currently this function only supports the 'B'=Ctrl+Break signal.  Specifying the index parameter will set the signal handler.  Valid values for index must be less than or equal to 0.  If index is 0, the default signal handler is used which halts Slick-C batch/macros that are running.  If index is less than 0, the Ctrl+break signal is ignored.


size_mdi

_command void size_mdi()

Alt+F8

Remarks	Allows you to size the MDI window with the keyboard.  Not supported by UNIX version.


size_window

_command void [wid_expression.]size_window()

Ctrl+F8

Applies To	Edit Window

Remarks	Allows you to size an MDI child window with the keyboard.  Not supported by UNIX version.


slick_enter

_command void [wid_expression.]slick_enter()

(Slick-C mode only) ENTER

Applies To	Edit Window, Editor Control

Remarks	New binding of ENTER key when in Slick-C mode.  Handles syntax expansion and indenting for files with e, sh, and cmd extensions.


slick_path_search

_str slick_path_search(_str filename [,'M'])

Remarks	Used for searching for Visual SlickEdit executables, Slick-C macros, help files, and miscellaneous Visual SlickEdit files.  The second and optional parameter specifies a program and batch macro search.  Search order is as follows:

•	Try path given with filename

•	non-UNIX platforms:  Try current directory.

•	Try paths specified in VSLICKPATH environment variable.

•	Try paths specified in PATH environment variable.

Return	If successful, a complete file specification for filename is returned.  Otherwise '' is returned.

See Also	path_search, include_search


slick_space

_command void slick_space()

(Slick-C mode only) SPACE BAR

Applies To	Edit Window, Editor Control

Remarks	New binding of SPACE key when in Slick-C mode.  Handles syntax expansion and indenting for files with e, sh, or cmd extension.


slickc_mode

_command void [wid_expression.]slickc_mode()

Applies To	Edit Window, Editor Control

Remarks	Activates Slick-C file editing mode.  The ENTER and SPACE BAR bindings are changed as well as the tab and margin settings.


_sort

void Array._sort( _str options="", int start=0, int Nofitems= -1 )

Remarks	Sorts an array.

options may contain one or more of the following option letters:

D	Descending.  When not specified sort is ascending.

I	Ignore case.  Default is case sensitive.

N	Sort numbers.  Supports floating point.

F	Sort filenames.

Example

a[0]="def";

a[1]="abc";

// Sort array of strings in ascending order.

a._sort();

See Also	_el, _makeempty, _isempty, _deleteel, _nextel, _indexin, _varformat


sort_buffer

_command int [wid_expression.]sort_buffer( [_str cmdline] )

Applies To	Edit Window, Editor Control

cmdline is a string in the format: [ A | D]    [ E | I ]    [ -N | -F]

Remarks	Sorts the current buffer in ascending or descending order in case sensitivity specified.  Sort defaults to ascending and case sensitive.

Multiple options having the following meaning may be specified:

A	Sort in ascending order.

D	Sort in descending order.

I	Case insensitive sort (Ignore case).

E	Case sensitive sort (Exact case).

-N	Sort numbers

-F	Sort filenames

Additional options specific to ISPF emulation are also supported by this command.  Refer to ispf_sort for more information about sorting on fields.

Command Line Examples

sort-buffer	Sort in ascending order and exact case.

sort-buffer I	Sort in ascending order and ignore case.

sort-buffer DI	Sort in descending order and ignore case.

sort-buffer -n d	Sort numbers in descending order

Return	Returns 0 if successful.  Common return codes are 1 (you tried to sort the concurrent process buffer), NOT_ENOUGH_MEMORY_RC, TOO_MANY_SELECTIONS_RC, and INVALID_SELECTION_HANDLE_RC.  On error, message displayed.

See Also	sort_on_selection, sort_within_selection, gui_sort


sort_on_selection

_command int sort_on_selection( [_str cmdline] )

cmdline is a string in the format: [ A | D]   [ E | I ]    [ -N | -F]

Applies To	Edit Window, Editor Control

Remarks	Sorts the marked text in ascending order comparing only the columns specified.  If a character mark is used, it is converted to a line mark.

Multiple options having the following meaning may be specified:

A	Sort in ascending order.

D	Sort in descending order.

I	Case insensitive sort (Ignore case).

E	Case sensitive sort (Exact case).

-N	Sort numbers

-F	Sort filenames

Command Line Examples

sort-on-selection	Sort in ascending order and exact case.

sort-on-selection I	Sort in ascending order and ignore case.

sort-on-selection DI	Sort in descending order and ignore case.

sort-on-selection -n d	Sort numbers in descending order

Return	Returns 0 if successful.  Common return codes are INVALID_OPTION_RC, LINE_OR_BLOCK_SELECTION_REQUIRED_RC, NOT_ENOUGH_MEMORY_RC, TOO_MANY_SELECTIONS_RC, and INVALID_SELECTION_HANDLE_RC.  On error, message displayed.

See Also	sort_buffer, sort_within_selection, gui_sort


_sort_selection

int _sort_selection( _str cmdline="", _str mark_id=""]

Applies To	Edit Window, Editor Control

cmdline is a string in the format: [ A | D]   [ E | I ]    [ -N | -F]

Remarks	Sorts the selection specified in ascending or descending order in case sensitivity specified.  Sorting defaults to ascending and case sensitive.  If the buffer containing the specified selection is active when this function is invoked, the resulting lines are inserted after the end of the selection.  Otherwise the resulting lines are inserted after the cursor.  If a character selection is used, it is converted to a line type selection.

Multiple options having the following meaning may be specified:

A	Sort in ascending order.

D	Sort in descending order.

I	Case insensitive sort (Ignore case).

E	Case sensitive sort (Exact case).

-N	Sort numbers

-F	Sort filenames

Example

_sort_selection();	// Sort in ascending order and exact case.

_sort_selection('I');	// Sort in ascending order and ignore case.

_sort_selection('DI');	// Sort in descending order and ignore case.

_sort_selection('-n d');	// Sort numbers in descending order

Return	Returns 0 if successful.  Common return codes are INVALID_OPTION_RC, LINE_OR_BLOCK_SELECTION_REQUIRED_RC, NOT_ENOUGH_MEMORY_RC, TOO_MANY_SELECTIONS_RC, and INVALID_SELECTION_HANDLE_RC.  On error, message displayed.


sort_within_selection

_command int sort_within_selection( [_str cmdline] )

Applies To	Edit Window, Editor Control

cmdline is a string in the format: [ A | D]   [ E | I ]    [ -N | -F]

Remarks	Sorts the text within the selection in ascending order.  If a character selection is used, it is converted into a line type selection.

Multiple options having the following meaning may be specified:

A	Sort in ascending order.

D	Sort in descending order.

I	Case insensitive sort (Ignore case).

E	Case sensitive sort (Exact case).

-N	Sort numbers

-F	Sort filenames

Command Line Examples

sort-within-selection	Sort in ascending order and exact case.

sort-within-selection I	Sort in ascending order and ignore case.

sort-within-selection DI	Sort in descending order and ignore case.

sort-within-selection -n d	Sort numbers in descending order

Return	Returns 0 if successful.  Common return codes are INVALID_OPTION_RC, LINE_OR_BLOCK_SELECTION_REQUIRED_RC, NOT_ENOUGH_MEMORY_RC, TOO_MANY_SELECTIONS_RC, and INVALID_SELECTION_HANDLE_RC.  On error, message displayed.

See Also	sort_buffer, sort_on_selection, gui_sort


_source_event_name

_str _source_event_name(int event_index)

Return	Returns the Slick-C event name corresponding to event index event_index in a form that can be used for defined event handlers.

See Also	event2name, index2event, event2index


_spell_add

int _spell_add(_str word, '1' | '2')

Remarks	Adds the word specified to user dictionary 1 or 2.  After the word is added to a user dictionary, it is considered a correctly spelled word.

Return	Returns 0 if successful.


_spell_add_hist

int _spell_add_hist( _str ignore_word,_str replace_word="" )

Remarks	Adds a word to be ignored for the current spelling session.  If the replace_word argument is given, occurrences of ignore_word are replaced with the replace_word.

Return	Returns 0 if successful.


spell_check

_command void [wid_expression.]spell_check( ['M'] )

"Tools", "Spell Check...", "Check from Cursor"

Applies To	Editor Control, Edit Window

Remarks	Starts spell checking from the cursor position in the current buffer.  If the 'M' option is given, then spell checking is performed within the visible selection and from the beginning of that selection.

See Also	spell_check_source, spell_check_word, spell_check_files


_spell_check

int [wid_expression.]_spell_check(_str &word, _str &replace_word, int &col, _str string="")

Applies To	Editor Control, Edit Window

Remarks	Starts spell checking from the cursor position in the current buffer.  The output variable, col is set to the starting column position (p_col) of the word found and the cursor is placed at the this column.  If the string argument is given, the string argument is spell checked instead of the current buffer.  In this case, col is set to the character position within the string of the word found.

Return	Return values are as follows:

SPELL_NO_MORE_WORDS_RC	End of buffer reached.

SPELL_REPEATED_WORD_RC	Found two of the same words found in a row.

SPELL_WORD_NOT_FOUND_RC	Possible misspelled word.  word variable set to the misspelled word.

SPELL_REPLACE_WORD_RC	History word found.  Replace word at cursor with replace_word.

SPELL_ERROR_READING_MAIN_DICT_RC


_spell_check_area

int [wid_expression.]_spell_check_area(_str &word, _str &replace_word, int &col , int start_col, int width=-1)

Applies To	Editor Control, Edit Window

Remarks	Spell checks a limited area of the current line.  start_col is an imaginary column position and specifies the column to start spell checking from.  width specifies the number of characters in the area to spell check.  This function is intended to used to assist in spell checking a selection.

Return	Return values are as follows:

SPELL_NO_MORE_WORDS_RC	End of buffer reached.

SPELL_REPEATED_WORD_RC	Found two of the same words found in a row.

SPELL_WORD_NOT_FOUND_RC	Possible misspelled word.  word variable set to the misspelled word.

SPELL_REPLACE_WORD_RC	History word found.  Replace word at cursor with replace_word.

SPELL_ERROR_READING_MAIN_DICT_RC


spell_check_source

_command void [wid_expression.]spell_check_source( ['M'] )

"Tools", "Spell Check...", "Check Comments and Strings"

Applies To	Editor Control, Edit Window

Remarks	Starts spell checking from the cursor position comments and strings in the current buffer.  The p_lexer_name property must be set to a section name defined in "vslick.vlx" or user defined ".vlx" file.

See Also	spell_check ,spell_check_word, spell_check_files


spell_check_files

_command void [wid_expression.]spell_check_files()

"Tools", "Spell Check...", "Check Files... "

Applies To	Editor Control, Edit Window

Remarks	Displays dialog for spell checks multiple source files. This command always does a language sensitive spell check.  For HTML, markup that is not literal text is ignored.  For source languages where color coding is provided, only comments and strings are spell checked.

See Also	spell_check ,spell_check_source, spell_check_files


spell_check_word

_command void [wid_expression.]spell_check_word()

"Tools", "Spell Check...", "Check Word at Cursor"

Applies To	Editor Control, Edit Window

Remarks	Spell checks the word at the cursor position.

See Also	spell_check ,spell_check_source, spell_check_files


_spell_clear

void _spell_clear( _str option)

Remarks	Clears spelling data in memory.

option must be one of the folowing:

'H'	Clear history.

'1'	Clear user 1 dictionary

'2'	Clear user 2 dictionary

'R'	Clear the repeat word.


_spell_delete

void _spell_delete(_str word ,_str option)

Remarks	Deletes a word from the history or a user dictionary.

option must be one of the folowing:

'H'	Delete word from history.

'1'	Delete word from user 1 dictionary.

'2'	Delete word from user 2 dictionary.


_spell_insert_suglist

void _spell_insert_suglist( _str word="" )

Applies To	List Box

Remarks	Inserts a suggestion list of possible correct spellings for word specified after the current line.  If the word argument is not given, the last word found by one of the functions _spell_check or _spell_check_area is used.  The cursor is placed on the last suggestion inserted.


_spell_option

_str _spell_option('R' | 'U' | 'C' | 'M' | '1' | '2' ,_str newValue=null)

Remarks	If newValue is not null, the corresponding option is set to vewValue.

Return	Returns current/set value.

The options have the following meaning:

'R'	Indicates whether repeated words should be flagged as an error.  Returns non-zero value when on.

'U'	Indicates whether upper case words should be ignored.  Returns non-zero value when on.

'C'`	Specifies name of common word dictionary.  Returns name of dictionary.

'M'	Specifies name of main dictionary.  Returns name of dictionary.

'1'	Specifies name of user 1 dictionary.  Returns name of dictionary.

'2	Specifies name of user 2 dictionary.  Returns name of dictionary.


spell_options

_command void spell_options()

"Tools", "Spell Check...", "Options..."

Remarks	Displays Spell Options dialog box.


_spell_options_form

_form _spell_options_form

Syntax	void show('_spell_options_form')

Remarks	Displays Spell Options dialog box.  Spell Options are set when the dialog box is closed.


_spell_save

int _spell_save( [_str user_dict1="", _str user_dict2="" )

Remarks	Writes the user dictionary 1 and 2 information in memory to the files specified.  user_dict1 and user_dict2 specify output file names.  The default user dictionary name set by the _spell_option function is used if a dictionary name is not specified.

Return	Returns 0 if successful.


spill_file_path

_command void spill_file_path( [_str path] )

Remarks	When path is given, the default spill file path is set to path.  If the spill file has already been created due to insufficient memory, this function has no effect on this session.  The current spill file path is displayed on the command line if no arguments are given.


_spill_file_path

_str _spill_file_path(_str path=null)

Return	Returns the default path for the editor spill file.  When path is not null, the default spill file path is set to path.  If the spill file has already been created due to insufficient memory, this function has no effect on this session.


split_insert_line

_command void [wid_expression.]split_insert_line()

Enter

Applies To	Edit Window, Editor Control, Command Line

Remarks	If the visible cursor is on the command line, the command is executed.  Otherwise the current line is split at the cursor.  Enough blanks are appended to the beginning of the new line to align it with the first non blank character of the original line.


split_line

_command void [wid_expression.]split_line()

Applies To	Edit Window, Editor Control

Remarks	Splits the current line at the cursor position.  Enough spaces are appended to the beginning of the new line to align it with the first non blank character of the current line.


_split_line

 void [wid_expression.]_split_line()

Applies To	Edit Window, Editor Control

Remarks	Splits the current line at the cursor position.  More specifically inserts p_newline character string at cursor.  If the cursor is past the end of the line, the p_newline character string is inserted after the last character of the line but before the line termination characters.


st

_command int st( [_str module_name] )

Remarks	Compiles the module specified.  If no name is specified and the current buffer has the extension e or cmd, the current module is saved (if necessary) and compiled.

Return	Returns 0 if successful.  A positive return code indicates a return code from the Slick-C translator meaning there is an error in the source module.  A negative return code indicates an error trying to find or execute the Slick-C translator.


st_position_on_error

int st_position_on_error()

Remarks	Parses Slick-C Translator error message.  Cursor is placed on the error if one exists.

Return	Returns 0 if successful. Otherwise 1 is returned.


start

_command void start( _str cmdline )

Remarks	 Passes cmdline to operating system start command.  This command is not supported by the UNIX version.


start_process

_command int start_process()

Ctrl+Shift+M or "Project", "Activate Build"

Remarks	Starts or activates the concurrent process buffer.  A concurrent process buffer is a command shell running inside an editor buffer.  The default command shell  is defined by the COMSPEC (UNIX: SHELL) environment variable.

Return	Returns 0 if successful.  however, this does not mean that the command shell will execute successfully.  A non-zero return code means that the concurrent process buffer was not created.  Common error codes are:  TOO_MANY_FILES_RC, TOO_MANY_SELECTIONS_RC, CANT_FIND_INIT_PROGRAM_RC, ERROR_CREATING_SEMAPHORE_RC, TOO_MANY_FILES_RC, NOT_ENOUGH_MEMORY_RC, ERROR_CREATING_QUEUE_RC, INSUFFICIENT_MEMORY_RC, and ERROR_CREATING_THREAD_RC.  On error, message is displayed.

See Also	stop_process, next_error, exit_process, set_next_error, reset_next_error, cursor_error, clear_pbuffer


start_recording

_command void start_recording()

Remarks	Starts macro recording.  Slick-C macro code will be generated until end_recording, record_macro_toggle, or record_macro_end_execute is executed.

See Also	end_recording, record_macro_toggle, save_macro, gui_save_macro, record_macro_end_execute


_stdform

_str _stdform(_str form_name)

Returns	Returns Windows form_name translated to the appropriated dialog box for the current operating System.  If there is no translation for the form form_name, form_name is returned.


sticky_message

void sticky_message(_str string)

Remarks	string is displayed on the message line.  Message will remain on the message line until another message is displayed or clear_message is called.

See Also	message, clear_message, messageNwait, _message_box, popup_message, popup_imessage


stop

void stop()

Remarks	Halts the macro command currently running.  If the command is an external command (extension '.e' or '.cmd'), the module is unloaded and the previous command is resumed.

See Also	exit, _suspend, _resume


stop_process

_command void stop_process()

"Project", "Break Process"

Remarks	Sends a Ctrl+Break signal to the concurrent process buffer created by the start_process command.

See Also	start_process, next_error, cursor_error, exit_process, set_next_error, reset_next_error, clear_pbuffer


_stop_process

void _stop_process()

Remarks	Sends a Ctrl+Break signal to the concurrent session created by the built-in function concur_shell.

See Also	concur_shell, _process_info


stranslate

_str stranslate(_str string, _str replace_string, _str search_string, _str options)

Return	Returns string with all occurrences of search_string replaced with replace_string.  See find function for information on valid search options.


strappend

_str strappend(_str &dest, _str source)

Return	Appends source string to end of dest string.  This function performs faster than using the statement "dest=dest:+source;".


strip

_str strip(_str string ,_str ltb="B",_str strip_char=" \t")

Return	Returns string stripped of leading and/or trailing strip_char.  If strip_char is not given, tabs and spaces are stripped.  ltb may be one of 3 values with the following meaning:

'L'     	Remove leading strip_char

'T'  	Remove trailing blanks

'B'   	Remove leading and trailing blanks.

By default, leading and trailing blanks are removed.

strip(' abc ')	:== 'abc'

strip(' abc ','L')	:== 'abc '

strip(' abc ','T') 	:== ' abc'

strip('  '\t'abc ' \t,'L')	:== 'abc '\t

strip('  '\t'abc '\t,'B',' ')	:== \t'abc '\t


strip_filename

_str strip_filename(_str filename ,['P']['E']['N']['D'])

Return	Returns filename with part stripped.  P=Path, D=Drive, E=Extension, N=Name.


strip_last_word

_str strip_last_word(_str &line)

Return	Returns the last space delimited word in line.   The last word and trailing spaces are deleted from line.


strip_options

_str strip_options(_str cmdline, _str &options)

Return	Returns cmdline without words that start with the characters '-', '+', or '['.  The variable Options is set to stripped option words.


substr

_str substr(_str string,int start,int length=-1,_str pad=" ")

Return	Returns length characters of string beginning at start.  By default, length is the rest of string.  If length is greater than length of string, the return string is padded with blanks or pad character if specified.  start must be a positive whole number.

Example

substr('test',2)  	:== 'est'

substr('test',1,5) 	:== 'test '

substr('',1,5,'*')	:== '*****'

substr('test',2,4)	:== 'est '


submit

int submit(_str file_name=p_buf_name )

Remarks	Submits the contents of the current buffer or the specified file to be processed as a batch job.  This command is available only on the System/390 platform.

See Also	shell, execute, dos


_suspend

int _suspend()

Remarks	Pushes a new level for a signal handler.  After a _suspend has been executed, errors which halt the interpreter will set the variable rc to the error code and _resume execution at the first statement after _suspend.  The _resume function restores the interpreter stack and code position to the state it was in after the last _suspend was executed.  Be sure to execute _resume to restore the previous signal handler.  This function sets the rc variable to 0 if successful.  Interpreter is stopped if too many suspends are performed.

Example

_suspend();	// rc is set to 0 by _suspend in first pass.

if (rc) {

     if (rc==1) {	// normal return?

         return(0);

     }

     message('Please specify floating point number');

     return(1);

}

// If arg(1) is not a valid number, run time error will occur which cause _resume

f=arg(1);

++f;

// Initiate normal return

rc=1;

_resume();

See Also	signal_handler, _resume


switch_buffer

void switch_buffer(_str old_buf_name)

Remarks	This procedure is called just after Visual SlickEdit switches to a new buffer.  When not in EMACS emulation, this procedure does nothing.  Under EMACS emulation, this procedure keeps track of the last buffer edited in the current window.


_syshelp

int _syshelp(_str help_filename,_str help_item, _str option= -1)

Remarks	Displays help.  This function is not available in the UNIX version.

option may be one of the following constants defined in "slick.sh":

HELP_FORCEFILE	Load help_filename specified.  If the help file is already loaded, the help window receives the focus.  help_item is ignored.

HELP_CONTENTS	Display table of contents help item of help_filename.  help_item is ignored.

HELP_KEY	Display help on help_item from help file help_filename.

HELP_PARTIALKEY	Displays Search dialog box which lists help items and allows you to enter a help item.   This constant is supported by Windows only and is translated to HELP_KEY for X Windows.

Windows, Windows 95/98, and Windows NT help files have the extension ".HLP".  help_filename specifies one or more help files separated with plus signs

Return	Returns 0 if successful.

Example

// Windows example.  Display help on SetFocus function.

_syshelp("win31wh.hlp+mscxx.hlp", "SetFocus");

See Also	wh, help


tab

void [wid_expression.]tab()

Applies To	Edit Window, Editor Control

Remarks	Places cursor at next tab stop if any.  If column is not in view, column is center scrolled or smooth scrolled into view depending on the scroll style.

See Also	backtab, tabs


tab_ext

_command void tab_ext( [_str file_extensions] )

Remarks	Specifies the file extensions which should have spaces compressed with tab characters when the save command is executed.  Files saved with tabs (especially assembler files) take up less disk space than files saved without tabs.  Tab compression increases the save time by about 15%.  Tab compression of a line stops when a quote is seen.  Lines that are part of a line continuation from the previous line (last character of line is '\\') are not tab compressed.

Command Line Example

       tab-ext  .asm               Compress assembler files with tabs


tabify_region

_command void [wid_expression.]tabify_region()

Applies To	Edit Window, Editor Control

Remarks	Used in EMACS emulation.  Converts consecutive spaces in the highlighted text to the equivalent number of tab characters.  If no highlighted text exists, an invisible selection is used which contains the last highlighted text not deleted or the last text pasted by the emacs_paste command.

See Also	indent_with_tabs, select_block, select_line, emacs_select_char, cut_region, indent_region, copy_region, untabify_region, exchange_point_and_mark, reflow_region, fill_selection, emacs_select_block


tabs

_command void [wid_expression.]tabs( [_str cmdline] )

Applies To	Edit Window, Editor Control

cmdline is a string in the format: [+t1]: [+t2]: [+t3] ...

Remarks	Sets up to tab stops in increasing order.  The commands ctab and cbacktab may be used to move between tab stops.  The '+' symbol is used to set tabs according to an increment value.  Tab stops continue past the last tab stop by repeating the difference of the last two tab stop values.

Command Line Examples

tabs 1 7 13 16	Creates tab stops 1 7 13 16 19 21 24 ...

tabs +3	Creates tab stops 1 4 7 ...

tabs 1 4	Creates tab stops 1 4 7 ...

tabs 1 49 +3	Creates tab stops 1 4 7 ...

tabs 1 49 +3 53 250 +4	Creates tab stops 1 4 7 ... 49 53 57 61 65 69 ...

tabs 10 +3	Creates tab stops 10 13 16 ...

See Also	ctab, cbacktab, move_text_tab, gui_tabs


_tag_form

_form _tag_form

Syntax	_str show('_tag_form')

Remarks	Displays Tag Files dialog box.

Return	Returns '' if dialog box is cancelled.  Otherwise, a command line argument ready for use as the input argument to the make_tags function is returned.


tags_filename

_str tags_filename()

Return	Returns the name of the tag file.  Returns the value of the VSLICKTAGS environment variable if set.  Otherwise, if the current project has tag files defined, those files are returned.  If the current project does not have any tag files defined, "tags.vtg" (UNIX: "utags.vtg") is returned.


test_event

_str test_event([_str options])

Remarks	options  defaults to '' and may be 'R' and/or 'K'

'R'	Specifies no screen refresh.

'K'	Return keys from physical keyboard and not keyboard macro that is being played back.

'P'	UNIX only.  Causes all messages except keyboard messages to be dispatched before testing for a key or mouse event.  This is necessary because the UNIX version can only look at the top message on the message queue.  This option is ignored under non-UNIX platforms.

Tests to see if a key or mouse message is available.  If a key is ready, a binary string representation of the key is returned.  If no key is available, '' is returned.    For ASCII keys a string of length 1 is returned.  For  extended keys, like Alt+L, and Backspace, a string of length 2 or 3 is returned.

If the 'R'  is not given, the screen is refreshed.

See Also	get_event, last_event, call_key, event2name, event2index, index2event, list_bindings, name2event, eventtab_index


text_col

int [wid_expression.]text_col(_str string [,int column [,'P'|'T'|'L'|'I']])

Applies To	Edit Window, Editor Control

Remarks	column does not have a default value.

third parameter defaults to 'L'.

Converts an imaginary column position to a physical string column position and visa versa.  The input and output values are described by the table below:

Third param.	Input column, Output column

'P'	Imaginary, Physical

'T'	Imaginary, Physical.  Position is negated if the imaginary column input corresponds to the middle of a tab character.

'L'	Doesn't matter, Imaginary length of string.

'I'	Physical, Imaginary

The input column is returned if input column is less than or equal to zero and the third parameter is not 'L'.

We use the term imaginary to describe column positions which correspond to a string as displayed on your screen.  Strings containing tab characters are expanded before displayed.  Hence, the need arises for a differentiation between physical and imaginary positions.  A physical position corresponds to a character in string.  The characters are number one to the length of string.  An imaginary position corresponds to a position in a string once tabs have been expanded.

Example  (Assume tabs are 1 9 17 25 ... (increments of 8))

text_col('abc'\t'def'\t'ghi')	== 19

text_col('abc'\t'def'\t'ghi',12,'P')	== 8

text_col('abc'\t'def'\t'ghi',13,'P')	== 8

text_col('abc'\t'def'\t'ghi',12,'T')	== 8

text_col('abc'\t'def'\t'ghi',13,'T')	== -8

text_col('abc'\t'def'\t'ghi',8,'I')	== 12

text_col('abc'\t'def'\t'ghi',-1,'P')	== -1

text_col('abc'\t'def'\t'ghi',0,'P')	== 0

text_col('abc'\t'def'\t'ghi',0,'I')	== 0

See Also	expand_tabs, _expand_tabsc, _text_colc


_text_colc

int [wid_expression.]_text_colc(int column=0 , _str option='L'])

Applies To	Edit Window, Editor Control

Remarks	Converts an imaginary column position to a physical string column position and visa versa.  The input and output values are described by the table below:

Second param.	Input column, Output column

'P'	Imaginary, Physical

'T'	Imaginary, Physical.  Position is negated if the imaginary column input corresponds to the middle of a tab character.

'L'	Doesn't matter, Imaginary length of string.

'E'	Doesn't matter, Imaginary length of line where the vsTruncQLineLength is used.  This has the same effect as the 'L' option if the VSP_TRUNCATELENGTH property is 0.

'I'	Physical, Imaginary

The input column is returned if input column is less than or equal to zero and the third parameter is not 'L'.

We use the term imaginary to describe column positions which correspond to a string as displayed on your screen.  Strings containing tab characters are expanded before displayed.  Hence, the need arises for a differentiation between physical and imaginary positions.  A physical position corresponds to a character in string.  The characters are number one to the length of string.  An imaginary position corresponds to a position in a string once tabs have been expanded.

See Also	expand_tabs, text_col


_text_height

int [wid_expression.]_text_height()

Applies To	All objects except Image

Returns	Returns the display height of the current font in the parent scale mode (p_xyscale_mode).

See Also	_text_width


_text_width

int [wid_expression.]_text_width(_str string)

Applies To	All objects except Image

Returns	Returns the display width of string in the current font.  Return value is in the parent scale mode (p_xyscale_mode).

See Also	_text_height


_textbox_form

_form _textbox_form

Syntax	_str show('_textbox_form', title ,flags ,text_box_width , help_item [, reserved [,retrieve_name [,prompt1 [,prompt2, ... promptN ]]]] )

Remarks	Displays one or more text boxes or combo boxes.

Input

title	Title of Dialog Box

flags	A combinations of the following flags defined in "slick.sh":

      TB_RETRIEVE	Create combo boxes instead of text boxes.  Fill in combo box list with previous response to combo box.  Be sure to specify the retrieve_name argument.

      TB_RETRIEVE_INIT	Same as TB_RETRIEVE.  In addition, combo box text is initialized to the previous responses unless the prompt string specifies an initial value.

      TB_VIEWID_INPUT	prompt1 is a view id and no arguments follow prompt1.

      TB_VIEWID_OUTPUT	The return value will be a view id containing the responses.

      TB_QUERY_COMPAT	The return value will be a view id containing the responses in the format of the QUERY command of SlickEdit.   This flag requires the TB_VIEWID_OUTPUT flag.

text_box_width	Specifies width of the text box in twips. 1440 twips is 1 inch on the display.  Specify '' for the default text box width.

help_item	Specifies help displayed when F1 is pressed or the help button is pressed.  If the help_item starts with a '?' character, the characters that follow are displayed in a message box.  The help string may also specify a unique keyword in the "vslick.hlp" (UNIX: "uvslick.hlp") help file.  The unique keywords for "vslick.hlp" (UNIX: "uvslick.hlp") are contained in the file "vslick.lst" (UNIX: "uvslick.lst").  In addition, you may specify a unique keyword for any windows help file by specifying a string in the format:  keyword:help_filename.

reserved	Specify '' for this parameter.  It is not supported yet.

retrieve_name	Specify the name of the command that called this function or a name for what is being prompted form.

prompt1, prompt2, ... promptN	Prompt strings.  See below

The prompt string argument are strings in the following format:   options label[: initial_value]

options may containing one of the following switches

-r  n1,n2	Value in text must be a valid floating pointer number in range n1..n2.

-e callback_name [:arg2]

Name of global function to call to check input.  First argument to call back function is the text in the text box.  Second argument is arg2 if specified.

-e1 callback_name[:arg2]

Name of global function to call to check values in ALL text boxes.  First argument is ''.  Second argument is arg2 if specified.  The text boxes have the control names (p_name) text1..textN and are numbered from top to bottom.

label is the caption to appear to the left of the text box.

initial_value is the initial value to appear in the text box.

Return	Returns '' if the dialog box is cancelled.

If the TB_VIEWID_OUTPUT flag is given, the return value is a view id containing the response to each text box on separates lines.  If the TB_QUERY_COMPAT flag is specified the format of the buffer is compatible with the output of the QUERY command of SlickEdit.  The view and buffer should be deleted with the _delete_temp_view function.

If the TB_VIEWID_OUTPUT flag is not given, the return value is 1, and the _param1. _paramN global variables are set to the responses to text1.. textN respectively.  The currently limit on globals for this case is 5.

Example

   parse p_margins with left_ma right_ma new_para_ma

   new_para_ma=strip(new_para_ma)

   result = show('-modal _textbox_form',

                 'Margins',	// Form caption

                 0,	//flags

                 '',	//use default textbox width

                 'gui_margins',	//Help item.

                 '',	//Font (not yet supported)

                 'gui_margins',	//Retrieve Name

                 '-E1 _check_margins Left Margin:'left_ma,

                 'Right Margin:'right_ma,

                 'New Paragraph Margin:'new_para_ma);

   if (result=='') {

      return(COMMAND_CANCELLED_RC);

   }

   p_margins=_param1' '_param2' '_param3


tile_windows

_command void tile_windows()

"Window", "Tile"

Remarks	Resizes and moves MDI edit windows so that they do not overlap.

See Also	cascade_windows


_tile_windows

void [wid_expression.]_tile_windows( _str option='V')

Applies To	MDI Window

Remarks	Resizes and moves MDI edit windows so that they do not overlap.

The option letter must be one of the following:

'V'	(Default) Attempt to tile windows vertically.

'H'	Attempt to tile windows horizontally.

See Also	_cascade_windows


_time

_str _time( _str retval_option='T' )

Return	Returns system time in the format specified.

retval_option may be one of the following.

'T'	Return time in the format hh:mmcc  where hh is an hour between 1 and 12, mm is the minutes between 0 and 59, and cc is the "am" or "pm".

'B'	Return binary time in milliseconds.  This options is used for comparing dates with the :< and :> operators.

'M'	24-hour (Military) time in the format hh:mm:ss where hh is an hour between 0 and 23, mm is the minutes between 0 and 59, and ss is the seconds between 0 and 59.

'L'	Returns time in the current local format.  Under Windows, this uses the regional settings "Time style".  For other platforms, this has not yet been defined.

See Also	_date


toolbars

_command void toolbars()

"View", "Toolbars..."

Remark	Displays the Toolbar Customization dialog box.  This dialog box is used to add and remove buttons from a toolbar.  You can also create new toolbars and choose which toolbars you want visible.

The following toolbars are available:

Project	Default toolbar display at left of MDI frame.  Includes tabs for class browser, project files, buffers, and disk files.

Output	Default toolbar display at bottom of MDI frame.  Includes tabs for build output, multi-file search output, and tag symbols for word at th cursor.

Standard	Default toolbar displayed at top of MDI frame.  Includes buttons for file open, file save, clipboard operations,  searching, help, version control, and displaying the current file in a web browser.

Tools	Includes buttons for the source code beautifier, difference editor, 3-way merge, find file, calculator, command prompt, spell checker, and hex mode toggle.

Edit	Includes buttons for uppercase, lowercase, shift selection left, shift selection right, indent, unindent, tabify selection, untabify selection, and match parenthesis.

Selective Display

Includes selective display buttons for function headings, hide code block, selective display dialog box, hide selected lines, and show all.


top

void [wid_expression.]top()

Applies To	Edit Window, Editor Control

Remarks	Places cursor at first line and first column of buffer

See Also	bottom


_top_height

int [wid_expression.]_top_height()

Applies To	Form

Remarks	Returns height in p_xyscale_mode of the top border of the window.

See Also	_bottom_height


top_of_buffer

_command void [wid_expression.]top_of_buffer()

Ctrl+HOME

Applies To	Edit Window, Editor Control

Remarks	Places cursor at first line and first column of buffer.  If the "Preserve Column on Top/Bottom" option ("Tools", "Configuration", "More Options...") is on, the cursor is placed at the top of the buffer and the column positon is unchanged.

See Also	bottom_of_buffer


top_of_window

_command void [wid_expression.]top_of_window()

Ctrl+PGUP

Applies To	Edit Window, Editor Control

Remarks	Places cursor at top of window.

See Also	bottom_of_window


_tprint

int _tprint( [_str filename  [,_str options [,_str cheader [,_str cfooter [,_str lheader [,_str lfooter [,_str rheader [,_str rfooter [,_str command  [,_str device [,_str filter]]]]]]]]]]] )

Applies To	Edit Window

Remarks	This function is only supported by the UNIX version.  Prints the contents of the current buffer according to the options given.

It is much easier to create input parameters to this function by using macro recording.  Use the Text Mode Print dialog box to set your options.  Then print a document while macro recording is on.

filename is inserted into the header and footer parameters wherever a %f occurs.  Usually this is the buffer name.

cheader, cfooter, lheader, lfooter, rheader, and rfooter are strings which may have escape sequences with the following meaning embedded into them:

%f	Buffer name

%p	Page number

%d	Date

the letters 'c', 'l', and 'r' correspond to the header or footer at the center, left, and right of the page.

The header is printer at the top of each page.  The footer is printed at the bottom of each page.

options is a string in the format:

   flags, bl_after_header, bl_before_footer, lines_per_page,  cols_per_line, linenums_every,

flags may be TPRINT_FORM_FEED_AFTER_LAST_PAGE or 0.

bl_after_header indicates the number of blank lines between the header line and the text on the page.  This value is ignored if all header parameters are blank.

bl_before_footer indicates the number of blank lines between the last line of text printed on the page and the footer line.

lines_per_page indicates the maximum number of lines that can be printed.  This includes header, footer, and blank lines.

cols_per_line indicates the maximum number of columns that can be printed on a line.

linenums_every when non-zero, lines at intervals of this value are printed with line numbers.

command specifies the program that will be executed to print the formatted text.  If no print command is specified, the text is written to the Print Device specified.  Usually command is set to "lp %f".

device specifies a printer device filename to write the formatted text to.  This value is ignored if a command has been specified.

filter specifies an external program to format text before it is printed and overrides our built-in print text formatting.  The program specified here must accept input from standard in and write its output to standard out.  This is usually a null string ('').

Return	Returns 0 if successful.

See Also	_tprint_format


tprint

_command int tprint( _str filename, _str options, _str cheader, _str cfooter, _str lheader, _str lfooter, _str rheader, _str rfooter, _str command, _str device, _str filter )

Remarks	This function is only available in the UNIX version.  The tprint command prints the contents of the current buffer according to the options given.  If a parameter is not specified, the default printer options set by the Text Mode Print dialog box are used.

It is much easier to create input parameters to this function by using macro recording.  Use the Text Mode Print dialog box to set your options.  Then print a document while macro recording is on.

command specifies the program that will be executed to print the formatted text.  If no print command is specified, the text is written to the Print Device specified.  Usually command is set to "lp %f".

device specifies a printer device filename to write the formatted text to.  This value is ignored if a command has been specified.

filter specifies an external program to format text before it is printed and overrides our built-in print text formatting.  The program specified here must accept input from standard in and write its output to standard out.  This is usually a null string ('').

See _tprint_format function for information on other parameters.

Return	Returns 0 if successful.

See Also	gui_print


_tprint_format

int _tprint_format( int output_view_id ,_str filename="" ,_str options="" ,_str cheader="" ,_str cfooter="" ,_str lheader="" ,_str lfooter="" ,_str rheader="" ,_str rfooter="" )

Applies To	Edit Window

Remarks	This function is only supported by the UNIX version.  Prints the contents of the current buffer according to the options given.

It is much easier to create input parameters to this function by using macro recording.  Use the Text Mode Print dialog box to set your options.  Then print a document while macro recording is on.

output_view_id specifies the window/buffer to get the formatted text.  Usually the _create_temp_view function is used to create an empty view.

filename is inserted into the header and footer parameters wherever a %f occurs.  Usually this is the buffer name.

cheader, cfooter, lheader, lfooter, rheader, and rfooter are strings which may have escape sequences with the following meaning embedded into them:

%f	Buffer name

%p	Page number

%d	Date

the letters 'c', 'l', and 'r' correspond to the header or footer at the center, left, and right of the page.

The header is printer at the top of each page.  The footer is printed at the bottom of each page.

options is a string in the format:

   flags, bl_after_header, bl_before_footer, lines_per_page,  cols_per_line, linenums_every,

flags are reserved and should be 0.

bl_after_header indicates the number of blank lines between the header line and the text on the page.  This value is ignored if all header parameters are blank.

bl_before_footer indicates the number of blank lines between the last line of text printed on the page and the footer line.

lines_per_page indicates the maximum number of lines that can be printed.  This includes header, footer, and blank lines.

cols_per_line indicates the maximum number of columns that can be printed on a line.

linenums_every when non-zero, lines at intervals of this value are printed with line numbers.

Return	Returns 0 if successful.

See Also	_tprint


tprint_selection

_command int tprint_selection( [_str filename [_str options [,_str cheader [,_str cfooter [,_str lheader [,_str lfooter [,_str rheader [,_str rfooter [,_str command  [,_str device [,_str filter]]]]]]]]]]] )

Remarks	This function is only available in the UNIX version.  Prints the selection according to the options given.  If a parameter is not specified, the default printer options set by the Text Mode Print dialog box are used.

It is much easier to create input parameters to this function by using macro recording.  Use the Text Mode Print dialog box to set your options.  Then print a document while macro recording is on.

See _tprint function for information on input parameters.

Return	Returns 0 if successful.


trace

void trace()

Remarks	Reserved word.


transpose_chars

_command void [wid_expression.]transpose_chars()

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Remarks	Exchanges the character to the left of the cursor with the character to the right of the cursor.  If the cursor is on the first character of the current line, the character to the right if any is exchanged with the character under the cursor.  If the cursor is past the end of line the last two characters are exchanged.  The cursor is placed on the character to the right.  This command has no affect if the current line has less than 2 characters.

See Also	transpose_words, transpose_lines


transpose_lines

_command void [wid_expression.]transpose_lines()

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Remarks	Exchanges the current line with the line above.  If the cursor is on the first line of the buffer, the line below is exchanged with the current line.  The cursor is placed on the character to the right.  This command has no affect if the current buffer has less than 2 lines.

See Also	transpose_words, transpose_chars


transpose_words

_command void [wid_expression.]transpose_words()

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Remarks	Exchanges the word to the left of the cursor with the word to the right of the cursor.  If the cursor is on a word character that word is considered the right word.  The cursor is placed on the first non-word character between the words and the non-word characters are not altered.  The default characters in a word are A-Z, a-z ,0-9, '_', and  '$'.  To change the word characters for a specific extension, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").

See Also	transpose_words, transpose_lines


translate

_str translate(_str string [ ,_str output_table [,_str input_table [,_str pad]]])

Return	Returns string with characters translated according to tables.  Characters that are in the input_table are translated to the corresponding character in the output table.  If the length of input_table is greater than the length of output_table, output_table is padded with the pad character given.  Pad character defaults to ''.  If output_table is not given, string is converted to upper case.

Example

     translate('bottom_of_window','-','_') 	=='bottom-of-window'

     translate('bottom_of_window','','_','*')	=='bottom*of*window'

     translate('bottom_of_window')	=='BOTTOM_OF_WINDOW'


translate_again

_command void [wid_expression.]translate_again()

Applies To	Edit Window

Remarks	Used in BRIEF emulation.  Repeats the last search and replace performed by the translate_forward or translate_backward command.

See Also	replace, find, i_search, reverse_i_search, search_case, case_toggle, re_search, re_toggle, search_forward, translate_forward, translate_backward, translate_again, search_backward


translate_backward

_command void [wid_expression.]translate_backward()

Applies To	Edit Window

Remarks	Used in BRIEF emulation.  Performs a search and replace in the backward direction.  This command is identical to the translate_forward command except the search and replace is in the backward direction.

See Also	replace, find, i_search, reverse_i_search, search_case, case_toggle, re_search, re_toggle, search_forward, translate_forward, search_again, translate_again, search_backward


translate_forward

_command void [wid_expression.]translate_forward()

Applies To	Edit Window

Remarks	Used in BRIEF emulation.  Performs a search and replace in the forward direction.  This command is identical to the replace command except that if the current buffer has a selection, the search is limited to the selection by default.  Another difference is that the translate_forward command does not accept any arguments.

See Also	replace, find, i_search, reverse_i_search, search_case, case_toggle, re_search, re_toggle, search_forward, search_again, translate_backward, translate_again, search_backward


_TreeAddItem

int [wid_expression.]_TreeAddItem(int ItemIndex, _str caption, int flags=0,  int NonCurrentBMIndex=0, int CurrentBMIndex=0, int ShowChildren=1, int moreFlags=0)

Applies To	Tree View

Remarks	Adds a new sibling or child item.

ItemIndex	Specifies a tree item.  The root of the tree can't be deleted and always has an item index of 0.

flags	One or more of the following flags ORed together.

TREE_ADD_BEFORE	Add this item before the item specified.

TREE_ADD_AS_CHILD	Add this item after last child of the item specified by ItemIndex.

TREE_ADD_SORTED_CS

Add this item sorted case sensitive.

TREE_ADD_SORTED_CI

Add this item sorted case insensitive.

TREE_ADD_SORTED_FILENAME

Add this item sorted by filename.

NonCurrentBMIndex

Names table index to a picture which gets displayed to the left of the caption text when this node is not the current node.  We recommend you specify the same values for NonCurrentBMIndex and CurrentBMIndex for leaf items.

CurrentBMIndex

Names table index to a picture which gets displayed to the left of the caption text when this node is the current node.

ShowChildren

Indicates whether to show the children of this node.  0 specifies not to show the children.  Specify 1 to initially show children of this node.  Set this to -1 for leaf items.

moreFlags

Allows you specify whether this item is hidden (TREENODE_HIDDEN).

Example

#include "slick.sh"

defeventtab form1

void tree1.on_create()

{

   flag=TREE_ADD_AS_CHILD;

   container1=prev=_TreeAddItem(0,"Container1",TREE_ADD_AS_CHILD, _pic_fldclos, _pic_fldaop,0);

   for (i=0;i<3;++i) {

      _TreeAddItem(container1,"item "i,TREE_ADD_AS_CHILD, _pic_file, _pic_file,-1);

   }

   container2=_TreeAddItem(container1,"Container2",0, _pic_fldclos, _pic_fldaop,0);

   for (i=0;i<3;++i) {

      _TreeAddItem(container2,"item "i,TREE_ADD_AS_CHILD, _pic_file,_pic_file,-1);

   }

}

Return	Returns the item index of the new item.


_TreeBottom

void [wid_expression.]_TreeBottom()

Applies To	Tree View

Remarks	This method moves the cursor to the last line of the displayed tree.


_TreeCurIndex

int [wid_expression.]_TreeCurIndex()

Applies To	Tree View

Return	Returns the current tree item index of the displayed tree.

See Also	_TreeSetCurIndex


_TreeCurLineNumber

int [wid_expression.]_TreeCurLineNumber(int lineNumber=-1)

Applies To	Tree View

Return	Returns the line number of the current node in the tree as if the tree we are list box.  If lineNumber>=0, the current node is set to the node corresponding to the line number specified.


_TreeDelete

void [wid_expression.]_TreeDelete( int ItemIndex,_str option="" )

Applies To	Tree View

Remarks	Deletes the tree item specified and all its descendants.  option may be "C" or "". When the "C" option is given, only the children of this tree item are deleted.


_TreeDown

int [wid_expression.]_TreeDown()

Applies To	Tree View

Return	This method is for moving the cursor down through the displayed tree.  Retuns 0 if successful.  Otherwise BOTTOM_OF_FILE_RC is returned.


_TreeGetCaption

_str [wid_expression.]_TreeGetCaption(int ItemIndex)

Applies To	Tree View

Return	Returns the caption for the specified tree item.

See Also	_TreeSetCaption, _TreeSetInfo, _TreeGetInfo, _TreeSetUserInfo, _TreeGetUserInfo


_TreeGetDepth

int [wid_expression.]_TreeGetDepth(int ItemIndex)

Applies To	Tree View

Return	Returns the depth of the specified tree item.  The depth of the root tree item (ItemIndex=0) is 0.


_TreeGetFirstChildIndex

int [wid_expression.]_TreeGetFirstChildIndex(int ItemIndex)

Applies To	Tree View

Return	Returns the tree item index of the first child of the node specified by ItemIndex.  -1 is returned if the node specified has no children.

See Also	_TreeGetNextSiblingIndex, _TreeGetPrevSiblingIndex, _TreeGetParentIndex


_TreeGetIndexFromLineNumber

int [wid_expression.]_TreeGetIndexFromLineNumber(int LineNumber')

Applies To	Tree View

Return	Returns tree item index corresponding to LineNumber given.

Parameters	Description

LineNumber	Specifies the line number of a tree node as if the tree we are list box.


_TreeGetIndexFromPoint

int [wid_expression.]_TreeGetIndexFromPoint(int mouX, int mouY, _str option='S')

Applies To	Tree View

Return	Returns tree item index under the mouse coordinates specified.

Parameters	Description

mouX	X coordinate.

mouY	Y coordinate.

option	'S' or 'P'.  'S' indicates that the coordinates are specified in p_xyscale_mode.  'P' indicates that the coordinates are in pixels.


_TreeGetInfo

void [wid_expression.]_TreeGetInfo(int ItemIndex, int &ShowChildren, int &NonCurrentBMIndex=0, int &CurrentBMIndex=0 int &moreFlags=0,int &lineNumber=0)

Applies To	Tree View

Remarks	Retrieves some tree item properties.

Parameters	Description

ItemIndex	Specifies a tree item.  The root of the tree can't be deleted and always has an item index of 0.

ShowChildren

Indicates whether children of this node are displayed.  0 indicates children are not displayed. 1 indicates children of this node are displayed. -1 for leaf items.

NonCurrentBMIndex

Names table index to a picture which gets displayed to the left of the caption text when this node is not the current node.

CurrentBMIndex

Names table index to a picture which gets displayed to the left of the caption text when this node is the current node.

moreFlags

Indicates whether this item is hidden (TREENODE_HIDDEN).

lineNumber

Set to the line number of the current node in the tree as if the tree we are list box.

See Also	_TreeSetCaption, _TreeGetCaption, _TreeSetInfo, _TreeSetUserInfo, _TreeGetUserInfo


_TreeGetNextIndex

int [wid_expression.]_TreeGetNextIndex(int ItemIndex, _str option="")

Applies To	Tree View

Return	Returns the tree item index of the next tree node as though the tree is a list box.  By default, will not return hidden nodes.  Specify 'H' to return hidden nodes. -1 is returned if the node specified has no next node.

See Also	_TreeGetParentIndex, _TreeGetNextIndex, _TreeGetPrevIndex, _TreeGetNextSiblingIndex, _TreeGetPrevSiblingIndex, _TreeGetFirstChildIndex


_TreeGetSelInfo

void [wid_expression.]_TreeGetSelInfo(int &Nofselected, int &startSelectedItem=0, int &endSelectedItem=0)

Applies To	Tree View

Remarks	Returns information about the selected items in the tree.  Only use this function if p_multi_select is set to MS_SIMPLE_LIST.

Parameters	Description

NofSelected

(Output only) Set to number of selected items in the tree.

firstSelectedItem

(Ouput only) Set to the tree item that started the selection.

endSelectedItem

(Ouput only) Set to the tree item that ends the selection.


_TreeGetNextSiblingIndex

int [wid_expression.]_TreeGetNextSiblingIndex(int ItemIndex)

Applies To	Tree View

Return	Returns the tree item index of the next sibling of the node specified by ItemIndex.  -1 is returned if the node specified has no next sibling.

See Also	_TreeGetParentIndex, _TreeGetPrevSiblingIndex, _TreeGetFirstChildIndex


_TreeGetNumChildren

int [wid_expression.]_TreeGetNumChildren(int ParentIndex)

Applies To	Tree View

Return	Returns the number of children beneath the parent node specified.


_TreeGetPrevIndex

int [wid_expression.]_TreeGetPrevIndex(int ItemIndex, _str option="")

Applies To	Tree View

Return	Returns the tree item index of the previous tree node as though the tree is a list box.  By default, will not return hidden nodes.  Specify 'H' to return hidden nodes. -1 is returned if the node specified has no next node.

See Also	_TreeGetParentIndex, _TreeGetNextIndex, _TreeGetPrevIndex, _TreeGetNextSiblingIndex, _TreeGetPrevSiblingIndex, _TreeGetFirstChildIndex


_TreeGetParentIndex

int [wid_expression.]_TreeGetParentIndex(int ItemIndex)

Applies To	Tree View

Return	Returns the tree item index of the parent of the node specified by ItemIndex.  -1 is returned if the node specified has no parent (this only happens when ItemIndex is 0).

See Also	_TreeGetNextSiblingIndex, _TreeGetPrevSiblingIndex, _TreeGetFirstChildIndex


_TreeGetPrevSiblingIndex

int [wid_expression.]_TreeGetPrevSiblingIndex(int ItemIndex)

Applies To	Tree View

Return	Returns the tree item index of the previous sibling of the node specified by ItemIndex.  -1 is returned if the node specified has no previous sibling.

See Also	_TreeGetParentIndex, _TreeGetNextSiblingIndex, _TreeGetFirstChildIndex


_TreeGetUserInfo

typeless [wid_expression.]_TreeGetUserInfo(int ItemIndex)

Applies To	Tree View

Return	Returns the user info value set by the _TreeSetUserInfo method for the specified tree item.

See Also	_TreeSetCaption, _TreeGetCaption, _TreeSetInfo, _TreeGetInfo, _TreeSetUserInfo


_TreePageDown

void [wid_expression.]_TreePageDown()

Applies To	Tree View

Remarks	This method is for moving the cursor down one page through the displayed tree.  Retuns 0 if successful.  Otherwise BOTTOM_OF_FILE_RC is returned.


_TreePageUp

void [wid_expression.]_TreePageUp()

Applies To	Tree View

Remarks	This method is for moving the cursor up one page through the displayed tree.  Retuns 0 if successful.  Otherwise TOP_OF_FILE_RC is returned.


_TreeScroll

int [wid_expression.]_TreeScroll(int lineNumber=-1)

Applies To	Tree View

Return	Returns the line number of the first visible node is returned.  If lineNumber>=0, then the first visible node is set to the node corresponding the line number specified.


_TreeSearch

int [wid_expression.]_TreeSearch( int ItemIndex, _str searchCaption, _str options="", _str searchUserInfo=null )

Applies To	Tree View

Parameters	Description

ItemIndex	By default, this is the parent index of the children to be searched.  If the 'S' option is specified, this is the first sibling searched.

searchCaption	Item caption to search for.

options	A string of zero or more of the following:

'I'	Case insensitive search.

'P'	Prefix match.

'S'	Search siblings.  When this is specified, itemIndex is the first sibling searched.  By default, itemIndex is the parent of the items to be searched.

'T'	Search recursively through the tree.  By default, only one level is searched.

searchUserInfo	Option item user info to search for.

Remarks	Searches a tree control.

Return	Returns the index of the tree item or -1 if the search fails.

See Also	_TreeGetCaption, _TreeSetInfo, _TreeGetInfo, _TreeSetUserInfo, _TreeGetUserInfo


_TreeSetAllFlags

void [wid_expression.]_TreeSetAllFlags(int flags, int mask=flags)

Applies To	Tree View

Remarks	Sets all node flags in the tree.  Only use this function if p_multi_select is set to MS_SIMPLE_LIST.

flags

New flags to set.

mask

Indicates which flags will be effected.

Example

       // Select all the items in the tree

       tree1._TreeSetAllFlags(TREENODE_SELECTED);

       // Deselect all the items in the tree

       tree1._TreeSetAllFlags(0,TREENODE_SELECTED);


_TreeSetCaption

void [wid_expression.]_TreeSetCaption(int ItemIndex, _str caption)

Applies To	Tree View

Remarks	Sets the caption for the specified tree item.

See Also	_TreeGetCaption, _TreeSetInfo, _TreeGetInfo, _TreeSetUserInfo, _TreeGetUserInfo


_TreeSetCurIndex

void [wid_expression.]_TreeSetCurIndex(int ItemIndex)

Applies To	Tree View

Remarks	Sets the current index in the display tree.

See Also	_TreeCurIndex


_TreeSetInfo

void [wid_expression.]_TreeSetInfo(int ItemIndex, int ShowChildren, int NonCurrentBMIndex=-1, int CurrentBMIndex=-1, int moreFlags=0)

Applies To	Tree View

Remarks	Modifies some tree item properties.

ItemIndex	Specifies a tree item.  The root of the tree can't be deleted and always has an item index of 0.

ShowChildren

Indicates whether to show the children of this node.  0 specifies not to show the children.  Specify 1 to initially show children of this node.  Set this to -1 for leaf items.

NonCurrentBMIndex

Names table index to a picture which gets displayed to the left of the caption text when this node is not the current node.  We recommend you specify the same values for NonCurrentBMIndex and CurrentBMIndex for leaf items.

CurrentBMIndex

Names table index to a picture which gets displayed to the left of the caption text when this node is the current node.

moreFlags

Allows you specify whether this item is hidden (TREENODE_HIDDEN).

See Also	_TreeSetCaption, _TreeGetCaption, _TreeGetInfo, _TreeSetUserInfo, _TreeGetUserInfo


_TreeSetUserInfo

void [wid_expression.]_TreeSetUserInfo(int ItemIndex, typeless info)

Applies To	Tree View

Remarks	Sets the user info value for the specified tree item.

See Also	_TreeSetCaption, _TreeGetCaption, _TreeSetInfo, _TreeGetInfo, _TreeGetUserInfo


_TreeSortCaption

void [wid_expression.]_TreeSortCaption(int ParentIndex, _str PrimarySortOptions="", _str SecondarySortOptions="" )

Applies To	Tree View

Remarks	Sort children of node specified where caption is the primary key and optionally the user info is the secondary key.

Parameters	Description

ParentIndex	Tree item index to parent containing children to be sorted.

PrimarySortOptions	String of one or more of the following options:

F	Sort filenames

N	Sort numbers

E	Exact Case.  Sort is case insensitive if this option is not specified.

D	Descending.  Sort is ascending if this option is not specified.

P	Place parents nodes at the top after sort.  Here we consider a parent nodes to be those with ShowChildren>-1.

SecondarySortOptions	String of sort options for secondary key.   See PrimarySortOptions.

See Also	_TreeSortUserInfo


_TreeSortUserInfo

void [wid_expression.]_TreeSortUserInfo( int ParentIndex, _str PrimarySortOptions="",_str SecondarySortOptions="" )

Applies To	Tree View

Remarks	Sort children of node specified where user info is the primary key and optionally the caption is the secondary key.

Parameters	Description

ParentIndex	Tree item index to parent containing children to be sorted.

PrimarySortOptions	String of one or more of the following options:

F	Sort filenames

N	Sort numbers

E	Exact Case.  Sort is case insensitive if this option is not specified.

D	Descending.  Sort is ascending if this option is not specified.

P	Place parents nodes at the top after sort.  Here we consider a parent nodes to be those with ShowChildren>-1.

SecondarySortOptions	String of sort options for secondary key.   See PrimarySortOptions.

See Also	_TreeSortCaption


_TreeTop

void [wid_expression.]_TreeTop()

Applies To	Tree View

Remarks	This method moves the cursor to the first line of the displayed tree.


_TreeUp

int [wid_expression.]_TreeUp()

Applies To	Tree View

Return	This method is for moving the cursor up through the displayed tree.  Retuns 0 if successful.  Otherwise TOP_OF_FILE_RC is returned.


trunc

_command void [wid_expression.]trunc(_str number='')

Applies To	Edit Window, Editor Control

Remarks	Displays and optionally sets the p_TruncateLength property.  See p_TruncateLength property for more information.


try_calling

void try_calling(int proc_index)

Remarks	If proc_index is a valid index to a procedure that exists, proc_index is called with no arguments.

See Also	call_root_key


_twips_per_pixel_x

int _twips_per_pixel_x()

Return	Returns the number of twips per pixel in the x direction on the display.  We recommend that you use the _dx2lx function instead of this function because it may not be portable.

See Also	_twips_per_pixel_y ,_dx2lx


_twips_per_pixel_y

int _twips_per_pixel_y()

Return	Returns the number of twips per pixel in the y direction on the display.  We recommend that you use the _dy2ly function instead of this function because it may not be portable.

See Also	_twips_per_pixel_x ,_dy2ly


type2oi

int type2oi(int type)

Return	Returns name type given converted to the corresponding object index.

See Also	oi2type


unbind_key

_command int unbind_key( [_str cmdline] )

cmdline is a string in the format: max_keystrokes [-r | -m]

Remarks	Unbinds the next key you press.

Prefix and cancel keys may only be unbound by specifying the max_keystrokes parameter.  max_keystrokes is a positive number representing the maximum number of keystrokes that will be pressed.  Alt, Ctrl, and Shift prefix key combinations count as one key stroke.

Normally a mode event table binding takes precedence over a root event table binding.  When the mode event table has no binding for the key, the root event table binding is selected to be unbound.  The -r and -m options may be used to select key bindings to the root or mode event table.

Return	Returns 0 if successful. Otherwise COMMAND_CANCELLED_RC is returned.  On error, message is displayed.

See Also	bind_to_key


undo

_command void [wid_expression.]undo()

Ctrl+Z or F9 or Alt+Backspace or "Edit", "Undo"

Applies To	Edit Window, Editor Control

Remarks	If the current buffer allows more than 0 undoable steps, the last operation is undone.  Cursor movement, scrolling, editing, and selection changes are undoable.  Undo does not affect disk files.  To set the maximum number of undoable steps for the current buffer, use the undo_steps command.  To set the maximum number of undoable steps for files not yet loaded, use the File Options dialog box. ("Tools", "Configuration", "File Options...", select Load Tab).

If the current buffer has 0 undoable steps, the current line is restored to its original value before the cursor moved onto it.

See Also	redo, undo_steps, load_options, undo_cursor


_undo

int [wid_expression.]_undo( _str option_letter='U' )

Applies To	Edit Window, Editor Control

Remarks	option_letter defaults to 'U' and may be one of the following:

'U'	If the current buffer allows more than 0 undoable steps, the last operation is undone.  Otherwise, the current line is restored to its original value before the cursor moved onto it.

'C'	Same 'U' option except when the current buffer has more than 0 undoable steps.  Consecutive cursor motion is undone as one step.

'R'	If the current buffer has more than 0 undoable steps, the last undo operation is redone.  Otherwise, this function has no affect.

'S'	Starts a new level of undo.

On successful, completion, a number greater than or equal to zero is returned which is composed of the flags below (defined in "slick.sh"):

LINE_DELETES_UNDONE

CURSOR_MOVEMENT_UNDONE

MARK_CHANGE_UNDONE

TEXT_CHANGE_UNDONE

LINE_INSERTS_UNDONE

MODIFY_FLAG_UNDONE

If not successful, NOTHING_TO_UNDO_RC or NOTHING_TO_REDO_RC is returned.

See Also	undo_msg


undo_cursor

_command void [wid_expression.]undo_cursor()

Shift+F9

Applies To	Edit Window, Editor Control

Remarks	This command is identical to the undo command except that consecutive steps that are just cursor motion are undone in one step.  Use this command instead of the undo command when you are only interested in seeing text changes undone.


undo_msg

_str undo_msg(int status)

Return	Returns a string message indicating what was changed by an undo or redo operation.  The input status parameter must be a positive return value from the undo built-in.  If the undo built-in returns a negative return code, do not call this procedure with that value.


undo_steps

_command void [wid_expression.]undo_steps( [int Nofsteps] )

Remarks	Sets the maximum number of undoable steps for the current buffer.  A value of 0 for Nofsteps turns undo off.  The range of Nofsteps is 0..32767.  This command is a simple front end to the p_undo_steps property.


unindent_selection

_command void unindent_selection()

Shift+Tab or "Edit", "Unindent"

Applies To	Edit Window, Editor Control

Remarks	Unindents selection.  For line and character selections, one indent level is removed from each line.  For block selections, one indent level starting from the left edge of the selection is removed.  Indenting will be with tab or space characters depending upon the Indent With Tabs setting ("Tools", "Configuration", "File Extension Setup...").  Set the Syntax Indent for each level using the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").  If Syntax Indent is grayed, the tab settings are used for all tab related operations including this command.

See Also	indent_selection


_unique_name

void [wid_expression.]_unique_name()

Applies To	All objects that are created on a form.

Remarks	Gives the object a unique name (p_name) different from other controls on the form.  If p_name is not '' and is already unique (no other controls have the same name), it is not changed.

See Also	_unique_tab_index


_unique_tab_index

void [wid_expression.]_unique_tab_index()

Applies To	All objects that are created on a form.

Remarks	Gives the object a unique tab index (p_tab_index) different from other controls on the form.  If p_tab_index is not 0 and is already unique (no other controls have the same tab index), it is not changed.

See Also	_unique_name


unlist_all

_command void unlist_all()

(fileman mode only) FILEMAN, "Files...", "Unlist all"

Remarks	Deletes all lines of the current buffer.  The lines may be retrieved with the command paste.  Used in fileman mode

See Also	_lbclear


unlist_attr

_command void unlist_attr( 'R'|'H'|'S'|'A'|'D' )

Remarks	Deletes lines of files with the specified attribute(s).  If more than one file attribute is given, they must appear in the same order as the attributes column with dashes present if necessary so that a column search can be performed.  Used in fileman mode

See Also	fileman_attr


unlist_ext

_command void unlist_ext(extension)

Remarks	Deletes lines of files with the specified extension.  Used in fileman mode.


unlist_search

_command void unlist_search(search_string)

Remarks	Prompted search and delete line.  Used in fileman mode.


unlist_select

_command void unlist_select()

Remarks	Lines beginning with the character '>' are deleted.  Used in fileman mode.


unload

_command void unload(_str module_names)

Remarks	Unloads modules specified.  If the module is currently running it may not be unloaded.  Do not specify a path for module_names.

See Also	load, gui_load, gui_unload


unnumber

_command int [wid_expression.]unnumber()

Applies To	Edit Window, Editor Control

Remarks	Removes line numbers from all lines in the current buffer.  It uses the extension specific numbering options to determine where line numbers will be located.  In ISPF emulation, this command is not called when invoked from the command line.  Instead ispf_unnumber is called.

.

See Also	ispf_unnumber, renumber


untabify_region

_command void [wid_expression.]untabify_region()

Applies To	Edit Window, Editor Control

Remarks	Used in EMACS emulation.  Converts consecutive tab characters in the highlighted text to the equivalent number of space characters.  If no highlighted text exists, an invisible mark is used which contains the last highlighted text not deleted or the last text pasted by the emacs_paste command.

See Also	indent_with_tabs, select_block, select_line, emacs_select_char, cut_region, indent_region, copy_region, tabify_region, exchange_point_and_mark, reflow_region, fill_selection, emacs_select_block


up

int [wid_expression.]up( [int number] )

Applies To	Edit Window, Editor Control

Remarks	Moves cursor number of lines up.  If number is not given a value of '1' is used.  If line is not in view, line is center scrolled or smooth scrolled into view.  If stop_column is specified, the up primitive stops when a line of length greater than or equal to stop_column is reached or until number of lines are scrolled.  Parameter two is useful for detecting lines that are too long to be printed on a printer.

Return	Returns 0 if successful.  Otherwise TOP_OF_FILE_RC is returned.

Example

       status=up();

       if (status==TOP_OF_FILE_RC) {

            message(get_message(status));

       }

See Also	down


upcase

_str upcase(_str string)

Returns string converted to upper case.

Example

upcase('ABc')	== 'ABC'

upcase('abc')	== 'ABC'

See Also	lowcase, upcase_selection, upcase_word


upcase_selection

_command void upcase_selection()

"Edit", "Other...", "Upcase"

Applies To	Edit Window, Editor Control

Remarks	Translates characters within selection into upper case.

See Also	lowcase_selection, upcase, upcase_word


upcase_word

int [wid_expression.]upcase_word()

Ctrl+Shift+U

Applies To	Edit Window, Editor Control

Remarks	Translates the current word to upper case and places the cursor after the current word.  To change the word characters for a specific extension, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").

Return	Returns 0 if successful.  Returns 1 if no word exists at cursor.  On error, message is displayed.

See Also	lowcase_word, cap_word, upcase, upcase_selection


_update_buffers

void _update_buffers(_str extension, _str update_list)

Remarks	Updates extension specific options you specify for all buffers.  This function does not change the default extension specific options.  Use the _setext function to change extension specific defaults.

update_list is a  string in the format: option=value ,option=value ,option=value ...

option may be one of the following:

p_mode_name or MN

Value specifies mode name.

p_tabs or TABS

Value specifies tab settings.

p_margins or MA

Value specifies margins.

p_mode_eventtab or KEYTAB

Value specifies mode event table.

p_word_wrap_style or WW

Value specifies word wrap style.

p_indent_with_tabs or IWT

Value specifies indent with tabs.

p_indent_style or IN

Value specifies indent style.

p_word_chars or WC

Value specifies word chaacters.

p_lexer_name or LN

Value specifies lexer name.

p_color_flags or CF

Value specifies color flags.

value may be not contain a comma character.

Example

#include "slick.sh"

defmain()

{

   // Can specify "" instead of "fundamental" to refer to buffers with no extension

   //Change the default margins for fundamental mode.

    _setext("fundamental","p_margins","1 70 1");

   // Update buffers already being edited

    _update_buffers("fundamental","p_margins=1 70 1");

}

See Also	_setext


update_format_line

void [wid_expression.]update_format_line()

Applies To	Edit Window, Editor Control

Remarks	Updates the format line of the current buffer, if present, to the current tab and word wrap options.  See section Format Line for more information.

See Also	read_format_line


_update_picture

int _update_picture(int index, _str filename)

Remarks	Replaces a picture or inserts a picture into the names table.  filename is the filename of a bitmap (.bmp) or pixmap (.xpm) .    Currently only bitmaps and pixmap files are supported.  After a picture is inserted into the names table, the path information is removed (name_name(p_picture) has no path).  Therefore, if you try to load two pictures from different directories with the same name part into the names table, the second copy will replace the first.

Important: Pictures are deleted from the names table when you save the configuration if the name of the picture does not start with an underscore ('_') and no forms reference the picture (p_picture).

If index is less than 0, the existing picture will be replaced if it already exists.  If it does not exist, the new picture is inserted.

If index is 0, a new picture is inserted.

If index is greater than 0, it is assumed to be a names table index to an existing picture to be replaced.

Return	Returns the names table index of the new picture if successful.  This index can be used by the p_picture property.  On error, a negative error code is returned.  Common error codes are FILE_NOT_FOUND_RC are PATH_NOT_FOUND_RC.

Example

// Replace the existing picture.  Use -1 for index unless you know what you are doing.

index=_update_picture(-1, '_drfixed.bmp');

messageNwait('name_name(index)='name_name(index));

// Try this code during a lbutton_up event of a command button.

// you need a form with a picture box called picture1 as well.

index=_update_picture(picture1.p_picture,'_drfixed.bmp');

messageNwait('name_name(index)='name_name(index));


_update_template

int [wid_expression.]_update_template()

Applies To	Form

Remarks	Updates a dialog box template in the names table.  If the p_template property is 0, a new dialog box template is inserted.  Otherwise, the existing dialog box template is replaced.  Specify the name of the form (p_name) to the show command to display the dialog box.

Return	Returns the index into the names table of the dialog box template.  The p_template property of the form is set to the index into the names table of the dialog box template.  On error, a negative error code is returned which can be used by get_message to retrieve the error message.


_use_edit_font

void [wid_expression.]_use_edit_font(int index, _str filename)

Applies To	Editor Control, Edit Window

Remarks	Sets the font properties to be the default font used by MDI edit windows.


v_match

_str v_match(_str name, int find_first)

Return	Returns next global Slick-C variable name which is a prefix match of name.  find_first must be non-zero to initialize matching.  Returns '' when no more matches are found.


_varformat

int typeless._varformat()

Return	Returns VF_??? constant defined in "slick.sh" which indicates the current storage format of a variable (often not the same as declaration type).  We DO NOT recommend you use this function because its return values are likely to change with the next version of Slick-C.  This function is currently only intended for use by the developers of Visual SlickEdit and Slick-C.

Example

t=1;

messageNwait("varformat="t._varformat());

See Also	_el, _makeempty, _isempty, _deleteel, _nextel, _indexin, _sort


verify

_str verify(_str string, _str reference [, _str option="",int start=1)

Remarks	If option =='', this function returns the first character position in string which is not one of the characters in reference.  If string is only composed of characters from reference, then 0 is returned.

If option == 'M' , this function returns the first character position in string which matches one of the characters in reference.  If no characters in reference match a character in string, 0 is returned.

If start is specified, the searching begins at start.

Example

verify("test.*","*?",'M')	==6

verify("?*st.*","*?",'M',3)	==6

verify("?*st.*","*?") 	==3


version

_command void version()

"Help", "Program Information..."

Remarks	Displays version of editor in message box.


view_line_numbers_toggle

_command void [wid_expression.]view_line_numbers_toggle()

"View", "Line Numbers"

Applies To	Edit Window, Editor Control

Remarks	Toggles line number display on/off.  This command does more than just set the p_line_numbers_len property.

See Also	view_special_chars_toggle, view_spaces_toggle, view_tabs_toggle, view_nlchars_toggle, p_ShowSpecialChars


view_nlchars_toggle

_command void [wid_expression.]view_nlchars_toggle()

"View", "New Line Chars"

Applies To	Edit Window, Editor Control

Remarks	Toggles newline character display on/off.

See Also	view_special_chars_toggle, view_spaces_toggle, view_tabs_toggle, view_line_numbers_toggle, p_ShowSpecialChars


view_spaces_toggle

_command void [wid_expression.]view_spaces_toggle()

"View", "Spaces"

Applies To	Edit Window, Editor Control

Remarks	Toggles space display on/off.

See Also	view_special_chars_toggle, view_tabs_toggle, view_nlchars_toggle, view_line_numbers_toggle, p_ShowSpecialChars


view_special_chars_toggle

_command void [wid_expression.]view_special_chars_toggle()

"View", "Special Chars"

Applies To	Edit Window, Editor Control

Remarks	Toggles display of all special characters such as tabs, spaces, newline and more on/off.

See Also	view_spaces_toggle, view_tabs_toggle, view_nlchars_toggle, view_line_numbers_toggle, p_ShowSpecialChars


view_tabs_toggle

_command void [wid_expression.]view_tabs_toggle()

"View", "Tab Chars"

Applies To	Edit Window, Editor Control

Remarks	Toggles Tab display on/off.

See Also	view_special_chars_toggle, view_spaces_toggle, view_nlchars_toggle, view_line_numbers_toggle, p_ShowSpecialChars


visit_file

_command void [wid_expression.]visit_file()

Applies To	Edit Window

Remarks	Used in EMACS emulation.  Loads a file from disk and replaces the contents of the current buffer with it.  Prompts you for the file to load on the command line.

See Also	edit, gui_visit_file


vsplit_window

_command int vsplit_window()

"Window", "Vsplit"

Applies To	Edit Window

Remarks	Splits the current window vertically in half.

Return	Returns 0 if successful.

See Also	hsplit_window


vsActivateView

void VSAPI vsActivateView(int view_id)

Applies To	All Objects

Parameters	Description

view_id	View id or window id to activate.  View ids are negative.  Window ids are positive.  Only editor controls have views.  Activating a view will always activate a window.  It will also activate the buffer currently attached to the view.

Remarks	For an explanation of how windows, views, and buffers are related, see Windows Structure.

A view cannot exist without being attached to a window and a buffer.    vsActivateView makes the window, view, and buffer corresponding to view_id active.  A view holds the information necessary for the editor to remember your location in a buffer.  The view properties you can access are VSP_CURSORX, VSP_CURSORY, VSP_LINE, VSP_COL, VSP_LEFTEDGE, VSP_BUFID, VSP_VIEWID, and VSP_WINDOWID.  When you have more than one window looking at the same buffer,  the windows have different views of that buffer.  Usually all view variables are different except for VSP_BUFID.

Example

     int view_id;

     // Remember the current view id

     view_id=vsPropGetI(0,VSP_VIEWID);

     // Switch to hidden view id

     vsActivateView(VSHIDDEN_VIEWID);

     //Switch back to original view

     vsActivateView(view_id);

See Also	vsPropGetI, vsPropSetI


vsAlloc

void * VSAPI vsAlloc(int len)

Return	If successful, returns a pointer to len allocated bytes of memory.  Otherwise 0 is returned.  The memory is not initialized with zeros.  Use the vsFree function to free memory allocated by this function.

See Also	vsFree, vsRealloc


vsAllocColor

VSCOLORINDEX VSAPI vsAllocColor(int wid)

Applies To	Edit window, Editor control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

Return	If successful, new color index is returned.  Otherwise 0 is returned.  Use the vsSetDefaultColor function to set the color attributes.  Color indexes are passed to the vsSetTextColor function to set color.  There is a limit of 255 colors so make sure to free the color when you are done.

See Also	vsFreeColor, vsSetTextColor, vsGetTextColor, vsSetDefaultColor, vsGetDefaultColor


vsAllocSelection

int VSAPI vsAllocSelection(int AllocBookmark)

Return	Returns a handle to a selection or bookmark.  A selection requires 2 marks and a bookmark requires one. If no more marks are available, a negative number (TOO_MANY_SELECTIONS_RC) is returned.  This handle may be passed as a parameter to other selection functions such as vsSelectLine and vsCopyToCursor.  Specify a non-zero value for AllocBookmark to allocate a book mark.  Bookmarks can not be deleted.

IMPORTANT: The active selection or selection showing may not be freed by the vsFreeSelection function.  Use the vsShowSelection function to make another mark active before freeing the mark you have allocated.

See Also	vsFreeSelection


vsArg

VSHVAR VSAPI vsArg(int ParamNum)

Return	If ParamNum is zero, the number of parameters passed to the function are returned.  If ParamNum is greater than the number of parameters passed to the function, 0 (null VSHVAR) is returned.  Otherwise, a valid VSHVAR is returned corresponding to the parameter number specified.  A VSHVAR is a handle to an interpreter typeless variable.  The vsHvarxxx functions can be used to get VSHVARs.

See Also	vsHvarGetI, vsHvarGetZ, vsHvarGetLstr, vsHvarSetB, vsHvarSetI, vsHvarSetZ, vsHvarHashtabEl, vsHvarArrayEl, vsHvarAlloc, vsHvarFree


vsBookmarkAdd

void VSAPI vsBookmarkAdd( const char  pszBookmarkName, int markid, int vsbmflags=VSBMFLAG_SHOWNAME|VSBMFLAG_STANDARD, int RealLineNumber=-1, int col=0, long BeginLineROffset=0, char *pszLineData=0, char *pszFilename=0, char *pszDocumentName=0)

Parameters	Description

pszBookmarkName	Name of bookmark to add.

markid	Selection id returned from vsAllocSelection or vsDuplicateSelection.

vsbmflags	Combination of VSBMFLAGS_??? ORed together.

RealLineNumber	Real line number of bookmark.  Specify -1 if markid is an active bookmark.

col	Column of bookmark.  Specify 0 if markid is an active bookmark.

BeginLineROffset	Real offset to beginning of line.  Imaginary line data not counted.  Specify 0 if markid is an active bookmark.

pszLineData	Text on the line of the bookmark.  Specify 0 if markid is an active bookmark.

pszFilename	Filename the bookmark is in.  Specify 0 if markid is an active bookmark.

pszDocumentName	Document name the bookmark is in.  Specify 0 if markid is an active bookmark.

Remarks	Adds a new bookmark.

See Also	vsBookmarkAdd, vsBookmarkRemove, vsBookmarkRestore, vsBookmarkGetInfo, vsBookmarkFind, vsBookmarkQCount


vsBookmarkGetInfo

int VSAPI vsBookmarkGetInfo( int i, char *pszBookmarkName=0, int *pmarkid=0, int *pvsbmflags=0, int *pbuf_id=0, int determineLineNumber=1, int *pRealLineNumber=0, int *pCol=0, long *pBeginLineROffset=0, char *pszLineData=0, char *pszFilename=0, char *pszDocumentName=0)

Parameters	Description

i	Bookmark index where 0<=i<vsBookmarkQCount().

pszBookmarkName	Set to name of bookmark.  Must have VSMAXBOOKMARKNAME chacters allocated. Specify NULL if you don't need this value.

pmarkid	Set to selection id previous given to vsBookmarkAdd.  Specify NULL if you don't need this value.

pvsbmflags	Set to combination of VSBMFLAGS_??? ORed together. Specify NULL if you don't need this value.

pbuf_id	Set to buffer id of bookmark. Specify NULL if you don't need this value.

pRealLineNumber	Set to real line number of bookmark. Specify NULL if you don't need this value.

pcol	Set to column of bookmark. Specify NULL if you don't need this value.

pBeginLineROffset	Set to real offset to beginning of line.  Imaginary line data not counted. Specify NULL if you don't need this value.

pszLineData	Set to text on the line of the bookmark.  Must have VSMAXBOOKMARKLINEDATA allocated. Specify NULL if you don't need this value.

pszFilename	Set to filename the bookmark is in.  Must have VSMAXFILENAME allocated. Specify NULL if you don't need this value.

pszDocumentName	Set to document name the bookmark is in.  Must have VSMAXDOCUMENTNAME allocated. Specify NULL if you don't need this value.

Remarks	Retrieves information for a bookmark.

Return	Returns 0 or TEXT_NOT_SELECTED_RC if successful.  TEXT_NOT_SELECT_RC indicates that the bookmark is not active.  This occurs when a buffer with bookmarks is closed.

See Also	vsBookmarkAdd, vsBookmarkRemove, vsBookmarkRestore, vsBookmarkGetInfo, vsBookmarkFind, vsBookmarkQCount


vsBookmarkFind

int VSAPI vsBookmarkFind( const char *pszBookmarkName,int vsbmflags=VSBMFLAG_STANDARD)

Parameters	Description

pszBookmarkName	Name of bookmark to find.

vsbmflags	One or more of these flags must be in the bookmark found.

Remarks	Finds bookmark index.

Return	Returns index of boomark 0..vsBookmarkQCount() or -1 to indicate the bookmark was not found.

See Also	vsBookmarkAdd, vsBookmarkRemove, vsBookmarkRestore, vsBookmarkGetInfo, vsBookmarkFind, vsBookmarkQCount


vsBookmarkQCount

int VSAPI vsBookmarkQCount()

Return	Returns the number of bookmarks.

See Also	vsBookmarkAdd, vsBookmarkRemove, vsBookmarkRestore, vsBookmarkGetInfo, vsBookmarkFind, vsBookmarkQCount


vsBookmarkRemove

void VSAPI vsBookmarkRemove( int i, int free_markid)

Parameters	Description

i	Index of bookmark where 0<=i<vsBookmarkQCount().

free_markid	When non-zero, vsFreeSelection is called for the markid belonging to this bookmark.

Remarks	Deletes a bookmark.

See Also	vsBookmarkAdd, vsBookmarkRemove, vsBookmarkRestore, vsBookmarkGetInfo, vsBookmarkFind, vsBookmarkQCount


vsBookmarkRestore

void VSAPI vsBookmarkRestore( int wid, int vsbmflags)

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

vsbmflags	One or more of these flags must be in the bookmark for the bookmark to be restored.

Remarks	Restores inactive bookmarks for the file specified by wid.  This function is typically called when a new file is loaded, so that inactive bookmarks may be restored.

See Also	vsBookmarkAdd, vsBookmarkRemove, vsBookmarkRestore, vsBookmarkGetInfo, vsBookmarkFind, vsBookmarkQCount


vsBPMClearAllBreakPoints

void VSAPI vsBPMClearAllBreakPoints()

Remarks	Clears all break points.  Also clears all disabled break points.  Execution line flags remain unchanged.

Return	Returns 0 if successful.  It is possible but very unlikely that you could run out of memory.


vsBPMDisableBreakPoint

int VSAPI vsBPMDisableBreakPoint( int wid, int LineNum=-1)

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

LineNum	Specifies the line number (VSP_LINE).  Specify -1 to indicate the current line.

Remarks	Disables a break point at the current line of the specified editor control.

Return	Returns 0 if successful.  It is possible but very unlikely that you could run out of memory.


vsBPMDisableBreakPointBL

int VSAPI vsBPMDisableBreakPointBL( const char *pszBufName, int RealLineNum)

Parameters	Description

pszBufName	Specifies the buffer name of the editor control.

RealLineNum	Specifies the real line number of the editor control (VSP_RLINE).

Remarks	Disables a break point at the line specified of the specified editor control.

Return	Returns 0 if successful.  It is possible but very unlikely that you could run out of memory.


vsBPMEndDebugMode

void VSAPI vsBPMEndDebugMode()

Remarks	Ends debug mode.  Frees all editor debug data and removes bitmap display.  You should call this function when the user is done debugging.


vsBPMEndDebugModeFor

void VSAPI vsBPMEndDebugModeFor(int wid)

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

Remarks	Ends debug mode for a specific editor control. Frees all editor debug data and removes bitmap display.  You still need to call vsBPMEndDebugMode once.


vsBPMEndDebugModeForB

void VSAPI vsBPMEndDebugModeForB( const char *pszBufName)

Parameters	Description

pszBufName	Specifies the buffer name of the editor control.

Remarks	Ends debug mode for a specific buffer.  Frees all editor debug data and removes bitmap display.  You still need to call vsBPMEndDebugMode once.


vsBPMEnumerate

int VSAPI vsBPMEnumerate( int wid, int i,int *pFlags, int *pLineNum, void *pReserved=0 )

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

i	Iterator.  Set to -1 to find first break point information.

pFlags	Set to flags for next break point if one exists.

pLineNum	Set to line number for next break point if one exists.

Remarks	Retrieves next break point information.  Use this function to enumerate all break points.

Return	Returns -1 if there are no more break points.  Otherwise, the iterator to be used in the next call to this function is returned.

Example

      int i;

      for (i=-1;;) {

         int flags,linenum;

         i=vsBPMEnumerate(wid,i,&flags,&linenum);

         if (i<0) {

            break;

         }

         //xprintf("i=%d flags=%x linenum=%d",i,flags,linenum);

      }


vsBPMEnumerateB

int VSAPI vsBPMEnumerateB( const char *pszBufName, int i,int *pFlags, int *pLineNum, void *pReserved=0 )

Parameters	Description

pszBufName	Specifies the buffer name of the editor control.

i	Iterator.  Set to -1 to find first break point information.

pFlags	Set to flags for next break point if one exists.

pLineNum	Set to line number for next break point if one exists.

Remarks	Retrieves next break point information.  Use this function to enumerate all break points.

Return	Returns -1 if there are no more break points.  Otherwise, the iterator to be used in the next call to this function is returned.

Example

      int i;

      for (i=-1;;) {

         int flags,linenum;

         i=vsBPMEnumerateB(szBufName,i,&flags,&linenum);

         if (i<0) {

            break;

         }

         //xprintf("i=%d flags=%x linenum=%d",i,flags,linenum);

      }


vsBPMQDefaultPicture

int VSAPI vsBPMQDefaultPicture( int wid, int LineNum, int RealLineNum, int OldLineNum, int reserved=0)

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

LineNum	Line number (VSP_LINE).

RealLineNum	Real line number (VSP_RLINE).

OldLineNum	Old line number (VSP_OLDLINENUMBER).

Return	Index into names table of picture or 0 to indictate no picture.  Calls the callback function defined by vsCallbackSet(VSCALLBACK_APP_BPMQ_DEFAULT_BITMAP,...)


vsBPMQFlags

int VSAPI vsBPMQFlags( int wid)

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

Return	Returns the debug flags for the current line of the editor control specified.  See VSBPFLAG_??? constants in "breakpt.h".


vsBPMQFlags2

int VSAPI vsBPMQFlags2( int wid, int LineNum=-1)

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

LineNum	Specifies the line number (VSP_LINE).  Specify -1 to indicate the current line.

Return	Returns the debug flags for the current line of the editor control specified.  See VSBPFLAG_??? constants in "breakpt.h".


vsBPMQPicture

int VSAPI vsBPMQPicture( int flags)

Parameters	Description

flags	Specifies the one or more of the VSBPFLAG_??? flags.  You can add your own.

Return	Returns the debug bitmap index which gets displayed for the specified debug flags.

See Also	vsBPMSetPicture


vsBPMQShowBreakPointsFor

int VSAPI vsBPMQShowBreakPointsFor( int wid)

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

Return	Returns non-zero value if break points are displayed for the editor control specified.  0 indicates that break points are hidden.


vsBPMRemoveBreakPoint

void VSAPI vsBPMRemoveBreakPoint( int wid, int LineNum=-1)

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

LineNum	Specifies the line number (VSP_LINE).  Specify -1 to indicate the current line.

Remarks	Removes a break point at the current line of the specified editor control.


vsBPMRemoveBreakPointBL

void VSAPI vsBPMRemoveBreakPointBL( const char *pszBufName, int LineNum)

Parameters	Description

pszBufName	Specifies the buffer name of the editor control.

LineNum	Specifies the line number of the editor control (VSP_LINE).

Remarks	Removes a break point at the line specifiedof the specified editor control.


vsBPMRemoveDisableBreakPoint

int VSAPI vsBPMRemoveDisableBreakPoint( int wid, int LineNum=-1)

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

LineNum	Specifies the line number (VSP_LINE).  Specify -1 to indicate the current line.

Remarks	Removes the disabled break point flag at the current line of the specified editor control.

Return	Returns 0 if successful.  It is possible but very unlikely that you could run out of memory.


vsBPMRemoveDisableBreakPointBL

int VSAPI vsBPMRemoveDisableBreakPointBL( const char *pszBufName, int LineNum)

Parameters	Description

pszBufName	Specifies the buffer name of the editor control.

LineNum	Specifies the line number of the editor control (VSP_LINE).

Remarks	Removes the disabled break point flag at the line specified of the specified editor control.

Return	Returns 0 if successful.  It is possible but very unlikely that you could run out of memory.


vsBPMRemoveExecLine

void VSAPI vsBPMRemoveExecLine( int wid, int LineNum=-1)

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

LineNum	Specifies the line number (VSP_LINE).  Specify -1 to indicate the current line.

Remarks	Removes the current execution line flag at the line specified of the specified editor control.


vsBPMRemoveExecLineBL

void VSAPI vsBPMRemoveExecLineBL( const char *pszBufName, int LineNum)

Parameters	Description

pszBufName	Specifies the buffer name of the editor control.

LineNum	Specifies the line number of the editor control (VSP_LINE).

Remarks	Removes the current execution line flag at the line specified of the specified editor control.


vsBPMRemoveStackExecLine

void VSAPI vsBPMRemoveStackExecLine( int wid, int LineNum=-1)

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

LineNum	Specifies the line number (VSP_LINE).  Specify -1 to indicate the current line.

Remarks	Removes a stack execution flag at the current line of the specified editor control.


vsBPMRemoveStackExecLineBL

void VSAPI vsBPMRemoveStackExecLineBL( const char *pszBufName, int LineNum)

Parameters	Description

pszBufName	Specifies the buffer name of the editor control.

LineNum	Specifies the line number of the editor control (VSP_LINE).

Remarks	Removes a stack execution flag at the line specified of the specified editor control.


vsBPMSet

int VSAPI vsBPMSet( int wid, int flags, int mask, int autoadd=1)

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

flags	Zero or more of the the VSBPFLAG_??? flags.

mask	One or more of the the VSBPFLAG_??? flags.  Only these debug flags are effected.

autoadd	When on, this indicates that even if the current line of the editor control does not currently have any debug flags, that these flags should be added.

Remarks	Adds or removes the debug flags specified at the current line of the specified editor control.

Return	Returns 0 if successful.  It is possible but very unlikely that you could run out of memory.


vsBPMSet2

int VSAPI vsBPMSet2( int wid, int LineNum, int flags, int mask, int autoadd=1)

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

LineNum	Specifies the line number (VSP_LINE).  Specify -1 to indicate the current line.

flags	Zero or more of the the VSBPFLAG_??? flags.

mask	One or more of the the VSBPFLAG_??? flags.  Only these debug flags are effected.

autoadd	When on, this indicates that even if the current line of the editor control does not currently have any debug flags, that these flags should be added.

Remarks	Adds or removes the debug flags specified at the current line of the specified editor control.

Return	Returns 0 if successful.  It is possible but very unlikely that you could run out of memory.


vsBPMSetAll

int VSAPI vsBPMSetAll( int flags, int mask)

Parameters	Description

flags	Zero or more of the the VSBPFLAG_??? flags.

mask	One or more of the the VSBPFLAG_??? flags.  Only these debug flags are effected.

Remarks	Adds or removes the debug flags specified for all lines which have debug flags.

Return	Returns 0 if successful.  It is possible but very unlikely that you could run out of memory.


vsBPMSetAllFor

int VSAPI vsBPMSetAllFor( int wid, int flags, int mask)

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

flags	Zero or more of the the VSBPFLAG_??? flags.

mask	One or more of the the VSBPFLAG_??? flags.  Only these debug flags are effected.

Remarks	Adds or removes the debug flags specified for all lines which have debug flags for the editor control specified.

Return	Returns 0 if successful.  It is possible but very unlikely that you could run out of memory.


vsBPMSetAllForB

int VSAPI vsBPMSetAllForB( const char *pszBufName, int flags, int mask)

Parameters	Description

pszBufName	Specifies the buffer name of the editor control.

flags	Zero or more of the the VSBPFLAG_??? flags.

mask	One or more of the the VSBPFLAG_??? flags.  Only these debug flags are effected.

Remarks	Adds or removes the debug flags specified for all lines which have debug flags for the editor control specified.

Return	Returns 0 if successful.  It is possible but very unlikely that you could run out of memory.


vsBPMSetBL

int VSAPI vsBPMSetBL( int wid, int flags, int mask, int autoadd=1)

Parameters	Description

pszBufName	Specifies the buffer name of the editor control.

RealLineNum	Specifies the real line number of the editor control (VSP_RLINE).

flags	Zero or more of the the VSBPFLAG_??? flags.

mask	One or more of the the VSBPFLAG_??? flags.  Only these debug flags are effected.

autoadd	When on, this indicates that even if the current line of the editor control does not currently have any debug flags, that these flags should be added.

Remarks	Adds or removes the debug flags specified at the line specified of the specified editor control.

Return	Returns 0 if successful.  It is possible but very unlikely that you could run out of memory.


vsBPMSetBreakPoint

int VSAPI vsBPMSetBreakPoint( int wid, int LineNum=-1)

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

LineNum	Specifies the line number (VSP_LINE).  Specify -1 to indicate the current line.

Remarks	Sets a break point at the current line of the specified editor control.

Return	Returns 0 if successful.  It is possible but very unlikely that you could run out of memory.


vsBPMSetBreakPointBL

int VSAPI vsBPMSetBreakPointBL( const char *pszBufName, int LineNum)

Parameters	Description

pszBufName	Specifies the buffer name of the editor control.

LineNum	Specifies the line number of the editor control (VSP_LINE).

Remarks	Sets a break point at the line specified of the specified editor control.

Return	Returns 0 if successful.  It is possible but very unlikely that you could run out of memory.


vsBPMSetExecLine

int VSAPI vsBPMSetExecLine( int wid, int LineNum=-1)

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

LineNum	Specifies the line number (VSP_LINE).  Specify -1 to indicate the current line.

Remarks	Sets the current execution line flag at the current line of the specified editor control.

Return	Returns 0 if successful.  It is possible but very unlikely that you could run out of memory.


vsBPMSetExecLineBL

int VSAPI vsBPMSetExecLineBL( const char *pszBufName, int LineNum)

Parameters	Description

pszBufName	Specifies the buffer name of the editor control.

LineNum	Specifies the line number of the editor control (VSP_LINE).

Remarks	Sets the current execution line flag at the line specified of the specified editor control.

Return	Returns 0 if successful.  It is possible but very unlikely that you could run out of memory.


vsBPMSetPicture

void VSAPI vsBPMSetPicture( int flags,int index)

Parameters	Description

flags	Specifies the one or more of the VSBPFLAG_??? flags.  You can add your own.

index	An index into the names table of the bitmap to display.  Use vsUpdatePicture to register a bitmap.

Remarks	Determines the debug bitmap which gets displayed for the specified debug flags.

See Also	vsBPMQPicture


vsBPMSetStackExecLine

int VSAPI vsBPMSetStackExecLine( int wid, int LineNum=-1)

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

LineNum	Specifies the line number (VSP_LINE).  Specify -1 to indicate the current line.

Remarks	Sets a stack execution flag at the current line of the specified editor control.

Return	Returns 0 if successful.  It is possible but very unlikely that you could run out of memory.


vsBPMSetStackExecLineBL

int VSAPI vsBPMSetStackExecLineBL( const char *pszBufName, int LineNum)

Parameters	Description

pszBufName	Specifies the buffer name of the editor control.

LineNum	Specifies the line number of the editor control (VSP_LINE).

Remarks	Sets a stack execution flag at the line specified of the specified editor control.

Return	Returns 0 if successful.  It is possible but very unlikely that you could run out of memory.


vsBPMShowBreakPoints

void VSAPI vsBPMShowBreakPoints( int onoff)

Parameters	Description

onoff	Specifies whether to show break points.

Remarks	This function determines whether break bitmaps are display to the left of each line for all buffers currently open.  This function provides a way to hide break points without exiting debug mode.   Users may like this so that the break points don't take up space to the left of each line.


vsBPMShowBreakPointsFor

void VSAPI vsBPMShowBreakPointsFor( int wid, int onoff)

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

onoff	Specifies whether to show break points.

Remarks	Determines whether break bitmaps are display to the left of each line.  This function provides a way to hide break points without exiting debug mode.   Users may like this so that the break points don't take up space to the left of each line.


vsBPMStartDebugMode

void VSAPI vsBPMStartDebugMode()

Remarks	You only need to call this function if you want to have strict old line support.  Starts debug mode for all MDI editor buffers and sets the old line numbers. When additional editor buffers are added, they are put into debug mode.   Existing editor controls not registered as MDI children are not put in debug mode.  If you are not using our MDI API's, use the vsBPMStartDebugModeFor function for editor controls containing source code.


vsBPMStartDebugModeFor

void VSAPI vsBPMStartDebugModeFor( int wid)

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

Remarks	You only need to call this function if you want to have strict old line support.  Starts debug mode for a specific editor control and sets the old line numbers.  When additional editor buffers are added, they are put into debug mode.


vsBPMToggleBreakPoint

int VSAPI vsBPMToggleBreakPoint( int wid, int LineNum=-1)

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

LineNum	Specifies the line number (VSP_LINE).  Specify -1 to indicate the current line.

Remarks	Toggles a break point at the current line of the specified editor control.

Return	Returns 0 if successful.  It is possible but very unlikely that you could run out of memory.


vsBufCreateTempView

int VSAPI vsBufCreateTempView( int buf_id, int *pTempViewId, int *pOrigViewId)

Parameters	Description

buf_id	Buffer to attach to this view.

pTempViewId	Set to newly created view id.

pOrigViewId	Set to current view id.  There is always a valid current view id.

Remarks	Since many functions in the VSE API require a window id, you need to play some tricks when you have a buffer id.

Example

int ColorFlags;

int orig_view_id,orig_buf_id;

vsBufCreateTempView(buf_id,&temp_view_id,&orig_view_id);

ColorFlags=vsPropGetI(VSWID_HIDDEN,VSP_COLORFLAGS)

vsBufDeleteTempView(temp_view_id,orig_view_id);

Return	If successful, returns 0 and the temp view/window/buffer is active.  Otherwise a negative error code is returned.

See Also	vsBufDeleteTempView


vsBufDeleteTempView

int VSAPI vsBufDeleteTempView( int TempViewId, int OrigViewId)

Parameters	Description

TempViewId	View id to delete.  Buffer is not deleted.

OrigViewId	View to activate after deleting TempViewId.

Remarks	This function deletes the view but does not delete the buffer attached to that view.

See Also	vsBufCreateTempView


vsBeginLine

void VSAPI vsBeginLine( int wid)

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Remarks	Places cursor at column 1 of current line.

See Also	vsEndLine


vsBeginSelect

int VSAPI vsBeginSelect( int wid, int mark_id=-1, int LockSelection=1)

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

mark_id	Handle to a selection returned by vsAllocSelection or vsDuplicateSelection.  A mark_id of -1 identifies the active selection.

LockSelection	If this is 1, the selection is "locked" (moving the cursor will no longer remove or extend the selection).

Remarks	If all input is valid and there is a selection, the cursor is placed at the beginning of the selection.  For line selection, the column position of the cursor is not changed.

Return	Returns 0 if successful.  Possible return codes are PROPERTY_OR_METHOD_NOT_ALLOWED_RC, INVALID_SELECTION_HANDLE_RC, TEXT_NOT_SELECTED_RC, or INVALID_OBJECT_HANDLE_RC.

See Also	vsEndSelect


vsBeginSelectCompare

int VSAPI vsBeginSelectCompare( int wid, int mark_id=-1)

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

mark_id	Handle to a selection returned by vsAllocSelection or vsDuplicateSelection.  A mark_id of -1 identifies the active selection.

Return

Return Value	Meaning

0	Current line is on first line of selection.

>0	Current line is after first line of selection.

<0	Current line is before first line of selection.

-1	Text is not selected or selection is not in current buffer.

See Also	vsEndSelectCompare


vsBottom

void VSAPI vsBottom(int wid)

Applies To	Edit Window, Editor Control

Remarks	Places text cursor at end of last line of buffer.  wid identifies the object to be operated on.  0 specifies the current object.

See Also	vsTop


vsBufCreate

int VSAPI vsBufCreate( const char *pszTempOption="+t",const char *pszLoadOptions=0,int reserved1=0,long reserved2=0)

Parameters	Description

pszTempOption	May be "+t", "+tu", "+td", or "+tm" which corresponds to current OS, UNIX, DOS, or Macintosh file format.

pszLoadOptions	Specifies options that occur before pszTempOption.  See vsLoadFiles function for a list of options.  It is not likely you will need to use any options except possibly in a strange macro.

Return	Creates an empty buffer and returns the buffer id if successful (0 is a valid buffer id).  Otherwise a negative error code is returned.

See Also	vsBufEdit


vsBufEdit

int VSAPI vsBufEdit( const char *pszFilename,const char * pszLoadOptions="",int IgnoreNotFound=1,const char * pszLoadOptions2="",int reserved=0)

Parameters	Description

pszFilename	File to open.

pszLoadOptions	One of the following values:

""	Display existing buffer or read pszFilename from disk.

"+d"	Always read pszFilename from disk even if this file is already loaded in the editor.

"+b"	Only succeed if a buffer already exists of the name pszFilename.

IgnoreNotFound	If non-zero, create a new buffer with name pszFilename if this file is not found.  This option has no effect if pszLoadOptions is "+bi" or "+b".

pszLoadOptions2	This option may be one of the following:

""	No effect.

"+L"	Always load entire file and close file handle.

"-L"	Never load entire file and leave file handle open to file.

"+E:ddd"	Expand tabs to spaces.  This expands tabs in increments of ddd.

"+E"	Expand tabs to spaces. If your tabs settings for the file being loaded are of the form "+<increment>" (like +4), then  tabs are expanded in increments of increment.  Otherwise tabs are expanded in increments of 8.  To set your tabs in a form "+<increment>", bring up the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup", select the extension, and set the "Tabs:" text box).  For languages such as REXX and UNIX shell scripts which require the contents of the file to be analyzed before the file type is known, the fundamental mode tab settings are used.

Return	Returns buffer id if successful (0 is a valid buffer id).  Otherwise a negative error code is returned.

See Also	vsBufCreate


vsBufGetDocumentName

char * VSAPI vsBufGetDocumentName( int buf_id,char *pszDocumentName,int MaxDocumentName,int *pMaxDocumentNameLen,int defaultToBufferName=1)

Parameters	Description

buf_id	Buffer id returned by vsPropGetI(wid,VSP_BUF_ID),  vsBufEdit, or vsBufMatch.

pszDocumentName	Set to document name (VSP_DOCUMENTNAME).  If defaultToBufferName is non-zero and the document name is "" then this parameter is set to the buffer name (VSP_BUFNAME).

MaxDocumentName	Number of characters allocated to pszDocumentName.

defaultToBufferName	Indicates that the pszDocumentName parameter should be set to the buffer name if the document is "".

Remarks	Gets the document name to be displayed to the user.

Return	Returns pszDocumentName.


vsBufGetName

char * VSAPI vsBufGetName( int buf_id, char *pszBufName, int MaxBufName, int *pMaxBufName=0)

Parameters	Description

buf_id	Buffer id returned by vsPropGetI(wid,VSP_BUF_ID),  vsBufEdit, or vsBufMatch.

pszBufName	Name of buffer corresponding to buf_id specified.  This can be 0.

MaxBufName	Number of characters allocated to pszBufName.  We recommend VSMAXFILENAME.

pMaxBufName	If this is not 0, this is set to the number of characters needed to be allocated.

Return	Returns buffer name corresponding to buffer id specified.  Returns pszBufName.


vsBufMatch

int VSAPI vsBufGetName( const char *pszBufName, int *pIndex, int BufMatchFlags, VSBUFMATCHINFO *pBufMatchInfo,int Reserved)

Parameters	Description

pszBufName	Document name or buffer name to look for.

pIndex	Set this to point to -1 to find the first buffer.  Continue to use the resulting value in calls that follow to find the next buffer.   A null pointer may be specified to find the first buffer, but you will not be able to perform a find next.

BufMatchFlags	One or more of the following flags:

VSBUFMATCH_HIDDEN

When specified buffers with the VSBUFFLAG_HIDDEN flag set in the VSP_BUFFLAGS property will be searched.  Note that buffers loaded by vsBufEdit all have the hidden flag set.

VSBUFMATCH_EXACT

When specified only buffers with name exactly matching pszBufName are returned.  By default a prefix match is performed.

VSBUFMATCH_BUFNAMEONLY

When specified, this function only searches for buffer names.

VSBUFMATCH_DOCUMENTNAMEONLY

When specified, this function only searches for document names.

pBufMatchInfo	If successful and this pointer is not null, this structure is filled in with a few properties of the buffer.

Remarks	This function is used to find information about a specific buffer by name or to list buffers.

Return	0 if successful.


vsBufName2Caption

void VSAPI vsBufName2Caption( int wid,char *pszCaption,int MaxCaptionLen,char state)

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

pszCaption	Output string for window caption.

MaxCaptionLen	Number of characters allocated in pszCaption.  We recommend VSMAXFILENAME.

state	Indicates the state of the MDI child edit window.  One of the following:

'I'	Caption is for an iconized window.  No path is placed in the caption.

'N'	Caption is for a normalized window.

'M'	Caption is for a maximized window.

Remarks	This function is used to convert the buffer name for an MDI child edit window into a window title.  Currently buffers with no name have a caption in the form "Untitled<nnn>" where nnn is the buffer id of the buffer.


vsBufQData

void *VSAPI vsBufQData( int buf_id)

Parameters	Description

buf_id	Buffer id returned by vsPropGetI(wid,VSP_BUF_ID),  vsBufEdit, or vsBufMatch.

Remarks	This function should only be used by OEM's to store some data per buffer and not by users writing macros.

Return	Returns pointer to OEM buffer data set by the vsBufSetData function.

See Also	vsBufSetData


vsBufRefresh

void VSAPI vsBufRefresh( int buf_id, int flags=VSREFRESH_BUFTEXT)

Parameters	Description

buf_id	Buffer id returned by vsPropGetI(wid,VSP_BUF_ID),  vsBufEdit, or vsBufMatch.

flags	Specifies buffer properties that need to be refreshed when vsRefresh is called or the editor automatically calls vsRefresh when a macro terminates.

Remarks	This function tells the editor to refresh parts of the buffer specified.  Currently only the break point manager uses this function because it modifies bitmaps which are stored outside the editors control.


vsBufRestoreHiddenWindow

void VSAPI vsBufRestoreHiddenWindow( int orig_view_id, int orig_buf_id)

Parameters	Description

orig_view_id	Original view id of hidden window returned by vsBufSetHiddenWindow function.

orig_buf_id	Original buffer id of hidden window returned by vsBufSetHiddenWindow function.

Remarks	See vsBufSetHiddenWindow.


vsBufSetData

void VSAPI vsBufSetData( int buf_id, void *pdata)

Parameters	Description

buf_id	Buffer id returned by vsPropGetI(wid,VSP_BUF_ID),  vsBufEdit, or vsBufMatch.

pdata	Pointer to buffer specific data.

Remarks	This function should only be used by OEM's to store some data per buffer and not by users writing macros.

Return	Sets pointer to OEM buffer data.

See Also	vsBufQData


vsBufSetHiddenWindow

void VSAPI vsBufSetHiddenWindow( int buf_id, int &orig_view_id,int &orig_buf_id)

Parameters	Description

orig_view_id	Set to original view id of hidden window.

orig_buf_id	Set to original buffer id of hidden window.

Remarks	This function is used when one has a buffer id but the function that needs to be called requires a window id.

Example

   int orig_view_id;

   int orig_buf_id;

   int IndentStyle;

   vsBufSetHiddenWindow(BufMatchInfo.BufID,orig_view_id,orig_buf_id);

   IndentStyle=vsPropGetI(VSWID_HIDDEN,VSP_INDENTSTYLE);

   vsBufRestoreHiddenWindow(orig_view_id,orig_buf_id);

See Also	vsBufRestoreHiddenWindow.


vsCallbackActivate

void VSAPI vsCallbackActivate( int wid)

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

Remarks	Updates global function pointer callbacks for message line and command line to those callbacks registered to the editor control specified.

See Also	vsCallbackSet, vsCallbackRemove


vsCallbackAdd

int VSAPI vsCallbackAdd( int id, VSCALLBACK_AR vscallback, void *pfn, int reserved1=0, int reserved2=0)

Applies To	Edit Window, Editor Control

Parameters	Description

id	Buffer id for VSCALLBACK_BUF_??? callbacks.

Window id for VSCALLBACK_WIN_??? callbacks.

Ignored for all other callbacks.

vscallback	One of the following constants which correspond to a callback function.

VSCALLBACK_AR_BUF_LINES_INSERTED

VSCALLBACK_AR_BUF_LINES_DELETED

VSCALLBACK_AR_BUF_TEXT_CHANGE

VSCALLBACK_AR_APP_DELETE_BUFFER

VSCALLBACK_AR_APP_SELECT_MODE

pfn	Pointer to callback function.  Make sure you remove your callback function with vsCallbackRemove if you unload a DLL which contains your callback function.

Remarks	Adds a callback function.

Return	Returns 0 if successful.  Otherwise NOT_ENOUGH_MEMORY_RC is returned.  Currently only 3 callback functions may be defined for each callback type.  The break pointer manager defines VSCALLBACK_AR_BUF_LINES_INSERTED, VSCALLBACK_AR_BUF_LINES_DELETED, and VSCALLBACK_AR_APP_DELETE_BUFFER.

See Also	vsCallbackSet, vsCallbackRemove


VSCALLBACK_AR_BUF_LINES_INSERTED

constant VSCALLBACK_AR_BUF_LINES_INSERTED

void VSAPI CallbackInsertLine(int buf_id, int AfterLineNum,int Noflines)

Parameters	Description

buf_id	Buffer id.

AfterLineNum 	Line number (VSP_LINE and not VSP_RLINE)  Lines we inserted after this line.

Noflines	Number of lines inserted.

The LINES_INSERTED callback is called when lines are inserted into a buffer.

WARNING:  It is not safe to access editor buffer data during this callback.


VSCALLBACK_AR_BUF_LINES_DELETED

constant VSCALLBACK_AR_BUF_LINES_DELETED

void VSAPI CallbackDeleteLine(int buf_id, int FirstLineNum,int Noflines)

Parameters	Description

buf_id	Buffer id.

FirstLineNum 	Line number (VSP_LINE and not VSP_RLINE. No save lines are counted).  First line deleted.

Noflines	Number of lines deleted.

The LINES_DELETED callback is called when lines are deleted in a buffer.

WARNING:  It is not safe to access editor buffer data during this callback.


VSCALLBACK_AR_BUF_TEXT_CHANGE

constant VSCALLBACK_AR_BUF_TEXT_CHANGE

void VSAPI CallbackTextChange(int buf_id, int wid, long StartMod, long EndMod)

Parameters	Description

buf_id	Buffer id.

wid	Window id of editor control.

StartMod 	Offset some where into the first line which was modified.   You should assume that all bytes in this line were modified even if this offset is into the middle of a line.

EndMod	Offset some where into the last line which was modified.   You should assume that all bytes in this line were modified even if this offset is into the middle of a line.

The TEXT_CHANGE callback is called when edits are made and refresh is called or a primitive which requires color code is called.  We use this callback to update some color coding information we store per line.

Note we ensure that StartMod and EndMod always specify at least the lines which changed.  However, they often specify more lines than actually did change.


VSCALLBACK_AR_APP_DELETE_BUFFER

constant VSCALLBACK_AR_APP_DELETE_BUFFER

void VSAPI CallbackDeleteBuffer(int buf_id)

Parameters	Description

buf_id	Buffer id.

The DELETE_BUFFER callback is called when a buffer is deleted.

WARNING:  It is not safe to access editor buffer data during this callback.


VSCALLBACK_AR_APP_SELECT_MODE

constant VSCALLBACK_AR_APP_SELECT_MODE

void VSAPI CallbackSelectMode(int wid, const char *pszExtension)

Parameters	Description

wid	Window id of editor control.

pszExtension 	Extension corresponding to file extension setup.  Note that this extension DOES NOT have to match the actual extension on the buffer.

The SELECT_MODE callback is called when Slick-C function select_edit_mode is called.  This occurs when vsBufEdit or vsCommandName is called.

This callback is typically used to set the extension specific VSCALLBACK_BUF_SET_LINE_COLOR callback.


vsCallbackRemove

int VSAPI vsCallbackRemove( int id, VSCALLBACK_AR vscallback, void *pfn, int reserved1=0, int reserved2=0)

Applies To	Edit Window, Editor Control

Parameters	Description

id	Buffer id for VSCALLBACK_AR_BUF_??? callbacks.

Window id for VSCALLBACK_AR_WIN_??? callbacks.

Ignored for all other callbacks.

vscallback	One of the following constants which correspond to a callback function.

VSCALLBACK_AR_BUF_LINES_INSERTED

VSCALLBACK_AR_BUF_LINES_DELETED

VSCALLBACK_AR_BUF_TEXT_CHANGE

VSCALLBACK_AR_APP_DELETE_BUFFER

pfn	Pointer to callback function to remove

Remarks	Removes a callback function.  Make sure you call this function if you unload a DLL which has a callback function.

See Also	vsCallbackSet, vsCallbackAdd


vsCallbackSet

void VSAPI vsCallbackSet( int id, VSCALLBACK vscallback, void *pfn)

Applies To	Edit Window, Editor Control

Parameters	Description

id	Buffer id for VSCALLBACK_BUF_??? callbacks.  Window id for VSCALLBACK_WIN_??? callbacks.

Ignored for all other callbacks.

vscallback	One of the following constants which correspond to a callback function.

VSCALLBACK_WIN_UPDATE_EDITOR_STATUS

VSCALLBACK_WIN_GOTFOCUS

VSCALLBACK_WIN_LOSTFOCUS

VSCALLBACK_WIN_CMDLINE_FUNCTIONS

VSCALLBACK_WIN_MESSAGE

VSCALLBACK_WIN_GET_MESSAGE

VSCALLBACK_APP_QUERY_END_SESSION

VSCALLBACK_APP_MENU_ADD_FILE_HISTORY

VSCALLBACK_APP_MENU_ADD_WORKSPACE_HISTORY

VSCALLBACK_APP_POPUP_MENU

VSCALLBACK_APP_POPUP_MENU2

VSCALLBACK_APP_ADD_BUFFER

VSCALLBACK_APP_RENAME_BUFFER

VSCALLBACK_BUF_QNOFDEBUGBITMAPS

VSCALLBACK_BUF_QDEBUGBITMAP

VSCALLBACK_BUF_SET_LINE_COLOR

VSCALLBACK_APP_READ_ONLY_ERROR

VSCALLBACK_APP_KEY_OR_MOUSE_EVENT_READ

VSCALLBACK_APP_BPMQ_DEFAULT_BITMAP

VSCALLBACK_APP_MESSAGEBOX

VSCALLBACK_APP_DISPATCH_MESSAGE

VSCALLBACK_APP_MODAL_WAIT

VSCALLBACK_APP_TAG_FILE_REFRESH

VSCALLBACK_APP_TAG_FILE_ADD_REMOVE

VSCALLBACK_APP_TAG_FILE_MODIFIED

VSCALLBACK_APP_MFFIND_ACTIVATE_TOOLBAR_AND_SEARCH_TAB

VSCALLBACK_APP_MFFIND_IS_TOOLBAR_VISIBLE

VSCALLBACK_APP_MFFIND_QEDITOR_CTL_WID

VSCALLBACK_APP_MFFIND_CLOSE_TOOLBAR

pfn	Pointer to callback function or 0 to remove callback function.  Make sure you remove your callback function with vsCallbackSet(id,vscallback,0) if you unload a DLL which contains your callback function.

VSCALLBACK_APP_DELETE_WINDOW

Remarks	Sets a callback function.

See Also	vsCallbackAdd, vsCallbackRemove


VSCALLBACK_APP_DELETE_WINDOW

constant VSCALLBACK_APP_DELETE_WINDOW

void VSAPI CallbackDeleteWindow(int wid, int modal)

Parameters	Description

wid	Window id of the window being deleted.

modal	Non-zero the the window id is for a form about to exit a modal wait state.

Remarks	This callback gets called before a dialog window gets deleted.  It may also get called for a control window that gets deleted.


VSCALLBACK_APP_MODAL_WAIT

constant VSCALLBACK_APP_MODAL_WAIT

void VSAPI CallbackModalWait(int BeginEnd, int parent_wid, int reserved, void *preserved)

Parameters	Description

BeginEnd	When non-zero, indicates the call is before the dialog has gone into a modal wait state.  When 0, the dialog is exiting its modal wait state.

parent_wid	Window id of the parent window of this dialog box.

Remarks	This callback gets called before and after a dialog box goes into a modal wait state.  This callback is necessary if you are using Visual SlickEdit in a threaded environment.


VSCALLBACK_APP_DISPATCH_MESSAGE

constant VSCALLBACK_APP_DISPATCH_MESSAGE

void VSAPI CallbackDispatchMessage(int BeginEnd, MSG *pmsg)

Parameters	Description

BeginEnd	When non-zero, indicates the call is before the dialog has gone into a modal wait state.  When 0, the dialog is exiting its modal wait state.

pmsg	Pointer to windows MSG structure.

Remarks	Windows only:  This callback gets called before and after a dialog box goes into a modal wait state. This callback is necessary if you are using Visual SlickEdit in a threaded environment.


VSCALLBACK_APP_MFFIND_ACTIVATE_TOOLBAR_AND_SEARCH_TAB

constant VSCALLBACK_APP_MFFIND_ACTIVATE_TOOLBAR_AND_SEARCH_TAB

void VSAPI CallbackMFFindActivateToolbarAndSearchTab()

Remarks	This displays/redocks the toolbar which contains the editor control output window used for multi-file search output.  The tab containing the search output should be activated.


VSCALLBACK_APP_MFFIND_CLOSE_TOOLBAR

constant VSCALLBACK_APP_MFFIND_CLOSE_TOOLBAR

void VSAPI CallbackMFFindCloseToolbar()

Remarks	This callback closes the toolbar which contains the editor control output window used for multi-file search output.  This occurs when the toolbar previously was not visible and there is no multi-file search output.


VSCALLBACK_APP_MFFIND_IS_TOOLBAR_VISIBLE

constant VSCALLBACK_APP_MFFIND_IS_TOOLBAR_VISIBLE

int VSAPI CallbackMFFindIsToolbarVisible()

Returnss	Returns non-zero value if the toolbar containg the editor control output window used for multi-file search output is currently visible.


VSCALLBACK_APP_MFFIND_QEDITOR_CTL_WID

constant

VSCALLBACK_MFFIND_QEDITOR_CTL_WID

int VSAPI CallbackMFFindQEditorCtlWID()

Returns	Returns window id of the editor control to receive multi-file search output.


VSCALLBACK_APP_TAG_FILE_ADD_REMOVE

constant VSCALLBACK_TAG_FILE_ADD_REMOVE

void VSAPI CallbackTagFileAddRemove(VSPSZ pszTagFilename, VSPSZ pszOption)

Parameters	Description

pszTagFilename	Name of tag file being added or removed.   Most of the time this if "" which indicates that the tag file(s) being added or removed are unknown so you must assume anything could have happened to the list of tag files.

pszOption	Specifies whether the tag file is being added or removed.  "A" when adding a tag file and "R" when removing a tag file.  When pszTagFileName is "", the value of pszOption is undefined.

Remarks	This callback is called after tag files are removed or added.  This happens when the Tag Files dialog box is used or when the current project changes.  This callback does get called when the vsTagSetTagFiles function is called.


VSCALLBACK_APP_TAG_FILE_MODIFIED

constant VSCALLBACK_TAG_FILE_MODIFIED

void VSAPI CallbackTagFileModified(VSPSZ pszTagFilename)

Parameters	Description

pszTagFilename	Name of tag file that was modified.  If this is "", you should ignore this call back.   Currently, this happens when a reference file was modified.  We expect this case to be removed in the future since tags references will be in the same tag file.

Remarks	This callback is called after a tag file is modified.  This typically occurs when the symbols for a particular file change.   Note that this callback does not get called when the vsTagRetagFile function is called.


VSCALLBACK_APP_TAG_FILE_REFRESH

constant VSCALLBACK_TAG_FILE_REFRESH

void VSAPI CallbackTagFileRefresh()

Remarks	This callback is called after tag files are removed , added, or modified.  This callback is called after one or more VSCALLBACK_APP_TAG_FILE_ADD_REMOVE and VSCALLBACK_APP_TAG_FILE_MODIFIED callbacks occur. Note that this callback does not get called when the vsTagRetagFile function is called.  This callback does get called when the vsTagSetTagFiles function is called.


VSCALLBACK_APP_MESSAGEBOX

constant VSCALLBACK_APP_MESSAGEBOX

int VSAPI CallbackMessageBox(const char *pszMessage,const char *pszTitle,int vsmb_flags)

Remarks	Displays a simple message box and prompts the user.  This callback must implement all features of the vsMessageBox function.  See vsMessageBox.


VSCALLBACK_APP_READ_ONLY_ERROR

constant VSCALLBACK_APP_READ_ONLY_ERROR

int VSAPI CallbackReadOnlyError(int KeyPressed)

Parameters	Description

KeyPressed	Indicates whether error occurred because key was pressed in strict read only mode.

Remarks	This callback is called when the user attempts to modify a read-only file.  By default, this callback displays a file is read-only message box and/or optional checks out a file.

Return	Returns 0 to indicate that no default processing is necessary.  A non-zero value indicates that the default processing should take place.


VSCALLBACK_APP_KEY_OR_MOUSE_EVENT_READ

constant VSCALLBACK_APP_KEY_OR_MOUSE_EVENT_READ

void VSAPI CallbackKeyOrMouseEventRead(int event)

Parameters	Description

event	Visual SlickEdit event.  See vskeys.h.

Remarks	The callback is called when a key or mouse is read but has not yet been processed.  This callback is typically used to track the state of the mouse.


VSCALLBACK_APP_BPMQ_DEFAULT_BITMAP

constant VSCALLBACK_APP_BPMQ_DEFAULT_BITMAP

int VSAPI CallbackQDefaultBitmap(int wid, int RealLineNum, int OldLineNum, int reserved)

Parameters	Description

wid	Window id of editor control.

RealLineNum	Real line number (VSP_RLINE).  This line number does not include lines with the VSLF_NOSAVE (non-savable line) flag set.  The difference editor adds non-savable lines.

OldLineNum	Old line number (VSP_OLDLINENUMBER).

Remarks	The break point manager calls this function when there are no debug flags (break point bitmaps) on the current line.  This callback is typically used to display a bitmap indicating whether a break point can be set on this line.

Return	Returns index into the names table of the picture or 0 to indicate no picture.


VSCALLBACK_BUF_SET_LINE_COLOR

constant VSCALLBACK_BUF_SET_LINE_COLOR

int VSAPI CallbackSetLineColor(int buf_id,int wid, int linenum, int RealLineNum, int LineFlags, VSCOLORINDEX *pColor,int ColorLen,char *pTempLine, int reserved)

Parameters	Description

buf_id	Buffer id (VSP_BUFID).  Color coding is per buffer and not per window.

wid	Window id of editor control.

linenum	Line number (VSP_LINE).  If you have a lexer state array, it must be indexed with this line number.

RealLineNum	Real line number (VSP_RLINE).  This line number does not include lines with the VSLF_NOSAVE (non-savable line) flag set.  The difference editor adds non-savable lines.

LineFlags	Current line flags.  See VSLF_??? constants in "vs.h".

pColor	Array of color indexes.  All data in this array must be set.  Valid color indexes are any of the VSCFG_??? constants or a color index allocated by vsAllocColor.  0 indicates a NULL color.  Use the NULL color to get our built-in color coding.  Some color layers will automaticaly overlay any color you define here.

ColorLen	Number of color indexes that must be set.

pTempLine	Optional temporary buffer which has ColorLen+1 characters allocated.  Use the vsGetLine function to retrieve the contents of the current line.

Return	Return VSLF_IN_SQUOTE if next line continues a multi-line single quoted string.  Return VSLF_IN_DQUOTE if next line continues a multi-line single quoted string.  Return VSLF_IN_LINE_COMMENT if this line end with a line comment.  Return vsLFHCommentInfo(1,0) if the next line continues a multi-line comment.  Otherwise return 0.

The SET_LINE_COLOR callback function is used to enhance and/or replace our built-in syntax color coding.  This callback is called when lines are displayed in a window, searching for syntax color coding, and when printing.  Any color set by the vsSetTextColor function will override syntax color coding.  In addition, difference color coding will also override syntax color.

This callback should ONLY be set during the VSCALLBACK_AR_APP_SELECT_MODE callback because this callback is an extension specific callback.

Unless you have already written a programmers editor with color coding, you probably don't have much of an idea about what is the best way to implement color coding.  All high performance color coding (including Visual SlickEdit) is done by generating the syntax color as the visible source lines are displayed.  As long as you don't write a slow lexer, the user will not be able to type too fast for you color coding to keep up.

Here are some important tips about implementing your own color coding:

•	It is easiest to implement syntax color coding for languages which have no multi-line constructs (like Basic or Assembler).  If possible, we recommend you use our built-in color coding to process your multi-line constructs, and have your lexer do some additional color processing.

•	Multi-line constructs such as multi-line comments, multi-line strings, and embedded languages (HTML can have embedded JavaScript or VBScript) require you to store lexer state data for each line in an editor buffer in your own array.  A byte or a 32 bit integer per line is typically all you need.  Our built-in color coding only uses 8 bits per line for handling all the multi-line constructs we support.  For example, your set line color callback may need to check the lexer state data to see whether the line being processed (gpArrayStateInfo[linenum]) is inside a multi-line comment started on a previous line.  This requires that you implement some additional code for the following callbacks (see vsCallbackAdd) in addition to the typical callbacks:

VSCALLBACK_AR_BUF_LINES_INSERTED

During this callback you need to insert lines into your lexer state array.  These new lines should be initialized with a NULL (we use 0) lexer state value.

VSCALLBACK_AR_BUF_LINES_DELETED

During this callback you need to delete the lines in your line array.

VSCALLBACK_AR_BUF_TEXT_CHANGE

Your lexer must be able to start in any of your defined multi-line states.  During this callback you need to set the lexer state data for lines whose state may have changed.

Syntax Color Coding Sample Code for Text Change Callback

•	Your DLL must define and export a function called "dllinit_DLLName" where DLLName is the name of your DLL without the extension.  When the editor initializes, all functions starting with "dllinit_" are called.  During your "dllinit_DLLName" function you need to register a VSCALLBACK_AR_APP_SELECT_MODE callback (see vsCallbackAdd) which checks the extension to see if the VSCALLBACK_BUF_SET_LINE_COLOR callback as well as the callbacks above need to be set.

Syntax Color Coding Sample Code for Select Mode Callback

Visual SlickEdit has four layers of color:  syntax color, undoable buffer color,  undoable line insert/modify color, and intra-line difference color (version >=4.0).

Note that Codewright's syntax color coding is implemented by storing color bytes for each byte in the file.  The syntax color data is generated in the background and not as the lines of the visible page are displayed.  For this reason, Codewright is the only editor with syntax color coding that can not keep up with the users typing.  In addition, files loaded into Codewright require twice the memory because the syntax color data requires one byte per byte in the file.  Even worse, you can't undo color changes.  While you don't need to undo syntax color changes, Visual SlickEdit has an additional color layer set by vsSetTextColor which supports undo.


Syntax Color Coding Sample Code for Select Mode Callback

Syntax Color Coding Sample Code for Select Mode Callback

static void VSAPI CallbackSelectMode(int wid,char *pszExtension)

{

     int buf_id;

     buf_id=vsPropGetI(wid,VSP_BUFID);

     if (

#if VSUNIX

        strcmp(pszExtension,"MyLanguageExtension")==0

#else

        stricmp(pszExtension,"MyLanguageExtension")==0

#endif

        ) {

          vsCallbackSet(buf_id,

                        VSCALLBACK_BUF_SET_LINE_COLOR,

                        CallbackSetLineColor);

          vsCallbackAdd(buf_id,

                        VSCALLBACK_AR_BUF_LINES_INSERTED,

                        CallbackLinesInserted);

          vsCallbackAdd(buf_id,

                        VSCALLBACK_AR_BUF_LINES_DELETED,

                        CallbackLinesDeleted);

          vsCallbackAdd(buf_id,

                        VSCALLBACK_AR_BUF_TEXT_CHANGE,

                        CallbackTextChange);

     } else {

          // DONT set the VSCALLBACK_BUF_SET_LINE_COLOR

          // here!

          // For completeness, we remove our callbacks here

          // in case the user renamed the buffer

          // or changed the mode.

          vsCallbackRemove(buf_id,

                           VSCALLBACK_AR_BUF_LINES_INSERTED,

                           CallbackLinesInserted);

          vsCallbackRemove(buf_id,

                           VSCALLBACK_AR_BUF_LINES_DELETED,

                           CallbackLinesDeleted);

          vsCallbackRemove(buf_id,

                           VSCALLBACK_AR_BUF_TEXT_CHANGE,

                           CallbackTextChange);

     }

}


Syntax Color Coding Sample Code for Text Change Callback

Syntax Color Coding Sample Code for Text Change Callback

#include <vsapi.h>

void VSAPI CallbackTextChange(int buf_id, int wid, long StartMod, long EndMod) {

     VSSAVEPOS  pos;

     vsSavePos(wid,&pos);   // Remember our cursor location.

     int cur_linenum=vsPropGetI(wid,VSP_LINE);

     vsGoToPoint(wid,StartMod);

     // Go up one line since the edit may have occurred

     // at the end of the previous line.

     vsUp(wid,1);

     int linenum;

     linenum=vsPropGetI(wid,VSP_LINE);

     if (linenum==0 ) {

          vsDown(wid,1);++linenum;

     }

     int LexerStateInfo;

     LexerStateInfo=gpArrayStateInfo[linenum];

     /*

      The following code is very similar to our built-in text

      change event for handling syntax color coding.  Ignore

      anything you don't think applies to your language.  Some

      of this code may seem like hocus pocus (the pass stuff)

      but our built-in color coding (unlike VC++ color coding

      which messes up on nested comments) has no known bugs.

     */

     int pass=1;

     for (;;) {

          long StartOffsetOfLine,down_count;

          vsQPoint(wid,&StartOffsetOfLine,&down_count);

#define MAXLINELEN   1024

          char szLine[MAXLINELEN];

          int LineLen;

          LineLen=vsGetLine(wid,szLine,MAXLINELEN);

          int linenum;

          linenum=vsPropGetI(wid,VSP_LINE);;

          // IF the current line is in this change

          if (cur_linenum==linenum) {

               // Make sure the all visible lines are refreshed

               // if the user is typing on this line.

               // The user may have opened a multi-line construct.

               // It actually is OK to always do this, and

               // place this call out side this loop.

               // We have not found this necessary.

               vsBufRefresh(buf_id);

          }

          if (vsQLineFlags(wid)& VSLF_NOSAVE) {

               // Use previous comment flags.

               gpArrayStateInfo[linenum]=LexerStateInfo;

               goto next_line;

          }

          int NextLineLexerStateInfo;

          // Here's a function you need to implement.

          NextLineLexerStateInfo=

          DetermineNextLineLexerStateInfo(szLine,LineLen,

                                          LexerStateInfo);

          // IF nesting level has changed.

          if (LexerStateInfo!=gpArrayStateInfo[linenum]) {

               gpArrayStateInfo[linenum]=LexerStateInfo;

          } else {

               // IF we are past last line of modification AND

               //    the lexer state info is the same

               if (pass>=2) {

                    break;

               }

          }

          LexerStateInfo=NextLineLexerStateInfo;

next_line:

          //IF we hit the bottom of the buffer

          if (vsDown(wid,1)) {

               break;

          }

          if (pass==1 && StartOffsetOfLine>EndMod) {

               ++pass;

          }

     }

     vsRestorePos(wid,&pos);   // Remember our cursor location.

}


VSCALLBACK_WIN_UPDATE_EDITOR_STATUS

constant VSCALLBACK_WIN_UPDATE_EDITOR_STATUS

void VSAPI CallbackUpdateEditorStatus(

      int wid, int RefreshFlags, int linenum, int col,

      const char *pModeName, int ModeNameLen,

      int StatusFlags, int reserved)

Parameters	Description

wid	Window id of editor control.

RefreshFlags	Flags indicating what has changed.

linenum	Line number (VSP_RLINE). Update only if (RefreshFlags & VSREFRESH_LINE).  Not valid if ~(RefreshFlags & VSREFRESH_LINE).  If linenum is less than 0, this means VSE does not know the current line number.  This happens (by default) when you load a file larger than 500k than has no color coding defined.

col	Column. Update only if (RefreshFlags & VSREFRESH_COL).

pModeName	Mode name. Update only if (RefreshFlags & VSREFRESH_OTHER).

ModeNameLen	Number of bytes in pModeName.

StatusFlags	See VSSTATUSFLAG_???? defines.  Update only if (RefreshFlags & CorrespondingRefreshFlag)

The UPDATEEDITORSTATUS callback function is called when the editor control status indicators have changed.  This allows the user to display a line number, column, and other editor status information anywhere they want.


VSCALLBACK_WIN_GOTFOCUS

constant VSCALLBACK_WIN_GOTFOCUS

void VSAPI CallbackGotFocus(int wid)

Parameters	Description

wid	Window id of editor control.

The GOTFOCUS callback function is called any time the editor control receives keyboard focus.


VSCALLBACK_WIN_LOSTFOCUS

constant VSCALLBACK_WIN_LOSTFOCUS

void VSAPI CallbackLostFocus(int wid)

Parameters	Description

wid	Window id of editor control.

The LOSTFOCUS callback function is called any time the editor control looses keyboard focus.


VSCALLBACK_WIN_CMDLINE_FUNCTIONS

constant VSCALLBACK_WIN_CMDLINE_FUNCTIONS

For this callback, pfn is a pointer to the VSCMDLINE_FUNCTIONS structure.  The VSCMDLINE_FUNCTIONS structure defines all the function required to implement a command line.  See VSCMDLINE_FUNCTIONS structure in "vs.h" for more information.  This allows each editor control to have its own command line.


VSCALLBACK_WIN_MESSAGE

constant VSCALLBACK_WIN_MESSAGE

void VSAPI CallbackMessage(int wid,const char *pszMsg,int Immediate)

Parameters	Description

wid	Window id of editor control.

pszMsg	String to display.

Immediate	Indicates whether the screen should be updated immediately or if it is OK if the screen gets update later in a paint message.

The MESSAGE callback function is called to display unobtrusive informational messages like popup menu messages, incremental search messages, and for many of the editor commands.


VSCALLBACK_WIN_GET_MESSAGE

constant VSCALLBACK_WIN_GET_MESSAGE

void VSAPI CallbackGetMessage(int wid,char *pszMsg,int MaxMsgLen, int *pMaxMsgLen)

Parameters	Description

wid	Window id of editor control.

pszMsg	String to receive message being displayed on message line.  This may or may not be the message displayed by the CallbackMessage function.  This can be 0.

MaxMsgLen	Number of characters allocated to pszMsg.

pMaxMsgLen	If this is not 0, this is set to the number of characters you need to allocate to pszMsg.

The GET_MESSAGE callback function allows the user to save the message line so that it can be restored later.  Currently the editor AutoSave features uses this to preserve the message.


VSCALLBACK_APP_QUERY_END_SESSION

constant VSCALLBACK_APP_QUERY_END_SESSION

int VSAPI CallbackQueryEndSession()

Returns 0 if it is safe to exit the application.  Otherwise 1 should be returned.  This call allows support for the Slick-C exit function to be called which is typically only needed by OEM which implement the MDI callbacks.


VSCALLBACK_APP_MENU_ADD_FILE_HISTORY

constant VSCALLBACK_APP_MENU_ADD_FILE_HISTORY

void VSAPI CallbackMenuAddFileHistory(const char *pszFilename)

Parameters	Description

pszFilename	Absolute name of file

The MENU_ADD_FILE_HISTORY callback gets called when the "edit" command or "gui_open" command are called.  Note that MFC MDI apps don't always uses these commands to open a file.  vsBufEdit does not call this callback.


VSCALLBACK_APP_MENU_ADD_WORKSPACE_HISTORY

constant VSCALLBACK_APP_MENU_ADD_WORKSPACE_HISTORY

void VSAPI CallbackMenuAddWorkspaceHistory(const char *pszFilename)

Parameters	Description

pszFilename	Absolute name of workspace file

The MENU_ADD_WORKSPACE_HISTORY callback is called when a Visual SlickEdit workspace is opened.


VSCALLBACK_APP_POPUP_MENU

constant VSCALLBACK_APP_POPUP_MENU

void VSAPI CallbackPopupMenu(const char *pszMenuName, int menu_handle)

Parameters	Description

pszMenuName	Name of Slick-C menu about to be displayed.

menu_handle	Handle to loaded menu.  Use vsMenu??? API's to make any kind of modification to the menu before it gets display.  For example, you might disable menu items, remove menu items, or even add menu items before the menu is displayed.

The POPUP_MENU callback is called when a right click menu is displayed.  Later we may expand this hook to support when any pop-up menu is displayed.


VSCALLBACK_APP_POPUP_MENU2

constant VSCALLBACK_APP_POPUP_MENU2

void VSAPI CallbackPopupMenu2(const char *pszMenuName,

     int vtpm_flags,int x, int y)

Parameters	Description

pszMenuName	Name of Slick-C menu which would be displayed.

vtpm_flags	Windows VTPM_??? flags which would be given to the WIN32 TrackPopupMenu function.

x	Recommended x screen coordinate to display menu.

y	Recommended y screen coordinate to display menu.

The POPUP_MENU2 callback is called when a right click menu would be displayed.  When this callback is defined no, menu is displayed. Later we may expand this hook to support when any pop-up menu is displayed.


VSCALLBACK_APP_ADD_BUFFER

constant VSCALLBACK_APP_ADD_BUFFER

void VSAPI CallbackAddBuffer(int buf_id,const char *pszBufName,int buf_flags)

Parameters	Description

buf_id	Buffer id.

pszBufName	Name of buffer.

buf_flags	Current value of VSP_BUFFLAGS property.  You might to use this to check whether the buffer is hidden or not.

The ADD_BUFFER callback is called when a new buffer is added to the editor through vsBufEdit, edit, or gui_open.  Note that this function does not hook vsLoadFiles.  This means that functions like vsCreateTempView do not call this function.


VSCALLBACK_APP_RENAME_BUFFER

constant VSCALLBACK_APP_RENAME_BUFFER

void VSAPI CallbackRenameBuffer(

      int buf_id,const char *pszOldBufName,

      const char *pszNewBufName,int buf_flags)

Parameters	Description

buf_id	Buffer id.

pszBufName	Name of buffer.

buf_flags	Current value of VSP_BUFFLAGS property.  You might to use this to check whether the buffer is hidden or not.

The RENAME_BUFFER callback is called when the vsName function is called.  Note that this function does not hook the VSP_BUFNAME property.


VSCALLBACK_BUF_QNOFDEBUGBITMAPS

constant VSCALLBACK_BUF_QNOFDEBUGBITMAPS

int VSAPI CallbackQNofDebugBitmaps(int buf_id)

Parameters	Description

buf_id	Buffer id.

This callback returns the number of debug bitmaps displayed in the current buffer.  The break point manager reserves this callback.

WARNING: It is not safe to modify this buffer during this call.


VSCALLBACK_BUF_QDEBUGBITMAP

constant VSCALLBACK_BUF_QDEBUGBITMAP

int VSAPI CallbackQDebugBitmap(

      int buf_id, int RealLineNum, int OldLineNum, int reserved)

Parameters	Description

buf_id	Buffer id.

RealLineNum	Real line number (VSP_RLINE).

OldLineNum	Old line number set by vsSetAllOldLineNumbers.

This callback returns the index to bitmap for the line number specified.  index must be an index into the names table of a registered bitmap.  Use vsUpdatePicture to register a bitmap.  0 indicates that the line has no bitmap.

WARNING: It is not safe to modify this buffer during this call.


vsCallIndex

void VSAPI vsCallIndex(int wid, int index, int Nofargs,VSARGTYPE *pArgList)

Applies To	Edit Window, Editor Control

Remarks	Calls a Slick-C function or method corresponding to the names table index specified with the arguments specified.  Any return value can be retrieved by accessing the VSHVAR_RC variable handle.   If you want to call a command (Slick-C _command or DLL _command) and speed is not an issue, use the more convenient vsExecute function.  vsCallIndex may be used to call any registered DLL function.

This function can not be used to call "built-in" Slick-C function or method such as _default_option function.  However, you can write your own Slick-C function to call a built-in and then use this function to call it.  To determine if a Slick-C function is a built-in, try the using the vsFindIndex function with VSTYPE_PROC|VSTYPE_COMMAND.  If 0 is returned, the function is a built-in.

Example

   // Call a Slick-C function which returns a Slick-C array or struct

   int index;

   index=vsFindIndex("ProcReturnsArray ",VSTYPE_PROC);

   if (!index) {

       vsMessage("not found");

       return;

   }

   VSARGTYPE ArgList[1];

   ArgList[0].kind=VSARGTYPE_PSZ;ArgList[0].u.psz="some message";

   vsCallIndex(0,index,1,ArgList);

   // Get first element of array or struct

   VSHVAR hvar;

   hvar=vsHvarArrayEl(VSHVAR_RC,0);

  VSPLSTR  plstr;

   // Interpreter L strings are NULL terminated.

   plstr=vsHvarGetLstr(hvar);

   vsMessage((char *)plstr->str);

See Also	vsHvarSetI, vsHvarSetB, vsHvarSetZ, vsHvarGetZ, vsHvarGetLstr, vsHvarGetI, vsArg, vsHvarAlloc, vsHvarFree, vsHvarHashtabEl, vsHvarArrayEl, vsFindIndex


vsCallKey

void VSAPI vsCallKey( int wid, int event, const char *pszShowKeys=0,int Reserved=1,int version=0)

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

event	An event returned by vsLastEvent or a event constant from "vskeys.h".

pszShowKeys	Previous prefix key message.

Remarks	This function is used to redirect a key.  For example, in our OEM MDI sample program, we redirect client window key presses to send the key press to VSMDI_WID.


vsCheckLineLengths

int VSAPI vsCheckLineLengths( int wid,int AllowedLineLen,char *pszLineNumbers=0,int MaxLineNumbersLen=0,int FromCursor=0,int *pMaxLineLen=0,int reserved1=0, int reserved2=0)

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

AllowedLineLen	Lines lengths greater than this length are flagged.

pszLineNumbers	(Ouput only) ASCIIZ string.   Set to a space delimited list of line numbers of lines which are too long.  Lines with the VSLF_NOSAVE flag set are ignored.

MaxLineNumebersLen	Number of characters allocated to pszLineNumebers.

FromCursor	Set this to zero to check lines at and after the cursor.  Otherwise, the entire buffer is checked.

pMaxLineLen	(Output only) Set to the length of the longest line.

Return	Returns 0 if there are no lines longer than the AllowedLineLen specified. At the moment only the physical line length is checked as if tab characters count as 1 character.  We may change this in the future.


vsClipboardQNofInternal

int VSAPI vsClipboardQNofInternal()

Return	Returns number of internal clipboards.


vsColWidthClear

int VSAPI [wid_expression.]vsColWidthClear(int wid)

Applies To	List Box and Tree View

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

Remarks	Clears all column settings.

Return	Returns 0 if successful.


vsColWidthGet

int [wid_expression.]vsColWidthGet(int wid, int i, int *pwidth)

Applies To	List Box and Tree View

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

i	Number between 0 and 199.

pwidth	Set to the the current column width in the scale mode (p_xyscale_mode) of the parent.

Remarks	Gets column width setting for column i. Column text is separated with a tab character.

Return	Returns 0 if successful.


vsColWidthSet

int [wid_expression.]vsColWidthSet(int wid, int i, int width)

Applies To	List Box and Tree View

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

i	Number between 0 and 199.

width	New column width in the scale mode (p_xyscale_mode) of the parent.

Remarks	Sets column width of column i.   Column text is separated with a tab character.

Return	Returns 0 if successful.


vsCommandFind

int VSAPI vsCommandFind( int wid,const char *pszFindString,const char *pszOptions="")

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

pszFindString	String to find.

pszOptions	String of search options.  See vsSearch for list of most options.  The following addition options may be specified.

P	Wrap to beginning/end when string not found.

Remarks	This function searches for the string specified.  This function is almost identical to making the call vsExecute(wid,"find /FindString/Options") except that vsRefresh is not called, a new undo step is never started, and code is not generated by macro recording.

Return	Returns 0 if the search string specified is found.  Common return codes are STRING_NOT_FOUND_RC, INVALID_OPTION_RC and INVALID_REGULAR_EXPRESSION_RC.  On error, message is displayed.


vsCommandName

void VSAPI vsCommandName( int wid,const char *pszFilename)

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

pszFilename	New buffer name.  Filename is converted to absolute.

Remarks	This function changes the buffer name.  Use this function instead of the VSP_BUFNAME property if you want various edit hook callbacks and/or your filename converted to absolute.

This function is almost identical to making the call vsExecute(wid,"name \"Filename\" ") except that vsRefresh is not called, a new undo step is never started, and code is not generated by macro recording.


vsCommandReplaceQNofChanges

int VSAPI vsCommandReplaceQNofChanges()

Remarks	Returns number of replaces performed by the last search and replace performed one of the following search functions: vsSearchPromptReplace, vsCommandReplace, or vsExecute(wid,"gui-replace").


vsCommandReplace

int VSAPI vsCommandReplace( int wid,const char *pszFindString,const char *pszReplaceString,const char *pszOptions="")

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

pszFindString	String to find.

pszReplaceString	String to replace string found with.

pszOptions	String of search options.  See vsSearch for list of most options.  The following addition options may be specified.

*	Make changes without prompting.

P	Wrap to beginning/end when string not found.

Remarks	This function searches for the string specified and replaces it with the.  This function is almost identical to making the call vsExecute(wid,"replace /FindString/ReplaceString/Options") except that vsRefresh is not called, a new undo step is never started, and code is not generated by macro recording.

Return	Returns 0 if the search string specified is found.  Common return codes are STRING_NOT_FOUND_RC, INVALID_OPTION_RC and INVALID_REGULAR_EXPRESSION_RC.  On error, message is displayed.


vsCommandSave

int VSAPI vsCommandSave(int wid, const char *pszOuputFilename=0, const char *pszOptions=0)

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

pszOutputFilename	Specifies name of output file.  If this is 0, the buffer name (VSP_BUFNAME) is used.

pszOptions	A string of zero or more of the following switches delimited with a space:

Note that since record files are saved in binary (always with the +B switch), many options have no effect.

+ or -E	Turn on/off expand tabs to spaces switch.  Default is off.

+ or -G	Turn on/off setting of all old numbers.  Default is off.  Visual SlickEdit uses old line numbers to better handle going to an error line after lines have been inserted or deleted.  We don't recommend setting the old line numbers on every save because this requires that you do not save the file until you have performed edits for all compile or multi-file search messages.  See _SetAllOldLineNumbers method for more information.

+ or -S	Strip trailing spaces on each line.  The buffer is modified if the output file name matches the buffer name.  Default is off.

+ or -CL	Check maximum line length.  Default is off.  If the destination file is requires a record length (an OS/390 dataset member), lines are checked against this record length.  Otherwise, line lengths are checked against the p_MaxLineLength property.  If there are any lines that are too long, an error code is returned and a message box is displayed with a list of the offending line numbers.  At the moment only the physical line length is checked as if tab characters count as 1 character.  We may change this in the future.

+FU	Save file in UNIX ASCII format (Lines ending with just 10 character).  The buffer is modified if the output file name matches the buffer name.

+FD	Save file in DOS  ASCII format (Lines ending with 13,10).  The buffer is modified if the output file name matches the buffer name.

+FM	Save file in Macintosh ASCII format (Lines ending with just 13 character).  The buffer is modified if the output file name matches the buffer name.

+ddd	Save file without line end characters and pad or truncate lines so that each line is ddd characters in length.  Use this option to generate of fixed length record file.

+FR	Save file without line end characters.

+Fddd	Save file using ASCII character ddd as the line end character.  The buffer is modified if the output file name matches the buffer name.

+ or -B	Binary switch.  Save file exactly byte per byte as it appears in the buffer.  This option overrides all save options which effect bytes in the input or output.  This option is always on for record buffers.  Defaults to value of p_binary property for other buffers.

+ or -O	Overwrite destination switch (no backup).  Default is off.  Useful for writing a file to a device such as the printer.

+ or -T	Compress saved file with tab increments of 8.  Default is off.

+ or -ZR	Remove end of file marker (Ctrl+Z).  This option is ignored if the current buffer is not a DOS ASCII file.  The buffer is modified if the p_showeof is true and the output file name matches the buffer name.  Default is off.

+ or -Z	Add end of file marker (Ctrl+Z).  Note that if a buffer has a visible EOF character, the output file will still have an EOF character.  Use +ZR to ensure that the output file does not have and EOF character.  Default is off.

+ or -L	Reset line modify flags.  Default is off.

+ or -N	Don't save lines with the VSLF_NOSAVE bit set.  When the editor keeps track of whether a buffer has lines with the VSLF_NOSAVE bit set, we will not need this option.

+ or -A	Convert destination filename to absolute.  Default is on.  This option is currently used to write files to device names such as PRN.  For example, "_save_file +o -a +e prn" sends the current buffer to the printer.

+DB, -DB, +D,-D,+DK,-DK

These options specify the backup style.  The default backup style is +D.  The backup styles are:

+DB, -DB	Write backup files into the same directory as the destination file but change extension to ".bak".

+D	When on, backup files are placed in a single directory.  The default backup directory is "\vslick\backup\" (UNIX: "$HOME/.vslick/backup") . You may define an alternate backup directory by defining an environment variable called VSLICKBACKUP.  The VSLICKBACKUP environment variable may contain a drive specifier. The backup file gets the same name part as the destination file.  For example, given the destination file "c:\project\test.c" (UNIX: "/project/test.c") , the backup  file will be "c:\vslick\backup\test.c" (UNIX: "$HOME/.vslick/backup/test.c").

non-UNIX platforms: For a network, you may need to create the backup directory with appropriate access rights manually before saving a file.

-D	When on, backup file directories are derived from concatenating a backup directory with the path and name of the destination file.  The default backup directory is "\vslick\backup\" (UNIX: "$HOME/.vslick").  You may define an alternate backup directory by defining an environment variable called VSLICKBACKUP.  The VSLICKBACKUP environment variable may contain a drive specifier.  For example, given the destination file "c:\project\test.c", the backup file will be "c:\vslick\backup\project\test.c" (UNIX: "$HOME/.vslick/backup/project/test.c").

non-UNIX platforms: For a network, you may need to create the backup directory with appropriate access rights manually before saving a file.

+DK,-DK	When on, backup files are placed in a directory off the same directory as the destination file.  For example, given the destination file "c:\project\test.c" (UNIX: "$HOME/.vslick"), the backup file will be "c:\project\backup\test.c" (UNIX: "/project/backup/test.c").  This option works well on networks.

Remarks	This function saves the buffer date from the editor control specified to the output file specified.  This function is identical to making the call vsExecute(wid,"save "\"pszOutputFilename\"") except that vsRefresh is not called, a new undo step is never started, and code is not generated by macro recording.

The VSP_MODIFY property is turned off if the output filename is the same as the buffer name.

Return	Returns 0 if successful.  Common return codes are: INVALID_OPTION_RC, ACCESS_DENIED_RC, ERROR_OPENING_FILE_RC, INSUFFICIENT_DISK_SPACE_RC, ERROR_READING_FILE_RC, ERROR_WRITING_FILE_RC, DRIVE_NOT_READY_RC, and PATH_NOT_FOUND_RC. On error, message displayed.

Example

    // Expand tabs and write buffer to temporary file.

    vsCommandSave (0,"tempfile","+E");


vsConcurProcessIsThisBuffer

int VSAPI vsConcurProcessIsThisBuffer( int wid)

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

Return	Returns non-zero value if the buffer in the editor control specified has a concurrent process attatched to it.


vsConcurProcessQCol

int VSAPI vsConcurProcessQCol( int wid)

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

Return	Returns concurrent process read column if the current line of the buffer in the editor control specified has the concurrent process read point.


vsConcurProcessQReadRunning

int VSAPI vsConcurProcessQReadRunning()

Return	Processes data in concurrent process buffer and returns non-zero value if the concurrent process is still running.


vsConcurProcessQRunning

int VSAPI vsConcurProcessQRunning()

Return	Returns non-zero value if the concurrent process is still running.


vsCopyToCursor

void VSAPI vsCopyToCursor( int wid, int markid=-1,int MustBeMinusOne=(-1) )

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

markid	mark_id is a selection handle allocated by the vsAllocSelection or vsDuplicateSelection function.  A mark_id of -1 specifies the active selection or selection showing and is always allocated.

Remarks	Copies the selection specified by mark_id to cursor.  Character or block selections are inserted before the character at the cursor.  Line selections are always inserted after the current line.  Resulting selection is always on destination text.


vsCreateEditorCtl

int VSAPI vsCreateEditorCtl( int wid, VSSYSHWND hwndparent, int x, int y, int width, int height, int BorderStyle=VSBDS_FIXED_SINGLE, int visible=1, int buf_id=-1, void *pdata=0, int mdi_wid=0, int reserved1=0, long reserved2=0)

Parameters	Description

wid	Window id of new editor control.  This should be 0 except when this function is called during the VSINIT.pfnMDICreateEditWindow callback.

hwndparent	System window handle of parent.

x, y, width, height	Size in pixels to use when created new editor control.

BorderStyle	Border style of editor control.

visible	When non-zero, editor control is created initially visible.  Set the VSP_VISIBILE property to make an editor visible or invisible.

buf_id	Buffer id to initially attatch to the new editor control.

pdata	Initial window specific user data.  Use vsWinQData function to get your window specific user data.  Use the vsWinSetData function to change this value later.

mdi_wid	Window id of MDI frame window. If you have implemented our MDI callbacks, specify this parameter to register a new editor control MDI child.  Use this parameter during the VSINIT. pfnMDICreateEditWindow callback.  Currently only one MDI frame window (VSWID_MDI) is supported.

Remarks	This function creates a new editor control.  DO NOT use this function to create an editor control on a Slick-C dialog box.  If you are NOT calling this function during the VSINIT.pfnMDICreateEditWindow callback, you need to call vsRefresh with the 'A' option so that the scroll bars are updated.

You do not have to call vsDestroyEditorCtl on Windows because Visual SlickEdit gets the Windows WM_DESTROY message and can cleanup their.  However, under X windows you must call vsDestroyEditorCtl just before destroying the parent window which contains the editor control window.  Otherwise, Visual SlickEdit will crash.

Return	If successful, returns window id of new editor control.  Otherwise negative error code is returned.  0 is not a valid window id and is never returned by this function.

See Also	vsDestroyEditorCtl


vsCreateTempView

int VSAPI vsCreateTempView( int *pTempViewId,int *pOrigViewId=0,const char *pszReserved=0)

Parameters	Description

pTempViewId	Set to newly created view id.

pOrigViewId	Set to current view id.  There is always a valid current view id.

Remarks	This function creates an editor view and buffer.  Use this function when you want to do editor processing on a file but you do not want a visible window created.  Use the vsActivateView and/or the VSP_VIEWID property to switch views.  The call vsPropGetI(0,VSP_VIEWID) returns the current view id.

A view holds the information necessary for the editor to track the current position in a buffer.  All editor control windows have a view id.  All views have a buffer id.

Example

int status, temp_view_id, orig_view_id;

status=vsCreateTempView(&temp_view_id,&orig_view_id);

if (status) {

    return(status);

}

vsInsertLine(0,"Insert text into temp view");

// Free view and buffer

vsDeleteTempView(temp_view_id);

vsActivateView(orig_view_id);

Return	If successful, returns 0 and the temp view/window/buffer is active.  Otherwise a negative error code is returned.

See Also	vsDeleteTempView, vsOpenTempView


vsCurWord

int VSAPI vsCurWord( int wid, char *pszWord, int MaxWordLen, int *pPhyiscalStartCol=0, int option=0, int *pMaxWordLen=0)

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

pszWord	Ouput buffer for current word.  This can be 0.

MaxWordLen	Number of characters allocated to pszWord.  We recommend VSMAXCURWORD.

pPhysicalStartCol	Recieves physical start column (1..vsQLineLength()) of word.

option	May be one of the following:

0	If the cursor is on a word character, all of that word is returned.  If the cursor is not on a word character and a word exists after the cursor, that word is returned.  If the cursor is not on a word character and a word does not exist after the cursor, the previous word is returned.  If no words exist on the current line, a non-zero status is returned.

1	(EMACS style) Same as 0 except that if cursor is on a word character, no word characters before the current character are returned.

2	Same as 0 except when the cursor is setting on the first non-word character after a word character, the previous word is returned.

pMaxWordLen	If this is not 0, this is set to the number of characters you need to allocate to pszWord.

Return	If successful, returns 0 and places current word in pszWord.  Otherwise a non-zero value is returned.

See Also	vsMouCurWord


vsDeleteAll

void VSAPI vsDeleteAll( int wid)

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

Remarks	Deletes all lines in the buffer of the editor control specified.


vsDeleteBuffer

void VSAPI vsDeleteBuffer(int wid)

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

Remarks	Deletes buffer from the buffer ring even if the buffer is modified.  The previous buffer's non-active view information (cursor position information) is copied into the active view making the previous buffer active.

See Also	_next_buffer, _prev_buffer


vsDeleteChar

void VSAPI vsDeleteChar( int wid )

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

Remarks	Deletes character under text cursor.


vsDeleteExtensionOptions

void VSAPI  vsDeleteExtensionOptions( const char *pszExtension)

Applies To	Edit window, Editor control

Parameters	Description

pszExtension	File extension.  For list of file extension types, use our Extension Options dialog ("Tools", "Configuration","File Extension Setup...").

Remarks	Gets extension specific options for a specific extension.

See Also	vsSetDefaultExtensionOptions, vsSetDefaultExtensionReferTo, vsDeleteExtensionOptions, vsUpdateExistingBufferExtensionOptions, vsSetDefaultExtensionOptions


vsDeleteLine

int VSAPI vsDeleteLine(int wid)

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

Remarks	Deletes the current line.

Return	Returns 0 unless last line of buffer is deleted.

See Also	vsInsertLine, vsReplaceLine, vsGetLine, vsGetText


vsDeleteSelection

int VSAPI vsDeleteSelection( int wid, int mark_id= -1, int Reserved=-1)

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

mark_id	Selection id to duplicated.   If -1 is specified the active selection.

Remarks	Deletes the marked text specified.  No clipboard is created.  This function performs a "binary" delete when in hex mode (p_hex_mode==true).  A binary delete allows bisecting of end of line pairs like CR, LF.

Return	Returns 0 if successful.  Otherwise TEXT_NOT_SELECTED_RC is returned. On error, message is displayed.


vsDeleteTempView

int VSAPI vsDeleteTempView( int TempViewId, int doDeleteBuffer=1)

Parameters	Description

TempViewId	View id to delete.

doDeleteBuffer	When doDeleteBuffer is 0, the buffer is never deleted.  When doDeleteBuffer is 1, the buffer is deleted ONLY if it is a hidden buffer (VSBUFFLAG_HIDDEN) not currently being displayed in an editor control.  A non-hidden buffer indicates that it is an MDI Child edit window buffers.

Remarks	This function deletes the view and optionally deletes the buffer attatched to that view.

See Also	vsCreateTempView, vsOpenTempView


vsDeleteText

int VSAPI vsDeleteText(int wid, int DelLen, char option=0)

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

DelLen	Number of characters to delete.   Specify -1 to delete to end of line.  Specify -2 to delete to end of file.  When DelLen is greater than the number of characters left in the file, the text up to the end of file is deleted.

option	Maybe 0 or 'C'.  Specify 'C' to indicate that DelLen is a positive imaginary count (as if tabs were expanded) of characters to delete in the current line.

Remarks	If option is zero, number of characters specified by DelLen starting from the cursor location are deleted.  Each end of line character is treated as 1 character (as is).

If option is 'C', the number of columns (as if tabs were expanded) specified by DelLen are deleted from the current line.   The end of line characters are not deleted.

Return	Returns 0 if successful.

See Also	vsInsertText


vsDeselect

void VSAPI vsDeselect( int wid, int mark_id=-1 )

Applies To	Edit window, Editor control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

mark_id	Selection id to duplicated.   If -1 is specified the active selection.

Remarks	Clears selection specified.  mark_id is a handle to a selection returned by vsAllocSelection or vsDuplicateSelection.  A mark_id of -1 identifies the active selection.

Return	Returns 0 if mark_id is a valid selection handle.  Otherwise INVALID_SELECTION_HANDLE_RC is returned.


vsDestroyEditorCtl

void VSAPI vsDestroyEditorCtl( int wid, long reserved=0)

Applies To	Edit window, Editor control

Parameters	Description

wid	Window id of the editor control.

Remarks	This function destroys an editor control window an all allocated data of that editor control.  The buffer is not deleted if there is another non-mdi (VSP_MDICHILD==0) editor control displaying that buffer.

See Also	vsCreateEditorCtl


vsDiffFiles

int VSAPI vsDiffFiles( const char *pszFileName1="", int iBuf1Index=-1, int iView1Index=0,const char *pszFileName2="", int iBuf2Index=-1, int iView2Index=0, int iFlags, const char *pszFileSpec="", const char *pszExcludeFileSpec="", const char *pszDialogTitle="", const char *pszFile1Title="", const char *pszFile2Title="", const char *pszComment="", const char *pszCommentButtonCaption="", const char *pszImaginaryLineCaption=0)

Parameters	Description

pszFileName1	Name of the first file to be diffed.  This will be loaded from disk.  If there is a buffer by the same name in memory, it will be used.  This may be a directory if you want a multi-file diff.

iBuf1Index	Buffer Index for the first buffer.  If you use this, be sure to specify "" for pszFileName1, and 0 for iView1Index.  Specify -1 to have this parameter ignored.  Do not use this for a multi-file diff.

iView1Index	View Index for the first buffer.  If you use this, be sure to specify "" for pszFileName1, and -1 for iBuf1Index.  Specify 0 to have this parameter ignored.  Do not use this for a multi-file diff.

pszFileName2	Name of the second file to be diffed.  This will be loaded from disk.  If there is a buffer by the same name in memory, it will be used.  This may only be a directory if you want a multi-file diff, or if pszFileName2 differs from pszFileName1 by path only.

iBuf2Index	Buffer Index for the second buffer.  If you use this, be sure to specify "" for pszFileName2, and 0 for iView2Index.  Specify -1 to have this parameter ignored. Do not use this for a multi-file diff.

iView2Index	View Index for the second buffer.  If you use this, be sure to specify "" for pszFileName2, and -1 for iBuf2Index.  Specify 0 to have this parameter ignored. Do not use this for a multi-file diff.

iFlags	Combination of the following flags:  None of these flags apply to multi-file diff.

VSDIFF_OPT_BUF1

pszFileName1 is a buffer name and not a relative filename which needs the path to be fully resolved.

VSDIFF_OPT_BUF2

pszFileName2 is a buffer name and not a relative filename which needs the path to be fully resolved.

VSDIFF_OPT_PRESERVE_BUF1

Do not delete buffer 1 when the diff closes.  Should be used in conjunction with a non-null iBuf1Index.  If the user chooses to "save" changes to this buffer, the modify flag will be left on to show the caller that the user wishes to save the file.  If the user does not save changes to the buffer, all changes will be undone, and the modify flag will be off.  When using this option, be sure to turn VSP_MODIFY off, and set VSP_UNDOSTEPS to a large number (32000 or more) before calling this function.

VSDIFF_OPT_PRESERVE_BUF2

Save as VSDIFF_OPT_PRESERVE_BUF1, except for buffer 2.

VSDIFF_OPT_QUIET

Quiet option.  Shuts off the "Files match" message

VSDIFF_OPT_READ_ONLY_1

Make File1 read only.

VSDIFF_OPT_READ_ONLY_2

Make File2 read only.

VSDIFF_OPT_INTERLEAVED

Interleaved output in a single buffer.  Cannot be specified for a multi-file diff.

VSDIFF_OPT_MODAL

Show diff dialog modally.  Cannot be used with VSDIFF_OPT_INTERLEAVED.

VSDIFF_OPT_VIEW_ONLY

Make both files read only.  Will not allow the user to type, and will hide all the "copy" buttons.

VSDIFF_OPT_RECURSIVE

Recurse subdirectories.  Use this option only with multi-file diffs.

VSDIFF_OPT_NOMAP

Do not add information about this diff to the mapping file(diffmap.ini)

*pszFileSpec	Filespecs to match for multi-file diff (ex "*.c *.h").  This is a space delimited list.  Specify only for a multi-file diff.  Specify "" to have this parameter ignored.

*pszExcludeFileSpec	Filespecs to exclude for multi-file diff (ex "junk* test*"). This is a space delimited list.  Specify only for a multi-file diff.  Specify "" to have this parameter ignored.

*pszDialogTitle	Title of diff dialog box.  If "" is specified, the title will be "Diff".  Title cannot be blank. Do not use this for a multi-file diff.

*pszFile1Title	Title above file 1 editor control in diff dialog.  If "" is specified, the Document name, or buffer name will be used.  Title cannot be blank. Do not use this for a multi-file diff.

*pszFile2Title	Title above file 1 editor control in diff dialog.  If "" is specified, the Document name, or buffer name will be used.  Title cannot be blank.  Do not use this for a multi-file diff.

*pszComment	If this parameter is specified, a "Comment" button will be visible on the diff dialog.  When the user presses the button, they will see a dialog with the contents of this parameter.  This string can contain new line characters ("\n").  Do not use this for a multi-file diff.

*pszCommentButtonCaption

This is the caption for the "Comment" button.  Use this only in conjunction with the pszComment parameter.  Do not use this for a multi-file diff.

*pszImaginaryLineCaption

This is the text used for imaginary lines. Note that this parameter is a global setting and will effect other diffs currently in progress.  For this reason, you must make sure that this parameter is the same for all calls to vsDiffFiles and vsMergeFiles.

Remarks	Diffs the files specified and displays the Diff dialog.

Returns	Returns 0 if successful.  On error a message box is display.


vsDropFiles

void VSAPI vsDropFiles( WPARAM wparam)

Parameters	Description

wparam	wparam of WM_DROPFILES message.

Remarks	This function is called during a Windows WM_DROPFILES message to open files in the editor.  This function is only supported under Windows and should only be called if you support the MDI API's.


vsDuplicateSelection

int VSAPI vsDuplicateSelection(int wid, int mark_id)

Applies To	Edit window, Editor control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

mark_id	Selection id to duplicated.   If -1 is specified for the mark_id parameter, a handle to the active selection is returned (no duplication is performed).  This is different than other selection functions which automatically assume the active selection and perform the same operation.

Return	If successful, a handle to a newly created selection identical to the selection specified.  Otherwise a negative error code is returned.  Possible error codes are INVALID_SELECTION_HANDLE_RC or TOO_MANY_SELECTIONS_RC.  mark_id is a handle to a selection returned by one of the built-ins vsAllocSelection or vsDuplicateSelection.

IMPORTANT:  If -1 is specified for the mark_id parameter, a handle to the active selection is returned (no duplication is performed).  This is different than other selection functions which automatically assume the active selection and perform the same operation.

On error, message is displayed.

Example

vsDeselect(0);vsSelectLine (0);

mark_showing=vsDuplicateSelection(-1);	// Save handle of active selection

mark_id=vsDuplicateSelection(mark_showing);	// Duplicate active selection

vsCopyToCursor(0);

vsShowSelection(mark_id);	// Keep selection on source text.

vsFreeSelection (mark_showing);	// Free selection on destination text.


vsDllExport

int VSAPI vsDllExport(const char *pszFuncProto, const char * pszNameInfo, int arg2)

Remarks	Registers a DLL command or function that can be called from the Slick-C macro.  See simple.c for a complete example.  DLL commands may be invoked from the command line or bound to a key.

The syntax for pszFuncProto is:

        [_command] [return-type] [dllname:]func-name([type [var-name] [, type [var-name]]...])

func-name is the name of the DLL function to be registered.  dllname is optional and indicates the name of the DLL which contains the function.  Currently the function names are case insensitive.

type may be one of the following:

VSPSZ	NULL terminated string

VSPLSTR	See typedef in "vsapi.h".

int

long

VSHVAR	Handle to interpreter variable

VSHREFVAR	Call by reference handle to interpreter variable.  This type can be used as input to functions which accept VSHVAR parameters.

pszNameInfo specifies completion for arguments to a command.  A '*' character may be appended to the end of a completion constant to indicate that one or more of the arguments may be entered.  One or more of the follow string completion constants separated with spaces may be specified:

VSARG_FILE	One filename

VSARG_MULTI_FILE	Multiple filenames

VSARG_BUFFER	Buffer name

VSARG_COMMAND	Slick-C command function

VSARG_PICTURE	Already loaded picture

VSARG_FORM	Dialog box template

VSARG_MODULE	Loaded Slick-C module

VSARG_MACRO	User recorded Slick-C command function

VSARG_MACROTAG	Slick-C tag name

VSARG_VAR	Slick-C global variable

VSARG_ENV	Environment variable

VSARG_MENU	Menu name

VSARG_TAG	Tag name

arg2 is zero or more of the following flags which specify when the command should be enabled/disabled and a few other things:

VSARG2_CMDLINE	Command supports the command line.                VSARG2_CMDLINE allows a fundamental mode key binding to be inherited by the command line

VSARG2_MARK	ON_SELECT event should pass control on to this command and not deselect text first.

Ignored if command does not require an editor control

VSARG2_QUOTE	Indicates that this command must be quoted when called during macro recording.  Needed only if command name is an invalid identifier or keyword.

VSARG2_LASTKEY	Command requires last_event value to be set when called during macro recording.

VSARG2_MACRO	This is a recorded macro command. Used for completion.

VSARG2_TEXT_BOX	Command supports any text box control. VSARG2_TEXT_BOX allows a fundamental mode  key binding to be inherited by a text box

VSARG2_NOEXIT_SCROLL	Do not exit scroll caused by using scroll bars. Ignored if command does not require an editor control.

VSARG2_EDITORCTL	Command allowed in editor control. VSARG2_EDITORCTL allows a fundamental mode key binding to be inherited by a non-MDI editor control

VSARG2_NOUNDOS	Do not automatically call _undo('s').  Require macro to call _undo('s') to start a new level of undo.

VSARG2_READ_ONLY	Command allowed when editor control is in strict read only mode. Ignored if command does not require an editor control

VSARG2_ICON	Command allowed when editor control window is iconized.  Ignored if command does not require an editor control

VSARG2_REQUIRES_EDITORCTL	Command requires an editor control.

VSARG2_REQUIRES_MDI_EDITORCTL

Command requires MDI editor control

VSARG2_REQUIRES_AB_SELECTION

Command requires selection in active buffer.

VSARG2_REQUIRES_BLOCK_SELECTION

Command requires block/column selection in any buffer

VSARG2_REQUIRES_CLIPBOARD	Command requires editor control clipboard

VSARG2_REQUIRES_FILEMAN_MODE

Command requires active buffer to be in fileman mode.

VSARG2_REQUIRES_TAGGING	Command requires <ext>_proc_search/find-tag support.

VSARG2_REQUIRES_SELECTION	Command requires a selection in any buffer.

VSARG2_REQUIRES_MDI	Command requires MDI interface may be because it opens a new file or uses _mdi object. Commands with this attribute are removed from pop-up menus which the MDI interface is not available (editor control OEMs).

return-type may be one of the following

      VSPSZ

      VSPLSTR

      int

      long

      void

If the _command keyword is specified, the DLL function may be bound to a key or executed from the command line.  Otherwise, the only way to call the function is to call it from a Slick-C macro.

Performance considerations:  For best performance, use the VSHVAR or VSREFVAR parameter type when operating on long strings instead of VSPSZ or VSPLSTR.  Then use the vsHvarGetLstr function to return a pointer to the interpreter variable. WARNING:  Pointers to interpreter variables returned by the vsHvarGetLstr function are NOT VALID after any interpreter variable is set.  Be sure to reset any pointer after setting other interpreter variables or calling other macros. You may modify the contents of the VSPLSTR pointer returned by vsHvarGetLstr so long as you do not make the string any longer.  We suspect that using the int and long parameter types are no slower than using the VSHVAR type and converting the parameter yourself.

Return	Returns 0 if successful.  Otherwise a non-zero error code is returned.

Examples

    vsDllExport("_command int JustLikeEdit(VSPSZ pszFilenames)", VSARG_MULTI_FILE,	VSARG2_CMDLINE|VSARG2_REQUIRES_MDI);

    vsDllExport("_command void MultiComplete(VSPSZ pszFilename, VSPSZ pszEnvVar)",

          VSARG_FILE" "VSARG_ENV, 0);

See Also	vsLibExport


vsDown

int VSAPI vsDown( int wid, int Noflines)

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

Noflines	Number of lines to move the cursor down.

Remarks	Moves cursor down the number of lines specified by Noflines.  If the destination line is not in view, it is center scrolled or smooth scrolled into view.

Example

       status=vsDown(0,1);

       if (status) {

           // Hit bottom of file

       }

Return	Returns 0 if successful. Otherwise BOTTOM_OF_FILE_RC is returned.

See Also	vsUp


vsEndLine

void VSAPI vsEndLine( int wid )

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Parameters	Description

wid	Window id of object.  0 specifies the current object.

Remarks	Places cursor after end of current line.

See Also	vsBeginLine


vsEndSelect

int VSAPI vsEndSelect( int wid, int mark_id=-1, int LockSelection=1)

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

mark_id	Handle to a selection returned by vsAllocSelection or vsDuplicateSelection.  A mark_id of -1 identifies the active selection.

LockSelection	If this is 1, the selection is "locked" (moving the cursor will no longer remove or extend the selection).

Remarks	If all input is valid and there is a selection, the cursor is placed at the end of the selection.  For line selection, the column position of the cursor is not changed.

Return	Returns 0 if successful.  Possible return codes are PROPERTY_OR_METHOD_NOT_ALLOWED_RC, INVALID_SELECTION_HANDLE_RC, TEXT_NOT_SELECTED_RC, or INVALID_OBJECT_HANDLE_RC.

See Also	vsBeginSelect


vsEndSelectCompare

int VSAPI vsEndSelectCompare( int wid, int markid=-1)

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

markid	Handle to a selection returned by vsAllocSelection or vsDuplicateSelection.  A mark_id of -1 identifies the active selection.

Return

Return Value	Meaning

0	Current line is on last line of selection.

>0	Current line is after last line of selection.

<0	Current line is before last line of selection.

-1	Text is not selected or selection is not in current buffer.

See Also	vsBeginSelectCompare


vsEvalExp

int VSAPI vsEvalExp( char *pszResult, const char *pszSource, int base=10, void *preserved=0)

Parameters	Description

pszResult	(Ouput only).  Result from evaluating the expression specified in pszSource.

pszSource	(Input only).  C syntax mathematical expression.  See help on math for more information.

base	Specifies the output base for the result.  Currently only 2, 8, 10, and 16 are supported.

Remarks	Evaluates a C syntax mathematical expression.

Returns	Returns 0 if successful.


vsEvent2Index

int VSAPI vsEvent2Index( int event, int version=0 )

Parameters	Description

event	Event constant.

Returns	Converts a Visual SlickEdit event into an index into an event table.

Example

int root_etab;

root_etab=vsQDefaultEventTab();

int index;

// Check key binding for Alt+F4

index= vsEventTabIndex(

       root_etab,

       root_etab,

       vsEvent2Index(VS_A_FKEYS_OFFSET+ 4));

if( vsNameType(index) & VSTYPE_COMMAND) {

     // Display the command bound to this key.

     vsMessage(vsNameName(index));

} else if (vsNameType(index) & VSTYPE_EVENTTAB) {

     // This key is a prefix key.  Display name of event table.

     vsMessage(vsNameName(index));

} else {

     // This could be a global function (not a command)

     // This could be an event function   (text1.A_F4) but this is unlikely for

     // the default event table.

}

See Also	vsEvent2Name, vsIndex2Event, vsSetEventTabIndex, vsEventTabIndex, vsQDefaultEventTab


vsEvent2Name

char * VSAPI vsEvent2Name( int event,char *pszName, int MaxNameLen, char option='L', int *pMaxNameLen=0, int version=0 )

Parameters	Description

event	Visual SlickEdit event constant.

pszName	Output buffer for name of event.  This can be 0.

MaxNameLen	Number of characters allocated to pszName.  We recommend VSMAXEVENTNAME.

option	One of the following option letters:

'S'	Return Slick-C source code event name.  These will never change so that our Slick-C source code will be backward compatible.

'L'	Return long event names intended for display on a menu. like "Alt+F4" instead for "A+F4".

'C'	Return short event names intended for display on a menu.

pMaxNameLen	If this is not 0, this is set to the number of characters you need to allocate.

Remarks	Converts a Visual SlickEdit event constant into its corresponding name.

Returns	Returns pszName.

See Also	vsEvent2Index, vsIndex2Event, vsSetEventTabIndex, vsEventTabIndex, vsQDefaultEventTab


vsEventTabIndex

int VSAPI vsEventTabIndex( int root_keytab_index,int mode_keytab_index,

                          int key_index,int return_used_keytab=0, int version=0 )

Parameters	Description

root_keytab_index	Index into names table of root event table.  When checking for key bindings this is usually the event table returned by vsQDefaultEventTab().

mode_keytab_index	Index into names table of mode event table.  This is either the same as root_keytab_index or the value of the VSP_MODEEVENTTAB property.  Note that the mode event table is defined so that each language can override keys like <ENTER>,  <Space Bar>, etc. for smarter support.

key_index	The event index in range 1..VS_NUMKEYS-1.  Use vsEvent2Index to convert an event constant to an index.

return_used_keytab	When non-zero, the index of the event table which has this key binding is returned (i.e. either root_keytab_index, mode_keytab_index, or 0 if there is not binding).

Example

int root_etab;

root_etab=vsQDefaultEventTab();

int index;

// Check key binding for Alt+F4

index= vsEventTabIndex(

       root_etab,

       root_etab,

       vsEvent2Index(VS_A_FKEYS_OFFSET+ 4));

if( vsNameType(index) & VSTYPE_COMMAND) {

     // Display the command bound to this key.

     vsMessage(vsNameName(index));

} else if (vsNameType(index) & VSTYPE_EVENTTAB) {

     // This key is a prefix key.  Display name of event table.

     vsMessage(vsNameName(index));

} else {

     // This could be a global function (not a command)

     // This could be an event function   "text1.A_F4() {   }" but this is unlikely for

     // the default event table.

}

Returns	Returns key binding information.

See Also	vsEvent2Name, vsIndex2Event, vsSetEventTabIndex, vsEvent2Index, vsQDefaultEventTab


vsExecute

long VSAPI vsExecute( int wid,  const char *pszCommand, const char *pszOptions)

Applies To	All Objects

Remarks	Runs the command specified.  pszCommand can be any command that can be invoked from the Visual SlickEdit command line.  Command may be an internal command (_command), an external operating system command, or an external Slick-C batch macro (with defmain entry point).    If no arguments are given, the command line is erased and the command is inserted into the command retrieve buffer.  wid identifies the object to be operated on.  0 specifies the current object.

pszOptions is a string of one or more of the following letters:

W	If command is an external program, run slkwait program to wait for program to complete.   This option allows you to view the results after running a DOS text mode application which displays results to the screen.  Defaults to OFF.

A	If command is an external program, run program asynchronously (no wait).  Defaults to OFF.

R	Insert command into command retrieve buffer (.command) and clear command line.  Defaults to OFF unless pszCommand is NULL.

Z	Return pointer to ASCIIZ instead of long.  BEWARE:  This is a pointer to the "rc" global variable which will change if vsExecute is called again or if you or another macro sets the "rc" variable.  Make a copy of the string if necessary.

L	Return pointer to VSLSTR instead of long.   BEWARE:  This is a pointer to the "rc" global variable which will change if vsExecute is called again or if you or another macro sets the "rc" variable.  Make a copy of the string if necessary.

S	Start new undo step.

M	Record source if macro recording.

D	Do refresh.  Refresh the screen after executing the command.

Return	Return value of command executed is returned.

IMPORTANT: The Windows 3.x version of Visual SlickEdit is only able to retrieve return codes of DOS programs and not Windows programs.  When fixes/enhancements are made to Windows/WIN32s, we will correct this limitation.


vsExit

void VSAPI vsExit( int ExitCode )

Parameters	Description

ExitCode	Exit code to return to operating system.

Remarks	Terminates the current application and returns the exit code given.


vsExpandTabs

void VSAPI vsExpandTabs(int wid, char * pszDest, int *pDestLen, const char *pSource, int SrcLen, int StartCol, int ColWidth, char Option)

Applies To	Edit Window, Editor Control

Remarks	Takes sub-string of source buffer and places the result in the dest buffer.

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

pszDest	Output.  Resulting string terminated with ASCII 0.

pDestLen	Output.  Number of bytes written to pszDest not including ASCII 0.

pSource	Input.  Source buffer.

SrcLen	Input.  Number of bytes in source buffer pSource.  You can specify -1 if pSource is an ASCIIZ string.

StartCol	Input. Start (imaginary) column for sub-string.

ColWidth	Input.  Number of (imaginary) columns to get from pSource.   -1 specifies the rest or the string.

Option	Input.  Specify 'E' if you want all tabs expanded.  Otherwise specify 'S' to return tabs unexpanded.

The StartCol and ColWidth specification correspond to the input string as if tab characters were expanded according to the buffers tab settings.  We call this type of text position or count imaginary.  Strings containing tab characters are expanded before displayed.  Hence, the need arises for a differentiation between physical and imaginary positions.  A physical position corresponds to a byte in a string where  the characters are numbered one to the length of string.  An imaginary position corresponds to a position in a string once tabs have been expanded.

See Also	vsExpandTabsC


vsExpandTabsC

void VSAPI vsExpandTabsC(int wid, char *pszDest, int *pDestLen, int StartCol, int ColWidth, char Option)

Applies To	Edit Window, Editor Control

Remarks	Takes sub-string of source buffer and places the result in the dest buffer.  Unlike the the vsExpandTabs function, this function gets the source text from the current line.

wid	wid identifies the object to be operated on.  0 specifies the current object.

pszDest	Output.  Resulting string terminated with ASCII 0.

pDestLen	Output.  Number of bytes written to pszDest not including ASCII 0.

StartCol	Input. Start (imaginary) column for sub-string.

ColWidth	Input.  Number of (imaginary) columns to get from pSource.   -1 specifies the rest or the string.  -2 specifies to use the vsTruncQLineLength instead of the real line length.  This has the same effect as specifying -1 if the VSP_TRUNCATELENGTH property is 0.

Option	Input.  Specify 'E' if you want all tabs expanded.  Otherwise specify 'S' to return tabs unexpanded.

The StartCol and ColWidth specification correspond to the input string as if tab characters were expanded according to the buffers tab settings.  We call this type of text position or count imaginary.  Strings containing tab characters are expanded before displayed.  Hence, the need arises for a differentiation between physical and imaginary positions.  A physical position corresponds to a byte in a string where  the characters are numbered one to the length of string.  An imaginary position corresponds to a position in a string once tabs have been expanded.

See Also	vsExpandTabs, vsTextColC


vsFileAbsolute

char * VSAPI vsFileAbsolute(char *pszDestFilename, const char *pszSoureFilename)

Parameters	Description

pszDestFilename	Result of convert pszSrcFilename to a fully qualified path.

pszSrcFilename	Filename with path specification which is relative to the current directory.  This may already be fully qualified.

Remarks	Converts pszSrcFilename to a fully qualified path.

Return	Returns pszDestFilename.

See Also	vsFileAbsolute, vsFileAbsoluteTo, vsFileRelative


vsFileAbsoluteTo

char * VSAPI vsFileAbsoluteTo(char *pszDestFilename, const char *pszSoureFilename, const char *pszToDir)

Parameters	Description

pszDestFilename	Result of convert pszSrcFilename to a fully qualified path.

pszSrcFilename	Filename with path specification which is relative to the directory specified by pszToDir.  This may already be fully qualified.

pszToDir	Directory with or without trailing backslash (UNIX: forward slash).  If 0 or "" is given, the current directory is used.

Remarks	Converts pszSrcFilename to a fully qualified path.

Return	Returns pszDestFilename.

See Also	vsFileAbsolute, vsFileAbsoluteTo, vsFileRelative


vsFileClose

int VSAPI vsFileClose(int fh)

Remarks	Closes the file handle fh.  fh must have been returned by vsFileOpen.

Return	Returns 0 if successful.

See Also	vsFileOpen, vsFileClose, vsFileRead, vsFileWrite, vsFileSeek, vsFileMove


vsFileFlush

int VSAPI vsFileFlush(int fh)

Remarks	Forces the operating system to flush cached file data to disk.

Return	Returns 0 if successful.

See Also	vsFileOpen, vsFileClose, vsFileRead, vsFileWrite, vsFileSeek, vsFileMove


vsFileMove

int VSAPI vsFileMove( const char *pszDestFilename, const char *pszSrcFilename)

Parameters	Description

pszDestFilename	New name for file.

pszSrcFilename	Existing name of file.

Remarks	Renames the file specified.  This function will fail if the destination file exists or the destionation path is on a different drive or file system.

Return	Returns 0 if successful.

See Also	vsFileOpen, vsFileClose, vsFileRead, vsFileWrite, vsFileSeek, vsFileMove


vsFileOpen

int VSAPI vsFileOpen(const char *pszFilename, int option)

Remarks	Opens the file specified with access specified by option.

option may be one of the following.

0	Open file for shared reading.

1	Open file for writing.  File is created if it does not exist.  File is truncated.

2	Open file for reading (read shared) and writing.  File is created if it does not exist.  File is truncated.

3	Open file for reading (read shared) and writing.  FILE_NOT_FOUND_RC is returned if the file does not exist.  File is NOT truncated.

UNIX, unfortunately does not support sharing.  On UNIX it is possible for the compiler to be reading a file that you are writing to.

Return	If successful, a handle to file which may be used by other vsFilexxx functions.  Otherwise a negative error code is returned.

See Also	vsFileOpen, vsFileClose, vsFileRead, vsFileWrite, vsFileSeek, vsFileMove


vsFileRead

int VSAPI vsFileRead(int fh, char *pBuf, int BufLen);

Remarks	Reads number of bytes specified by BufLen into pBuf.

Return	If successful, the number of bytes read is returned.  Otherwise a negative error code is returned.

See Also	vsFileOpen, vsFileClose, vsFileRead, vsFileWrite, vsFileSeek, vsFileMove


vsFileRelative

char * VSAPI vsFileRelative(char *pszDestFilename, const char *pszSoureFilename, const char *pszToDir, int addDotDots)

Parameters	Description

pszDestFilename	Result of convert pszSrcFilename to a relative path specification.

pszSrcFilename	Filename with fully qualified path specification.  This may NOT be a relative path specification.

pszToDir	Directory with or without trailing backslash (UNIX: forward slash).  If 0 or "" is given, the current directory is used.

addDotDots	Indicates with ".." are allowed in the result filename.

Remarks	Converts pszSrcFilename to a path specification which is relative to the directory specified by pszToDir.

Return	Returns pszDestFilename.

See Also	vsFileAbsolute, vsFileAbsoluteTo, vsFileRelative


vsFileSeek

long VSAPI vsFileSeek(int fh, long SeekPos, int option);

Remarks	Changes the file position for the file specified by fh.

option changes the meaning of SeekPos as follows:

0	SeekPos is absolute position.

1	SeekPos is relative to current position.

2	SeekPos is relative to end of file.

Return	If successful, the new seek position is returned.  Otherwise a negative error code is returned.

See Also	vsFileOpen, vsFileClose, vsFileRead, vsFileWrite, vsFileSeek, vsFileMove


vsFileWrite

int VSAPI vsFileWrite(int fh, const char *pBuf, int BufLen);

Remarks	Write number of bytes specified by BufLen to the file specified by fh.  pBuf points to the data to be written.

Return	If successful, the number of bytes written is returned.  Otherwise a negative error code is returned.

See Also	vsFileOpen, vsFileClose, vsFileRead, vsFileWrite, vsFileSeek, vsFileMove


vsFillSelection

void VSAPI vsFillSelection( int wid, int markid=-1, unsigned char ch=' ')

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

mark_id	Selection id to duplicated.   If -1 is specified the active selection.

ch	Character to fill selection with.

Remarks	Fills the selection specified with a character.


vsFindIndex

int VSAPI vsFindIndex( const char *pszName, int flags)

Parameters	Description

pszName	Name to find.

flags	One or more of the VSTYPE_??? flags Ored together.

VSTYPE_PROC	Matches function

VSTYPE_VAR 	Matches variable

VSTYPE_EVENTTAB 	Matches event table

VSTYPE_COMMAND	Matches command

VSTYPE_MODULE	Matches module

VSTYPE_PICTURE	Matches picture.

VSTYPE_OBJECT	Matches any type of dialog box template.  Use vsoi2type(VSOI_???) to find a specific type of object.

VSTYPE_MISC	Matches miscellaneous.

Return	Returns name table index to pszName of one of the types specified by flags. 0 is returned if a match is not found.  A name type match is considered if  (flags & vsNameType(index)) is true.  Search is not case sensitive except for names of type VSTYPE_PICTURE and VSTYPE_MODULE under UNIX.  All underscore characters in name are converted to dash characters before searching takes place except for names of type VSTYPE_PICTURE or VSTYPE_MODULE.  The name type flags are listed in the file "vs.h".

Example

    int index=vsFindIndex("form1",vsoi2type(VSOI_FORM));

See Also	vsFindIndex, vsNameMatch, vsNameName, vsNameType, vsNameInfo, vsNameSetInfo, vsNameInfoArg2, vsCallIndex, vsNameInsert, vsNameReplace, vsNameDelete, vsNameCallable


vsFontIsScalable

int VSAPI vsFontIsScalable( int flags, const char *pszFontName, void *reserved=0)

Parameters	Description

flags	One or more of the VSFONTLISTFLAG_??? flags ORed together.

VSFONTLISTFLAG_SCREEN_FONTS	Test screen font.

VSFONTLISTFLAG_PRINTER_FONTS

Test printer font.

pszFontName	Name of font to list sizes for.  Specify 0 to list available font names.

Return	Returns non-zero value if the font is scalable.  You should not list font sizes for fonts which are scalable since all sizes are supported.

See Also	vsFontIsScalable, vsFontList, vsFontQType, vsFontQDefaultCharSet


vsFontList

int VSAPI vsFontList( void (VSAPI *pfnCallback)(const char *psz), int flags=VSFONTLISTFLAG_SCREEN_FONTS, const char *pszFontName=0)

Parameters	Description

pfnCallback	Function called for each font name or font size found.

flags	One or more of the VSFONTLISTFLAG _??? flags ORed together.

VSFONTLISTFLAG_SCREEN_FONTS	List screen fonts.

VSFONTLISTFLAG_PRINTER_FONTS

List printer fonts

VSFONTLISTFLAG_FIXED_ONLY	List fixed fonts only.

VSFONTLISTFLAG_OUPUT_WIDTHxHEIGHT

Windows only:  When listing font sizes, 	list fonts in format wwwxhhh. where www is the pixel width and hhh is the pixel height.

pszFontName	Name of font to list sizes for.  Specify 0 to list available font names.

Return	Returns 0 if successful.

See Also	vsFontIsScalable, vsFontList, vsFontQType, vsFontQDefaultCharSet


vsFontQDefaultCharSet

int VSAPI  vsFontQDefaultCharSet( int flags, const char *pszFontName, ,const char *pszFontSize)

Parameters	Description

flags	One or more of the VSFONTLISTFLAG_??? flags ORed together.

VSFONTLISTFLAG_SCREEN_FONTS	Test screen font.

VSFONTLISTFLAG_PRINTER_FONTS

Test printer font.

pszFontName	Name of font to list sizes for.  Specify 0 to list available font names.

pszFontSize	Font size.

Return	Windows only:  Returns Windows character set.

See Also	vsFontIsScalable, vsFontList, vsFontQType, vsFontQDefaultCharSet


vsFontQType

int VSAPI vsFontQType( int flags, const char *pszFontName, void *reserved=0)

Parameters	Description

flags	One or more of the VSFONTLISTFLAG_??? flags ORed together.

VSFONTLISTFLAG_SCREEN_FONTS	Test screen font.

VSFONTLISTFLAG_PRINTER_FONTS

Test printer font.

pszFontName	Name of font to list sizes for.  Specify 0 to list available font names.

Return	Returns flags of information about this font.

VSFONTTYPE_RASTER	Windows only.  Raster font.

VSFONTTYPE_DEVICE	Windows only.  Device font.

VSFONTTYPE_TRUETYPE	Windows only. True Type font.

VSFONTTYPE_FIXED	Fixed pitch font.

VSFONTTYPE_OUTLINE	Outline font.

VSFONTTYPE_KERNING	No longer used.

See Also	vsFontIsScalable, vsFontList, vsFontQType, vsFontQDefaultCharSet


vsFree

void VSAPI vsFree(void *p)

Return	Frees memory allocated by the vsAlloc function.  If a NULL pointer is given, this function does nothing.

See Also	vsAlloc, vsRealloc


vsFreeColor

void VSAPI [wid_expression.]vsFreeColor(int wid, VSCOLORINDEX ColorIndex)

Applies To	Edit window, Editor control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

Remarks	Frees a color index allocated by vsAllocColor.

See Also	vsAllocColor, vsSetTextColor, vsGetTextColor, vsSetDefaultColor, vsGetDefaultColor


vsFreeSelection

void VSAPI vsFreeSelection( int mark_id )

Parameters	Description

mark_id	Selection id to free.

Remarks	Frees the selection handle or bookmark handle corresponding to mark_id.  _free_selection will not free the active selection (the one that is seen on screen).  mark_id is a handle to a selection returned by vsAllocSelection or vsDuplicateSelection.  A mark_id of -1 is not allowed.  The default selection or selection show (vsShowSelection) can be freed.

See Also	vsAllocSelection


vsGetDefaultColor

int VSAPI  vsGetDefaultColor( int cfgfield,int *pFGColor,int *pBGColor,

                             int *pFontFlag)

Applies To	Edit window, Editor control

Parameters	Description

cfgfield	One of the VSCFG_??? constants or a color index allocated by vsAllocColor.

pFGColor	Ouput only.  Set to rgb foreground color.

pBGColor	Ouput only.  Set to rgb background color.

pFontFlag	Ouput only.  Set to one of the VSFONTFLAG_?? constants or 0.

Remarks	Gets rgb color values (always in Windows format) and font style flag for the cfgfield specified.

Returns	Returns 0 if successful.

See Also	vsAllocColor, vsFreeColor, vsSetTextColor, vsSetDefaultColor, vsGetTextColor


vsGetDefaultExtensionOptions

int VSAPI  vsGetDefaultExtensionOptions( const char *pszExtension, VSEXTENSIONOPTIONS *pExtensionOptions, int version=0)

Applies To	Edit window, Editor control

Parameters	Description

pszExtension	File extension.  For list of file extension types, use our Extension Options dialog ("Tools", "Configuration","File Extension Setup...").

pExtensionOptions	Ouput only.  Set to extension specific options for pszExtension.

Remarks	Gets extension specific options for a specific extension.

Returns	Returns 0 if successful.

See Also	vsSetDefaultExtensionOptions, vsSetDefaultExtensionReferTo, vsDeleteExtensionOptions, vsUpdateExistingBufferExtensionOptions, vsSetDefaultExtensionOptions


vsGetDefaultFont

int VSAPI vsGetDefaultFont( int field, char *pszFontName, int MaxFontName, int *pFontSizex10, int *pFontFlags,int *pCharSet=0 )

Parameters	Description

field	Field to change font for.  One of the following constants defined in "vs.h".

VSCFG_CMDLINE

Font used by the command line.

VSCFG_WINDOW_TEXT

Font used by the editor control window text.

VSCFG_MESSAGE

Font used by the message line.

VSCFG_STATUS

Font used by the status line.

pszFontName	Output buffer for font name.

MaxFontName	Number of characters for font name.

pFontSizex10	Point size of font x 10.

pFontFlags	One or more of the following flags:

VSFONTFLAG_BOLD

VSFONTFLAG_ITALIC

VSFONTFLAG_STRIKE_THRU

VSFONTFLAG_UNDERLINE

pCharSet	Indicates the character set of the font.  These character sets map directly onto the Windows character sets. See VSCHARSET_??? constants defined in "vs.h".  We do not expect this parameter to be used under UNIX.

Remarks	Returns information about the font configuration.

Returns	Returns 0 if parameters are valid.

See Also	vsSetDefaultFont, vsGetDefaultColor, vsSetDefaultColor


vsGetDefaultOptionZ

char * VSAPI  vsGetDefaultOptionZ( int option, char *pszResult, int MaxResult, int *pMaxResult=0 )

Parameters	Description

option	One of the following options:

VSOPTIONZ_PAST_EOF

String displayed for lines in an editor control past the end of the file.  Currently this string can't be longer than 1 character.

VSOPTIONZ_SPECIAL_CHAR_XLAT_TAB

Editor control display translation table. MaxResult should be set to VSSPECIALCHAR_MAX.   Each character corresponds to one of the VSSPECIALCHAR_??? constants.

pszResult	Ouput buffer for option.  This can be 0.

MaxResult	Number of characters allocated to pszResult.

pMaxResult	If this is not 0, this is set to the number of characters you need to allocate to pszResult.

Return	Returns pszResult.

See Also	vsGetDefaultFont, vsSetDefaultFont, vsGetDefaultColor, vsSetDefaultColor, vsQDefaultOption, vsGetDefaultOptionZ, vsSetDefaultOption, vsSetDefaultOptionZ


vsGetEditorName

char * VSAPI vsGetEditorName( int option,char *pszName,int MaxNameLen, int *pMaxNameLen=0)

Parameters	Description

option	One of the VSEDITORNAME_??? constants defined in "vs.h".

VSEDITORNAME_INVOCATION_NAME

Invocation name of editor.  (argv[0]).  This name will contain a path if the user invoked the editor with a path specification.  Under Windows, this name is used when associating an extension to the editor.

VSEDITORNAME_EXE_PATH

Absolute editor executable path with trailing backslash.  A few files in a single user configuration are stored in this directory (vrestore.slk, vslick.ini).

VSEDITORNAME_STATE_FILENAME

Absolute state file name.

VSEDITORNAME_AUTORESTORE_FILENAME

Absolute auto restore file name.

VSEDITORNAME_DDE_SERVER_NAME

DDE server name.

VSEDITORNAME_APPLICATION_NAME

Application name.  This is currently only used by vsMessageBox as the default title.  However, it is likely other dialogs will use this in the future.

pszName	Buffer to contain copy of value.  This parameter is used as the return value.  This can be 0.

MaxNameLen	Number of bytes allocated to pszName.  Must be at least 1.  We recommend VSMAXFILENAME.

pMaxNameLen	If this is not 0, this is set to the number characters  you need to be allocate.

Return	Returns string corresponding to option specified.


vsGetEmulation

char * VSAPI  vsGetEmulation( char *pszResult, int MaxResult, int *pMaxResult=0 )

Parameters	Description

pszResult	Ouput buffer for current emulation string.  Currently supported emulations are "" (SlickEdit), "brief-keys", "emacs-keys", "vi-keys", "gnuemacs-keys", "vcpp-keys" (Visual C++), "ispf-keys" and "windows-keys" (CUA).  This can be 0.

MaxResult	Number of characters allocated to pszResult.  We recommend VSMAXEMULATION.

pMaxResult	If this is not 0, this is set to the number of characters you need to allocated.

Return	Returns pszResult.  To set the emulation, call vsExecute with the command "emulate emu_mode", where emu_mode is one of the following value, for example, "emulate vi" switches the editor into VI emulation.

Value	Emulation Mode

windows	Windows CUA

emacs	Emacs (Epsilon)

gnu	GNU Emacs

brief	Brief

vi	Unix VI

slick	SlickEdit

ispf	OS/390 ISPF

vcpp	Visual C++


vsGetEnv

char * VSAPI vsGetEnv( const char *pszName )

Parameters	Description

pszName	Name of environment variable to retrieve value of.

Returns	Returns value of environment variable given.  0 is returned if the environment variable does not exist.

See Also	vsSetEnv


vsGetLine

int VSAPI vsGetLine(int wid, char *pszBuf, int BufLen )

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

pszBuf	Output buffer for current line.

BufLen	Number of characters allocated to pszBuf.

Remarks	Places the current line into pszBuf.  The resulting string is always null terminated.  No more than BufLen bytes are written.  Use the vsQLineLength function to determine the length of the current line.

Return	Returns number of bytes copied not including null character.

See Also	vsInsertLine, vsReplaceLine, vsDeleteLine, vsGetText


vsGetMessage

char * VSAPI vsGetMessage( int rc,char *pszMessage,int MaxMessageLen, int *pMaxMessageLen=0 )

Parameters	Description

rc	Error code.  One of ???_RC constants defined in "rc.h".

pszMessage	Output buffer for message.  This can be 0.  We recommend VSMAXMESSAGE.

MaxMessageLen	Number of characters allocated to pszMessage.  We recommend VSMAXMESSAGE.

pMaxMessageLen	If this is not 0, this is set to the number of characters you need to allocate to pszMessage.

Remarks	Copies corrensponding message into pszMessage.  Set to "Message not available" for a non-existant error code.

Returns	Returns pszMessage.

See Also	vsMessage, vsGetMessageLine


vsGetMessageLine

char * VSAPI vsGetMessageLine( char *pszMessage,int MaxMessageLen, int *pMaxMessageLen=0 )

Parameters	Description

pszMessage	Output buffer for message.  This can be 0.

MaxMessageLen	Number of characters allocated to pszMessage.  We recommend VSMAXMESSAGELINE.

pMaxMessageLen	If this is not 0, this is set to the number of characters you need to allocate to pszMessage.

Remarks	Copies current contents of message line into pszMessage.

Returns	Returns pszMessage.

See Also	vsMessage, vsGetMessage


vsGetProjectName

char * VSAPI  vsGetProjectName( char *pszFilename, int MaxFilenameLen, int *pMaxFilenameLen=0 )

See vsProjectQName.


vsGetRText

int VSAPI vsGetRText(int wid, int Len, long RealSeekPos, char *pszBuf)

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

Len	Number of characters to copy into pszBuf.

RealSeekPos	Specifies the real seek position from which to start copying.  Specify VSNULLSEEK to start copying for the cursor position.

pszBuf	Output buffer for text. The buffer pszBuf must be large enough to contain Len+1 bytes of data.

Remarks	Places Len bytes of data starting from the byte offset specified by RealSeekPos into pszBuf.  The resulting string is always null terminated.  The buffer pszBuf must be large enough to contain Len+1 bytes of data.   Lines with the VSLF_ NOSAVE flag set are not copied into the output buffer.  Use this function to read all data but no save lines.

Return	Returns number of bytes copied not including null character.

See Also	vsInsertLine, vsReplaceLine, vsDeleteLine, vsGetLine, vsGetText, vsGetRText


vsGetSelInfo

int VSAPI vsGetSelInfo( int wid, int markid, int *pfirstcol, int *plastcol=0, int *pbuf_id=0, char *pszBufName=0, int MaxBufName=0, int *pMaxBufNameLen=0 )

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

markid	Selection handle returned by vsAllocSelection or vsDuplicateSelection.  -1 specifies current selection.

pfirstcol	Output for first column of the first line of the selection.

plastcol	Output for last column of the last line of the selection.  For a character selection, you need to check whether the selection includes this column ( vsQSelectType(markid,'I') ).

pbuf_id	Indicates the buffer id of the buffer which has this selection.

pszBufName	Indicates the name of the buffer which has this selection.  This can be 0.

MaxBufName	Number of bytes allocated to pszBufName.  We recommend VSMAXFILENAME.

pMaxBufNameLen	If this is not 0, this is set to the number of characters you need to allocate.

Remarks	Returns information about the selection specified.

Returns	Returns 0 if wid and markid are valid.


vsGetSelectedText

int VSAPI vsGetSelectedText(int wid, char *pszBuf, int BufLen, int markid=-1, int flags=-1, const char *pEOLChars=0, int EOLCharsLen=-1)

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

pszBuf	Buffer to receive selected text.  Set to "" if there is no selected text.

BufLen	Number of characters allocated to pszBuf.

markid	mark_id is a selection handle allocated by the vsAllocSelection or vsDuplicateSelection function.  A mark_id of -1 specifies the active selection or selection showing and is always allocated.

flags	Must be -1.

pEOLChars	Line separator characters.  When this is 0, "\r\n" (UNIX: "\n") is used.

EOLCharsLen	Number of characters in pEOLChars.  -1 means pEOLChars is null terminated.

Remarks	This function retrieves the selected text.  pszBuf is set to "" (strlen(pszBuf)==0)

if there is no selection.

Return	Returns the number of characters in the selected text.

See Also	vsQSelectedTextLength


vsGetServerName

char * VSAPI  vsGetServerName( char *pszServerName, int MaxServerNameLen, int *pMaxServerNameLen=0)

Parameters	Description

pszServerName	Ouput buffer for server name.  The server name is set by the vsInit call by VSINIT. pszServerNamePrefix.  This can be 0.

MaxServerNameLen	Number of characters allocated to pszServerName.  We recommend you this be VSMAXSERVERNAME.

pMaxServerNameLen	If this is not 0, this is set to the exact number of characters you need to allocate.

Remarks	Visual SlickEdit uses the server name to communicate with other instances of the editor and for DDE.

Return	Returns pszServerName.


vsGetText

int VSAPI vsGetText(int wid, int Len, long SeekPos, char *pszBuf)

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

Len	Number of characters to copy into pszBuf.

SeekPos	Specifies the seek position of from which to start copying.  Specify VSNULLSEEK to start copying for the cursor position.

pszBuf	Output buffer for text. The buffer pszBuf must be large enough to contain Len+1 bytes of data.

Remarks	Places Len bytes of data starting from the byte offset specified by SeekPos into pszBuf.  The resulting string is always null terminated.  The buffer pszBuf must be large enough to contain Len+1 bytes of data.

Return	Returns number of bytes copied not including null character.

See Also	vsInsertLine, vsReplaceLine, vsDeleteLine, vsGetLine


vsGetTextColor

void VSAPI [wid_expression.]vsGetTextColor(int wid, VSCOLORINDEX *pColor, int ColorLen)

Applies To	Edit window, Editor control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

pColor	Output buffer to receive color indexes for ColorLen characters.

ColorLen	Number of color indexes to read.

Remarks	Stores color indexes for ColorLen bytes of text starting from the cursor in pColor array. 0 indicates a null color.

See Also	vsAllocColor, vsFreeColor, vsSetTextColor, vsSetDefaultColor, vsGetDefaultColor


vsGetVar

VSHVAR VSAPI vsGetVar(int index)

Parameters	Description

index	Names table index returned by vsFindIndex or vsNameMatch.

Return	Returns handle to global variable corresponding to the name table index given.

Example

      VSHVAR hvar;

      VSPLSTR plstr;

      char buffer[100];

      // The rc variable is a global variable which always exists.

      index=vsFindIndex("rc",VSTYPE_VAR);

      // Get handle to interpreter variable

      hvar=vsGetVar(index);

      // Convert contents of typeless variable into ASCIIZ buffer.

      vsZLstrcpy(buffer,vsHvarGetLstr(hvar),100);

See Also	vsHvarSetI, vsHvarSetB, vsHvarSetZ, vsHvarGetZ, vsHvarGetLstr, vsHvarGetI, vsArg, vsHvarAlloc, vsHvarFree, vsHvarHashtabEl, vsHvarArrayEl


vsGoToOldLineNumber

void VSAPI vsGoToOldLineNumber( int wid, int OldLineNumber, int Reserved=1 )

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

OldLineNumber	Indicates the old line number to find.

Remarks	Searches for the OldLineNumber specified and places the cursor on the line with that old line number or the closest old line number.  If no lines have an old line number set, then the cursor is placed on the real line (p_RLine) number given.  The "real line number" does not count non-savable lines (that is lines with the VSLF_ NOSAVE flag).  Use the vsSetAllOldLineNumbers function to set the old line numbers.  Note that the Slick-C save command takes an option to set the old line numbers on save.

See Also	vsSetAllOldLineNumbers


vsGoToPoint

int VSAPI vsGoToPoint( int wid, long Point, long DownCount=0, int LineNum=(-1) )

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

Point	Seek position to an character in the buffer.

DownCount	Number of lines to scroll down.

LineNum	If not -1, this specifies the new value for the VSP_LINENUM property.

Remarks	Moves the current buffer location to text position specified..  The vsQPoint function may be used to get the text line position (not necessarily the seek position for a record file) of the beginning of the current line.  The current line number may also be retrieved by the built-in function vsQPoint.

Return	Returns 0 if successful.  Otherwise INVALID_POINT_RC is returned.


vsGoToROffset

int VSAPI  vsGoToROffset(int wid, long offset)

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

offset	Real character offset to go to.

Remarks	Places the cursor at the character offset specified. Non-savable lines (lines with the VSLF_NOSAVE flag set) are not included.  This methed is intended for dealing with disk seek position.  However, if you have changed the load options to translate files when they are openned, these offsets will not match what is on disk.

Returns	Returns 0 if offset is a valid offset.   Otherwise an negative error code is returned.

See Also	vsGoToPoint, vsQPoint, vsQROffset, vsGoToROffset


vsHaveClipboard

int VSAPI vsHaveClipboard( )

Returns	Returns non-zero value if the is a system or internal clipboard which can be pasted by the "paste" command.


vsHaveSelection

char * VSAPI vsHaveSelection( int wid, int reserved=0 )

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

Returns	Returns non-zero value if there is a current selection.


vsHvarAlloc

VSHVAR VSAPI vsHvarAlloc(VSHVAR InitTohVar=0)

Return	Returns a handle to a newly created Slick-C variable.  You need to used this function if you want to call a Slick-C function or method which takes a call by reference input parameter.  You may also need to used this function when calling a Slick-C function or method which takes a more complex argument type like a Slick-C array.  If InitTohVar is non-zero, the returned variable is a copy of the input variable.  Use vsHvarFree to free a variable allocated by this function.

Example

   int index;

   index=vsFindIndex("popup_message",VSTYPE_COMMAND);

   if (!index) {

       vsMessage("popup_message not found");

       return;

   }

   // Note that we could call the popup_message method by using

   // VSARG_PSZ instead of allocating a Slick-C variable.

   VSHVAR hVar;

   hVar=vsHvarAlloc(0);

   vsHvarSetZ(hVar,"this is a message");

   VSARGTYPE ArgList[1];

   ArgList[0].kind=VSARGTYPE_HVAR;ArgList[0].u.hVar=hVar;

   vsCallIndex(0,index,1,ArgList);

   vsHvarFree(hVar);

See Also	vsHvarGetI, vsHvarSetI, vsHvarSetB, vsHvarSetZ, vsHvarGetZ, vsHvarGetLstr, vsGetVar, vsArg, vsHvarHashtabEl, vsHvarArrayEl, vsHvarFree


vsHvarArrayEl

int VSAPI vsHvarArrayEl(VSHVAR hvar, int i)

Return	Returns a Slick-C variable handle which refers to an element in a Slick-C array.   If the index specified by i is greater than the number of items in the array specifed, the array is made larger and a variable handle to an uninitialized element is returned.  If hVarHashtab is not currently an array, the current variable contents are destroyed and an empty array is created.

Example

   // Call a Slick-C function which returns a Slick-C array or struct

   int index;

   index=vsFindIndex("ProcReturnsArray ",VSTYPE_PROC);

   if (!index) {

       vsMessage("not found");

       return;

   }

   VSARGTYPE ArgList[1];

   ArgList[0].kind=VSARGTYPE_PSZ;ArgList[0].u.psz="some message";

   vsCallIndex(0,index,1,ArgList);

   // Get first element of array or struct

   VSHVAR hvar;

   hvar=vsHvarArrayEl(VSHVAR_RC,0);

  VSPLSTR  plstr;

   // Interpreter L strings are NULL terminated.

   plstr=vsHvarGetLstr(hvar);

   vsMessage((char *)plstr->str);

See Also	vsHvarSetI, vsHvarSetB, vsHvarSetZ, vsHvarGetZ, vsHvarGetLstr, vsGetVar, vsArg, vsHvarHashtabEl, vsHvarAlloc, vsHvarFree


vsHvarArrayLength

int  VSAPI vsHvarArrayLength( VSHVAR hvar )

Parameters	Description

hvar	Handle to Slick-C variable.

Returns	Returns number or entries in the array variable specified.


vsHvarFormat

int  VSAPI vsHvarFormat( VSHVAR hvar )

Parameters	Description

hvar	Handle to Slick-C variable.

Returns	Returns variable format of hvar.  One of the VSVF_??? constants.


vsHvarFree

int VSAPI vsHvarFree(VSHVAR hVar)

Return	Returns 0 if the variable specified is valid.  This function frees a variable allocated by the vsHvarAlloc function.

Example

   int index;

   index=vsFindIndex("popup_message",VSTYPE_COMMAND);

   if (!index) {

       vsMessage("popup_message not found");

       return;

   }

   // Note that we could call the popup_message method by using

   // VSARG_PSZ instead of allocating a Slick-C variable.

   VSHVAR hVar;

   hVar=vsHvarAlloc(0);

   vsHvarSetZ(hVar,"this is a message");

   VSARGTYPE ArgList[1];

   ArgList[0].kind=VSARGTYPE_HVAR;ArgList[0].u.hVar=hVar;

   vsCallIndex(0,index,1,ArgList);

   vsHvarFree(hVar);

See Also	vsHvarGetI, vsHvarSetI, vsHvarSetB, vsHvarSetZ, vsHvarGetZ, vsHvarGetLstr, vsGetVar, vsArg, vsHvarHashtabEl, vsHvarArrayEl, vsHvarAlloc


vsHvarGetI

int VSAPI vsHvarGetI(VSHVAR hvar)

Return	Returns integer value of interpreter variable corresponding to hvar.  If the value of the variable is not a valid integer, an unknown value is returned.

Example

      VSHVAR hvar;

      int i;

      // The rc variable is a global variable which always exists.

      index=vsFindIndex("rc",VSTYPE_VAR);

      // Get handle to interpreter variable

      hvar=vsGetVar(index);

      i=vsHvarGetI(hvar);

See Also	vsHvarSetI, vsHvarSetB, vsHvarSetZ, vsHvarGetZ, vsHvarGetLstr, vsGetVar, vsArg, vsHvarHashtabEl, vsHvarArrayEl, vsHvarAlloc, vsHvarFree


vsHvarGetLstr

VSPLSTR VSAPI vsHvarGetLstr(VSHVAR hvar)

Return	Returns pointer to Lstring value of interpreter variable corresponding to hvar.  Currently, this data format is the most efficient for retrieving interpreter variable data because no format change is required.

Example

      VSHVAR hvar;

      VSPLSTR plstr;

      char buffer[100];

      // The rc variable is a global variable which always exists.

      index=vsFindIndex("rc",VSTYPE_VAR);

      // Get handle to interpreter variable

      hvar=vsGetVar(index);

      // Convert contents of typeless variable into ASCIIZ buffer.

      vsZLstrcpy(buffer,vsHvarGetLstr(hvar),100);

See Also	vsHvarSetI, vsHvarSetB, vsHvarSetZ, vsHvarGetI, vsGetVar, vsArg, vsHvarHashtabEl, vsHvarArrayEl, vsHvarAlloc, vsHvarFree


vsHvarGetZ

VSPLSTR VSAPI vsHvarGetZ(VSHVAR hvar)

Return	Returns pointer to Lstring value of interpreter variable corresponding to hvar.  Currently, this data format is the most efficient for retrieving interpreter variable data because no format change is required.

Example

      VSHVAR hvar;

      VSPLSTR plstr;

      char buffer[100];

      // The rc variable is a global variable which always exists.

      index=vsFindIndex("rc",VSTYPE_VAR);

      // Get handle to interpreter variable

      hvar=vsGetVar(index);

      xprintf("result=<%s>",vsHvarGetZ(hvar));

See Also	vsHvarSetI, vsHvarSetB, vsHvarSetZ, vsHvarGetI, vsGetVar, vsArg, vsHvarHashtabEl, vsHvarArrayEl, vsHvarAlloc, vsHvarFree


vsHvarHashtabEl

int VSAPI vsHvarHashtabEl(VSHVAR hVarHashtab, const char *pBuf, int BufLen=-1)

Return	Returns a Slick-C variable handle which refers to an element in a Slick-C hash table.  If the string index specified by pBuf does not exists in the hash table specified, a new uninitialized elemented is inserted.  If hVarHashtab is not currently a hash table, the current variable contents are destroyed and an empty hash table is created.

Example

   // Call a Slick-C function which returns a Slick-C hash table

   int index;

   index=vsFindIndex("ProcReturnsHashtab ",VSTYPE_PROC);

   if (!index) {

       vsMessage("not found");

       return;

   }

   VSARGTYPE ArgList[1];

   ArgList[0].kind=VSARGTYPE_PSZ;ArgList[0].u.psz="some message";

   vsCallIndex(0,index,1,ArgList);

   // Get known index element of a hash table

   VSHVAR hvar;

   hvar=vsHvarHashtabEl(VSHVAR_RC,"styles");

  VSPLSTR  plstr;

   // Interpreter L strings are NULL terminated.

   plstr=vsHvarGetLstr(hvar);

   vsMessage((char *)plstr->str);

See Also	vsHvarSetI, vsHvarSetB, vsHvarSetZ, vsHvarGetZ, vsHvarGetLstr, vsGetVar, vsArg, vsHvarArrayEl, vsHvarAlloc, vsHvarFree


vsHvarIsEmpty

int VSAPI vsHvarIsEmpty(VSHVAR hvar )

Parameters	Description

hvar	Handle to variable.

Return	Returns true if the format of the variable specified is VSVF_EMPTY.  This is equivelant to the expression vsHvarFormat(hvar)==VSVF_EMPTY.


vsHvarMakeEmpty

void VSAPI vsHvarMakeEmpty(VSHVAR hvar )

Parameters	Description

hvar	Handle to variable.

Remarks	Clears contents of variable and sets its variable format to VSVF_EMPTY.

Example

VSHVAR  hvar;

VSHVAR hvarel;

// Create hash table with ["a"]=1, ["b"]=2, and ["c"]=3

hvar=vsHvarAlloc();

hvarel=vsHvarHashTabEl(hvar,"a");vsHvarSetI(hvarel,1);

hvarel=vsHvarHashTabEl(hvar,"b");vsHvarSetI(hvarel,2);

hvarel=vsHvarHashTabEl(hvar,"c");vsHvarSetI(hvarel,3);

// Traverse the elements in hash table

VSHVAR hvarIndex;

for (vsHvarMakeEmpty(hvarIndex);;) {

   VSHVAR    hvarel;

    hvarel=vsHvarNextEl(hvar,hvarIndex);

    if (!hvarel) break;

    vsMessageBox ((char *)vsHvarGetLstr (hvarel)->str);

}


vsHvarNextEl

VSHVAR VSAPI vsHvarNextEl(VSHVAR hvar, VSHVAR hvarIndex )

Parameters	Description

hvar	Handle to hash table or array variable.

hvarIndex	Handle to index variable.

Return	Returns reference to next element in array or hash table.  If index is empty (see vsHvarMakeEmpty()), the first element is returned.  If there are no more elements, index is set to empty and 0 is returned.

Example

VSHVAR  hvar;

VSHVAR hvarel;

// Create hash table with ["a"]=1, ["b"]=2, and ["c"]=3

hvar=vsHvarAlloc();

hvarel=vsHvarHashTabEl(hvar,"a");vsHvarSetI(hvarel,1);

hvarel=vsHvarHashTabEl(hvar,"b");vsHvarSetI(hvarel,2);

hvarel=vsHvarHashTabEl(hvar,"c");vsHvarSetI(hvarel,3);

// Traverse the elements in hash table

VSHVAR hvarIndex;

for (vsHvarMakeEmpty(hvarIndex);;) {

   VSHVAR    hvarel;

    hvarel=vsHvarNextEl(hvar,hvarIndex);

    if (!hvarel) break;

    vsMessageBox ((char *)vsHvarGetLstr (hvarel)->str);

}


vsHvarSetB

void VSAPI vsHvarSetB(VSHVAR hvar, void *pBuf, int BufLen)

Remarks	Sets value of interpreter variable specified to data pointed to by pBuf. BufLen specifies the length of the data.

Example

      VSHVAR hvar;

      VSPLSTR plstr;

      char buffer[100];

      // The rc variable is a global variable which always exists.

      index=vsFindIndex("rc",VSTYPE_VAR);

      // Get handle to interpreter variable

      hvar=vsGetVar(index);

      vsHvarSetB(hvar,"this is a test",14);

See Also	vsHvarSetI, vsHvarGetZ, vsHvarGetLstr, vsHvarSetZ, vsHvarGetI, vsGetVar, vsArg, vsHvarHashtabEl, vsHvarArrayEl, vsHvarAlloc, vsHvarFree


vsHvarSetI

void VSAPI vsHvarSetI(VSHVAR hvar, int Value)

Remarks	Sets value of interpreter variable to integer value specified.

Example

      VSHVAR hvar;

      VSPLSTR plstr;

      char buffer[100];

      // The rc variable is a global variable which always exists.

      index=vsFindIndex("rc",VSTYPE_VAR);

      // Get handle to interpreter variable

      hvar=vsGetVar(index);

     // Specify integer for variable value

      vsHvarSetI(hvar,100);

See Also	vsHvarSetB, vsHvarGetZ, vsHvarGetLstr, vsHvarSetZ, vsHvarGetI, vsGetVar, vsArg, vsHvarHashtabEl, vsHvarArrayEl, vsHvarAlloc, vsHvarFree


vsHvarSetZ

void VSAPI vsHvarSetZ(VSHVAR hvar, const char *pszValue)

Remarks	Sets value of interpreter variable specified to ASCIIZ string pszValue.

Example

      VSHVAR hvar;

      VSPLSTR plstr;

      char buffer[100];

      // The rc variable is a global variable which always exists.

      index=vsFindIndex("rc",VSTYPE_VAR);

      // Get handle to interpreter variable

      hvar=vsGetVar(index);

      vsHvarSetZ(hvar,"this is a test");

See Also	vsHvarSetI, vsHvarGetZ, vsHvarGetLstr, vsHvarSetB, vsHvarGetI, vsGetVar, vsArg, vsHvarHashtabEl, vsHvarArrayEl, vsHvarAlloc, vsHvarFree


vsIndex2Event

int VSAPI vsIndex2Event( int index, int version=0 )

Parameters	Description

index	Event index in range 1..VS_NUMKEYS-1.

Returns	Converts a Visual SlickEdit event into an index into an event table.

See Also	vsEvent2Name, vsEvent2Index, vsSetEventTabIndex, vsEventTabIndex, vsQDefaultEventTab


vsInit

int VSAPI vsInit( VSINIT *pvsinit )

Parameters	Description

pvsinit	See comments for VSINIT structure in "vs.h".

Remarks	This function is intended for use by OEMs only.  OEMs receive a special CD which has serveral examples which use this function.  We recommend you look at the sample applications to get quickly started using this function.

This function is called once before calling any other Visual SlickEdit editor API function to initialize the API.  After calling this function, you can create as many editor controls as you want with "vsCreateEditorCtl".  Make sure you call vsPrepareForTerminate and vsTerminate to properly terminate the editor and release all resources.

Returns	Returns 0 if successful.


vsInsertLine

void VSAPI vsInsertLine(int wid, const char *pBuf, int BufLen )

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

pBuf	Data for new line.  Should not include line separator characters except for binary record files.

BufLen	Number of characters in pBuf.  -1 specifies that pBuf is null terminate and length can be determined from it.

Remarks	Inserts line into editor buffer after the current line.

Example

   vsInsertLine(0,"add line after current line", -1);

See Also	vsGetLine, vsReplaceLine, vsDeleteLine, vsGetText


vsInsertText

int VSAPI vsInsertText(int wid,const char *pBuf, int BufLen=-1, int Binary=0,unsigned char NLCh1='\r',unsigned char NLCh2='\n' )

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

pBuf	Text to insert.  May contain line separator characters.

BufLen	Number of characters in pBuf.  -1 specifies that pBuf is null terminate and length can be determined from it.

binary	Specify a non-zero value for the binary argument if you want to allow bisection of newline characters (i.e. CR<insert here>LF).

NLCh1	First character of end of line sequence.

NLCh2	Second character of end of line sequence.

Remarks	Insert string at cursor position.  You may use this function to insert multiple lines of text.  NLCh1 and NLCh2 define a 1 or two character end of line sequence.  You must specify NLCh1==NLCh2 if you want a 1 character end of line sequence.  The end of line sequence is used to parse the source string pBuf into multiple lines.  The NLCh1 and NLCh2 are ignored if the binary option is non-zero.

When you use this function on a record file (p_buf_width!=0) and the binary argument is non-zero, all data is inserted into the current line and not broken up into multiple lines.

NOTE: If you are inserting at the end of a file and the last character of pBuf is a new line, you can end up with a blank line that has no new line characters in it.  You can test for this condition by calling vsQLineLength(0,1) which will return 0.  Use vsDeleteLine(0) to delete the line.

Return	Returns 0 if successful.


vsIsWindowValid

char * VSAPI vsIsWindowValid( int wid)

Parameters	Description

wid	Window id of object.  0 specifies the current object.

Returns	Returns 0 if the window id is a valid instance of an Visual SlickEdit object.

Example

int wid;

//Traverse all Visual SlickEdit objects.

for (wid=1;wid<=vsLastWindowID();++wid) {

     // IF this window is a valid object

     if (_iswindow_valid(wid) ){

            // NOTE that it is OK to query the VSP_VIEWID property for objects

            // that are not an editor control.

            // IF this is an editor control object AND

            //      this an MDI child editor control AND

            //      it is not the HIDDEN WINDOW

            if(vsPropGetI(wid,VSP_VIEWID)<0 &&

                vsPropGetI(wid,VSP_MDICHILD) &&

                wid!=VSWID_HIDDEN) {

                  vsDestroyEditorCtl (wid);

            }

     }

}


vsJoinLine

int VSAPI vsJoinLine( int wid )

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of object.  0 specifies the current object.

Remarks	Joins the next line to the end of the current line.

Returns	Returns 0 if successful.  The join is aborted if the join will create a line longer than the truncation length and the truncation length is non-zero (see p_TruncateLength property).   A non-zero value is returned if the join is aborted.

See Also	vsJoinLineToCursor


vsJoinLineToCursor

int VSAPI vsJoinLineToCursor( int wid )

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of object.  0 specifies the current object.

Remarks	Joins the next line to the cursor position.   If necessary the current line is padded with blanks.  If the cursor is before the end of the current line, the next line is joined at the end of the current line.

Returns	Returns 0 if successful.  The join is aborted if the join will create a line longer than the truncation length and the truncation length is non-zero (see p_TruncateLength property).   A non-zero value is returned if the join is aborted.

See Also	vsJoinLine


vsKeyin

void VSAPI vsKeyin( int wid, const char *pBuf, int BufLen=-1 )

Applies To	Text Box, Combo Box, Edit Window, Editor Control

Parameters	Description

wid	Window id of object.  0 specifies the current object.

pBuf	Text to insert.  May contain line separator characters.

BufLen	Number of characters in pBuf.  -1 specifies that pBuf is null terminate and length can be determined from it.

Remarks	Inserts or overwrites string specified into the command line or text area depending on the insert state and the cursor position.  If BufLen is -1, then pBuf must point to a null terminated string.  This function is slow because it performs word wrap.  Use vsInsertLine or vsInsertText function for better performance.

See Also	vsQInsertState, vsSetInsertState


vsLibExport

int VSAPI vsLibExport(const char *pszFuncProto, const char * pszNameInfo, int arg2, void *pfn)

Remarks	Registers a native command or function that can be called from Slick-C.  Commands may be invoked from the command line or bound to a key.

The syntax for pszFuncProto is:

        [_command] [return-type] func-name([type [var-name] [, type [var-name]]...])

func-name is the name of the DLL function to be registered.  Currently the function names are case insensitive.

type may be one of the following:

VSPSZ	NULL terminated string

VSPLSTR	See typedef in "vsapi.h".

int

long

VSHVAR	Handle to interpreter variable

VSHREFVAR	Call by reference handle to interpreter variable.  This type can be used as input to functions which accept VSHVAR parameters.

pszNameInfo specifies completion for arguments to a command.  A '*' character may be appended to the end of a completion constant to indicate that one or more of the arguments may be entered.  One or more of the follow string completion constants separated with spaces may be specified:

VSARG_FILE	One filename

VSARG_MULTI_FILE	Multiple filenames

VSARG_BUFFER	Buffer name

VSARG_COMMAND	Slick-C command function

VSARG_PICTURE	Already loaded picture

VSARG_FORM	Dialog box template

VSARG_MODULE	Loaded Slick-C module

VSARG_MACRO	User recorded Slick-C command function

VSARG_MACROTAG	Slick-C tag name

VSARG_VAR	Slick-C global variable

VSARG_ENV	Environment variable

VSARG_MENU	Menu name

VSARG_TAG	Tag name

arg2 is zero or more of the following flags which specify when the command should be enabled/disabled and a few other things:

VSARG2_CMDLINE	Command supports the command line.                VSARG2_CMDLINE allows a fundamental mode key binding to be inherited by the command line

VSARG2_MARK	ON_SELECT event should pass control on to this command and not deselect text first.

Ignored if command does not require an editor control

VSARG2_QUOTE	Indicates that this command must be quoted when called during macro recording.  Needed only if command name is an invalid identifier or keyword.

VSARG2_LASTKEY	Command requires last_event value to be set when called during macro recording.

VSARG2_MACRO	This is a recorded macro command. Used for completion.

VSARG2_TEXT_BOX	Command supports any text box control. VSARG2_TEXT_BOX allows a fundamental mode  key binding to be inherited by a text box

VSARG2_NOEXIT_SCROLL	Do not exit scroll caused by using scroll bars. Ignored if command does not require an editor control.

VSARG2_EDITORCTL	Command allowed in editor control. VSARG2_EDITORCTL allows a fundamental mode key binding to be inherited by a non-MDI editor control

VSARG2_NOUNDOS	Do not automatically call _undo('s').  Require macro to call _undo('s') to start a new level of undo.

VSARG2_READ_ONLY	Command allowed when editor control is in strict read only mode. Ignored if command does not require an editor control

VSARG2_ICON	Command allowed when editor control window is iconized.  Ignored if command does not require an editor control

VSARG2_REQUIRES_EDITORCTL	Command requires an editor control.

VSARG2_REQUIRES_MDI_EDITORCTL

Command requires MDI editor control

VSARG2_REQUIRES_AB_SELECTION

Command requires selection in active buffer.

VSARG2_REQUIRES_BLOCK_SELECTION

Command requires block/column selection in any buffer

VSARG2_REQUIRES_CLIPBOARD	Command requires editor control clipboard

VSARG2_REQUIRES_FILEMAN_MODE

Command requires active buffer to be in fileman mode.

VSARG2_REQUIRES_TAGGING	Command requires <ext>_proc_search/find-tag support.

VSARG2_REQUIRES_SELECTION	Command requires a selection in any buffer.

VSARG2_REQUIRES_MDI	Command requires MDI interface may be because it opens a new file or uses _mdi object. Commands with this attribute are removed from pop-up menus which the MDI interface is not available (editor control OEMs).

return-type may be one of the following

      VSPSZ

      VSPLSTR

      int

      long

      void

If the _command keyword is specified, the DLL function may be bound to a key or executed from the command line.  Otherwise, the only way to call the function is to call it from a Slick-C macro.

Performance considerations:  For best performance, use the VSHVAR or VSREFVAR parameter type when operating on long strings instead of VSPSZ or VSPLSTR.  Then use the vsHvarGetLstr function to return a pointer to the interpreter variable. WARNING:  Pointers to interpreter variables returned by the vsHvarGetLstr function are NOT VALID after any interpreter variable is set.  Be sure to reset any pointer after setting other interpreter variables or calling other macros. You may modify the contents of the VSPLSTR pointer returned by vsHvarGetLstr so long as you do not make the string any longer.  We suspect that using the int and long parameter types are no slower than using the VSHVAR type and converting the parameter yourself.

Return	Returns 0 if successful.  Otherwise a non-zero error code is returned.

Examples

    static int VSAPI MyCommand()

    {

          vsMessageBox("Got here");

    }

    extern "C" int VSAPI vsDllInit()

    {

        vsLibExport("_command int MyCommand()",

                VSARG_MULTI_FILE,0,

                                     MyCommand);

         // Bind this command to F12

         vsSetEventTabIndex(

                vsQDefaultEventTab(),

                vsEvent2Index(VS_OFFSET_FKEYS +11)  // F12,

                vsFindIndex("MyCommand", VSTYPE_COMMAND));

    }

See Also	vsDllExport


vsLastWindowID

int VSAPI vsLastWindowID( )

Returns	Returns largest window id ever allocated.  This function is used in conjuction with vsIsWindowValid to traverse all Visual SlickEdit objects.

Example

int wid;

//Traverse all Visual SlickEdit objects.

for (wid=1;wid<=vsLastWindowID();++wid) {

     // IF this window is a valid object

     if (_iswindow_valid(wid) ){

            // NOTE that it is OK to query the VSP_VIEWID property for objects

            // that are not an editor control.

            // IF this is an editor control object AND

            //      this an MDI child editor control AND

            //      it is not the HIDDEN WINDOW

            if(vsPropGetI(wid,VSP_VIEWID)<0 &&

                vsPropGetI(wid,VSP_MDICHILD) &&

                wid!=VSWID_HIDDEN) {

                  vsDestroyEditorCtl (wid);

            }

     }

}


vsLoadFiles

int VSAPI vsLoadFiles(int wid, const char *pszCmdLine )

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

pszCmdLine	See load_files method for more information.

Remarks	See Slick-C load_files method for information on return values and pszCmdLine string.


vsMacroGetFilename

char * VSAPI vsMacroGetFilename( char *pszFilename, int MaxFilenameLen, int *pMaxFilenameLen=0 )

Parameters	Description

pszFilename	Ouput buffer for filename.  This can be 0.

MaxFilenameLen	Number of characters allocated to pszFilename.  We recommend VSMAXFILENAME.

pMaxFilenameLen	If this is not 0, this is set to the number of characters you need to allocate.

Return	Returns absolute output filename of the last recorded macro.  This is "" if there is no last recorded macro.

See Also	cancel_recording, record_macro_toggle, record_macro_end_execute, start_recording, end_recording, list_macros, last_macro, gui_save_macro, save_macro, pause_recording, vsMacroGetFilename, vsMacroEndRecording, vsMacroQDefined, vsMacroQDefining, vsMacroQRecording, vsMacroQRecordSource, vsMacroQRunning, vsMacroSetRecordSource, vsMacroSetRunning, vsMacroStartRecording


vsMacroEndRecording

void VSAPI vsMacroEndRecording( )

Remarks	Terminates macro recording.  This function is used to implement our macro recording commands.

See Also	cancel_recording, record_macro_toggle, record_macro_end_execute, start_recording, end_recording, list_macros, last_macro, gui_save_macro, save_macro, pause_recording, vsMacroGetFilename, vsMacroEndRecording, vsMacroQDefined, vsMacroQDefining, vsMacroQRecording, vsMacroQRecordSource, vsMacroQRunning, vsMacroSetRecordSource, vsMacroSetRunning, vsMacroStartRecording


vsMacroQDefined

int VSAPI vsMacroQDefined( )

Return	Returns non-zero value if there is a last recorded macro which can be executed by the available to be executed by the last_macro command.

See Also	cancel_recording, record_macro_toggle, record_macro_end_execute, start_recording, end_recording, list_macros, last_macro, gui_save_macro, save_macro, pause_recording, vsMacroGetFilename, vsMacroEndRecording, vsMacroQDefined, vsMacroQDefining, vsMacroQRecording, vsMacroQRecordSource, vsMacroQRunning, vsMacroSetRecordSource, vsMacroSetRunning, vsMacroStartRecording


vsMacroQDefining

int VSAPI vsMacroQDefining( )

Remarks	Use this function to determine which macro recording commands should be enabled or disabled.

Return	Returns non-zero value if there is a macro is currently being recorded.  This will return a non-zero value even if the pause_recording command is used to temporarily turn of recording.

See Also	cancel_recording, record_macro_toggle, record_macro_end_execute, start_recording, end_recording, list_macros, last_macro, gui_save_macro, save_macro, pause_recording, vsMacroGetFilename, vsMacroEndRecording, vsMacroQDefined, vsMacroQDefining, vsMacroQRecording, vsMacroQRecordSource, vsMacroQRunning, vsMacroSetRecordSource, vsMacroSetRunning, vsMacroStartRecording


vsMacroQRecording

int VSAPI vsMacroQRecording()

Remarks	Use this function and the vsMacroQRecordSource function to determine whether your macro command needs to generate source code.  If you have written a command, you should use vsMacroQRecordSource to check whether you need to generate source.  If your command executes another command with vsExecute or vsCallIndex you may want to use vsMacroSetRecordSource to turn on or off macro recording before making the call.

Return	Returns non-zero value if a macro is currently being recorded.  This will return 0 if the pause_recording command is called to temporarily turn off recording.

See Also	cancel_recording, record_macro_toggle, record_macro_end_execute, start_recording, end_recording, list_macros, last_macro, gui_save_macro, save_macro, pause_recording, vsMacroGetFilename, vsMacroEndRecording, vsMacroQDefined, vsMacroQDefining, vsMacroQRecording, vsMacroQRecordSource, vsMacroQRunning, vsMacroSetRecordSource, vsMacroSetRunning, vsMacroStartRecording


vsMacroQRecordSource

int VSAPI vsMacroQRecordSource()

Remarks	Use vsMacroQRecordSource and the vsMacroQRecording function to determine whether your macro command needs to generate source code.  If you have written a command, you should use vsMacroQRecordSource to check whether you need to generate source.  If your command executes another command with vsExecute or vsCallIndex you may want to use vsMacroSetRecordSource to turn on or off macro recording before making the call.

Return	Returns non-zero value if a macro is currently being recorded.  This will return 0 if the pause_recording command is called to temporarily turn off recording.

See Also	cancel_recording, record_macro_toggle, record_macro_end_execute, start_recording, end_recording, list_macros, last_macro, gui_save_macro, save_macro, pause_recording, vsMacroGetFilename, vsMacroEndRecording, vsMacroQDefined, vsMacroQDefining, vsMacroQRecording, vsMacroQRecordSource, vsMacroQRunning, vsMacroSetRecordSource, vsMacroSetRunning, vsMacroStartRecording


vsMacroQRunning

int VSAPI vsMacroQRunning()

Return	Returns non-zero value if a recording macro is currently being executed.

See Also	cancel_recording, record_macro_toggle, record_macro_end_execute, start_recording, end_recording, list_macros, last_macro, gui_save_macro, save_macro, pause_recording, vsMacroGetFilename, vsMacroEndRecording, vsMacroQDefined, vsMacroQDefining, vsMacroQRecording, vsMacroQRecordSource, vsMacroQRunning, vsMacroSetRecordSource, vsMacroSetRunning, vsMacroStartRecording


vsMacroSetRecordSource

void VSAPI vsMacroSetRecordSource( int value )

Parameters	Description

value	Set to 1 if you want command called by vsExecute or vsCallIndex to do macro recording.

Remarks	Determines what vsMacroQRecordSource will return to a command called by vsExecute or vsCallIndex.  By default,  will Use vsMacroQRecordSource and the vsMacroQRecording function to determine whether your macro command needs to generate source code.  If you have written a command, you should use vsMacroQRecordSource to check whether you need to generate source. If your command executes another command with vsExecute or vsCallIndex you may want to use vsMacroSetRecordSource to turn on or off macro recording before making the call.

Example

void VSAPI mycommand()

{

     vsMacroSetRecordSource(0);

     vsExecute(0,"save_as c:\\temp\\junk.c",

                       "" /* DONT specify M option here*/ );

}

See Also	cancel_recording, record_macro_toggle, record_macro_end_execute, start_recording, end_recording, list_macros, last_macro, gui_save_macro, save_macro, pause_recording, vsMacroGetFilename, vsMacroEndRecording, vsMacroQDefined, vsMacroQDefining, vsMacroQRecording, vsMacroQRecordSource, vsMacroQRunning, vsMacroSetRecordSource, vsMacroSetRunning, vsMacroStartRecording


vsMacroSetRunning

void VSAPI vsMacroSetRunning( int value )

Parameters	Description

value	Set to 0 or 1.

Remarks	Indicates whether a source macro is currently running.  Determines value returned by vsMacroQRunning.

See Also	cancel_recording, record_macro_toggle, record_macro_end_execute, start_recording, end_recording, list_macros, last_macro, gui_save_macro, save_macro, pause_recording, vsMacroGetFilename, vsMacroEndRecording, vsMacroQDefined, vsMacroQDefining, vsMacroQRecording, vsMacroQRecordSource, vsMacroQRunning, vsMacroSetRecordSource, vsMacroSetRunning, vsMacroStartRecording


vsMacroStartRecording

void VSAPI vsMacroStartRecording( int wid )

Parameters	Description

wid	Window id of object.  0 specifies the current object.

Remarks	Starts recording a macro and makes the editor control corresponding to wid the output editor control for recorded source.

See Also	cancel_recording, record_macro_toggle, record_macro_end_execute, start_recording, end_recording, list_macros, last_macro, gui_save_macro, save_macro, pause_recording, vsMacroGetFilename, vsMacroEndRecording, vsMacroQDefined, vsMacroQDefining, vsMacroQRecording, vsMacroQRecordSource, vsMacroQRunning, vsMacroSetRecordSource, vsMacroSetRunning, vsMacroStartRecording


vsMatchCursorLength

int VSAPI vsMatchCursorLength()

Applies To	Edit Window, Editor Control

Return	Returns the number of bytes between the first byte of the last string found by vsSearch or vsRepeatSearch and the cursor (regular expression cursor).

Example

int status;

status=vsSearch(0,"th\\cis",-1,"r");

if (!status ){

    char temps[100];

    // Get first 2 characters of match "th"

    vsGetText(0,vsMatchCursorLength(),vsMatchStart(),temps);

    vsMessage(temps);

}

See Also	vsMatchStart, vsMatchLength, vsSelectMatch, vsSearch, vsRepeatSearch, vsSearchReplace, vsSaveSearch, vsRestoreSearch


vsMatchLength

int VSAPI vsMatchLength( int TaggedExpression=-1)

Applies To	Edit Window, Editor Control

Parameters	Description

TaggedExpression	Tagged expression number.  For MicroEdge and Brief regular expressions the first tagged expression is 0 and the last is 9.  For UNIX, the first tagged expression is 1 and the last is 0.

Return	Returns the length of the last match or tagged expression found by the last vsSearch or vsRepeatSearch.

Example

int status;

status=vsSearch(0,"this|that",-1,"r");

if (!status ){

    char temps[100];

    // Get the word matched

    vsGetText(0,vsMatchLength(),vsMatchStart(),temps);

    vsMessage(temps);

}

See Also	vsMatchStart, vsMatchCursorLength, vsSelectMatch, vsSearch, vsRepeatSearch, vsSearchReplace, vsSaveSearch, vsRestoreSearch


vsMatchStart

long VSAPI vsMatchStart( int TaggedExpression=-1)

Applies To	Edit Window, Editor Control

Parameters	Description

TaggedExpression	Tagged expression number. Specify a MatchGroup of -1 to get the length of the entire string matched.   For MicroEdge and Brief regular expressions the first tagged expression is 0 and the last is 9.  For UNIX, the first tagged expression is 1 and the last is 0.

Return	Returns the character offset from the beginning of the buffer to the last match or tagged expression found by the last vsSearch or vsRepeatSearch.

Example

int status;

status=vsSearch(0,"this|that",-1,"r");

if (!status ){

    char temps[100];

    // Get the word matched

    vsGetText(0,vsMatchLength(),vsMatchStart(),temps);

    vsMessage(temps);

}

See Also	vsMatchLength, vsMatchCursorLength, vsSelectMatch, vsSearch, vsRepeatSearch, vsSearchReplace, vsSaveSearch, vsRestoreSearch


vsMDICreate

int VSAPI vsMDICreate( VSSYSHWND hwndframe, VSSYSHWND hwnd,VSSYSHWND hwndmdiclient )

Parameters	Description

hwndframe	System window handle to outer most MDI frame window.  For Windows, this is always the same as hwnd.

hwnd	System window handle MDI frame client window.  The hwndmdiclient window is inside this window.

hwndmdiclient	System window handle of MDI client window.  In a Windows MDI, this is the parent window for all MDI child windows.

Remarks	This function registers some MDI window handles.  Currently, only one MDI window is supported.  Visual SlickEdit will automically disable the hwndframe window when a modal dialog box is displayed.

Return	Returns MDI window instance handle.

See our MDI sample program for an example.


vsMDIRegisterStatusWindow

void VSAPI vsMDIRegisterStatusWindow( VSSYSHWND hwndframe, VSSYSHWND hwnd)

Parameters	Description

hwndframe	System window handle which contains the client window.  For Windows, this is always the same as hwnd.  For UNIX, specify the same value as hwnd if the client window is not contained by a window with decorations.

hwnd	System window handle client window.

Remarks	This function registers some MDI status line window handles.  Visual SlickEdit will set focus to the hwnd window when there are no MDI child windows.  The callback VSINIT.pfnSetFocus is called with VSWID_STATUS to set focus to this window.  If this callback is not defined, the focus is not changed.

See our MDI sample program for an example.


vsMDISetActiveChild

void VSAPI vsMDISetActiveChild( int wid )

Parameters	Description

wid	Window id of object.  0 specifies the current object.

Remarks	This function sets the active MDI child edit window.  This function must be called by OEM's who implement our MDI API so Visual SlickEdit knows at all times which edit window is active.  This function is called during the Windows WM_ACTIVATE message or during the MFC  CView::OnActivateView handler.

See our MDI sample program for an example.


vsMenuDelete

int VSAPI vsMenuDelete(int menu_handle, int menu_pos)

Parameters	Description

menu_handle	Handle of loaded menu returned by VSP_MENUHANDLE, vsMenuLoad, vsMenuFind, or vsMenuGetState.  This handle may also be a handle to menu resource returned by vsFindIndex or vsNameMatch.

menu_pos	Position within menu menu_handle.  The first menu item position is 0.

Remarks	Deletes a menu or menu item in a loaded menu or a menu resource.

Example

void VSAPI dllproc ()

{

     int status;

     int mh,mpos;

     status=vsMenuFind (

               vsPropGetI(VSWID_MDI,VSP_MENU_HANDLE),

               "help -using",&mh,&mpos,'M');

     if (!status) vsMenuDelete (mh,mpos);

}

Return	Returns 0 if successful.

See Also	vsMenuDelete, vsMenuDestroy, vsMenuFind, vsMenuGetState, vsMenuInsert, vsMenuLoad, vsMenuQInfo, vsMenuSet, vsMenuSetState, vsMenuShow


vsMenuDestroy

int vsMenuDestroy(int menu_handle)

Parameters	Description

menu_handle	Handle of loaded menu returned by VSP_MENUHANDLE, vsMenuLoad, vsMenuFind, or vsMenuGetState.

Remarks	Destroy menu loaded by the vsMenuLoad function.  This function is typically used to destroy the old menu bar when replacing a menu bar or to destroy a pop-up menu after it has been displayed.

Return	Returns 0 if successful.

See Also	vsMenuDelete, vsMenuDestroy, vsMenuFind, vsMenuGetState, vsMenuInsert, vsMenuLoad, vsMenuQInfo, vsMenuSet, vsMenuSetState, vsMenuShow


vsMenuFind

int VSAPI vsMenuFind( int menu_handle, const char *pszCommand, int *pmenu_handle, int *pposition, char by_category)

Parameters	Description

menu_handle	Handle of loaded menu returned by VSP_MENUHANDLE, vsMenuLoad, vsMenuFind, or vsMenuGetState.

pszCommand	Command or category of menu item to find.  If a command is specified, the command must match exactly.  See by_category parameter.

pmenu_handle	Handle to loaded menu which contains menu item found.

pposition	Position of menu item found within pmenu_handle.  0 is the position of the first menu item.  Use the vsMenuQInfo function to determine the number of items in a loaded menu.

by_category	May be 'M' or  'C'.  If the 'M' option is given, pszCommand is the command of the menu item to be found.  If the 'C' option is given,  pszCommand is the category of the menu item to be found.  Defaults to 'C' if not specified.

Remarks	Finds menu or menu item with a specified command or category.

Return	Returns 0 if successful.

Example

void VSAPI dllproc ()

{

    int status;

    int mh,mp;

    // Find the menu item which executes the gui-find command

    status=vsMenuFind(

            vsPropGetI(VSWID_MDI,VSP_MENUHANDLE),

            "new", &mh, &mp,'M');

    if (status) {

        vsMessage("Command not found in menu bar");

        return;

    }

    int mf_flags;

    char caption[VSMAXMENUSTRING];

    char command[VSMAXMENUSTRING];

    char categories[VSMAXMENUSTRING];

    char  help_command[VSMAXMENUSTRING];

    char help_message[VSMAXMENUSTRING];

    vsMenuGetState(mh, mp, &mf_flags, 'P',

                                caption,VSMAXMENUSTRING

                                command, VSMAXMENUSTRING,

                                categories, VSMAXMENUSTRING,

                                help_command, VSMAXMENUSTRING,

                                help_message, VSMAXMENUSTRING );

    vsMessage(help_message);

}

See Also	vsMenuDelete, vsMenuDestroy, vsMenuFind, vsMenuGetState, vsMenuInsert, vsMenuLoad, vsMenuQInfo, vsMenuSet, vsMenuSetState, vsMenuShow


vsMenuGetState

int VSAPI vsMenuGetState( int menu_handle,char *pszFindCommand, int *pflags, char by_category, char *pszItemText=0, int MaxItemTextLen=0, char *pszCommand=0, int MaxCommandLen=0, char *pszCategory=0, int MaxCategoryLen=0, char *pszHelpCommand=0, int MaxHelpCommandLen=0, char *pszHelpString=0, int MaxHelpStringLen=0, int *pMaxItemTextLen=0, int *pMaxCommandLen=0, int *pMaxCategoryLen=0, int *pMaxHelpCommandLen=0, int *pMaxHelpStringLen=0)

Parameters	Description

menu_handle	Handle of loaded menu returned by VSP_MENUHANDLE, vsMenuLoad, vsMenuFind, or vsMenuGetState.

pszFindCommand	Command or category of menu item to find.  If a command is specified, the command must match exactly.  See by_category parameter.

by_category	May be 'M', 'C', 'P'.  If the 'M' option is given, pszFindCommand is the command of the menu item to be found. If the 'C' option is given,  pszFindCommand is the category of the menu item to be found.  If the 'P' option is given, pszFindCommand is an integer (you must cast pszFindCommand to int) position (0..vsMenuQInfo(menu_handle)-1) of the menu item with in menu_handle in ASCIIZ format.  Defaults to 'C'.

mf_flags	mf_flags may be zero or more of the following flags defined in "vs.h":

VSMF_CHECKED

VSMF_UNCHECKED

VSMF_GRAYED

VSMF_ENABLED

VSMF_SUBMENU

pszItemText	Menu item title.  This may be 0.

MaxItemTextLen	Number of characters allocated to pszItemText.  We recommend VSMAXMENUSTRING.

pszCommand	For a sub-menu, command is set to a menu handle which may be used in calls to _menu_get_state or _menu_info (you must convert it to an int).  Otherwise, this is set to the command to be executed when the menu item is selected..  This may be 0.

MaxCommandLen	Number of characters allocated to pszCommandLen.  We recommend VSMAXMENUSTRING.

pszCategory	Menu item categories. This may be 0. May be one or more categories separated with a '|' character.  See vsMenuSetState function for more information about categories.

MaxCategoryLen	Number of characters allocated to pszCategory.  We recommend VSMAXMENUSTRING.

pszHelpCommand	Menu item help command.  This may be 0. Executed when F1 is pressed while on the menu item.

MaxHelpCommandLen	Number of characters allocated to pszHelpCommand.  We recommend VSMAXMENUSTRING.

pszHelpMessage	Menu item help message.  This may be 0.  Displayed when menu item is selected.

MaxHelpMessageLen	Number of characters allocated to pszHelpMessage. We recommend VSMAXMENUSTRING.

pMaxItemTextLen	If this is not 0, this is set to the number of characters you need to allocate to pszItemText.

pMaxCommandLen	If this is not 0, this is set to the number of characters you need to allocate to pszCommand.

pMaxCategoryLen	If this is not 0, this is set to the number of characters you need to allocate to pszCategory.

pMaxHelpCommandLen	If this is not 0, this is set to the number of characters you need to allocate to pszHelpCommand.

pMaxHelpStringLen	If this is not 0, this is set to the number of characters you need to allocate to pszHelpString.

Remarks	Gets menu item values for the menu items which contain the command or category specified.

Example

// This code traverses a menu that has been loaded with vsMenuLoad

static void traverse_menu(int menu_handle)

{

    int Nofitems;

    Nofitems=vsMenuQInfo(menu_handle,'c');

    for (i=0;i<Nofitems;++i) {

           int mf_flags;

          char caption[VSMAXMENUSTRING];

          char command[VSMAXMENUSTRING];

          char categories[VSMAXMENUSTRING];

          char  help_command[VSMAXMENUSTRING];

          char help_message[VSMAXMENUSTRING];

          vsMenuGetState(mh, i, &mf_flags, 'P',

                                       caption,VSMAXMENUSTRING

                                       command, VSMAXMENUSTRING,

                                       categories, VSMAXMENUSTRING,

                                       help_command, VSMAXMENUSTRING,

                                       help_message, VSMAXMENUSTRING );

         vsMessageBox (caption)

         if (mf_flags & VSMF_SUBMENU) {

             traverse_menu(command);

         }

    }

}

void VSAPI dllproc ()

{

     traverse_menu(vsPropGetI(VSWID_MDI, VSP_MENUHANDLE));

}

Return	Returns 0 if successful.

See Also	vsMenuDelete, vsMenuDestroy, vsMenuFind, vsMenuGetState, vsMenuInsert, vsMenuLoad, vsMenuQInfo, vsMenuSet, vsMenuSetState, vsMenuShow


vsMenuInsert

int vsapi vsMenuInsert( int menu_handle,int position,int flags,

                       const char *pszItemText,const char *pszCommand,

                       const char *pszCategory,

                       const char *pszHelpCommand,

                       const char *pszHelpString )

Parameters	Description

menu_handle	Handle of loaded menu returned by VSP_MENUHANDLE, vsMenuLoad, vsMenuFind, or vsMenuGetState.

position	Position within menu menu_handle.  Menu item is inserted before position.  The first menu item position is 0.  Specify -1 or a position greater than the last menu item to insert after the last menu item.

mf_flags	mf_flags may be zero or more of the following flags defined in "vs.h":

VSMF_CHECKED

VSMF_UNCHECKED

VSMF_GRAYED

VSMF_ENABLED

VSMF_SUBMENU

pszItemText	Menu item title.

pszCategory	Menu item categories. May be one or more categories separated with a '|' character.  See vsMenuSetState function for more information about categories.

pszHelpCommand	Menu item help command.  Executed when F1 is pressed while on the menu item.

pszHelpMessage	Menu item help message.  Displayed when menu item is selected.

MaxHelpMessageLen	Number of characters allocated to pszHelpMessage.

Remarks	Inserts a menu or menu item into a loaded menu or a menu resource.

Example

void VSAPI dllproc ()

{

     // Insert 2 items into a menu resource called menu1

     int index;

     index=vsFindIndex ("menu1",vsoi2type(VSOI_MENU));

     if (!index) {  // IF menu1 does not already exist?

         // Create new menu resource in names table

         index=vsNameInsert ("menu1",vsoi2type(VSOI_MENU));

         if (index<=0) {

             vsMessage("unable to create menu1");

             return;

         }

     }

     // Insert File menu

     vsMenuInsert(index, 0,VSMF_ENABLED|VSMF_SUBMENU,"&File",

                               "","","help file menu","");

     // Insert New menu item within File menu

     vsMenuInsert(

                  vsPropGetI(index,VSP_CHILD),

                   0,VSMF_ENABLED,"&New","New","",

                   "help file menu", "");

     // Load and display the menu as a pop-up menu

    vsExecute(0, "show menu1");

}

Return	Returns 0 if successful.

See Also	vsMenuDelete, vsMenuDestroy, vsMenuFind, vsMenuGetState, vsMenuInsert, vsMenuLoad, vsMenuQInfo, vsMenuSet, vsMenuSetState, vsMenuShow


vsMenuLoad

int VSAPI vsMenuLoad(int wid, int menu_index, menu_option)

Parameters	Description

wid	Window id of Visual SlickEdit form or MDI frame.

menu_index	Names table index of menu returned by vsFindIndex or vsNameMatch.

menu_option	Specify 'P' for a popup-menu or 'M' for menu bar.

Return	If successful, loads menu resource and returns handle of loaded menu.  Otherwise a negative error code is returned.   Displaying a menu resource as a pop-up menu with the vsMenuShow function requires that you specify 'P' as the second argument to this function.  menu_index is a handle to a menu resource returned by vsFindIndex or vsNameMatch.

Example

void VSAPI dllproc ()

{

    int index;

    // Find index of Visual SlickEdit MDI menu resource

    index=vsFindIndex("_mdi_menu",vsoi2type(VSOI_MENU));

    // Load this menu resource

    int menu_handle;

    menu_handle=vsMenuLoad(VSWID_MDI,index,'M');

    int old_menu_handle;

    old_menu_handle=vsPropGetI(VSWID_MDI,VSP_MENUHANDLE);

    // _set_menu will fail if the form has a dialog box style border.

    // Put a menu bar on this form.

    vsMenuSet(VSWID_MDI,menu_handle);

    // You DO NOT need to call vsMenuDestroy.  This menu is

    // destroyed when the MDI window is deleted.

    vsMenuDestroy(old_menu_handle);

}

See Also	vsMenuDelete, vsMenuDestroy, vsMenuFind, vsMenuGetState, vsMenuInsert, vsMenuLoad, vsMenuQInfo, vsMenuSet, vsMenuSetState, vsMenuShow


vsMenuQInfo

int VSAPI vsMenuQInfo(int menu_handle [, reserved] )

Parameters	Description

menu_handle	Handle of loaded menu returned by VSP_MENUHANDLE, vsMenuLoad, vsMenuFind, or vsMenuGetState.

Return	Returns number of menu items in loaded menu menu_handle.

See Also	vsMenuDelete, vsMenuDestroy, vsMenuFind, vsMenuGetState, vsMenuInsert, vsMenuLoad, vsMenuQInfo, vsMenuSet, vsMenuSetState, vsMenuShow


vsMenuSet

int VSAPI  vsMenuSet(int wid, int menu_handle)

Applies To	MDI Window, Form

Parameters	Description

wid	Window id of Visual SlickEdit form or MDI frame.

menu_handle	Handle of loaded menu returned by vsMenuLoad.

Remarks	Sets the menu bar to the loaded menu specified.   If the form already has a menu bar you should destroy the old menu bar AFTER setting the menu bar.  See example below.

Return	Returns 0 if successful.

Example

void VSAPI dllproc ()

{

    int index;

    // Find index of Visual SlickEdit MDI menu resource

    index=vsFindIndex("_mdi_menu",vsoi2type(VSOI_MENU));

    // Load this menu resource

    int menu_handle;

    menu_handle=vsMenuLoad(VSWID_MDI,index,'M');

    int old_menu_handle;

    old_menu_handle=vsPropGetI(VSWID_MDI,VSP_MENUHANDLE);

    // _set_menu will fail if the form has a dialog box style border.

    // Put a menu bar on this form.

    vsMenuSet(VSWID_MDI,menu_handle);

    // You DO NOT need to call vsMenuDestroy.  This menu is

    // destroyed when the MDI window is deleted.

    vsMenuDestroy(old_menu_handle);

}

See Also	vsMenuDelete, vsMenuDestroy, vsMenuFind, vsMenuGetState, vsMenuInsert, vsMenuLoad, vsMenuQInfo, vsMenuSet, vsMenuSetState, vsMenuShow


vsMenuSetState

int VSAPI vsMenuSetState( int menu_handle, const char *pszFindCommand, int flags, char by_category, const char *pszItemText=0, const char *pszCommand=0,const char *pszCategory=0, const char *pszHelpCommand=0,const char *pszHelpString=0 )

Parameters	Description

menu_handle	Handle of loaded menu returned by vsMenuLoad.

pszFindCommand	Command or category of menu item to find.  If a command is specified, the command must match exactly.  See by_category parameter.

by_category	May be 'M', 'C', 'P'.  If the 'M' option is given, psaFindCommand is the command of the menu item to be found. If the 'C' option is given,  pszFindCommand is the category of the menu item to be found.  If the 'P' option is given, pszFindCommand is an integer (you must cast pszFindCommand to int) position (0..vsMenuQInfo(menu_handle)-1) of the menu item with in menu_handle.  Defaults to 'C'.

mf_flags	mf_flags may be zero or more of the following flags defined in "vs.h":

VSMF_CHECKED

VSMF_UNCHECKED

VSMF_GRAYED

VSMF_ENABLED

VSMF_SUBMENU

pszItemText	Menu item title.

pszCategory	Menu item categories. May be one or more categories separated with a '|' character.  See vsMenuSetState function for more information about categories.

pszHelpCommand	Menu item help command.  Executed when F1 is pressed while on the menu item.

pszHelpMessage	Menu item help message.  Displayed when menu item is selected.

Remarks	Sets menu item values for the menu items which contain the command or category specified.

Example

void VSAPI dllproc ()

{

    // Gray out all menu items which are not allowed when there

    // no child windows.

    vsMenuSetState(

           vsPropGetI(VSWID_MDI,VSP_MENUHANDLE),

           "new",VSMF_GRAYED,'M');

}

Return	Returns 0 if successful.

See Also	vsMenuDelete, vsMenuDestroy, vsMenuFind, vsMenuGetState, vsMenuInsert, vsMenuLoad, vsMenuQInfo, vsMenuSet, vsMenuSetState, vsMenuShow


vsMenuShow

int VSAPI vsMenuShow(int menu_handle , int vpm_flags , int x , int y )

Parameters	Description

menu_handle	Handle of loaded menu returned by vsMenuLoad.

vpm_flags	Defaults to VPM_LEFTBUTTON|VPM_LEFTALIGN.  vpm_flags may be zero or more of the following flags defined in "slick.sh":

VSVPM_LEFTBUTTON

Track menu items with left mouse button.

VSVPM_RIGHTBUTTON

Track menu items with right mouse button.

VSVPM_LEFTALIGN

x coordinate represents left most corner of menu.

VSVPM_CENTERALIGN

x coordinate represents horizontal center of menu

VSVPM_RIGHTALIGN

x coordinate represents right side of menu.

x	x coordinate of left side of menu.

y	y coordinate of top of menu.

Remarks	Displays/runs menu as pop-up.  All menu items should be grayed/checked before calling this function.  This function does not return until the menu is closed.

Example

#include "slick.sh"

defmain()

{

   // Low-level code to display Visual SlickEdit menu bar as pop-up.

   // Could just use show or mou_show_menu function.

   index=vsFindIndex("_mdi_menu",vsoi2type(OI_MENU))

   if (!index) {

       vsMessage("Can't find _mdi_menu");

   }

   int menu_handle;

   menu_handle=vsMenuLoad(VSWID_MDI,index,'P');

   // Display this menu at top left of screen.

   int flags;

   flags=VSVPM_CENTERALIGN|VSVPM_LEFTBUTTON;

   vsMenuShow(menu_handle,flags,0,0)

   vsMenuDestroy(menu_handle);

}

Return	Returns 0 if successful.

See Also	vsMenuDelete, vsMenuDestroy, vsMenuFind, vsMenuGetState, vsMenuInsert, vsMenuLoad, vsMenuQInfo, vsMenuSet, vsMenuSetState, vsMenuShow


vsMergeFiles

int VSAPI vsMergeFiles( const char *pszBaseFilename="", int iBaseBufferId=-1, int iBaseViewId=0, const char *pszRev1Filename="", int iRev1BufferId=-1, int iRev1ViewId=0, const char *pszRev2Filename="", int iRev2BufferId=-1, int iRev2ViewId=0, const char *pszOutputFilename="", int iOutputBufferId=-1, int iOutputViewId=0, int iFlags=0, const char *pszCopy1Caption="", const char *pszCopy2Caption="", const char *pszCopy1AllCaption="", const char *pszCopy2AllCaption="", const char *pszImaginaryLineCaption=0)

Parameters	Description

pszBaseFilename	Name of the base file.  This will be loaded  from disk.  If there is a buffer by this name in memory, it will be used.

iBaseBufferId	Buffer index for the base buffer.  If you use  this, be sure to specify "" for pszBaseFilename, and 0 for iBaseViewId.   Specify -1 to have this parameter ignored.

iBaseViewId	View Index for the first buffer.  If you use this, be sure to specify "" for pszBaseFilename, and -1 for iBuf1Index.    Specify 0 to have this parameter ignored.

pszRev1Filename	Name of the revision 1 file.  This will be loaded from disk.  If there is a buffer by this name in memory, it will be used.

iRev1BufferId	Buffer index for the revision 1 buffer.  If you use this, be sure to specify "" for pszRev1Filename, and 0 for iRev1ViewId.  Specify -1 to have this parameter ignored.

iRev1ViewId	View Index for the revision 1 buffer.  If you use this, be sure to specify "" for pszRev1Filename, and -1 for iBuf1Index.  Specify 0 to have this parameter ignored.

pszRev2Filename	Name of the revision 2 file.  This will be loaded from disk.  If there is a buffer by this name in memory, it will be used.

iRev2BufferId	Buffer index for the revision 2 buffer.  If you use this, be sure to specify "" for pszRev2Filename, and 0 for iRev2ViewId.  Specify -1 to have this parameter ignored.

iRev2ViewId	View Index for the revision 2 buffer.  If you use this, be sure to specify "" for pszRev2Filename, and -1 for iBuf2Index.  Specify 0 to have this parameter ignored.

pszOutputFilename	Name of the output 2 file.

iOutputBufferId	Buffer index for the output buffer.  If you use this, be sure to specify "" for pszOutputFilename, and 0 for iOutputViewId.  If you specify iOutputBufferId or  iOutputViewId, the output will be left open after merge terminates(if there are conflicts) so that you can deal with the output.  Specify -1 to have this parameter ignored.

iOutputViewId	View Id for the output buffer.  If you use this, be sure to specify "" for pszOutputFilename, and -1 for iOutputBufferId.  If you specify iOutputBufferId or iOutputViewId, the output will be left open after merge terminates (if there are conflicts) so that you can deal with the output.  Specify 0 to have this parameter ignored.

iFlags	Combination of the following flags:

VSMERGE_OPT_BASE_BUFFER

pszBaseFilename is a buffer name and not a relative filename which needs the path to be fully resolved.

VSMERGE_OPT_REV1_BUFFER

pszRev1Filename is a buffer name and not a relative filename which needs the path to be fully resolved.

VSMERGE_OPT_REV2_BUFFER

pszRev2Filename is a buffer name and not a relative filename which needs the path to be fully resolved.

VSMERGE_OPT_OUTPUT_BUFFER

pszRev2Filename is a buffer name and not a relative filename which needs the path to be fully resolved.  Buffer is left open after merge for user to deal with.

VSMERGE_OPT_SMART

Feeds some conflict pieces back to diff in order to try to resolve conflicts.  In many cases, will not make a difference  IF YOU WANT YOUR USERS TO MAKE MOST OF THE DECISIONS WITH CONFLICTS, THIS OPTION IS NOT FOR YOU.

VSMERGE_OPT_INTERLEAVED

Gives the output in a single buffer with collisions labeled rather than in an interactive dialog.

VSMERGE_OPT_QUIET

Quiet option.  Shuts off "Merge complete x conflicts" message.

VSMERGE_OPT_CALLERSAVES

When the user is prompted to save the file on close, does not actually save.

VSMERGE_OPT_FORCECONFLICT

Merge will never automatically copy a change/delete into the output.  Instead, a conflict will be generated.

VSMERGE_OPT_SHOWCHANGES

In cases where merge automatically copies lines into the output, the lines are still colored with the color of the file that they came from so the user can see what happened.

VSMERGE_OPT_INDIVIDUALCONFLICTUNDO

Rather than use Visual SlickEdit's buffer undo, when the undo button is pressed, the current conflict region is returned to its original state.

VSMERGE_OPT_IGNORESPACES

Does not force conflicts because of lines that differ in spacing.  In cases where  this happens, lines copied to output will always come from the base file for consistency.

pszCopy1Caption	This is the caption of the "Copy 1>>" button.

pszCopy2Caption	This is the caption of the "Copy 2>>" button.

pszCopy1AllCaption	This is the caption of the "Copy 1 All>>" button.

pszCopy2AllCaption	This is the caption of the "Copy 2 All>>" button/.

*pszImaginaryLineCaption

This is the text used for imaginary lines. Note that this parameter is a global setting and will effect other diffs currently in progress.  For this reason, you must make sure that this parameter is the same for all calls to vsDiffFiles and vsMergeFiles.

Remarks	Performs a three way merge and displays the results interleave or in a merge dialog.

Returns	Returns 0 if successful and there are no conflicts.  1 if there are conflicts and the user chooses to save the file.  2 if there are conflicts and the user chooses not to save the file.  A negative return code is returned and a error message box is diplayed if a file I/O error occurs or a file does not exist.


vsMessage

void VSAPI vsMessage(const char *psz)

Remarks	psz is temporarily displayed on the message line.  Message will disappear after a key is pressed.

See Also	vsStickyMessage


vsMessageBox

int vsMessageBox( const char *pszMessage,const char *pszTitle=0,int vsmb_flags=VSMB_OK )

Parameters	Description

pszMessage	Message to display.

pszTitle	Title for message box.  If 0, the default application title is used.

vsmbflags	Zero or more of the following flags:

VSMB_OK	Display an OK button.

VSMB_OKCANCEL	Display an OK and Cancel button.

VSMB_ABORTRETRYIGNORE

Display  Abort, Retry, Ignore buttons.  Not supported on UNIX.

VSMB_YESNOCANCEL

Display Yes, No, and Cancel buttons.

VSMB_YESNO	Display Yes, and No buttons.

VSMB_RETRYCANCEL

Display a Retry and Cancel button.  Not supported on UNIX.

VSMB_ICONHAND	Display a stop sign picture to the left of the message.

VSMB_ICONQUESTION

Display a question picture to the left of the message.

VSMB_ICONEXCLAMATION

Display an exclamation point picture to the left of the message.

VSMB_ICONINFORMATION

Display an 'i' picture to the left of the message.

VSMB_ICONSTOP	Display a stop sign picture to the left of the message.

VSMB_ICONNONE	Don't display a picture to the left of the message.

VSMB_DEFBUTTON1	Make the default button the first button.

VSMB_DEFBUTTON2	Make the default button the second button.

VSMB_DEFBUTTON3	Make the default button the third button.

Remarks	Creates a modal dialog box and displays pszMessage and various buttons.  pszMessage may contain carriage return characters to break a string message into multiple lines.  By default, pszMessage is broken into multiple lines on word boundaries if necessary.

Return	Returns the button id of the button pressed which closed the dialog box.  One of the following constants is returned:

VSIDOK

VSIDCANCEL

VSIDABORT

VSIDRETRY

VSIDIGNORE

VSIDYES

VSIDNO

Example

result=vsMessageBox(

              "Save changes?",

              "",

              VSMB_YESNO|VSMB_ICONQUESTION);

if (result==VSIDYES) {

    // save the file

} else {

    // Don't save it

}

See Also	vsStickyMessage, vsMessage


vsMouCurWord

int VSAPI vsMouCurWord( int wid, int x, int y, int XYAreInScreenCoordinates, int MaybeReturnSelectedText,, char *pszWord, int MaxWordLen, int *pPhyiscalStartCol=0, int option=0, int *pMaxWordLen=0)

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

x, y	Pixel coordinates under which to check for word or selection.

XYAreInScreenCoordinates

If this is not zero, (x,y) are in screen coordinates, otherwise (x,y) are relative to the editor control specified by wid.

MaybeReturnSelectedText

If non-zero and a single line of selected text exists under (x,y), the selected text is returned.  Otherwise, the word under (x,y) is returned.

pszWord	Ouput buffer for word.  This can be 0.

MaxWordLen	Number of characters allocated to pszWord.  We recommend VSMAXCURWORD.

pPhysicalStartCol	Recieves physical start column (1..vsQLineLength()) of word.

option	May be one of the following:

0	If the cursor is on a word character, all of that word is returned.  If the cursor is not on a word character and a word exists after the cursor, that word is returned.  If the cursor is not on a word character and a word does not exist after the cursor, the previous word is returned.  If no words exist on the current line, a non-zero status is returned.

1	(EMACS style) Same as 0 except that if cursor is on a word character, no word characters before the current character are returned.

2	Same as 0 except when the cursor is setting on the first non-word character after a word character, the previous word is returned.

pMaxWordLen	If this is not 0, this is set to the number of characters you need to allocate to pszWord.

Return	If successful, returns 0 and places word or selection at location (x,y) in pszWord.  Otherwise a non-zero value is returned.

Example

extern "C" void VSAPI vsDllInit()

{

     vsDllExport("void mymouse_move()",0,0);

     int index;

     index=vsFindIndex("mymouse_move",VSTYPE_PROC|VSTYPE_COMMAND);

     if (index) {

          // Bind this function to a mouse move event.

           vsSetEventTabIndex(vsQDefaultEventTab(),

                          vsEvent2Index(VS_K_MOUSE_MOVE),

                          index);

     }

}

extern "C" void VSAPI mymouse_move()

{

     // IF the current object is not an editor control object.

     //  Could check for VSP_OBJECT==VSOI_EDITOR, but this won't work

     // for MDI Child use of the editor control which will return VSOI_FORM.

     if (vsPropGetI(0,VSP_VIEWID)>=0) return;

     char word[VSMAXCURWORD];

     vsMouCurWord(0,vsMouQLastX(),vsMouQLastY(),1,1,word,VSMAXCURWORD);

     vsMessage(word);

}


vsMouQLastX

int VSAPI vsMouQLastX( int wid, char option='D')

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

option	'D' specifies to return the position of mouse in pixels relative to the screen.  '\0' specifies to return the position of the mouse in pixels relative to the window specified.  'M' specifies to return the position in the scale mode (VSP_SCALEMODE) of wid relative to the window specified.

Return	Returns x position of mouse for last mouse event.    This function is typically used by a command or function which is bound to a mouse event, to determine where the mouse was when the event occurred.


vsMouQLastY

int VSAPI vsMouQLastY( int wid, char option='D')

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

option	'D' specifies to return the position of mouse in pixels relative to the screen.  '\0' specifies to return the position of the mouse in pixels relative to the window specified.  'M' specifies to return the position in the scale mode (VSP_SCALEMODE) of wid relative to the window specified.

Return	Returns y position of mouse for last mouse event.    This function is typically used by a command or function which is bound to a mouse event, to determine where the mouse was when the event occurred.


vsMoveWindow

void VSAPI  vsMoveWindow( int wid, int x, int y, int width, int height, char state=0,int reserved=1 )

Applies To	All objects except the Command Line

Parameters	Description

wid	Window id of object.  0 specifies the current object.

x	X position of window relative to parent.

y	Y position of window relative to parent.

width	Width of window.

height	Height of window.

state	One of the following:

0 or 'C'	Change position and size of window for its current state.

'N'	Change normalized position and size of window.

Remarks	Moves and sizes the current window to the position and size specified.  The input position and size parameters are specified in the parent scale mode (VSP_XYSCALEMODE).  For an editor control created with vsCreateEditorCtl, the parent scale mode is always in pixels.

After calling this function, you need to call vsRefresh with the 'A' option so that the scroll bars are updated.


vsNameCallable

int VSAPI vsNameCallable(int index)

Return	Returns index into the name table of the module to which the procedure or command, corresponding to index, is linked.  If index is invalid or does not correspond to a procedure or command, 0 is returned.

Example

      index=vsFindIndex("upcase_filter");

      if (!vsNameCallable(index) ) {

           vsMessage("upcase_filter name in not in names table or not linked");

      } else {

           vsMessage("upcase_filter is defined and callable");

      }

See Also	vsFindIndex, vsNameMatch, vsNameName, vsNameType, vsNameInfo, vsNameSetInfo, vsNameInfoArg2, vsCallIndex, vsNameInsert, vsNameReplace, vsNameDelete, vsNameCallable, vsNameDllAddr


vsNameDelete

void VSAPI vsNameDelete( int index, int reserved=0 )

Parameters	Description

index	Index into names table of item to delete.  For safety, Slick-C functions or DLL functions which have explicit calls from Slick-C are not removed.  In addition, variables (VSTYPE_VAR) and modules (VSTYPE_MODULE) may not be deleted.

Remarks	Removes name entry corresponding to name table index.

See Also	vsFindIndex, vsNameMatch, vsNameName, vsNameType, vsNameInfo, vsNameSetInfo, vsNameInfoArg2, vsCallIndex, vsNameInsert, vsNameReplace, vsNameDelete, vsNameCallable, vsNameDllAddr


vsNameDllAddr

char * VSAPI vsNameDllAddr( int index )

Parameters	Description

index	Index into names table of global function.

Return	Returns address of function.  0 is returned if index is not valid or can not be resolved.

See Also	vsFindIndex, vsNameMatch, vsNameName, vsNameType, vsNameInfo, vsNameSetInfo, vsNameInfoArg2, vsCallIndex, vsNameInsert, vsNameReplace, vsNameDelete, vsNameCallable, vsNameDllAddr


vsNameInfo

char * VSAPI vsNameInfo( int index, char *pszInfo, int MaxInfoLen )

Parameters	Description

index	Index into names table of item.

pszInfo	Output buffer for name information string.  This can be 0.

MaxInfoLen	Number of characters allocated to pszInfo.  We recommend VSMAXNAMEINFO.

pMaxInfoLen	If this is not 0, this is set to the number of characters you need to allocate to pszInfo.

Remarks	This function is used to get command function attributes or user defined additional name information.

Return	Returns pszInfo.

See Also	vsFindIndex, vsNameMatch, vsNameName, vsNameType, vsNameInfo, vsNameSetInfo, vsNameInfoArg2, vsCallIndex, vsNameInsert, vsNameReplace, vsNameDelete, vsNameCallable, vsNameDllAddr


vsNameInfoArg2

int VSAPI vsNameInfoArg2( int index )

Parameters	Description

index	Index into names table of command (VSTYPE_COMMAND).

Return	This function is used to return command function VSARG2_??? attributes.  See "vs.h" for list of VSARG2_??? constants.

See Also	vsFindIndex, vsNameMatch, vsNameName, vsNameType, vsNameInfo, vsNameSetInfo, vsNameInfoArg2, vsCallIndex, vsNameInsert, vsNameReplace, vsNameDelete, vsNameCallable, vsNameDllAddr


vsNameInsert

int VSAPI vsNameInsert( const char *pszName, int kind, const char *pszInfo=0, int reserved=0 )

Parameters	Description

pszName	Name for new names table item.  For kind==VSTYPE_PICTURE, pszName is the filename of a ".bmp" or ".xpm" (UNIX only) whose path will be stripped off.   Your picture should start with an "_" (ex. "c:\vslick\_stackex.bmp") to indicate that your bitmap is global.  Otherwise when the configuration is written your bitmap will get deleted if it is not attatched to a Slick-C dialog box.

kind	Type of new names table item.  May be VSTYPE_MISC, VSTYPE_PICTURE, VSTYPE_EVENTTAB, or VSTYPE_MENU.

pszInfo	Optional name information for new names table item.  Use vsNameInfo function to retrieve this information later.

Remarks	This function creates a new names table item.

Return	If successful, the index of new names table item is returned.  Otherwise, a negative error code is returned.  0 is never returned.

See Also	vsFindIndex, vsNameMatch, vsNameName, vsNameType, vsNameInfo, vsNameSetInfo, vsNameInfoArg2, vsCallIndex, vsNameInsert, vsNameReplace, vsNameDelete, vsNameCallable, vsNameDllAddr


vsNameMatch

int VSAPI vsNameMatch( const char *pszNamePrefix, int start, int flags)

Parameters	Description

pszNamePrefix	Find names matching this prefix.

start	Specify 0 to search for the first match.   Then use the return value of this function to search for the next match.

flags	One or more of the VSTYPE_??? flags Ored together.

Return	Returns name table index of the name with prefix matching pszNamePrefix and where (flags & name_type(index)) is true.  A non-zero value for find_first, begins a new search.  If find_first is zero, the next matching index is returned. 0 is returned  if no match is found.  Search is case sensitive unless one of the flags VSTYPE_MODULE, VSTYPE_PICTURE, or VSTYPE_IGNORECASE is given.  When one of the flags VSTYPE_MODULE or VSTYPE_PICTURE is given, search is case sensitive for file systems like UNIX which is case sensitive.  The search is always case insensitive when the VSTYPE_IGNORECASE flag is given.  Underscores in pszName are translated to dashes before search takes place unless VSTYPE_PICTURE or VSTYPE_MODULE is specified.

Example

      flags= VSTYPE_COMMAND;

      char *pszNamePrefix="p"; // Find names that start with p

      int index;

      index= vsNameMatch(pszNamePrefix,0,flags);   // Find first

      // Press Ctrl-Break to break a macro during a messageNwait

      for (int i=0;i<10;++i) {  // Only display first 10.

          if (!index ) break;

          char temps[1024];

          vsMessageBox(vsNameName(index,temps,1024));

          index= vsNameMatch(pszNamePrefix,index,flags) // Find next

      }

See Also	vsFindIndex, vsNameMatch, vsNameName, vsNameType, vsNameInfo, vsNameSetInfo, vsNameInfoArg2, vsCallIndex, vsNameInsert, vsNameReplace, vsNameDelete, vsNameCallable, vsNameDllAddr


vsNameName

char * VSAPI vsNameName( int index,char *pszName, int MaxNameLen, int *pMaxNameLen=0 )

Parameters	Description

index	Index into names table of item.

pszName	Output buffer to receive name of names table item. This can be 0.

MaxNameLen	Number of characters allocated to psName.  We recommend VSMAXNAME.

pMaxNameLen	If this is not 0, this is set to the number of characters you need to allocate.

Return	Returns pszName.

See Also	vsFindIndex, vsNameMatch, vsNameName, vsNameType, vsNameInfo, vsNameSetInfo, vsNameInfoArg2, vsCallIndex, vsNameInsert, vsNameReplace, vsNameDelete, vsNameCallable, vsNameDllAddr


vsNameReplace

int VSAPI vsNameReplace( int index, const char *pszName, const char *pszInfo=0, int reserved=0 )

Parameters	Description

index	Index into names table of item.

pszName	New name.

pszInfo	Optional new name information.  If null, current name information is preserved.

Remarks	This function is used to rename a names table item.

Return	If successful, returns index.  Otherwise a negative error code is returned.

See Also	vsFindIndex, vsNameMatch, vsNameName, vsNameType, vsNameInfo, vsNameSetInfo, vsNameInfoArg2, vsCallIndex, vsNameInsert, vsNameReplace, vsNameDelete, vsNameCallable, vsNameDllAddr


vsNameSetInfo

int VSAPI vsNameSetInfo( int index, char *pInfo, int InfoLen=-1 )

Parameters	Description

index	Index into names table of item.

pInfo	New name information string.

InfoLen	Number of characters in pInfo.  -1 means pInfo is null terminated.

Remarks	This function is used to set command function attributes or user defined additional name information.

Return	Returns 0 if successful.

See Also	vsFindIndex, vsNameMatch, vsNameName, vsNameType, vsNameInfo, vsNameSetInfo, vsNameInfoArg2, vsCallIndex, vsNameInsert, vsNameReplace, vsNameDelete, vsNameCallable, vsNameDllAddr


vsNameType

int VSAPI vsNameType( int index )

Parameters	Description

index	Index into names table of item.

Return	Returns name table type flags for index.

See Also	vsFindIndex, vsNameMatch, vsNameName, vsNameType, vsNameInfo, vsNameSetInfo, vsNameInfoArg2, vsCallIndex, vsNameInsert, vsNameReplace, vsNameDelete, vsNameCallable, vsNameDllAddr


vsNextBuffer

void VSAPI  vsNextBuffer( int wid, int nbflags )

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

nbflags	zero or more of the following flags:

VSNBFLAG_FIND_HIDDEN

When specified, buffers with (VSP_BUFFLAGS & VSBUFFLAG_HIDDEN) are found.

VSNBFLAG_NO_UPDATE_BUFFER_VIEW

When specified, the buffers old view (line number, col, etc.) information is not updated.

VSNBFLAG_NO_REFRESH

When specified, window refresh flags are not updated to avoid unnecessary screen painting.

Remarks	Switches to the next buffer.

See Also	vsPrevBuffer, vsDeleteBuffer


vsOpenTempView

int VSAPI vsOpenTempView( const char *pszFilename, int *pTempViewId, int *pOrigViewId=0, const char *pszLoadOption=0, const char *pszReserved=0 )

Parameters	Description

pszFilename	Name of

pTempViewId	Set to newly created view id.

pOrigViewId	Set to current view id.  There is always a valid current view id.

pszLoadOption	One

""	Display existing buffer or read pszFilename from disk.

"+bi <buf_id>"	Ignore pszFilename and create new view of buffer corresponding to buf_id.

"+d"	Always read pszFilename from disk even if this file is already loaded in the editor.

"+b"	Only succeed if a buffer already exists of the name pszFilename.

Remarks	This function creates an editor view which is linked to an existing or new buffer.  Use this function when you want to do editor processing on a file but you do not want a visible window created.  Use the vsActivateView and/or the VSP_VIEWID property to switch views.  The call vsPropGetI(0,VSP_VIEWID) returns the current view id.

A view holds the information necessary for the editor to track the current position in a buffer.  All editor control windows have a view id.  All views have a buffer id.

Return	If successful, returns 0 and the temp view/window/buffer is active.  Otherwise a negative error code is returned.

See Also	vsDeleteTempView, vsCreateTempView


vsPosGetLinePointers

int VSAPI  vsPosGetLinePointers( unsigned char **pp,unsigned char **ppBeginLine, unsigned char **ppEndLine,int *pRelLine)

Applies To	Edit Window, Editor Control

Parameters	Description

pp	Set to point to current byte.  You must check that pp is within the range *ppBeginLine and *ppEndLine.

ppBeginLine	Set to first valid byte at the beginning of the current Pos line segment.

ppEndLine	Set to point past the last valid byte of the current Pos line segment.

pRelLine	Use this to track the relative number of lines the Pos cursor as moved up or down.  Subtract the initial RelLine from the RelLine when you are done to get the number of complete lines the Pos cursor has gone up or down.

Remarks	You must call vsPosInit before calling this function.  Once you use a non vsPosXXX function which accesses buffer data you MUST call vsPosInit again to avoid crashing the editor.  Only use this function if you want your searching to be as fast as possible.

This function is used to quickly scan part of the current Pos line (Not the same as the cursor position).

See Also	vsPosIsEOL, vsPosSetPointer,vsPosInit, vsPosRelPGoTo, vsPosNextBOL, vsPosSave, vsPosRestore, vsPosIsEOR, vsPosGetPointers, vsPosSetCurLine, vsPosQCol


vsPosGetPointers

int VSAPI  vsPosGetPointers( unsigned char **pp,unsigned char **ppEndLine, unsigned char **ppEndBuf=0)

Applies To	Edit Window, Editor Control

Parameters	Description

pp	Set to point to current byte.  You must check that pp is less than *ppEndBuf.

ppEndLine	Set to point past the last valid byte of the current Pos line segment.

ppEndBuf	Set to point past the last valid byte of the current Pos buffer segment.

Remarks	You must call vsPosInit before calling this function.  Once you use a non vsPosXXX function which accesses buffer data you MUST call vsPosInit again to avoid crashing the editor.  Only use this function if you want your searching to be as fast as possible.

This function is used to quickly scan part of the current Pos line (Not the same as the cursor position).

See Also	vsPosIsEOL, vsPosSetPointer,vsPosInit, vsPosRelPGoTo, vsPosNextBOL, vsPosSave, vsPosRestore, vsPosIsEOR, vsPosGetLinePointers, vsPosSetCurLine, vsPosQCol


vsPosInit

int VSAPI  vsPosInit(int LineOffset)

Applies To	Edit Window, Editor Control

Parameters	Description

LineOffset	Offset tp set the Pos cursor with in the current line.

Remarks	The vsPosXXX functions provide the fastest way to scan buffers.  However, once you use a non vsPosXXX function to access buffer data (may be to modify something), you MUST call vsPosInit again to avoid crashing the editor.  For this reason, we recommend you only use this function if you want your searching to be as fast as possible.

Speed tips: Use the vsSearch function if you are searching for something which occurs far less times than the number of bytes in the file.  Using vsGetText to retrieve 4k of data or more is almost as fast as using vsPosInit except that a copy of the buffer data must be made.

The Pos cursor is NOT the same as the cursor position.

Use the vsPropSetI function with the VSP_WINDOW_ID property index to set the current object.

Example

// Process all the bytes in the current buffer as fast as possible.

// Move the cursor to the top of the current buffer.

vsTop(0);

// Initialize the Pos cursor to the first byte of the current line.

vsPosInit(0);

unsigned char *p,*pEndLine,*pEndBuf);

vsPosGetPointers(&p,&pEndLine,&pEndBuf);

// Count the number of star characters in the current buffer

int count=0;

for(;;++p) {

     if(p>=pEndBuf) {

           int status;

           status=vsPosRelPGoTo(pEndBuf);

           if(status) break;

           vsPosGetPointers(&p,&pEndLine,&pEndBuf);

           continue;

     }

     if(*p=='*' ) ++count;

}

See Also	vsPosGetLinePointers, vsPosIsEOL, vsPosSetPointer, vsPosRelPGoTo, vsPosNextBOL, vsPosSave, vsPosRestore, vsPosIsEOR, vsPosGetPointers, vsPosSetCurLine, vsPosQCol


vsPosIsEOL

int VSAPI  vsPosIsEOL(int Offset,int ReturnWhenBetweenNLChars=0)

Applies To	Edit Window, Editor Control

Parameters	Description

Offset	Specifies offset from Pos cursor.  Must be >=0.

ReturnWhenBetweenNLChars

This value is returned when the position is under the linefeed of a carriage return, linefeeed end of line sequence.

Remarks	You must call vsPosInit before calling this function.  Once you use a non vsPosXXX function which accesses buffer data you MUST call vsPosInit again to avoid crashing the editor.  Only use this function if you want your searching to be as fast as possible.

Return	Returns information about where Pos cursor + Offset is in relation to the end of line characters as follows:

1	End of record which is past the last end of line character.

EOL2_RC	DOS end of line sequence was found (cr,lf).

EOL1_RC	Single character end of line sequence.

0	Position is not at the start of the end of line sequence.

RE_EOF_RC	Position is past the end of the file+1.

ReturnWhenBetweenNLChars	This value is returned when the position is under the linefeed of a carriage return, linefeeed end of line sequence.

Other	File I/O error

See Also	vsPosInit, vsPosGetLinePointers, vsPosSetPointer, vsPosRelPGoTo, vsPosNextBOL, vsPosSave, vsPosRestore, vsPosIsEOR, vsPosGetPointers, vsPosSetCurLine, vsPosQCol


vsPosIsEOR

int VSAPI  vsPosIsEOR(int Offset)

Applies To	Edit Window, Editor Control

Parameters	Description

Offset	Specifies offset from Pos cursor.  Must be >=0.

Remarks	You must call vsPosInit before calling this function.  Once you use a non vsPosXXX function which accesses buffer data you MUST call vsPosInit again to avoid crashing the editor.  Only use this function if you want your searching to be as fast as possible.

Return	Returns information about where Pos cursor + Offset is in relation to the end of the record as follows:

1	End of record which is past the last end of line character.

0	Position is not at the start of the end of line sequence.

RE_EOF_RC	Position is past the end of the file+1.

Other	File I/O error

See Also	vsPosInit, vsPosGetLinePointers, vsPosIsEOL, vsPosSetPointer, vsPosRelPGoTo, vsPosNextBOL, vsPosSave, vsPosGetPointers, vsPosSetCurLine, vsPosQCol


vsPosNextBOL

int VSAPI  vsPosNextBOL(int Noflines)

Applies To	Edit Window, Editor Control

Parameters	Description

Noflines	Number of lines to move Pos cursor up or down.  The Pos cursor is always place at the beginning of the line even when 0 is given.

Remarks	You must call vsPosInit before calling this function.  Once you use a non vsPosXXX function which accesses buffer data you MUST call vsPosInit again to avoid crashing the editor.  Only use this function if you want your searching to be as fast as possible.

Moves the Pos cursor up or down the number of lines specified.  The Pos cursor is always place at the beginning of the line even when 0 is given.

Return	Returns the actually number of lines the Pos cursor went up or down.

See Also	vsPosInit, vsPosGetLinePointers, vsPosIsEOL, vsPosSetPointer, vsPosRelPGoTo, vsPosSave, vsPosRestore, vsPosIsEOR, vsPosGetPointers, vsPosSetCurLine, vsPosQCol


vsPosQCol

int VSAPI  vsPosQCol()

Applies To	Edit Window, Editor Control

Remarks	You must call vsPosInit before calling this function.  Once you use a non vsPosXXX function which accesses buffer data you MUST call vsPosInit again to avoid crashing the editor.  Only use this function if you want your searching to be as fast as possible.

Return	Returns the Pos cursor column position.  This is the same as the p_col property except for the Pos cursor instead of the edit cursor.

See Also	vsPosInit, vsPosGetLinePointers, vsPosIsEOL, vsPosSetPointer, vsPosRelPGoTo, vsPosNextBOL, vsPosSave, vsPosRestore, vsPosIsEOR, vsPosGetPointers, vsPosSetCurLine


vsPosRelPGoTo

int VSAPI  vsPosRelPGoTo(unsigned char *p)

Applies To	Edit Window, Editor Control

Parameters	Description

p	New position for Pos cursor.  p must be >=pBeginBuf.

Remarks	You must call vsPosInit before calling this function.  Once you use a non vsPosXXX function which accesses buffer data you MUST call vsPosInit again to avoid crashing the editor.  Only use this function if you want your searching to be as fast as possible.

Moves the Pos cursor to the byte that would be there if the Pos buffer was contiguous.  p must be >=pBeginBuf.

Example

// Process all the bytes in the current buffer as fast as possible.

// Move the cursor to the top of the current buffer.

vsTop(0);

// Initialize the Pos cursor to the first byte of the current line.

vsPosInit(0);

unsigned char *p,*pEndLine,*pEndBuf);

vsPosGetPointers(&p,&pEndLine,&pEndBuf);

// Count the number of star characters in the current buffer

int count=0;

for(;;++p) {

     if(p>=pEndBuf) {

           int status;

           status=vsPosRelPGoTo(pEndBuf);

           if(status) break;

           vsPosGetPointers(&p,&pEndLine,&pEndBuf);

           continue;

     }

     if(*p=='*' ) ++count;

}

See Also	vsPosInit, vsPosGetLinePointers, vsPosIsEOL, vsPosSetPointer, vsPosNextBOL, vsPosSave, vsPosRestore, vsPosIsEOR, vsPosGetPointers, vsPosSetCurLine, vsPosQCol


vsPosRestore

int VSAPI  vsPosRestore(void *pSavePos)

Applies To	Edit Window, Editor Control

Return	Restore Pos cursor to position saved by vsPosSave.

See Also	vsPosInit, vsPosGetLinePointers, vsPosIsEOL, vsPosSetPointer, vsPosRelPGoTo, vsPosNextBOL, vsPosSave, vsPosIsEOR, vsPosGetPointers, vsPosSetCurLine, vsPosQCol


vsPosSave

int VSAPI  vsPosSave(void *pSavePos)

Applies To	Edit Window, Editor Control

Return	Saves the Pos cursor information in the memory pointed to by pSavePos. Specify 0 for pSavePos to determine how much memory you need to allocate.  This function allows you to access any editor buffer function that does not modify the buffer and then restore the Pos cursor with vsPosRestore.

See Also	vsPosInit, vsPosGetLinePointers, vsPosIsEOL, vsPosSetPointer, vsPosRelPGoTo, vsPosNextBOL, vsPosSave, vsPosRestore, vsPosIsEOR, vsPosGetPointers, vsPosSetCurLine, vsPosQCol


vsPosSetCurLine

int VSAPI  vsPosSetCurLine()

Applies To	Edit Window, Editor Control

Remarks	You must call vsPosInit before calling this function.  Once you use a non vsPosXXX function which accesses buffer data you MUST call vsPosInit again to avoid crashing the editor.  Only use this function if you want your searching to be as fast as possible.

Sets the edit current line to the same line as the Pos cursor is on.

See Also	vsPosInit, vsPosGetLinePointers, vsPosIsEOL, vsPosSetPointer, vsPosRelPGoTo, vsPosNextBOL, vsPosSave, vsPosRestore, vsPosIsEOR, vsPosGetPointers, vsPosQCol


vsPosSetPointer

int VSAPI  vsPosSetPointer(unsigned char *p)

Applies To	Edit Window, Editor Control

Parameters	Description

p	New position for Pos cursor.  Where pBeginBuf>=p<pEndBuf.

Remarks	You must call vsPosInit before calling this function.  Once you use a non vsPosXXX function which accesses buffer data you MUST call vsPosInit again to avoid crashing the editor.  Only use this function if you want your searching to be as fast as possible.

Sets the Pos cursor to a position inside the contiguous buffer segment returned by vsPosGetPointers or vsPosGetLinePointers.

Example

vsPosInit(0);

unsigned char *p,*pEndLine,*pEndBuf);

vsPosGetPointers(&p,&pEndLine,&pEndBuf);

if (p+1<pEndBuf) {

    vsPosSetPointer(p+1);

    if (vsPosIsEOL(0)) {

        ...

    }

}

See Also	vsPosInit, vsPosGetLinePointers, vsPosIsEOL, vsPosRelPGoTo, vsPosNextBOL, vsPosSave, vsPosRestore, vsPosIsEOR, vsPosGetPointers, vsPosSetCurLine, vsPosQCol


vsPrepareForTerminate

void VSAPI vsPrepareForTerminate( )

Remarks	Currently this function just sets some internal global variables to avoid dispatching events for windows which are disappearing.  Due to our MDI API implementation you must call vsPrepareForTerminate before calling before vsTerminate.  Visual SlickEdit destroys its MDI Frame window inbetween these two calls.


vsPrevBuffer

void VSAPI  vsPrevBuffer( int wid, int nbflags )

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

nbflags	zero or more of the following flags:

VSNBFLAG_FIND_HIDDEN

When specified, buffers with (VSP_BUFFLAGS & VSBUFFLAG_HIDDEN) are found.

VSNBFLAG_NO_UPDATE_BUFFER_VIEW

When specified, the buffers old view (line number, col, etc.) information is not updated.

VSNBFLAG_NO_REFRESH

When specified, window refresh flags are not updated to avoid unnecessary screen painting.

Remarks	Switches to the previous buffer.

See Also	vsNextBuffer, vsDeleteBuffer


vsprint

void VSAPI vsprint( const char *pBuf, int BufLen )

Parameters	Description

pBuf	Data to be printed.

BufLen	Number of characters in pBuf.  -1 specifies that pBuf is null terminate and length can be determined from it.

Remarks	Outputs a debug data to a scrolling window.  This function does is not yet supported under UNIX.  This function is used for assisting in debugging.

See Also	vsprint, vsprintln


vsprintln

void VSAPI vsprintln( const char *pBuf, int BufLen )

Parameters	Description

pBuf	Data to be printed.

BufLen	Number of characters in pBuf.  -1 specifies that pBuf is null terminate and length can be determined from it.

Remarks	Outputs a debug data to a scrolling window.  The next debug output message will be printed on the next line.  This function does is not yet supported under UNIX.  This function is used for assisting in debugging.

See Also	vsprint, vsprintln


vsPrintGetConfig

void VSAPI vsPrintGetConfig( VSPRINTCONFIG *pconfig, int version=0 )

Remarks	Windows: Retrieves the current print configuration which will be used by the print command.  Note that is does not retrieve the dialog box retrieval information for gui_print dialog box.  Call the vsPrintSetConfig function to set print configuration for the next time the gui_print dialog box is displayed.


vsPrintSetConfig

void VSAPI vsPrintSetConfig( const VSPRINTCONFIG *pconfig, int version=0 )

Remarks	Windows: Sets the current print configuration which will be used by the print command and the gui_print commands dialog box.


vsProjectQName

char * VSAPI  vsProjectQName( char *pszFilename, int MaxFilenameLen, int *pMaxFilenameLen=0 )

Parameters	Description

pszFilename	Ouput buffer for project name.  This can be 0.

MaxFilenameLen	Number of characters allocated to pszFilename.  We recommend VSMAXFILENAME.

pMaxServerNameLen	If this is not 0, this is set to the exact number of characters you need to allocate.

Return	Returns pszFilename.


vsProjectListConfigs

char * VSAPI  vsProjectListConfigs( int *pNofConfigs,int *pActiveConfig=0 )

Parameters	Description

pNofConfigs	Set to the number of configurations in the current project.  Set to zero of there is not a project currently open.

pActiveConfig	Set to the index (0..NofConfigs-1) of the active configuration.  Set to -1 if no configuration is active.

Return	Returns an array of ASCIIZ strings which are the configrations names in the current project.  0 is returned if an error occurs or there is no project currently open.


vsPropGetB

int VSAPI vsPropGetB(int wid, int prop_id, void *pBuf, int BufLen, int *pBufLen=0 )

Applies To	All Objects

Parameters	Description

wid	Window id of object or index to resource returned by vsFindIndex, vsNameMatch, VSP_CHILD, or VSP_NEXT.  0 specifies the current object.

prop_id	One of the VSP_??? constants in "vs.h".

pBuf	Output buffer for string value.  Buffer is not null terminated.  This can be 0.

BufLen	Number of bytes allocated to pBuf.

pBufLen	If  this is not 0, this is set to the number of characters you need to allocate to pBuf.

Remarks	Copies string value of property into pBuf.  No more than BufLen bytes are copied.

Return	Returns number of bytes copied

Example

    int len;

    char bufname[100];

    len=vsPropGetB(0,VSP_BUFNAME,bufname,100);

See Also	vsPropGetB, vsPropGetZ, vsPropSetZ, vsPropSetB, vsPropGetI, vsPropSetI, vsPropGetL, vsPropSetL


vsPropGetI

int VSAPI vsPropGetI(int wid, int prop_id)

Applies To	All Objects

Parameters	Description

wid	Window id of object or index to resource returned by vsFindIndex, vsNameMatch, VSP_CHILD, or VSP_NEXT.  0 specifies the current object.

prop_id	One of the VSP_??? constants in "vs.h".

Return	Returns value of integer property.

Example

    int col;

    col=vsPropGetI(0,VSP_COL);

See Also	vsPropGetB, vsPropGetZ, vsPropSetZ, vsPropSetB, vsPropGetI, vsPropSetI, vsPropGetL, vsPropSetL


vsPropGetL

long VSAPI vsPropGetL(int wid, int prop_id)

Applies To	All Objects

Parameters	Description

wid	Window id of object or index to resource returned by vsFindIndex, vsNameMatch, VSP_CHILD, or VSP_NEXT.  0 specifies the current object.

prop_id	One of the VSP_??? constants in "vs.h".

Return	Returns value of long integer property.

Example

    HWND hwnd;

    hwnd=(HWND)vsPropGetL(0,VSP_HWND);

See Also	vsPropGetB, vsPropGetZ, vsPropSetZ, vsPropSetB, vsPropGetI, vsPropSetI, vsPropGetL, vsPropSetL


vsPropGetZ

int VSAPI vsPropGetZ(int wid, int prop_id, char *pszValue, int BufLen, int *pBufLen=0)

Applies To	All Objects

Parameters	Description

wid	Window id of object or index to resource returned by vsFindIndex, vsNameMatch, VSP_CHILD, or VSP_NEXT.  0 specifies the current object.

prop_id	One of the VSP_??? constants in "vs.h".

pszValue	Ouput buffer for null terminate string.  This can be 0.

BufLen	Number of characters allocated to pszValue.

pBufLen	If this is not 0, this is set to the number of characters you need to allocate to pBufLen.

Remarks	Copies string value of property into pszValue.  The returned string is always null terminated.  No more than BufLen characters are copied.

Return	Returns number of characters copied

Example

    int len;

    char bufname[100];

    len=vsPropGetZ(0,VSP_BUFNAME,bufname,100);

See Also	vsPropGetB, vsPropGetZ, vsPropSetZ, vsPropSetB, vsPropGetI, vsPropSetI, vsPropGetL, vsPropSetL


vsPropSetB

void VSAPI vsPropSetB(int wid, int prop_id, void *pBuf, int BufLen)

Applies To	All Objects

Parameters	Description

wid	Window id of object or index to resource returned by vsFindIndex, vsNameMatch, VSP_CHILD, or VSP_NEXT.  0 specifies the current object.

prop_id	One of the VSP_??? constants in "vs.h".

pBuf	Buffer containing new value.

BufLen	Number of charactes to copy from pBuf.

Remarks	Sets value of string property to pBuf.  For documentation on the properties, you must translate the VSP_??? constants into the Slick-C property name.  For example, VSP_BUFNAME corresponds to p_buf_name and VSP_LINE corresponds to p_line.

Example

    vsPropSetB(0,VSP_BUFNAME,"c:\\autoexec.bat",15);

See Also	vsPropGetB, vsPropGetZ, vsPropSetZ, vsPropSetB, vsPropGetI, vsPropSetI, vsPropGetL, vsPropSetL


vsPropSetI

void VSAPI vsPropSetI(int wid, int prop_id, int value)

Applies To	All Objects

Parameters	Description

wid	Window id of object or index to resource returned by vsFindIndex, vsNameMatch, VSP_CHILD, or VSP_NEXT.  0 specifies the current object.

prop_id	One of the VSP_??? constants in "vs.h".

value	New value for property.

Remarks	Sets value of integer property to value.  For documentation on the properties, you must translate the VSP_??? constants into the Slick-C property name.  For example, VSP_BUFNAME corresponds to p_buf_name and VSP_LINE corresponds to p_line.

Example

    // Go to line 5 in current buffer

    vsPropSetI(0,VSP_LINE,5);

See Also	vsPropGetB, vsPropGetZ, vsPropSetZ, vsPropSetB, vsPropGetI, vsPropSetI, vsPropGetL, vsPropSetL


vsPropSetL

void VSAPI vsPropSetL(int wid, int prop_id, long value)

Applies To	All Objects

Parameters	Description

wid	Window id of object or index to resource returned by vsFindIndex, vsNameMatch, VSP_CHILD, or VSP_NEXT.  0 specifies the current object.

prop_id	One of the VSP_??? constants in "vs.h".

value	New value for property.

Remarks	Sets value of long integer property to value.

See Also	vsPropGetB, vsPropGetZ, vsPropSetZ, vsPropSetB, vsPropGetI, vsPropSetI, vsPropGetL, vsPropSetL


vsPropSetZ

void VSAPI vsPropSetZ(int wid, int prop_id, const char *pszValue)

Applies To	All Objects

Parameters	Description

wid	Window id of object.  0 specifies the current object.

prop_id	One of the VSP_??? constants in "vs.h".

pszValue	New value for property.

Remarks	Sets value of string property to pszValue.

Example

    vsPropSetZ(0,VSP_BUFNAME,"c:\\autoexec.bat");

See Also	vsPropGetB, vsPropGetZ, vsPropSetZ, vsPropSetB, vsPropGetI, vsPropSetI, vsPropGetL, vsPropSetL


vsQDefaultEventTab

int VSAPI  vsQDefaultEventTab( )

Return	Returns names table index of default event table.  This is typically used to get and set key bindings global to all modes for the current emulation.

Example

   int index;

   index=vsFindIndex("gui_open",VSTYPE_PROC|VSTYPE_COMMAND);

   if (index) {

      // Bind this function to a F12

       vsSetEventTabIndex(vsQDefaultEventTab(),

                          vsEvent2Index(VS_OFFSET_FKEYS+11),

                          index);

   }


vsQDefaultOption

int VSAPI  vsQDefaultOption( int option )

Parameters	Description

option	One of the following options:

VSOPTION_WARNING_ARRAY_SIZE

A warning message is displayed if a Slick-C array of this size or larger is created.

VSOPTION_WARNING_STRING_LENGTH

A warning message is displayed if a Slick-C string of this size or larger is created.

VSOPTION_VERTICAL_LINE_COL

Column at which editor control displays a vertical line.  0 indicates no vertical line column.

VSOPTION_WEAK_ERRORS

Indicates whether a less server Slick-C error should set the find_error commands error location.

VSOPTION_MAXIMIZE_FIRST_MDICHILD

Indicates whether the first MDI Child should be created maximized.

VSOPTION_MAXTABCOL

Specifies the maximum column to expand tabs.  Tab characters after this column are not expanded.

VSOPTION_CURSOR_BLINK

Indicates whether the cursor should blink.

VSOPTION_DISPLAY_TEMP_CURSOR

Indicates whether the editor control should display a temporary cursor for an active MDI child which does not have focus.

VSOPTION_LEFT_MARGIN

Left margin in twips between the editor control text and the left edge of the window.  This is ignored, when bitmaps are displayed.

VSOPTION_DISPLAY_TOP_OF_FILE

Indicates whether the editor control should display a "Top of File" line.

VSOPTION_HORIZONTAL_SCROLL_BAR

Indicates whether MDI Children should have scroll bars.

VSOPTION_VERTICAL_SCROLL_BAR

Indicates whether MDI Children should have scroll bars.

VSOPTION_HIDE_MOUSE

Indicates whether the mouse should be hidden when you start typing in an editor control.

VSOPTION_ALT_ACTIVATES_MENU

Indicates whether a lone alt key should activate the menu bar.

VSOPTION_DRAW_BOX_AROUND_CURRENT_LINE

Indicates whether the editor control draws a dotted box around the current line.

VSOPTION_MAX_MENU_FILENAME_LEN

Indicates the maximum length of a filename displayed in a menu.

VSOPTION_PROTECT_READONLY_MODE

Indicates whether a read only mode editor control allows editing.  This option has no effect for a an editor control if VSP_PROTECTREADONLYMODE!=0.

VSOPTION_PROCESS_BUFFER_CR_ERASE_LINE

Indicates whether a carriage return not followed by a line feed erase the line in the current process buffer.

VSOPTION_ENABLE_FONT_FLAGS

No longer supported.

VSOPTION_APIFLAGS

VSINIT.APIFlags

You can not set this option.

VSOPTION_HAVECMDLINE

Indicates whether a command line is currently available.  This gets set when an event is dispatched or vsExecute is called.  You can not set this option.

VSOPTION_QUIET	Indicates whether the -Q invocation option was specified.

VSOPTION_SHOWTOOLTIPS

Indicates whether tool tip message should be displayed.

VSOPTION_TOOLTIPDELAY

Determines the tool tip message delay in 10ths of a second.

VSOPTION_HAVEMESSAGELINE

Indicates whether a message line is currently available.  This gets set when an event is dispatched or vsExecute is called.  You can not set this option.

VSOPTION_HAVEGETMESSAGELINE

Indicates whether get message line is currently available.  This gets set when an event is dispatched or vsExecute is called.  You can not set this option.

VSOPTION_MACRO_SOURCE_LEVEL

Indicates the source code macro level stored in "vsapi.dll".

VSOPTION_APPLY_LOCAL_STATE_FILE_CHANGES

Indicates if local state file changes need to be applied to the global state file.

VSOPTION_DISPLAYVERSIONMESSAGE

Indicates whether the version of the editor message should be displayed when the editor starts.

VSOPTION_CXDRAGMIN

(Windows only) Indicates the minumum number of pixels in the X directory which indicate a drag instead of just a click operation.

VSOPTION_CYDRAGMIN

(Windows only) Indicates the minumum number of pixels in the Y directory which indicate a drag instead of just a click operation.

VSOPTION_DRAGDELAY

(Windows only) Indicates the minumum amount of time in milliseconds which indicate a drag instead of just a click operation.

VSOPTION_NEXTWINDOWSTYLE

This can be 0 or 1.  1 specifies "Smart next window" mode.

VSOPTION_CODEHELP_FLAGS

Zero or more of the following flags:

VSCODEHELPFLAG_AUTO_FUNCTION_HELP

Indicates whether auto function help is on/off.

VSCODEHELPFLAG_AUTO_LIST_MEMBERS    0x2

Indicates whether auto list members is on/off.

VSCODEHELPFLAG_SPACE_INSERTS_SPACE

When on, pressing space bar during list members always inserts a space.

VSCODEHELPFLAG_INSERT_OPEN_PAREN

When on, selecting an item during list members which requires an open paren,'<', or additional characters, automatically inserts the additinal characters.

VSCODEHELPFLAG_SPACE_COMPLETION

When on, pressing space during list members completes the word.

VSCODEHELPFLAG_DISPLAY_MEMBER_COMMENTS

When on, source comments are displayed while in list help

VSCODEHELPFLAG_DISPLAY_FUNCTION_COMMENTS

When on, source comments are displayed while in function help

VSCODEHELPFLAG_AUTO_SYNTAX_HELP

Determines whether auto syntax help is on or off.  Only some languages which have Context Tagging such as COBOL have auto syntax help.

VSCODEHELPFLAG_REPLACE_IDENTIFIER

When on, the current identifier is replaced when an item is selected from list members.

VSOPTION_LINE_NUMBERS_LEN

Indicates the number of digits to use when displaying line numbers.  In addition, in ISPF emulation this indicates the number of '=' signs to display.

VSOPTION_LCREADWRITE

A non-zero value indicates that a prefix area should be displayed for read/write files.

VSOPTION_LCREADONLY

A non-zero value indicates that a prefix area should be displayed for read/only files.

VSOPTION_LCMAXNOFLINECOMMANDS

Indicates the maximumum number of line command data allowed durring a search and replace.  This is so that the error information does not get extremely large.

VSOPTION_DOUBLE_CLICK_TIME

The maximum amount of time between two clicks to be considered a double click.

VSOPTION_LCNOCOLON

A non-zero value indicates that no colon character should be displayed after line numbers.  This option is ignored in hex mode.

Return	Returns current setting of specified option.

See Also	vsGetDefaultFont, vsSetDefaultFont, vsGetDefaultColor, vsSetDefaultColor, vsQDefaultOption, vsGetDefaultOptionZ, vsSetDefaultOption, vsSetDefaultOptionZ


vsQButtonBar

int VSAPI  vsQButtonBar( int wid, int bbside )

Applies To	MDI Window

Parameters	Description

wid	Window id of MDI frame window.

bbside	Indicates which docking side.  May be one of the following:

VSBBSIDE_LEFT

VSBBSIDE_TOP

VSBBSIDE_RIGHT

VSBBSIDE_BOTTOM

Return	Returns window id of frame window contain docked toolbars for a particular side.  Note that we have not yet provided a C API call to dock one of our toolbars because we don't expect anyone using our C editor control API's to use our toolbars.  Visual SlickEdits MDI implementation uses the Slick-C _loadbuttonbar function to dock toolbars.  You can uses this too as long as all your toolbars are written in Slick-C and you implement the VSINIT. CallbackMDIToolBarChange call back to adjust your MDI client area.


vsQhide_all_comments_enabled

int VSAPI  vsQhide_all_comments_enabled( int wid )

Parameters	Description

wid	Window id of MDI frame window.

Return	Returns non-zero value if this editor controls buffer type supports the hide_all_comments command.


vsQhide_code_block_enabled

int VSAPI  vsQhide_code_block_enabled( int wid )

Parameters	Description

wid	Window id of MDI frame window.

Return	Returns non-zero value if this editor controls buffer type supports the hide_code_block command.


vsQLastEvent

int VSAPI vsQLastEvent( int NewLastEvent=VS_NULL_KEY, int version=0 )

Parameters	Description

NewLastEvent	If this is not VS_NULL_KEY, the last event is set to this value.

Return	Returns a last event.  Last event is set when a key is pressed.  This function is typically used by a command which wants to know what key it was invoked by.

See Also	vsCallKey, vsEvent2Name, vsEvent2Index, vsIndex2Event, vsEventTabIndex, vsSetEventTabIndex


vsQIdle

long VSAPI vsQIdle()

Returns	Returns the time in milliseconds since the last key or mouse event.

See Also	vsResetIdle


vsQInsertState

int VSAPI  vsQInsertState( int wid )

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Parameters	Description

wid	Window id of object.  0 specifies the current object.

Remarks	Each text box has its own insert state.  However, all edit windows and editor controls share the same insert state.

Return	Returns non-zero value if insert is on.

See Also	vsSetInsertState


vsQIntVar

int VSAPI vsQIntVar(VSPSZ pszVarName, int DefaultValue)

Parameters	Description

pszVarName	Global Slick-C variable name.

DefaultValue	Value returned if variable is not found in names table.

Returns	Returns the value of the global Slick-C variable name given.  If the variable is not found, DefaultValue is returned.


vsQLastIndex

int VSAPI vsQLastIndex( char option)

Parameters	Description

option	Indicates last index information to return.

'C'	Returns the index of the last command or function executed by a key, vsCallKey, or vsExecute.

Note that this is different than the Slick-C last_index function which updates this value when call_index is called.  Call vsSetLastIndex to explicitly update this value.

'L'	Returns the index of the last command or function executed by a key or the vsCallKey function.

'K'	Returns the index of the last event table used to determine a key binding.

'W'	Returns the command line/menu wait value.  This flag is used by a command to determine whether it was invoke by vsExecute (command line or menu) or a key press.  This flag is set to non-zero when vsExecute is called and 0 when a key is pressed or vsCallKey is called.

Return	Returns a last index corresponding to option given.

See Also	vsQLastIndex, vsQPrevIndex, vsSetLastIndex, vsSetPrevIndex


vsQLineFlags

int VSAPI vsQLineFlags(int wid)

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

Return	Gets line status flags for the current line.  wid identifies the object to be operated on.  0 specifies the current object.  See vsSetLineFlags function for information on meaning of flags returned.

See Also	vsQLineFlags, vsSetLineFlags, vsResetModifiedLineFlags


vsQLineLength

int VSAPI vsQLineLength(int wid, int IncludeNLChars)

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

IncludeNLChars	Specify a non-zero value for IncludeNLChars if you want to include the end of line characters in the returned length.

Return	Returns number of characters in current line not including end of line characters.  Specify a non-zero value for IncludeNLChars if you want to include the end of line characters in the returned length.


vsQLineNumberFromOld

int VSAPI vsQLineNumberFromOld(int wid, int RealLineNumber)

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

OldLineNumber	Old line number (VSP_OLDLINENUMBER).

Return	Returns line number (VSP_LINE) corresponding to OldLineNumber.

See Also	vsQLineNumberFromReal, vsQLineNumberFromOld, vsQRealLineNumberFromLine, vsQOldLineNumberFromLine


vsQLineNumberFromReal

int VSAPI vsQLineNumberFromReal(int wid, int RealLineNumber)

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

RealLineNumber	Real line number (VSP_RLINE).

Return	Returns line number (VSP_LINE) corresponding to RealLineNumber.

See Also	vsQLineNumberFromReal, vsQLineNumberFromOld, vsQRealLineNumberFromLine, vsQOldLineNumberFromLine


vsQMaxTabCol

int VSAPI vsQMaxTabCol()

Return	Returns highest tab expansion column.  This value is useful for dynamically determine how large a buffer you need to expand tabs for an entire line.  To determine the buffer size assume the worst case where the first byte of the line is a tab character and the first tab stop is the value returned by this function.

// Lets say     vsQMaxTabCol()  == 1000

//	and            vsQLineLength(0)==10

BufferSize= vsQMaxTabCol()+vsQLineLength(0)+2== 1012

char *pszBuffer=(char *)vsAlloc(BufferSize);

if (pszBuffer) {

    vsExpandTabsC(0,pszBuffer,BufferSize,1,-1,'E');

}

We added 2 to adjust for adding a null terminating character and one more to be extra careful.


vsQmflast_enabled

int VSAPI vsQmflast_enabled( )

Return	Returns true if a menu item which executes the mflast command should be enabled.


vsQOffset

long VSAPI vsQOffset(int wid)

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

Return	Returns character offset of cursor from beginning of buffer.

IMPORTANT:  This function includes lines with VSLF_NOSAVE set which means that these file offsets will not match what is on disk if the file has non-savable lines.  Use vsGoToROffset, vsQROffset, p_RLine, and p_RNoflines for dealing with disk seek positions and line numbers.


vsQOldLineNumberFromLine

int VSAPI vsQOldLineNumberFromLine(int wid, int LineNumber)

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

LineNumber	Line number (VSP_LINE).

Return	Returns old line number (VSP_OLDLINENUMBER) corresponding to LineNumber.

See Also	vsQLineNumberFromReal, vsQLineNumberFromOld, vsQRealLineNumberFromLine, vsQOldLineNumberFromLine


vsQPoint

void VSAPI vsQPoint(int wid, long *pPoint, long *pDownCount, char Option='P')

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

pPoint	If option=='P', ouput for seek position to beginning of line.  Otherwise, output for current line number.  -1 indicates current line number is unknown.

pDownCount	Ouput for number of lines to cursor down to get to the current line.  This is non-zero in rare cases such as when editing record files (p_buf_width!=0) which have no end of line characters and blank lines are inserted.

option	'P' or 'L'.

Remarks	Option=='P'.  Sets pPoint to the seek position to the beginning of the current line.  Sets pDownCount to the number of lines to cursor down to get to the current line when starting from the seek position to the beginning of line.  It is unusual for pDownCount to be non-zero.  This can only occur for record files (p_buf_width!=0) when a line has 0 bytes INCLUDING the end of line characters.  Lines of record files have no end of line characters.

Option=='L'.  Sets pPoint to current line number.  If the current line number is not known, pPoint is set to -1.


vsQPrevIndex

int VSAPI vsQPrevIndex( char option)

Parameters	Description

option	Indicates last index information to return.

'C'	Returns the index of the previous command or function executed by a key, vsCallKey, or vsExecute.  Use this value to determine if your command was executed multiple times in a row (see example below).  For example, several clipboard commands perform append to clipboard when they realize they have been executed multiple times in a row.

Note that this is different than the Slick-C prev_index function which updates this value when call_index is called.  Call vsSetPrevIndex to explicitly update this value.

'L'	Returns the index of the previous command or function executed by a key or the vsCallKey function.

Return	Returns a last index corresponding to option given.

Example

    void VSAPI mycommand()

    {

          char szTemp[VSMAXNAME];

          int InvokedTwiceInRow;

          InvokeTwiceInRow=strcmp(vsNameName(

                        vsQPrevIndex('C'),szTemp,VSMAXNAME),

                        "mycommand"

                       )==0;

    }

See Also	vsQLastIndex, vsQPrevIndex, vsSetLastIndex, vsSetPrevIndex


vsQReadOnly

int VSAPI vsQReadOnly(int wid)

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

Return	Returns the 1 if the editing is allowed for this buffer.

See Also	p_readonly_set_by_user, p_ReadOnly, p_readonly_mode, p_ProtectReadOnlyMode, vsQReadOnly


vsQRealLineNumberFromLine

int VSAPI vsQRealLineNumberFromLine(int wid, int LineNumber)

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

LineNumber	Old line number (VSP_LINE).

Return	Returns real line number (VSP_RLINE) corresponding to LineNumber.

See Also	vsQLineNumberFromReal, vsQLineNumberFromOld, vsQRealLineNumberFromLine, vsQOldLineNumberFromLine


vsQROffset

long VSAPI  vsQROffset(int wid)

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

Return	Returns the number of bytes before the cursor.  Non-savable lines (lines with the VSLF_NOSAVE flag set) are not included. This methed is intended for dealing with disk seek position. However, if you have changed the load options to translate files when they are openned, these offsets will not match what is on disk.

See Also	vsGoToPoint, vsQPoint, vsGoToROffset


vsQSelectedTextLength

int VSAPI vsQSelectedTexLength(int wid, int markid=-1, int flags=-1, const char *pEOLChars=0, int EOLCharsLen=-1)

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

markid	mark_id is a selection handle allocated by the vsAllocSelection or vsDuplicateSelection function.  A mark_id of -1 specifies the active selection or selection showing and is always allocated.

flags	Must be -1.

pEOLChars	Line separator characters.  When this is 0, "\r\n" (UNIX: "\n") is used.

EOLCharsLen	Number of characters in pEOLChars.  -1 means pEOLChars is null terminated.

Return	Returns the number of characters in the selected text.  0 is returned if there is no selection.

See Also	vsGetSelectedText


vsQSelectType

int VSAPI vsQSelectType(int wid, int markid, char option='T')

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

markid	mark_id is a selection handle allocated by the vsAllocSelection or vsDuplicateSelection function.  A mark_id of -1 specifies the active selection or selection showing and is always allocated.

option	See below.

Return	If a value of 'T' is specified for the second parameter, one of the selection types VSSELECT_BLOCK, VSSELECT_CHAR, or VSSELECT_LINE is returned. 0 is returned if the selection specified has not been set.

When a value of 'S' is specified for the second parameter, the select style is returned.  Select styles are VSSELECT_CURSOREXTENDS or 0 which correspond to cut/paste (selection extends as the cursor moves) or begin/end respectively.  0 is returned if the selection specified has not been set.

If a value of 'I' is specified for the second parameter, 1 is returned if the selection specified is an inclusive selection.  Otherwise 0 is returned

When a value of 'U' is specified for the second parameter, a VSSELECT_PERSISTENT is returned if the selection specified is a persistent mark.  Otherwise, 0 is returned.

See Also	vsSetSelectType


vsQTaggingSupported

int VSAPI  vsQTaggingSupported( int wid )

Parameters	Description

wid	Window id of MDI frame window.

Return	Returns non-zero value if this editor controls buffer type supports tag navigation commands include show_procs, list_tags, next_proc, prev_proc, find_tag, and push_tag.


vsQTextWidth

int VSAPI [wid_expression.]vsQTextWidth(int wid, const char *pText, int TextLen=-1)

Applies To	All objects except Image

Parameters	Description

wid	Window id of object.  0 specifies the current object.

pText	Text to return width of.

TextLen	Number of characters in pText.  -1 means pText is null terminated and length is determined.

Returns	Returns the display width of text string specified based on the current font.  Return value is in the parent scale mode (p_xyscale_mode).


vsQUndoStatus

int VSAPI vsQUndoStatus( int wid, char undo_option='U' )

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

undo_option	Specify 'U' to test for undo information.  Specify 'R' to test for redo information.

Return	If undo_option is 'U', NOTHING_TO_UNDO_RC if there is no undo information.  If undo_option is 'R', NOTHING_TO_REDO_RC if there is no redo information.  Use this function to determine whether menu items which execute the undo, undo_cursor, or redo commands should be enabled.


vsQuitView

void VSAPI vsQuitView(int wid)

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of object.  0 specifies the current object.

Remarks	For an explanation of how windows,  views, and buffers are related, see section Windows Structure.

Removes view of buffer from window.  If there are no more views in the active window, it is deleted and the previous window becomes active.  vsQuitView does not delete buffers any more.  Use the vsDeleteBuffer function to delete a buffer.  wid identifies the object to be operated on.  0 specifies the current object.


vsQvcadd_enabled

int VSAPI vsQvcadd_enabled( )

Return	Returns true if a menu item which executes the vcadd command should be enabled.


vsQvccheckin_enabled

int VSAPI vsQvccheckin_enabled( )

Return	Returns true if a menu item which executes the vccheckin command should be enabled.


vsQvccheckout_enabled

int VSAPI vsQvccheckout_enabled( )

Return	Returns true if a menu item which executes the vccheckout command should be enabled.


vsQvcdiff_enabled

int VSAPI vsQvcdiff_enabled( )

Return	Returns true if a menu item which executes the vcdiff command should be enabled.


vsQvcget_enabled

int VSAPI vsQvcget_enabled( )

Return	Returns true if a menu item which executes the vcget command should be enabled.


vsQvchistory_enabled

int VSAPI vsQvchistory_enabled( )

Return	Returns true if a menu item which executes the vchistory command should be enabled.


vsQvclock_enabled

int VSAPI vsQvclock_enabled( )

Return	Returns true if a menu item which executes the vclock command should be enabled.


vsQvcmanager_enabled

int VSAPI vsQvcmanager_enabled( )

Return	Returns true if a menu item which executes the vcmanager command should be enabled.


vsQvcproperties_enabled

int VSAPI vsQvcproperties_enabled( )

Return	Returns true if a menu item which executes the vcproperties command should be enabled.


vsQvcremove_enabled

int VSAPI vsQvcremove_enabled( )

Return	Returns true if a menu item which executes the vcremove command should be enabled.


vsQvcunlock_enabled

int VSAPI vsQvcunlock_enabled( )

Return	Returns true if a menu item which executes the vcunlock command should be enabled.


vsRealloc

void * VSAPI vsRealloc(void *pBuf,  int len)

Parameters	Description

pBuf	Null pointer or pointer allocated by vsAlloc.

len	New allocation size for pBuf.

Return	If successful, resizes the memory allocated by vsAlloc to allow up to len bytes and returns a pointer to the newly allocated memory.  pBuf may be 0 to allocate new memory.  Otherwise 0 is returned.  The new memory is initialized to the previous value if any pointed to by pBuf.  Use the vsFree function to free memory allocated by this function.

See Also	vsFree, vsAlloc


vsRefresh

void VSAPI vsRefresh( int wid,char option='A' )

Applies To	All Objects

Parameters	Description

wid	Window id of object.  0 specifies the current object.

option	'A' or 'W'. The 'A' option refreshes all editor controls, all editor control scroll bars, and calls the VSINIT.pfnRefresh callback function if one exists.  While it may sound like the 'A' option is inefficient, it is actually highly optimized.  Visual SlickEdit only updates editor controls which have data that has been modified.  Use the 'W' option to flush paint messages for the object specified.  The 'W' option will not update the scroll bars or call the VSINIT.pfnRefresh callback.

Remarks	By default, when you call a function which makes a change to an editor control window the editor just sets some internal flags indicating what updates are needed.  Then when you call this function with the 'A' option, all editor controls and other Visual SlickEdit objects are updated.  This makes macros written for Visual SlickEdit run much faster.  Call several editor control functions and when you are done call this function with the 'A' option to update the window.


vsQRefNextOccurrenceEnabled

int VSAPI vsQRefNextOccurrenceEnabled(int reserved=0)

Remarks	Returns non-zero value if the find_next and find_prev commands are searching through symbol references.


vsRegisterWindow

int VSAPI vsRegisterWindow( VSSYSHWND hwndframe,VSSYSHWND hwndclient, int oi=VSOI_FORM )

Parameters	Description

hwndframe	System window handle which contains the client window.  For Windows, this is always the same as hwnd.  For UNIX, specify the same value as hwnd if the client window is not contained by a window with decorations.

hwnd	System window handle client window.

oi	Object type.   One of VSOI_??? constants.  For now this must be VSOI_FORM.

Remarks	Registers a system window as a Visual SlickEdit object.  There are different reasons for registering form (outer) windows.  One reason is so that a window created outside of Visual SlickEdits dialog boxes will get disabled when Visual SlickEdit displays a modal dialog box.  Another reason is so that you can make a particular window the parent of one of our dialog boxes.  Make sure you call vsUnregisterWindow before you destroy your window.

Return	Returns window id of newly registered window.

See Also	vsUnregisterWindow


vsRepeatSearch

int VSAPI [wid_expression.]vsRepeatSearch( int wid,const char *pszOptions=0,int StartCol=0)

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

pszOptions	String of zero or more of the following option letters:

+ 	Forward search.

-	Reverse search.

<	Place cursor at beginning of string found.

>	Place cursor after end of string found.

E 	Case sensitive search.

I  	Case insensitive search.

M 	Search within visible mark.

R 	Search for regular expression.  Syntax of regular expression is described in section "MicroEdge Regular Expressions".

U	Interpret string as a UNIX regular expression.   See section UNIX Regular Expressions.

B	Interpret string as a Brief regular expression.   See section Brief Regular Expressions.

N	Do not interpret search string as a regular expression search string.

@	No error message.

W	Limits search to words.  Used to search and replace variable names.  The default word characters are [A-Za-z0-9_$].  To change the word characters for a specific extension, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").

W=MicroEdge-regular-expression

Specifies a word search and sets the default word characters to those matched by the MicroEdge-regular-expression given.

W:P	Limits search to word prefix.  For example, searching for "pre" matches "pre" and "prefix" but not "supreme" or "supre".

W:PS	Limits search to strict word prefix.  For example, searching for "pre" matches "prefix" but not "pre", "supreme" or "supre".

W:S	Limits search to word suffix.  For example, searching for "fix" matches "fix" and "sufix" but not "fixit".

W:SS	Limits search to strict word suffix.  For example, searching for "fix" matches "sufix" but not "fix" or "fixit".

Y	Binary search.  This allows start positions in the middle of a DBCS character (only effects Japanese operating systems).  This option is useful when editing binary files which may contain characters which look like DBCS but are not.

,	Delimeter to separate ambiguous options.

XCCLetters	Requires the first character of search string NOT be one of the color coding elements specified. For example, "XCS" requires that the first character not be in a comment or string. CCLetters is a string of one or more of the following color coding element letters:

O	Other

K	Keyword

N	Number

S	String

C	Comment

P	Preprocessing

L	Line number

1	Symbol 1

2 	Symbol 2

3 	Symbol 3

4 	Symbol 4

F	Function color

V	No save line

CCCLetters	Requires the first character of search string to be one of the color coding elements specified. See CCLetters above.

Any search option not specified takes on the same value as the last search executed.  The exact start column of the search may be specified by StartCol.  If StartCol is not given, searching continues so that the string found by the last search command is not found again.

StartCol	Optional column to start repeat search from.

Remarks	Repeats a search initiated by vsSearch.  This will not repeat a search initiated with one of the Slick-C search commands find, or replace (see find_next command).

Return	Returns 0 if successful.  Possible return codes are INVALID_OPTION_RC and STRING_NOT_FOUND_RC.  On error, message is displayed.

Example

      // While we could use a regular expression to do what this loop does, this example

      // is easy to understand.

       int status;

       status=vsSearch(0,"_command");

       for (;;) {

           if (status) break;

           if (vsPropGetI(0,VSP_COL) ==1) {

               status=0;break;   // Found _command in column 1

           }

           status=vsRepeatSearch (0);

       }

See Also	vsMatchLength, vsMatchStart, vsMatchCursorLength, vsSelectMatch, vsSearch, vsSearchReplace, vsSaveSearch, vsRestoreSearch


vsReplaceLine

void VSAPI vsReplaceLine(int wid, const char *pBuf, int BufLen)

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

pBuf	New text for current line.  This should not contain line separator characters.

BufLen	Number of characters in pBuf. If BufLen is -1, pBuf must be null terminated.

Remarks	Sets the current line of the current buffer to pBuf.

See Also	vsGetLine, vsInsertLine, vsDeleteLine


vsResetIdle

void VSAPI vsResetIdle( int reserved=-1 )

Remarks	Resets Visual SlickEdit's idle time count to 0.  If an OEM does not call this function, Visual SlickEdit will not be able to track idle time.  This will effect autosave and background tagging as well as any macro which calls the vsQIdle() function.

Example for Windows.

static HHOOK ghook;

static LRESULT CALLBACK GetMsgProc(

    int code,	// hook code

    WPARAM wparam,	// removal flag

    LPARAM lparam 	// address of structure with message

   )

{

   if (wparam==PM_REMOVE) {

      MSG *pmsg;

      pmsg=(MSG *)lparam;

      UINT message;

      message=pmsg->message;

      if ((message>=WM_KEYFIRST && message<=WM_KEYLAST) ||

          (message>=WM_MOUSEFIRST && message<=WM_MOUSELAST)

          ) {

         if (message==WM_MOUSEMOVE) {

            static int old_mx= -1000,old_my=-1000;

            int mx,my;

            mx=(short)LOWORD(lparam);my=(short)HIWORD(lparam);

            // IF the mouse did not move

            if (mx!=old_mx || my!=old_my) {

               old_mx=mx;old_my=my;

               vsResetIdle();

            }

         } else {

            vsResetIdle();

         }

      }

   }

   return(CallNextHookEx(ghook,code,wparam,lparam));

}

int PASCAL WinMain( ...)

{

   /*

      Here we hook GetMessage so that we can accurately update

      Visual SlickEdits Idle time for AutoSave save and background

      tagging.

      You may not have to unhook this hook function because

      it automatically gets unhooked when the process

      terminates.

   */

   ghook=SetWindowsHookEx(

        WH_GETMESSAGE,	// type of hook to install

        (HOOKPROC)GetMsgProc,	// address of hook procedure

        hinstance,	// handle of application instance

        GetCurrentThreadId() 	// identity of thread to install hook for

   );

}

See Also	vsQIdle


vsResetModifiedLineFlags

void VSAPI vsResetModifiedLineFlags(int wid, int reserved=0)

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

Remarks	Turns off the VSLF_INSERTED_LINE and VSLF_MODIFY flags for all lines in the specified editor control.

See Also	vsQLineFlags, vsSetLineFlags, vsResetModifiedLineFlags


vsRestorePos

void VSAPI vsRestorePos( int wid, const VSSAVEPOS *pbuf )

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

pbuf	Structure initialized by vsSavePos.

Remarks	Restores the editor cursor position and scroll position information.  pbuf must have been initialized by vsSavePos.   NO EDITS should have been made to this buffer inbetween the vsSavePos and vsRestorePos calls.  Use vsSavePos2 and vsRestorePos2 to save and restore where edits are made.


vsRestorePos2

void VSAPI vsRestorePos2( int wid, int mark_id )

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

mark_id	mark id allocated by vsSavePos2.

Remarks	Restores the editor cursor position and scroll position information and frees the selection.


vsRestoreSearch

void VSAPI vsRestoreSearch( void *pvoid)

Applies To	Edit Window, Editor Control

Remarks	Restores search information saved by the vsSaveSearch function.

See Also	vsMatchLength, vsMatchStart, vsMatchCursorLength, vsSelectMatch, vsSearch, vsRepeatSearch, vsSearchReplace, vsSaveSearch


vsRubout

void VSAPI vsRubout( int wid )

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

Remarks	Deletes a character if any to left of cursor and moves the cursor to left.  When the left edge is hit, the text area is smooth scrolled or center scrolled depending on the scroll style.


vsSaveFile

int VSAPI vsSaveFile(int wid, const char *pszCmdLine)

Applies To	Edit Window, Editor Control

Note	This function is a low level save function.  It does not support the users "Save" options specified in the File Options dialog box.  It also does not perform any prompting when a file is overwritten or if an error occurs during the save.  We recommend you use the vsCommandSave function instead of this function.

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

pszCmdLine	An option output filename in double quotes and any of the following switches delimited with a space:

Note that since record files are saved in binary (always with the +B switch), many options have no effect.

+ or -E	Turn on/off expand tabs to spaces switch.  Default is off.

+ or -G	Turn on/off setting of all old numbers.  Default is off.  Visual SlickEdit uses old line numbers to better handle going to an error line after lines have been inserted or deleted.  We don't recommend setting the old line numbers on every save because this requires that you do not save the file until you have performed edits for all compile or multi-file search messages.  See _SetAllOldLineNumbers method for more information.

+ or -S	Strip trailing spaces on each line.  The buffer is modified if the output file name matches the buffer name.  Default is off.

+FU	Save file in UNIX ASCII format (Lines ending with just 10 character).  The buffer is modified if the output file name matches the buffer name.

+FD	Save file in DOS  ASCII format (Lines ending with 13,10).  The buffer is modified if the output file name matches the buffer name.

+FM	Save file in Macintosh ASCII format (Lines ending with just 13 character).  The buffer is modified if the output file name matches the buffer name.

+FR	Save file without line end characters.

+Fddd	Save file using ASCII character ddd as the line end character.  The buffer is modified if the output file name matches the buffer name.

+ or -B	Binary switch.  Save file exactly byte per byte as it appears in the buffer.  This option overrides all save options which effect bytes in the input or output.  This option is always on for record buffers.  Defaults to value of p_binary property for other buffers.

+ or -O	Overwrite destination switch (no backup).  Default is off.  Useful for writing a file to a device such as the printer.

+ or -T	Compress saved file with tab increments of 8.  Default is off.

+ or -ZR	Remove end of file marker (Ctrl+Z).  This option is ignored if the current buffer is not a DOS ASCII file.  The buffer is modified if the p_showeof is true and the output file name matches the buffer name.  Default is off.

+ or -Z	Add end of file marker (Ctrl+Z).  Note that if a buffer has a visible EOF character, the output file will still have an EOF character.  Use +ZR to ensure that the output file does not have and EOF character.  Default is off.

+ or -L	Reset line modify flags.  Default is off.

+ or -N	Don't save lines with the VSLF_NOSAVE bit set.  When the editor keeps track of whether a buffer has lines with the VSLF_NOSAVE bit set, we will not need this option.

+ or -A	Convert destination filename to absolute.  Default is on.  This option is currently used to write files to device names such as PRN.  For example, "_save_file +o -a +e prn" sends the current buffer to the printer.

+DB, -DB, +D,-D,+DK,-DK

These options specify the backup style.  The default backup style is +D.  The backup styles are:

+DB, -DB	Write backup files into the same directory as the destination file but change extension to ".bak".

+D	When on, backup files are placed in a single directory.  The default backup directory is "\vslick\backup\" (UNIX: "$HOME/.vslick/backup") . You may define an alternate backup directory by defining an environment variable called VSLICKBACKUP.  The VSLICKBACKUP environment variable may contain a drive specifier. The backup file gets the same name part as the destination file.  For example, given the destination file "c:\project\test.c" (UNIX: "/project/test.c") , the backup  file will be "c:\vslick\backup\test.c" (UNIX: "$HOME/.vslick/backup/test.c").

non-UNIX platforms: For a network, you may need to create the backup directory with appropriate access rights manually before saving a file.

-D	When on, backup file directories are derived from concatenating a backup directory with the path and name of the destination file.  The default backup directory is "\vslick\backup\" (UNIX: "$HOME/.vslick").  You may define an alternate backup directory by defining an environment variable called VSLICKBACKUP.  The VSLICKBACKUP environment variable may contain a drive specifier.  For example, given the destination file "c:\project\test.c", the backup file will be "c:\vslick\backup\project\test.c" (UNIX: "$HOME/.vslick/backup/project/test.c").

non-UNIX platforms: For a network, you may need to create the backup directory with appropriate access rights manually before saving a file.

+DK,-DK	When on, backup files are placed in a directory off the same directory as the destination file.  For example, given the destination file "c:\project\test.c" (UNIX: "$HOME/.vslick"), the backup file will be "c:\project\backup\test.c" (UNIX: "/project/backup/test.c").  This option works well on networks.

Remarks	Writes buffer to file name specified.  If no filename is specified, the buffer name is used.

The p_modify property is turned off if the output filename is the same as the buffer name.

Return	Returns 0 if successful.  Common return codes are: INVALID_OPTION_RC, ACCESS_DENIED_RC, ERROR_OPENING_FILE_RC, INSUFFICIENT_DISK_SPACE_RC, ERROR_READING_FILE_RC, ERROR_WRITING_FILE_RC, DRIVE_NOT_READY_RC, and PATH_NOT_FOUND_RC. On error, message displayed.

Example

    // Expand tabs and write buffer to temporary file.

    vsSaveFile(0,"+E tempfile");


vsSavePos

void VSAPI vsSavePos( int wid, VSSAVEPOS *pbuf )

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

pbuf	Structure filled in with editor cursor position and scroll position information.

Remarks	Saves the editor cursor position and scroll position information so that it can be restored later by vsRestorePos. NO EDITS should be made to this buffer inbetween the vsSavePos and vsRestorePos calls.  Use vsSavePos2 and vsRestorePos2 to save and restore where edits are made.

IMPORTANT:  You do not have to call vsRestorePos after calling this function or free and memory.


vsSavePos2

void VSAPI vsSavePos2( int wid, int *pmark_id )

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

pmark_id	Ouput for mark id.

Remarks	Saves the editor cursor position and scroll position information so that it can be restored later by vsRestorePos2.  It is safe to make edits inbetween calls to vsSavePos2 and vsRestorePos2.

IMPORTANT:  If you do not call vsRestorePos2, you need to call vsFreeSelection to free the selection allocated.


vsSaveSearch

int VSAPI vsSaveSearch( void *pvoid=0 )

Applies To	Edit Window, Editor Control

Remarks	Saves search information set by one of the functions vsSearch or vsRepeatSearch.  Use vsRestoreSearch to restore the search information.

Return	Returns number of bytes needed to be allocated to pvoid.

See Also	vsMatchLength, vsMatchStart, vsMatchCursorLength, vsSelectMatch, vsSearch, vsRepeatSearch, vsSearchReplace, vsRestoreSearch


vsSearch

int VSAPI vsSearch(int wid, const char *pSearchString, int SearchStringLen, const char *pszOptions=0, const char * pReplaceString=0, int ReplaceStringLen=0, int *pNofchanges=0)

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

pSearchString	String to search for.

SearchStringLen	Number of characters in pSearchString.  You can specify -1 if pSearchString is null terminated.

pszOption	String of zero or more of the following options:

+ 	(Default) Forward search.

-	Reverse search.

<	(Default) Place cursor at beginning of string found.

>	Place cursor after end of string found.

E 	(Default) Case sensitive search.

I  	Case insensitive search.

M 	Search within visible mark.

H 	Find text in hidden lines.   Only the line contain the first character of the search string is checked.

R 	Search for MicroEdge regular expression.  See MicroEdge Regular Expressions.

U	Interpret string as a UNIX regular expression.   See section UNIX Regular Expressions.

B	Interpret string as a Brief regular expression.   See section Brief Regular Expressions.

N	(Default) Do not interpret search string as a regular search string.

P	Wrap to beginning/end when string not found.  Flag is set.  However, this option has no effect on this function.

@	Don't display error message.

*	This option is ignored.

W	Limits search to words.  Used to search and replace variable names.  The default word characters are [A-Za-z0-9_$].  To change the word characters for a specific extension, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").

W=MicroEdge-regular-expression

Specifies a word search and sets the default word characters to those matched by the MicroEdge-regular-expression given.

W:P	Limits search to word prefix.  For example, searching for "pre" matches "pre" and "prefix" but not "supreme" or "supre".

W:PS	Limits search to strict word prefix.  For example, searching for "pre" matches "prefix" but not "pre", "supreme" or "supre".

W:S	Limits search to word suffix.  For example, searching for "fix" matches "fix" and "sufix" but not "fixit".

W:SS	Limits search to strict word suffix.  For example, searching for "fix" matches "sufix" but not "fix" or "fixit".

Y	Binary search.  This allows start positions in the middle of a DBCS character (only effects Japanese operating systems).  This option is useful when editing binary files which may contain characters which look like DBCS but are not.

,	Delimeter to separate ambiguous options.

XCCLetters	Requires the first character of search string NOT be one of the color coding elements specified. For example, "XCS" requires that the first character not be in a comment or string. CCLetters is a string of one or more of the following color coding element letters:

O	Other

K	Keyword

N	Number

S	String

C	Comment

P	Preprocessing

L	Line number

1	Symbol 1

2 	Symbol 2

3 	Symbol 3

4 	Symbol 4

F	Function color

V	No save line

CCCLetters	Requires the first character of search string to be one of the color coding elements specified. See CCLetters above.

pReplaceString	String to replace search string with.  Specify 0 to just perform a search.  If pReplaceString is not NULL, a search and replace without prompting is performed.

ReplaceStringLen	Number of characters in pReplaceString.  You can specify -1 if pReplaceString is null terminated.

pNofChanges	If this is non-zero and a search and replace is performed, this is set to the number of changes made.

Remarks	Searches for pSearchString specified.  If pReplaceString is non-zero, and search and replace without prompting is performed. Press and hold Ctrl+Alt+Shift to terminate a long search.  pszOptions is one or more of the following option letters:

Return	Returns 0 if the search specified is found.  Common return codes are STRING_NOT_FOUND_RC, INVALID_OPTION_RC, and INVALID_REGULAR_EXPRESSION_RC.  On error, message is displayed.

Example

     // Search for word delimited string "pathsearch" where the first character is

     // not in a comment or a string.

     int Nofchanges;

     vsSearch( 0,"pathsearch",-1,"xcs,w", "path_search",-1, &Nofchanges);

See Also	vsMatchLength, vsMatchStart, vsMatchCursorLength, vsSelectMatch, vsRepeatSearch, vsSearchReplace, vsSaveSearch, vsRestoreSearch


vsSearchInitSkipped

void VSAPI vsSearchInitSkipped(int MustBeZero=0)

Applies To	Edit Window

Remarks	When the VSP_TRUNCATELENGTH is non-zero, replace operations are skipped in the resulting line becomes longer than the truncation length.  This function is used in conjunction with vsSearchQNofSkipped and vsSearchQSkipped to return information about what was skipped.  Call this function before performing a search and replace operation to reset NofSkipped and Skipped lines data returned by the vsSearchQNofSkipped and vsSearchQSkipped functions.


vsSearchPromptReplace

int VSAPI vsSearchPromptReplace( int wid,const char *pszFindString,const char *pszReplaceString,const char *pszOptions="")

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

pszFindString	String to find.

pszReplaceString	String to replace string found with.

pszOptions	String of search options.  See vsSearch for list of most options.  The following addition options may be specified.

*	Make changes without prompting.

P	Wrap to beginning/end when string not found.

Remarks	This function searches for the string specified and replaces it with the string specified.  This function is different from vsCommandReplace in that it uses a dialog box instead of the message line to prompt the user.

Return	Returns 0 if successful.  Common return codes are COMMAND_CANCELLED_RC, STRING_NOT_FOUND_RC, INVALID_OPTION_RC and INVALID_REGULAR_EXPRESSION_RC.  On error, message is displayed.

See Also	vsCommandReplaceQNofChanges


vsSearchQNofSkipped

int VSAPI vsSearchQNofSkipped()

Applies To	Edit Window

Remarks	When the VSP_TRUNCATELENGTH is non-zero, replace operations are skipped in the resulting line becomes longer than the truncation length.  The vsSearchInitSkipped function is used in conjunction with vsSearchQNofSkipped and vsSearchQSkipped to return information about what was skipped.  Call this function before performing a search and replace operation to reset NofSkipped and Skipped lines data returned by the vsSearchQNofSkipped and vsSearchQSkipped functions.

Returns	Returns the number of replace operations that were skipped.


vsSearchQSkipped

char * VSAPI vsSearchQSkipped()

Applies To	Edit Window

Remarks	When the VSP_TRUNCATELENGTH is non-zero, replace operations are skipped in the resulting line becomes longer than the truncation length.  The vsSearchInitSkipped function is used in conjunction with vsSearchQNofSkipped and vsSearchQSkipped to return information about what was skipped.  Call this function before performing a search and replace operation to reset NofSkipped and Skipped lines data returned by the vsSearchQNofSkipped and vsSearchQSkipped functions.

Returns	Returns a space delimited list of line numbers where the replace operation that was skipped.


vsSearchReplace

int VSAPI vsSearchReplace( int wid, const char *pReplaceString, int ReplaceStringLen=-1, int RepeatSearch=0)

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

pReplaceString	Last search string found is replaced with this string.

ReplaceStringLen	Number of characters in pReplaceString.  -1 means pReplaceString is null terminated.

RepeatSearch	If this is non-zero, a search for the next occurrence of the last search string is performed with the same options and direction specified by the last vsSearch or vsRepeatSearch call

Remarks	Replaces the match found by the last vsSearch or vsRepeatSearch with the replace string specified and optionally searches for the next occurrence.

Return	Returns 0 if successful.  Common return codes are BREAK_KEY_PRESSED_RC and STRING_NOT_FOUND_RC.

See Also	vsMatchLength, vsMatchStart, vsMatchCursorLength, vsSelectMatch, vsSearch, vsRepeatSearch, vsSaveSearch, vsRestoreSearch


vsSelectBlock

int VSAPI vsSelectBlock( int wid, int markid=-1, int SelectFlags=0 )

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

markid	mark_id is a selection handle allocated by vsAllocSelection or vsDuplicateSelection.  A mark_id of -1 specifies the active selection or selection showing and is always allocated.

SelectFlags	Zero or more of the following flags Ored together:

VSSELECT_BEGINEND

Specifies that selecting an area of text requires _select_char be executed to select the end of the text area as well as the beginning.  If VSSELECT_CURSOREXTENDS is not specified, this select style is used.

VSSELECT_CURSOREXTENDS

Specifies that the selection extend as the cursor moves.

VSSELECT_INCLUSIVE

Specifies an inclusive selection.  Currently only character selections are affected by this option.

VSSELECT_NONINCLUSIVE

Specifies a non-inclusive selection.  Currently only character selections are affected by this option.  If the 'I' letter is not specified, the character selection will be non-inclusive selection.

VSSELECT_PERSISTENT

A value of 'P' specifies a persistent select style and may be specified in addition to the other options above.  Macros use this to help determine if a selection should be unhighlighted when the cursor moves.

Remarks	Starts or extends the block selection specified.  Used for processing columns of text.  The first vsSelectBlock becomes the pivot point.  Subsequent vsSelectBlock calls will extend the selection between the pivot point and the cursor.

Return	Returns 0 if successful.  Possible returns are TEXT_NOT_SELECT_RC.  and TEXT_ALREADY_SELECTED_RC.

See Also	vsSelectChar, vsSelectLine


vsSelectChar

int VSAPI vsSelectChar( int wid, int markid=-1, int SelectFlags=0 )

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

markid	mark_id is a selection handle allocated by vsAllocSelection or vsDuplicateSelection.  A mark_id of -1 specifies the active selection or selection showing and is always allocated.

SelectFlags	Zero or more of the following flags Ored together:

VSSELECT_BEGINEND

Specifies that selecting an area of text requires _select_char be executed to select the end of the text area as well as the beginning.  If VSSELECT_CURSOREXTENDS is not specified, this select style is used.

VSSELECT_CURSOREXTENDS

Specifies that the selection extend as the cursor moves.

VSSELECT_INCLUSIVE

Specifies an inclusive selection.  Currently only character selections are affected by this option.

VSSELECT_NONINCLUSIVE

Specifies a non-inclusive selection.  Currently only character selections are affected by this option.  If the 'I' letter is not specified, the character selection will be non-inclusive selection.

VSSELECT_PERSISTENT

A value of 'P' specifies a persistent select style and may be specified in addition to the other options above.  Macros use this to help determine if a selection should be unhighlighted when the cursor moves.

Remarks	Starts or extends the character selection specified.  Used for processing sentences of text which do not start and end on line boundaries.  The first vsSelectChar becomes the pivot point.  Subsequent vsSelectChar calls will extend the selection between the pivot point and the cursor.

Return	Returns 0 if successful.  Possible returns are TEXT_NOT_SELECT_RC.  and TEXT_ALREADY_SELECTED_RC.

See Also	vsSelectBlock, vsSelectLine


vsSelectEditMode

void VSAPI vsSelectEditMode( int wid, const char *pszExt=0, int reserved=0 )

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

pszExt	Extension corresponding to Extension Options dialog box.

Remarks	Sets the extension specific information such as tabs, margins, color coding, etc. to the specified extension options.


vsSelectLine

int VSAPI vsSelectLine( int wid, int markid=-1, int SelectFlags=0 )

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

markid	mark_id is a selection handle allocated by vsAllocSelection or vsDuplicateSelection.  A mark_id of -1 specifies the active selection or selection showing and is always allocated.

SelectFlags	Zero or more of the following flags Ored together:

VSSELECT_BEGINEND

Specifies that selecting an area of text requires _select_char be executed to select the end of the text area as well as the beginning.  If VSSELECT_CURSOREXTENDS is not specified, this select style is used.

VSSELECT_CURSOREXTENDS

Specifies that the selection extend as the cursor moves.

VSSELECT_INCLUSIVE

Specifies an inclusive selection.  Currently only character selections are affected by this option.

VSSELECT_NONINCLUSIVE

Specifies a non-inclusive selection.  Currently only character selections are affected by this option.  If the 'I' letter is not specified, the character selection will be non-inclusive selection.

VSSELECT_PERSISTENT

A value of 'P' specifies a persistent select style and may be specified in addition to the other options above.  Macros use this to help determine if a selection should be unhighlighted when the cursor moves.

Remarks	Starts or extends the character selection specified.  Used for processing lines of text.  The first vsSelectLine becomes the pivot point.  Subsequent vsSelectLine calls will extend the selection between the pivot point and the cursor.

Return	Returns 0 if successful.  Possible returns are TEXT_NOT_SELECT_RC.  and TEXT_ALREADY_SELECTED_RC.

See Also	vsSelectChar, vsSelectLine


vsSelectMatch

void VSAPI vsSelectMatch( int wid, int markid=-1 )

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

markid	mark_id is a selection handle allocated by vsAllocSelection or vsDuplicateSelection.  A mark_id of -1 specifies the active selection or selection showing and is always allocated.

Remarks	Uses the selection id specified to select the last string matched by one of the functions vsSearch or vsRepeatSearch.

See Also	vsMatchLength, vsMatchStart, vsMatchCursorLength, vsSearch, vsRepeatSearch, vsSearchReplace, vsSaveSearch, vsRestoreSearch


vsSetAllOldLineNumbers

void VSAPI vsSetAllOldLineNumbers(int wid, int Reserved=1)

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

Remarks	Sets all old line numbers for the current buffer to the line number.  Use the vsGoToOldLineNumber method to go to an old line number. Visual SlickEdit uses old line numbers to better handle going to an error line after lines have been inserted or deleted. Note that the Slick-C save command takes an option to set the old line numbers on save.


vsSetDefaultColor

int VSAPI [wid_expression.]vsSetDefaultColor( int cfgfield,int FGColor=0,int SetFGColor, int BGColor=0, int SetBGColor=0,

                             int FontFlag=0, int SetFontFlag=0)

Applies To	Edit window, Editor control

Parameters	Description

cfgfield	One of the VSCFG_??? constants or a color index allocated by vsAllocColor.

FGColor	New rgb foreground color.

SetFGColor	Indicates whether to use FGColor as new foreground color.

BGColor	New rgb background color.

SetBGColor	Indicates whether to use BGColor as new foreground color.

FontFlag	Ouput only.  Set to one of the VSFONTFLAG_?? constants or 0.

SetFontFlag	Indicates whether to use FontFlag as new foreground color.

Remarks	Gets rgb color values (always in Windows format) and font style flag for the cfgfield specified.

Returns	Returns 0 if successful.

See Also	vsAllocColor, vsFreeColor, vsSetTextColor, vsSetDefaultColor, vsGetTextColor


vsSetDefaultExtensionOptions

void VSAPI  vsSetDefaultExtensionOptions( const char *pszExtension, const VSEXTENSIONOPTIONS *pExtensionOptions, int reserved=0, int version=0)

Applies To	Edit window, Editor control

Parameters	Description

pszExtension	File extension.  For list of file extension types, use our Extension Options dialog ("Tools", "Configuration","File Extension Setup...").

pExtensionOptions	New extension specific options for pszExtension.  Since all options are must be set, use the vsGetDefaultExtensionOptions first to query the existing value before setting new values.

Remarks	Sets extension specific options for a specific extension.

See Also	vsSetDefaultExtensionOptions, vsSetDefaultExtensionReferTo, vsDeleteExtensionOptions, vsUpdateExistingBufferExtensionOptions, vsSetDefaultExtensionOptions


vsSetDefaultExtensionReferTo

void VSAPI  vsSetDefaultExtensionReferTo( const char *pszExtension, const VSEXTENSIONOPTIONS *pszReferTo, int version=0)

Applies To	Edit window, Editor control

Parameters	Description

pszExtension	File extension.  For list of file extension types, use our Extension Options dialog ("Tools", "Configuration","File Extension Setup...").

pszReferTo	pszExtension is set to refer to the extension options specified by pszReferTo.

Remarks	Allows you to create an extension which refers to all options and support of another extension.

See Also	vsSetDefaultExtensionOptions, vsSetDefaultExtensionReferTo, vsDeleteExtensionOptions, vsUpdateExistingBufferExtensionOptions, vsSetDefaultExtensionOptions


vsSetDefaultFont

int VSAPI vsSetDefaultFont( int field, char *pszFontName, int FontSizex10, int FontFlags, int CharSet=VSCHARSET_DEFAULT )

Parameters	Description

field	Field to change font for.  One of the following constants defined in "vs.h".

VSCFG_CMDLINE

Font used by the command line.

VSCFG_WINDOW_TEXT

Font used by the editor control window text.

VSCFG_MESSAGE

Font used by the message line.

VSCFG_STATUS

Font used by the status line.

VSCFG_DIALOG

Font used by dialog boxes.

pszFontName	Output buffer for font name.

pFontSizex10	Point size of font x 10.

FontFlags	One or more of the following flags:

VSFONTFLAG_BOLD

VSFONTFLAG_ITALIC

VSFONTFLAG_STRIKE_THRU

VSFONTFLAG_UNDERLINE

CharSet	Indicates the character set of the font.  These character sets map directly onto the Windows character sets. See VSCHARSET_??? constants defined in "vs.h".  We do not expect this parameter to be used under UNIX.

Remarks	Sets font configuration for various Visual SlickEdit objects.

Returns	Returns 0 if parameters are valid.

See Also	vsGetDefaultFont, vsGetDefaultColor, vsSetDefaultColor


vsSetDefaultOption

void VSAPI  vsSetDefaultOption( int option )

Parameters	Description

option	See vsQDefaultOption.

Remarks	Sets corresponding option.

See Also	vsGetDefaultFont, vsSetDefaultFont, vsGetDefaultColor, vsSetDefaultColor, vsQDefaultOption, vsGetDefaultOptionZ, vsSetDefaultOption, vsSetDefaultOptionZ


vsSetDefaultOptionZ

int VSAPI  vsSetDefaultOptionZ( int option, const char *pszResult )

Parameters	Description

option	One of the following options:

VSOPTIONZ_PAST_EOF

String displayed for lines in an editor control past the end of the file.  Currently this string can't be longer than 1 character.

VSOPTIONZ_SPECIAL_CHAR_XLAT_TAB

Editor control display translation table. MaxResult should be set to VSSPECIALCHAR_MAX.   Each character corresponds to one of the VSSPECIALCHAR_??? constants.

pszResult	New option value.

Return	Returns 0 if arguments are valid.

See Also	vsGetDefaultFont, vsSetDefaultFont, vsGetDefaultColor, vsSetDefaultColor, vsQDefaultOption, vsGetDefaultOptionZ, vsSetDefaultOption, vsSetDefaultOptionZ


vsSetEnv

void VSAPI vsGetEnv( const char *pszName, const char *pszValue )

Parameters	Description

pszName	Name of environment variable to set value of.

pszValue	New value for environment variable.  Specify 0 to delete the environment variable.

Remarks	Sets environment variable

See Also	vsGetEnv


vsSetEventTabIndex

void VSAPI vsSetEventTabIndex( int keytab_index, int key_index, int index, int version=0 )

Parameters	Description

keytab_index	Index into names table of event table.  When setting key bindings this is usually the event table returned by vsQDefaultEventTab() or VSP_MODEEVENTTAB.

key_index	The event index in range 1..VS_NUMKEYS-1.  Use vsEvent2Index to convert an event constant to an index.

index	Names table index.  May be 0 to unbind key.

Examples

    static int VSAPI MyCommand()

    {

          vsMessageBox("Got here");

    }

    extern "C" int VSAPI vsDllInit()

    {

        vsLibExport("_command int MyCommand()",

                0,0,

                                     MyCommand);

         // Bind this command to F12

         vsSetEventTabIndex(

                vsQDefaultEventTab(),

                vsEvent2Index(VS_OFFSET_FKEYS +11)  // F12,

                vsFindIndex("MyCommand", VSTYPE_COMMAND));

    }

Remarks	Set event binding.

See Also	vsEvent2Name, vsIndex2Event, vsEventTabIndex, vsEvent2Index, vsQDefaultEventTab


vsSetFocus

void VSAPI vsSetFocus( wid )

Applies To	All Objects except Image

Parameters	Description

wid	Window id of object to set focus to

Remarks	Sets focus to the object.  This function calls the VSINIT.pfnSetFocus call back if it is defined.  Don't call this function in the VSINIT.pfnSetFocus callback.


vsSetFocus2

void VSAPI vsSetFocus2( wid )

Applies To	All Objects except Image

Parameters	Description

wid	Window id of object to set focus to

Remarks	Sets focus to the object.  This function does not call the VSINIT.pfnSetFocus call back.


vsSetFocusToModalDialog

int VSAPI vsSetFocusToModalDialog()

Remarks	Visual SlickEdit seems to use the functions in its MDI frame window procedure during a WM_SETFOCUS message to adjust the focus.  We are not sure if this is necessary so we have left the function.

Return	Returns non-zero value if focus was set to a modal dialog box.


vsSetInsertState

void VSAPI  vsSetInsertState( int wid, int State )

Applies To	Edit Window, Editor Control, Text Box, Combo Box

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

State	New value for insert state.

Remarks	Sets the insert state on (non-zero) or off (0).  Each text box has its own insert state.  However, all edit windows and editor controls share the same insert state.

See Also	vsQInsertState


vsSetHelpFilename

int VSAPI vsSetHelpFilename( char *pszFilename)

Parameters	Description

pszFilename	Name of help file to use.  At the moment, help files have a .hlp extension.   We may change our help system to use HTML files in the future.


vsSetLastIndex

int VSAPI vsSetLastIndex( char option, int index)

Parameters	Description

option	Indicates last index information to Set.

'C'	Set the index of the last command or function executed by a key, vsCallKey, or vsExecute.

'L'	Set the index of the last command or function executed by a key or the vsCallKey function.

'K'	Set the index of the last event table used to determine a key binding.

'W'	Set the command line/menu wait value.  This flag is used by a command to determine whether it was invoke by vsExecute (command line or menu) or a key press.  This flag is set to non-zero when vsExecute is called and 0 when a key is pressed or vsCallKey is called.

index	New value for index.

Return	Sets a last index corresponding to option given.

See Also	vsQLastIndex, vsQPrevIndex, vsSetLastIndex, vsSetPrevIndex


vsSetLineFlags

int VSAPI vsSetLineFlags(int wid, int Flags, int Mask=0)

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

Flags

Remark	Sets the line status flags for the current line.  The mask indicates which bits will be set according to flags.  If mask is 0, mask is set to the value of Flags.

Flags is one or more of the following constants ORed together.

VSLF_MLCOMMENTINDEX	Indicates which multi-line comment.

Only two are allowed. Must know which

multi-line comment we are in so we know

what will terminate it.

VSLF_MLCOMMENTLEVEL	Indicates multi-line comment nest level.

VSLF_NOSAVE	Used by Difference Editor and Merge Editor.  Lines with the VSLF_NOSAVE flag set are not saved in the file.

VSLF_VIMARK	Used by VI emulation to mark lines.

VSLF_MODIFY	Line has been modified.

VSLF_INSERTED_LINE	Line was inserted.

VSLF_HIDDEN	Indicates that this line should not be displayed.

VSLF_PLUSBITMAP	Display "+" bitmap to left of this line.

VSLF_MINUSBITMAP	Display "-" bitmap to left of this line.

VSLF_CURLINEBITMAP	Display current line bitmap.

VSLF_LEVEL	Bits used to store selective display nest level.

The MLCOMMENT flags can not be modified.

See Also	vsQLineFlags, vsSetLineFlags, vsResetModifiedLineFlags


vsSetPrevIndex

int VSAPI vsSetPrevIndex( char option, int index)

Parameters	Description

option	Indicates last index information to return.

'C'	Set the index of the previous command or function executed by a key, vsCallKey, or vsExecute.

 'L'	Set the index of the previous command or function executed by a key or the vsCallKey function.

index	New value for index.

Return	Returns a last index corresponding to option given.

See Also	vsQLastIndex, vsQPrevIndex, vsSetLastIndex, vsSetPrevIndex


vsSetSelectType

int VSAPI vsSetSelectType(int wid, int markid, int type, char option='L')

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

markid	mark_id is a selection handle allocated by the vsAllocSelection or vsDuplicateSelection function.  A mark_id of -1 specifies the active selection or selection showing and is always allocated.

type	One of the following:

If option=='L' or option=='T'

VSSELECT_LINE

VSSELECT_CHAR

VSSELECT_BLOCK

VSSELECT_NONINCLUSIVEBLOCK

If option=='S'

VSSELECT_CURSOREXTENDS

If option=='U'

VSSELECT_PERSISTENT

option	'L', 'T', 'S', or 'U'.

For 'L' or 'T' the select type is set to the type given.  When the 'L' option, type==VSSELECT_LINE,, and the last line of a character selection has 0 bytes selected, the last line is not included in the new line selection.

For 'S', the selection style is set to extend as the cursor moves or not to extend as the cursor moves.

For 'U', the selection style is set to be persistent or not persistent.

Remarks	This function changes the selection type for a specified selection handle.

Return	Returns 0 if the markid specified is valid.  Otherwise a negative error code is returned.

See Also	vsQSelectType


vsSetTextColor

void VSAPI [wid_expression.]vsSetTextColor(int wid, VSCOLORINDEX *pColor, int ColorLen)

Applies To	Edit window, Editor control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

pColor	Valid color indexes are any of the VSCFG_??? constants or a color index allocated by vsAllocColor.  0 indicates a NULL color.  Use the NULL color to get our built-in color coding.  When ColorLen is less than 0, pColor points to one color index which is repeated abs(ColorLen) times.

ColorLen	Number of color indexes pointed to by pColor.   When ColorLen is less than 0, pColor points to one color index which is repeated abs(ColorLen) times.

Remarks	Copies color indexes for ColorLen characters of text starting from the cursor.  A 0 color index indicates a null color.

See Also	vsAllocColor, vsFreeColor, vsGetTextColor, vsSetDefaultColor, vsGetDefaultColor


vsShiftSelectionLeft

void VSAPI vsShiftSelectionLeft( int wid, int markid=-1 )

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

markid	mark_id is a selection handle allocated by the vsAllocSelection or vsDuplicateSelection function.  A mark_id of -1 specifies the active selection or selection showing and is always allocated.

Remarks	Deletes characters at left edge of marked area specified.


vsShiftSelectionRight

void VSAPI  vsShiftSelectionRight( int wid, int markid=-1)

Applies To	Edit Window, Editor Control

Remarks	Inserts space character at left edge of marked area specified.  mark_id is a handle to a selection returned by vsAllocSelection or vsDuplicateSelection.  A mark_id of -1 mark_id parameter identifies the active selection.


vsShowSelection

void VSAPI vsShowSelection(int wid, int mark_id)

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

markid	mark_id is a selection handle allocated by the vsAllocSelection or vsDuplicateSelection function.

Remarks	Makes the mark corresponding to mark_id visible.  Currently only one mark may be showing at a time.


vsSortSelection

int VSAPI vsSortSelection( int wid, int markid=-1, int SortFlags=0]

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Ouput window id.  Window id of editor control.  0 specifies the current object.

markid	mark_id is a selection handle allocated by the vsAllocSelection or vsDuplicateSelection function.

SortFlags	Zero or more of the following flags Ored together.

VSSORT_DESCENDING	Sort in descending order.

VSSORT_IGNORECASE	Case insensitive sort according to locale.

VSSORT_IGNORECASE_NONLOCALE

Case insensitive sort according to U.S. locale.

VSSORT_NUMBER	Data being sorted contains floating point numbers.

VSSORT_FILENAME	Data being sorted containts file names.

Remarks	Sorts the selection specified in ascending or descending order in case sensitivity specified.  Sorting defaults to ascending and case sensitive.  If the buffer containing the specified selection is the active buffer of wid, the resulting lines are inserted after the end of the selection.  Otherwise the resulting lines are inserted after the cursor.  If a character selection is used, it is converted to a line type selection.

Return	Returns 0 if successful.  Common return codes are LINE_OR_BLOCK_SELECTION_REQUIRED_RC, NOT_ENOUGH_MEMORY_RC, TOO_MANY_SELECTIONS_RC, and INVALID_SELECTION_HANDLE_RC.


vsSplitLine

 void VSAPI vsSplitLine( int wid )

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

Remarks	Splits the current line at the cursor position.  More specifically inserts p_newline character string at cursor.  If the cursor is past the end of the line, the p_newline character string is inserted after the last character of the line but before the line termination characters.


vsStickyMessage

void VSAPI vsStickyMessage(const char *psz)

Remarks	psz is displayed on the message line.

See Also	vsMessage


vsStrLastPos

int VSAPI vsStrLastPos( const char *pSearchFor, int SearchForLen,const char *pBuf, int BufLen, int start, int SearchFlags)

Parameters	Description

pSearchFor	String to search for.

SearchForLen	Number of bytes in pSearchFor.  You can specify -1 if pSearchFor is NULL terminated.

pBuf	Buffer to search in.

BufLen	Number of bytes in pBuf.

start	Character position to start searching from 1..BufLen.  Specify BufLen to start search from last character.

SearchFlags	One or more of the following flags:

VSSTRPOSFLAG_IGNORE_CASE

Case insensitive search.

VSSTRPOSFLAG_RE

MicroEdge regular expression search.  See MicroEdge Regular Expressions.

VSSTRPOSFLAG_WORD

Reserved for future used.

VSSTRPOSFLAG_UNIXRE

UNIX regular expression search.  See UNIX Regular Expressions.

VSSTRPOSFLAG_BINARY

Binary search.  Effects DBCS searching only.

VSSTRPOSFLAG_BRIEFRE

Brief regular expression search.  See Brief Regular Expressions.

Returns	Searches backward from start position specified for string given.  If string is found, the position of the string found is returned.  First character of string is 1 and NOT 0.  Returns 0 if the string is not found.

See Also	vsStrPos, vsStrPosMatchLength, vsStrPosMatchStart


vsStrPos

int VSAPI vsStrPos( const char *pSearchFor, int SearchForLen,const char *pBuf, int BufLen, int start, int SearchFlags)

Parameters	Description

pSearchFor	String to search for.

SearchForLen	Number of bytes in pSearchFor.  You can specify -1 if pSearchFor is NULL terminated.

pBuf	Buffer to search in.

BufLen	Number of bytes in pBuf.

start	Character position to start searching from 1..BufLen.  Specify 1 to start search from firstcharacter.

SearchFlags	One or more of the following flags:

VSSTRPOSFLAG_IGNORE_CASE

Case insensitive search.

VSSTRPOSFLAG_RE

MicroEdge regular expression search.  See MicroEdge Regular Expressions.

VSSTRPOSFLAG_WORD

Reserved for future used.

VSSTRPOSFLAG_UNIXRE

UNIX regular expression search.  See UNIX Regular Expressions.

VSSTRPOSFLAG_BINARY

Binary search.  Effects DBCS searching only.

VSSTRPOSFLAG_BRIEFRE

Brief regular expression search.  See Brief Regular Expressions.

Returns	Searches forward from start position specified for string given.  If string is found, the position of the string found is returned.  First character of string is 1 and NOT 0.  Returns 0 if the string is not found.

Example

   int i;

   char *ptext;

   ptext="t(h.s)";

   i=vsStrPos("t{h?s}",-1,

     "WHERE IS THIS",-1,

     1,

     VSSTRPOSFLAG_IGNORE_CASE|VSSTRPOSFLAG_RE);

   if (i) {

      // The first tagged expression for MicroEdge RE's is 0

      char word[100];

      int wordlen;

      wordlen=vsStrPosMatchLength(0);

      memcpy(word,ptext+vsStrPosMatchStart(0)-1,wordlen);

      word[wordlen]=0;

      vsMessageBox(word,"Tagged Expression");

      wordlen=vsStrPosMatchLength(-1);

      memcpy(word,ptext+vsStrPosMatchStart(-1)-1,wordlen);

      word[wordlen]=0;

      vsMessageBox(word,"Whole word found");

   }

   ptext="t(h.s)";

   StrPos(ptext,-1,

       "WHERE IS THIS",-1,

       1,

       VSSTRPOSFLAG_IGNORE_CASE|VSSTRPOSFLAG_UNIXRE);

   if (i) {

      // The first tagged expression for UNIX is 1 and not 0.

      char word[100];

      int wordlen;

      wordlen=vsStrPosMatchLength(1);

      memcpy(word,ptext+vsStrPosMatchStart(1)-1,wordlen);

      word[wordlen]=0;

      vsMessageBox(word,"Tagged Expression");

      wordlen=vsStrPosMatchLength(-1);

      memcpy(word,ptext+vsStrPosMatchStart(-1)-1,wordlen);

      word[wordlen]=0;

      vsMessageBox(word,"Whole word found");

   }

See Also	vsStrLastPos, vsStrPosMatchLength, vsStrPosMatchStart


vsStrPosMatchLength

int VSAPI vsStrPosMatchLength( int TaggedExpression)

Parameters	Description

TaggedExpression	Tagged expression number.  For MicroEdge and Brief regular expressions the first tagged expression is 0 and the last is 9.  For UNIX, the first tagged expression is 1 and the last is 0.

Returns	Returns length of tagged expression found for last search performed by vsStrPos, or vsStrLastPos.  Result is not defined if the tagged expression was not found.

See vsStrPos for an example.

See Also	vsStrPos, vsStrLastPos, vsStrPosMatchStart


vsStrPosMatchStart

int VSAPI vsStrPosMatchStart( int TaggedExpression)

Parameters	Description

TaggedExpression	Tagged expression number.  For MicroEdge and Brief regular expressions the first tagged expression is 0 and the last is 9.  For UNIX, the first tagged expression is 1 and the last is 0.

Returns	Returns start of tagged expression found for last search performed by vsStrPos, or vsStrLastPos.  Result is not defined if the tagged expression was not found.

See vsStrPos for an example.

See Also	vsStrPos, vsStrLastPos, vsStrPosMatchLength


vsTerminate

void VSAPI vsTerminate()

Remarks	Frees allocated resources.  vsPrepareForTerminate must be callled before calling this function.  No other vs??? calls should be made after calling this function.  You may not call vsInit after calling vsTerminate.


vsTestEvent

void VSAPI vsTestEvent( int wid=0, char *pszOptions=0)

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

pszOptions	A string of zero or more of the following options:

'R'	Specifies no screen refresh.

'K'	Return keys from physical keyboard and not keyboard macro that is being played back.

'P'	UNIX only: Process non-key/mouse events first before testing for a key or mouse event.  This option is ignored for non-UNIX platforms.

'M'	When given, only key events are tested.

Remarks	This function returns non-zero pending key or mouse event.  If there is no pending event, 0 is returned..  See our OEM MDI sample program for sample code which translates windows messages into our event constants.


vsTextColC

int VSAPI vsTextColC(int wid, int col,char option='L')

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

col	Input imaginary or physical column depending on option.  See table below:

option	See below.

Remarks	Converts an imaginary column position to a physical string column position and visa versa.  The input and output values are described by the table below:

option	Input column, returned column

'P'	Imaginary, Physical

'T'	Imaginary, Physical.  Position is negated if the imaginary column input corresponds to the middle of a tab character.

'L'	Doesn't matter, Imaginary length of string.

'E'	Doesn't matter, Imaginary length of line where the vsTruncQLineLength is used.  This has the same effect as the 'L' option if the VSP_TRUNCATELENGTH property is 0.

'I'	Physical, Imaginary

The input column is returned if input column is less than or equal to zero and the third parameter is not 'L'.

We use the term imaginary to describe column positions which correspond to a string as displayed on your screen.  Strings containing tab characters are expanded before displayed.  Hence, the need arises for a differentiation between physical and imaginary positions.  A physical position corresponds to a character in string.  The characters are number one to the length of string.  An imaginary position corresponds to a position in a string once tabs have been expanded.

See Also	vsExpandTabsC, vsExpandTabs


vsTop

void VSAPI vsTop(int wid)

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

Remarks	Places cursor at first line and first column of buffer.  wid identifies the object to be operated on.  0 specifies the current object.

See Also	vsBottom


vsTreeAddItem

int VSAPI [wid_expression.]vsTreeAddItem(int wid, int ItemIndex, const char * caption, int Flags, int NonCurrentBMIndex, int CurrentBMIndex, int ShowChildren, ,int iNodeFlags=0)

Applies To	Tree View

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

ItemIndex	Specifies a tree item.  The root of the tree can't be deleted and always has an item index of 0.

Flags	One or more of the following flags ORed together:

VSTREE_ADD_BEFORE	Add this item before the item specified.

VSTREE_ADD_AS_CHILD	Add this item after last child of the item specified by ItemIndex.

VSTREE_ADD_SORTED_CS

Add this item sorted case sensitive.

VSTREE_ADD_SORTED_CI

Add this item sorted case insensitive.

VSTREE_ADD_SORTED_FILENAME

Add this item sorted by filename.

NonCurrentBMIndex	Names table index to a picture which gets displayed to the left of the caption text when this node is not the current node.  We recommend you specify the same values for NonCurrentBMIndex and CurrentBMIndex for leaf items.

CurrentBMIndex	Names table index to a picture which gets displayed to the left of the caption text when this node is the current node.

ShowChildren	Indicates whether to show the children of this node.  0 specifies not to show the children.  Specify 1 to initially show children of this node.  Set this to -1 for leaf items.

iNodeFlags	This is 0 or VSTREENODE_HIDDEN.  The hidden flag indicates that the new item not be visible.

Remarks	Adds a new sibling or child item.

Return	Returns the item index of the new item.


vsTreeSetUserInfo

void [wid_expression.]vsTreeSetUserInfo(int wid, int ItemIndex, VSHAR hvarinfo)

Applies To	Tree View

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

ItemIndex	Tree item index.

hvarinfo	New value for user info of this tree item.

Remarks	Sets the user info value for the specified tree item.

See Also	_TreeSetCaption, _TreeGetCaption, _TreeSetInfo, _TreeGetInfo, _TreeGetUserInfo


vsTruncQLineLength

int VSAPI vsTruncQLineLength(int wid, int IncludeNLChars)

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

IncludeNLChars	Specify a non-zero value for IncludeNLChars if you want to include the end of line characters in the returned length.  This argument is ignored if the VSP_TRUNCATELENGTH property is non-zero.

Return	If VSP_TRUNCATELENGTH is 0, the number of characters in current line not including end of line characters is returned.  Specify a non-zero value for IncludeNLChars if you want to include the end of line characters in the returned length.

If VSP_TRUNCATELENGTH is non-zero, the length of the current line as if the text to the right of the truncation length does not exist is returned.  In addition, trailing blanks (tab characters count) are not included in the length.


vsUnregisterWindow

void VSAPI vsUnregisterWindow( int wid )

Parameters	Description

wid	Window id of object.

Remarks	Unregisters a window registered by vsRegisterWindow.

See Also	vsRegisterWindow


vsUp

int VSAPI vsUp( int wid, int Noflines)

Applies To	Edit Window, Editor Control

Remarks	Moves cursor up the number of lines specified by Noflines.  If the destination line is not in view, it is center scrolled or smooth scrolled into view.  wid identifies the object to be operated on.  0 specifies the current object.

Return	Returns 0 if successful. Otherwise TOP_OF_FILE_RC is returned.

See Also	vsDown


vsUpdateExistingBufferExtensionOptions

void VSAPI vsUpdateExistingBufferExtensionOptions( const char *pszExtension,const char *pszReserved=0,int reserved=0)

Applies To	Edit window, Editor control

Parameters	Description

pszExtension	File extension.  For list of file extension types, use our Extension Options dialog ("Tools", "Configuration","File Extension Setup...").

Remarks	Updates all editor control buffers which are using these extension options to the newly configured values.

See Also	vsSetDefaultExtensionOptions, vsSetDefaultExtensionReferTo, vsDeleteExtensionOptions, vsUpdateExistingBufferExtensionOptions, vsSetDefaultExtensionOptions


vsUpdatePicture

int VSAPI vsUpdatePicture( const char *pszFilename,int reserved=0 )

Parameters	Description

pszFilename	Filename of picture to load.  The filename stored in the names table has no path.  So if you use vsFindIndex to lookup your bitmap, make sure you strip the path.

Remarks	Loads a windows .bmp file or .xpm file.  Only the UNIX version supports .xpm files. We recommend that the filename start with an "_" (ex. "c:\vslick\_stackex.bmp").  This tells Visual SlickEdit that the bitmap is global (not attatched to a Slick-C dialog box).

Return	If succcessful, returns names table index of picture.  Otherwise, a negative error code is returned.


vsWinQData

void * VSAPI vsWinQData( int wid )

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

Remarks	This function should only be used by OEM's to store some data per editor control and not by users writing macros.

Return	Returns pointer to OEM window data set by the vsWinSetData function.

See Also	vsWinSetData


vsWinSetData

void * VSAPI vsWinSetData( int wid, void *pdata )

Applies To	Edit Window, Editor Control

Parameters	Description

wid	Window id of editor control.  0 specifies the current object.

pdata	Pointer to window specific data.

Remarks	This function should only be used by OEM's to store some data per editor control and not by users writing macros.

Return	Sets pointer to OEM window data.

See Also	vsWinSetData


vsWorkspaceQName

char * VSAPI  vsWorkspaceQName( char *pszFilename, int MaxFilenameLen, int *pMaxFilenameLen=0 )

Parameters	Description

pszFilename	Ouput buffer for workspace filename.  This can be 0.

MaxFilenameLen	Number of characters allocated to pszFilename.  We recommend VSMAXFILENAME.

pMaxServerNameLen	If this is not 0, this is set to the exact number of characters you need to allocate.

Return	Returns pszFilename.


vsWorkspaceListProjects

char * VSAPI  vsWorkspaceListProjects( int *pNofProjects,int *pActiveProject=0 )

Parameters	Description

pNofProjects	Set to the number of projects in the current workspace.  Set to zero of there is not a workspace currently open.

pActiveProject	Set to the index (0..NofProjects-1) of the active project.  Set to -1 if no project is active.

Return	Returns an array of ASCIIZ strings which are the relative projects filenames in the current workspace.  0 is returned if an error occurs or there is no workspace currently open.


vsZLstrcpy

char * VSAPI vsZLstrcpy(char * pszDest, VSPLSTR plstrSource, int DestLen)

Remarks	Converts VSPLSTR to ASCIIZ string.  No more than DestLen are written.

Return	Returns pszDest.


vstw

_command int vstw ...

Remarks	This function is identical to the st command.


wfont

_command void  [wid_expression.]wfont()

"Window", "Font..."

Applies To	Edit Window, Editor Control

Remarks	Displays Window Font dialog box which allows you to change the font for the current MDI edit window or all MDI edit windows.


_wfont_form

_form _wfont_form

Syntax	void show('_wfont_form', options , font)

Remarks	Displays Font dialog box which allows you to change the font for the current MDI edit window or all MDI edit windows.

options is a string of zero or more of the following option letters:

F	Display fixed pitch fonts only.

S	(Default) Display screen fonts.

P	Display printer fonts.

Printer and screen fonts can not be displayed at the same time.

font specifies the font that should be used to initialize the dialog box.  It is a string in the format:

font_name,font_size, font_flags

font_size is the point size of the font.  font_flags is zero or constants ORed together.  The font flag constants are defined in "slick.sh" and have the prefix "F_" (ex. F_BOLD).

See Also	_choose_font, wfont


wh

_command void wh()

Ctrl+F1

Applies To	Edit Window, Editor Control

Remarks	Displays SDK help for the word at the cursor.  This command requires that the macro variable "def_wh" be set to the WinHelp file.  Make sure that the help file appears in your path.  You can use the General Configuration dialog box ("Tools", "Configuration", "General...", selected General Tab, "Word Help Filename") to set the help file used by this command.


what_is

_command int what_is()

Remarks	Displays help for the command that is bound to the next key you press.

Return	Returns 0 if successful.


where_is

_command _str where_is(_str command [,_str return_text] )

Return	If return_text is not given or is '', this command displays the key(s) that are bound to command on the message line and returns 0.  Otherwise, the message that would be displayed on the message line is returned.


which

void which(_str filename)

Remarks	Searches for filename in VSLICKPATH and PATH and displays the full path filename results on the message line.


_win32s

boolean _win32s()

Returns	Returns 1 if running under WIN32s on Windows 3.x.  Returns 2 if running under Windows 95/98.  Otherwise 0 is returned.

See Also	machine


window_above

_command void window_above()

Applies To	Edit Window

Remarks	Switches to window above the current window if one exists.

See Also	window_left, window_right, window_below, next_window, prev_window


window_below

_command void window_below()

Applies To	Edit Window

Remarks	Switches to window below the current window if one exists.

See Also	window_left, window_right, window_above, next_window, prev_window


window_edit

int window_edit(_str filename)

Applies To	Edit Window

Remarks	This function is intended to be used by the developers of Visual SlickEdit only.  Opens filename for editing.  Checks out filename from the version control system if Auto Check Out is on and the file does not exist or is read only.

Return	Returns 0 if successful.  Common return codes are NEW_FILE_RC (empty buffer created with filename specified because file did not exist), PATH_NOT_FOUND_RC, TOO_MANY_WINDOWS_RC, TOO_MANY_FILES_RC, TOO_MANY_SELECTIONS_RC, NOT_ENOUGH_MEMORY_RC.  On error, message is displayed.


window_left

_command void window_left()

Applies To	Edit Window

Remarks	Switches to window to the left of the current window if one exists.

See Also	window_above, window_right, window_below, next_window, prev_window


window_match

int window_match(_str name_prefix, int find_first, _str options="")

Return	Returns window id of window which has a buffer name (p_buf_name) with prefix matching name_prefix.  A non-zero value for find_first,  begins a new search.  If find_first is zero, the next matching window id is returned.  0 is returned if no match is found.  Search is not case sensitive except for file systems like UNIX which are case sensitive.

options is a string of zero or more of the following:

'I'	Windows with p_visible false will be returned.

'X'	Exact buffer name match instead of prefix matching.

'H'	Windows with (p_window_flags & HIDE_WINDOW_OVERLAP) true will be returned.

'E'	Only windows with p_edit true will be returned.

'N'	Only windows with p_edit false will be returned.

'A'	Non-MDI edit window ids will be returned.  By default, only MDI edit window ids are returned.

Example

// Look for window displaying ".process" buffer.

wid=window_match('.process','xn');

See Also	 buf_match, name_match, file_match


window_right

_command void window_right()

Applies To	Edit Window, Editor Control

Remarks	Switches to window to the right of the current window if one exists.

See Also	window_above, window_left, window_below, next_window, prev_window


wleft_margin

_command void wleft_margin( [int margin] )

Remarks	Sets the spaces between the left edge of the window and the text in twips.  This option has no effect when bitmaps are display in the left edge of the window.  All edit windows and editor controls are effected by this value.  If no argument is given, the current value is displayed on the command line.  The General Configuration dialog box ("Tools", "Configuration", "General...", select General Tab) lets you change this option in inches instead of twips.


word

_str word(_str string, int Nth)

Return	Returns the Nth space or tab delimited word in string.  '' is returned if the Nth word does not exist.


word_chars

_command void word_chars(  [_str characters] )

Remarks	Allows you to specify the characters in a word for the current buffer.  These characters affect word commands such as next_word or prev_word and the characters used for word searching.  To change the word characters for a specific extension, use the Extension Options dialog box ("Tools", "Configuration", "File Extension Setup...").


word_wrap

_command void [wid_expression.]word_wrap('Y'|'N')

Applies To	Edit Window, Editor Control

Remarks	If yes, the editor attempts to keep the cursor within the margins when entering text, moving the cursor, and deleting characters.  The word_wrap command only affects the current buffer.  To set the default word wrap style for specific file extension, use the Extension Options dialog box ("Tools", "Configuration..", "File Extension Setup...").

See Also	word_wrap_toggle


word_wrap_toggle

_command void [wid_expression.]word_wrap_toggle()

"Document", "Word Wrap"

Applies To	Edit Window, Editor Control

Remarks	Toggles word wrap on/off.  See word_wrap command for more information.


wordwrap_delete_char

void [wid_expression.]wordwrap_delete_char([_str force_wrap])

Applies To	Edit Window, Editor Control

Remarks	Deletes the character under the cursor.  If the cursor is past the end of the current line and word wrap is on or force_wrap != '', the next line is joined with the current line.


wordwrap_left

void [wid_expression.]wordwrap_left([_str force_wrap])

Applies To	Edit Window, Editor Control

Remarks	Moves the cursor one character to the left.  If word wrap is on and the cursor is at or before the left margin or force_wrap != '', the cursor is placed at the end of the previous line.


wordwrap_right

void [wid_expression.]wordwrap_right([_str force_wrap])

Applies To	Edit Window, Editor Control

Remarks	Moves the cursor one character to the right.  If word wrap is on and the cursor is at or past the right margin or force_wrap != '', the cursor is placed on the next line at the left margin.


wordwrap_rubout

void [wid_expression.]wordwrap_rubout([_str force_wrap])

Applies To	Edit Window, Editor Control

Remarks	Deletes the character to left of cursor.  If the visible cursor is in the text area and word wrap is on or force_wrap != '', the cursor will wrap to the previous line when the left margin is hit.


workspace_close

_command int workspace_close()

"Project", "Close Workspace"

Remarks	Prompts to save modified files, save workspace auto-restore information, and closes all files.

Returns	Returns 0 if command not cancelled because user selected to cancel when prompted with modified file list.  Otherwise a non-zero value is returned.

See Also	project_build, project_rebuild, project_debug, project_execute, project_user1, project_user2, workspace_open, project_compile, project_edit, project_load, new, workspace_insert, workspace_dependencies, workspace_set_active, workspace_properties, workspace_close


workspace_dependencies

_command void workspace_dependencies()

"Project", "Dependencies..."

Remarks	Lists dependencies for the current project and allows you to modify the dependencies.

See Also	project_build, project_rebuild, project_debug, project_execute, project_user1, project_user2, workspace_open, project_compile, project_edit, project_load, new, workspace_insert, workspace_dependencies, workspace_set_active, workspace_properties, workspace_close


workspace_insert

_command void workspace_insert(_str filename="" )

"Project", "Insert Project into Workspace..."

Remarks	Allows you to add an existing project to the currently open workspace.  The optional filename specifies the project to add.

See Also	project_build, project_rebuild, project_debug, project_execute, project_user1, project_user2, workspace_open, project_compile, project_edit, project_load, new, workspace_insert, workspace_dependencies, workspace_set_active, workspace_properties, workspace_close


workspace_new

_command void workspace_new()

"Project", "New..."

Applies To	Edit Window

Remarks	Displays the New dialog box.  Allows you to create files, projects, and workspaces. The Project tab is initially active.


workspace_open

_command void workspace_open(_str filename="")

"Project", "Workspace Open..."

Remarks	Displays the Workspace Open dialog box which allows you to open a workspace.  If a workspace is already open it is closed.  The optional filename specifies the workspace to open.

See Also	project_build, project_rebuild, project_debug, project_execute, project_user1, project_user2, workspace_open, project_compile, project_edit, project_load, new, workspace_insert, workspace_dependencies, workspace_set_active, workspace_properties, workspace_close


workspace_properties

_command void workspace_properties()

"Project", "Workspace Properties..."

Remarks	Allows you to add projects to a workspace, change project dependencies, and set the active project.  Displays Workspace Properties dialog box

See Also	project_build, project_rebuild, project_debug, project_execute, project_user1, project_user2, workspace_open, project_compile, project_edit, project_load, new, workspace_insert, workspace_dependencies, workspace_set_active, workspace_properties, workspace_close


workspace_set_active

_command void workspace_set_active(_str filename)

Remarks	Sets the specified project active in the current workspace.

See Also	project_build, project_rebuild, project_debug, project_execute, project_user1, project_user2, workspace_open, project_compile, project_edit, project_load, new, workspace_insert, workspace_dependencies, workspace_set_active, workspace_properties, workspace_close


write_list

_command int write_list( [_str filename] )

Remarks	Writes the current buffer to filename.  If filename is not specified you are prompted for a filename.  The write_list command may be used to create a list of file names for the make_tags command.  The save command is the fastest way to save a file manager list.  However, its format is not accepted by the make_tags command and may not be accepted by other programs.  Used in fileman mode.

Return	Returns 0 if successful.  Common return codes are 1 (select file(s) first), INVALID_OPTION_RC, ACCESS_DENIED_RC, ERROR_OPENING_FILE_RC, INSUFFICIENT_DISK_SPACE_RC, ERROR_READING_FILE_RC, ERROR_WRITING_FILE_RC, DRIVE_NOT_READY_RC, and PATH_NOT_FOUND_RC.  On error, message displayed.


write_state

_command int write_state(_str filename)

Remarks	Saves macro module(s), name table, dialog box templates, bitmaps, event table(s), global/static variable value(s), and editor options to filename.  When the editor is invoked, it searches for the state file.  First the directory from which the editor was loaded is searched and then the path directories are searched.  The editor will not search for a state file if the editor is invoked with the '-x' option in the command line.  State files (.sta) or normal pcode files (.ex) may be specified with the -x option.

UNIX:  Note that you should use the save_config command under normal circumstances instead of this command.  The save_config command save source code for configuration changes which gets applied to the state file when the editor is invoked.

Return	Returns 0 if successful.  Common return codes are: INVALID_OPTION_RC, ACCESS_DENIED_RC, ERROR_OPENING_FILE_RC, INSUFFICIENT_DISK_SPACE_RC, ERROR_READING_FILE_RC, ERROR_WRITING_FILE_RC, DRIVE_NOT_READY_RC, and PATH_NOT_FOUND_RC.  On error, message box displayed.

Command Line Example

     write-state  vslick.sta

Return	clear_message, _write_state, gui_save_config


_write_state

int _write_state(_str filename)

Remarks	Saves macro module(s), name table, key table(s), global/static variable value(s), and editor options to filename.  When the editor is invoked, it searches for the state file.  First the directory from which the editor was loaded is searched and then the PATH directories are searched.  The editor will not search for a state file if the editor is invoked with the '-x' option in the command line.  State files (.sta) or normal pcode files (.ex) may be specified with the -x option.

UNIX:  Note that you should use the save_config command under normal circumstances instead of this command.  The save_config command save source code for configuration changes which gets applied to the state file when the editor is invoked.

Return	Returns 0 if successful.  Common return codes are: INVALID_OPTION_RC, ACCESS_DENIED_RC, ERROR_OPENING_FILE_RC, INSUFFICIENT_DISK_SPACE_RC, ERROR_READING_FILE_RC, ERROR_WRITING_FILE_RC, DRIVE_NOT_READY_RC, and PATH_NOT_FOUND_RC.  On error, message displayed.

Example

     _write_state('rich.sta');

     // now the editor may be invoked with "vs -xrich.sta".

See Also	clear_message


write_state_message

void write_state_message()

Remarks	Displays the message "Execute write-state to save the configuration.".


xcom

_command typeless xcom( [_str command] )

Remarks	Executes the external macro or program specified by-passing an internal command search for the command.  This command is intended to be called from the command line.  Use the shell built-in to achieve the same function from within a macro.

Command Line Example:

      xcom find                    - Runs an external find program or Slick-C batch program.

Return	Return code of external macro or program specified is returned.

See Also	dos, shell


xnext_error2

void xnext_error2()

Remarks	Finds the next error.  Cursor is placed on the line and column of the file with error.

See Also	next_error


xprintf

void xprintf(char *s, ...)

Note	This function is a DLL API function.  It does not have a vs prefix or have the VSAPI attribute because it is not a portable function.  It is compiler dependant.  We expect this function to work with most (maybe all) UNIX C compilers.  However, under Windows, this function will likely only work for you if you are using Microsoft Visual C++.  This function is NOT callable from Slick-C.

Remarks	This functions parameters are identical to the C run-time printf function.  Displays a debug message in a scrolling window.  Under UNIX, this message is sent to standard out.  This function is used to assist in debugging.

See Also	xprintf, mprintf, dfprintf


zap_line

_command int [wid_expression.]zap_line()

Applies To	Edit Window, Editor Control

Remarks	Deletes the current line and moves the cursor to column one.  This function is used as input to the process_list procedure.

Return	Returns 0.


zoom_window

_command void zoom_window()

Ctrl+Shift+Z or "Window", "Zoom Toggle"

Remarks	Zooms the current window to as large as possible.  If the current window has already been zoomed, the previous window configuration is restored.


tag_check_access_level

boolean tag_check_access_level(int context_flags, int tag_flags)

Parameters	Description

context_flags	Context flags representing access constraints, public, package, protected, or private.

VS_TAGCONTEXT_ACCESS_private	Private class members

VS_TAGCONTEXT_ACCESS_protected	Protected class members

VS_TAGCONTEXT_ACCESS_package	Package scope members (Java)

VS_TAGCONTEXT_ACCESS_public	Public class members

tag_flags	Tag flags for tag to check access level of.  See tag_insert_simple for a complete list of tag flags.

Return	true if at the current access level (represented by context_flags), we have access to the member with the given access restrictions (represented by tag_flags), false if not.

See Also	tag_check_context_flags, tag_insert_simple


tag_check_context

int tag_check_context()

Return	Check if the current buffer position is still within the current context tag and return one of the following codes:

0	The current context is not set or wrong (maybe changed buffers).

-1	The context info is loaded, but the cursor is out of 'current' context.

1	The context is within the current context tag.

2	The context is within the scope of the current context tag.

See Also	tag_current_context, tag_get_context


tag_check_context_flags

boolean tag_check_context_flags(int context_flags, int tag_flags, _str tag_type )

Parameters	Description

context_flags	Context flags representing what to allow or restrict to.

VS_TAGCONTEXT_ALLOW_locals	Allow local variables

VS_TAGCONTEXT_ALLOW_private	Allow private members

VS_TAGCONTEXT_ALLOW_protected	Allow protected members

VS_TAGCONTEXT_ALLOW_package	Allow package scope members

VS_TAGCONTEXT_ALLOW_anonymous	Allow anonymous classes

VS_TAGCONTEXT_ONLY_volatile	Only volatile tags

VS_TAGCONTEXT_ONLY_const	Only const tags

VS_TAGCONTEXT_ONLY_static	Only static tags

VS_TAGCONTEXT_ONLY_non_static	Only non-static tags

VS_TAGCONTEXT_ONLY_data	Only data members (variables)

VS_TAGCONTEXT_ONLY_funcs	Only functions or procs

VS_TAGCONTEXT_ONLY_classes	Only classes, structs or unions

VS_TAGCONTEXT_ONLY_packages	Only packages, libraries, etc.

VS_TAGCONTEXT_ONLY_inclass	Only tags with inclass flag

VS_TAGCONTEXT_ONLY_constructors	Only class constructors

VS_TAGCONTEXT_ONLY_this_class	Do not search parent classes

VS_TAGCONTEXT_ONLY_parents	Only search parent classes

VS_TAGCONTEXT_ONLY_locals	Only local variables

VS_TAGCONTEXT_FIND_derived	Find overloads in child classes

VS_TAGCONTEXT_ANYTHING	Match any tag

tag_flags	Tag flags for tag to check access level of.  See tag_insert_simple for a complete list of tag flags.

tag_type	Tag type name (see tag_get_type).

Return	true if the tag having the given tag_flags and tag_type matches the requirements set by the given context_flags, false if not.

See Also	tag_check_access_level, tag_get_type, tag_insert_simple


tag_check_for_define

boolean tag_check_for_define(_str tag_name, int line_no, var tag_files, _str &alt_tag_name )

Parameters	Description

tag_name	Tag name to check if it is a macro define.

line_no	If checking in current context, maximum line number to search to.

tag_files	List of tag files to search.

alt_tag_name	Returns value of #define macro.

Remarks	Look up tag_name and see if it is a macro preprocessing symbol (#define).  If so, return the value of symbol in alt_tag_name.  Note that this function does not support complex macros, that is, macros having arguments or defined to something more complicated than a simple identifier or empty string.

Return	Returns the number of matches was found, 0 of none found.

See Also	tag_check_for_package, tag_check_for_template, tag_check_for_typedef


tag_check_for_package

boolean tag_check_for_package(_str tag_name, var tag_files, boolean exact_match, boolean case_sensitive)

Parameters	Description

tag_name	Tag name to check if it is a package or package prefix.

tag_files	List of tag files to search.

exact_match	Exact match or prefix match?

case_sensitive	Use case-sensitive string comparisons?

Return	true if the given tag is a package name or the prefix of a package name.  Otherwise return false.

See Also	tag_check_for_define, tag_check_for_template, tag_check_for_typedef, tag_tree_type_is_package


tag_check_for_template

boolean tag_check_for_template(_str tag_name,  _str class_name, int case_sensitive, var tag_files, _str &arguments )

Parameters	Description

tag_name	Tag name to check if it is a template class.

class_name	Name of class that tag belongs to.

case_sensitive	Use case-sensitive string comparisons?

tag_files	List of tag files to search.

arguments	(Output) If found, contains arguments to template.

Remarks	Look up tag_name and see if it is a template class.  If so, return the signature of the template in template_sig.  The current object must be an editor control or current buffer.

Return	true if a match was found and sets template_sig, 0 of none found.

See Also	tag_check_for_define, tag_check_for_package, tag_check_for_typedef


tag_check_for_typedef

boolean tag_check_for_typedef(_str tag_name, var tag_files, boolean case_sensitive)

Parameters	Description

tag_name	Tag name to check if it is a typedef.

tag_files	List of tag files to search.

case_sensitive	Use case-sensitive string comparisons?

Return	true if the given tag could be a typedef.  Otherwise return false.  This function ignore class scope.  Simply put, if 'symbol' is a typedef, anywhere, this function may return true.  Thus, it's should really be used only as an arbiter prior to attempting to match 'symbol' in context as a typedef.  The reason that this function behaves in this was is for speed and simplicity.  Otherwise, it would have to search all parent and outer class scopes, in addition to locals, context and tag files.

See Also	tag_check_for_define, tag_check_for_package, tag_check_for_template


tag_clear_context

int tag_clear_context()

Remarks	Clear all context tags.  This is normally done before updating the context, since there is no primitive for removing individual context tags.

Return	 0 on success, or <0 on error.

See Also	tag_insert_context


tag_clear_locals

int tag_clear_locals(int local_id = 0)

Parameters	Description

local_id	Local ID [ from 0 to tag_get_num_of_locals() ] of last local variable tag to retain.  This can be useful for popping all the locals from a code block off of the stack, for example.

Remarks	Clear all local variable tags.  This is normally done before updating the list of local variables, since there is no primitive for removing individual tags.

Return	 0 on success, or <0 on error.

See Also	tag_get_num_of_locals, tag_insert_local2


tag_clear_matches

int tag_clear_matches()

Remarks	Clear all tags out of the match set.

Return	 0 on success, or <0 on error.

See Also	tag_insert_match, tag_insert_match_fast


tag_close_all_db

int tag_close_all_db()

Remarks	Close all open tag databases.

Return	 0 on success, < 0 on error.

See Also	tag_close_db, tag_create_db, tag_current_db, tag_current_version, tag_flush_db, tag_open_db, tag_read_db


tag_close_db

int tag_close_db( [_str file_name [ , boolean do_not_cache=false] ] )

Parameters	Description

file_name	(optional) File path of database to close.

do_not_cache	(optional) If false, do not really close the file, instead flush the buffer if open read-write, then leave the file open read-only.

Remarks	Close the current database.

Return	0 on success, < 0 on error.

See Also	tag_close_all_db, tag_create_db, tag_current_db, tag_flush_db, tag_open_db, tag_read_db


tag_create_db

int tag_create_db(_str file_name, int db_type=VS_DBTYPE_tags)

Parameters	Description

file_name	File path where to create new database. If the file already exists, it will be truncated.

db_type	Type of database to create.  Default is VS_DBTYPE_tags to create a tag database (.vtg file).  If db_type is VS_DBTYPE_references, creates a references database (.vtr file).

Remarks	Create a database, with standard tables, index, and types.

Return	0 on success, < 0 on error.

See Also	tag_close_all_db, tag_close_db, tag_current_db, tag_flush_db, tag_open_db, tag_read_db


tag_current_context

_str tag_current_context()

Return	Return the index of the current context tag, calculated using the current buffer seek position.  Returns <0 on error or 0 if no current context.

See Also	tag_check_context, tag_get_context, tag_nearest_context


tag_current_local

_str tag_current_local()

Return	Return the index of the current local variable tag, calculated using the current buffer seek position.  Returns <0 on error or 0 if no current local variable.

See Also	tag_get_local2, tag_insert_local2


tag_current_db

_str tag_current_db()

Return	 Return the name of the database currently open.  Returns the empty string on error.

See Also	tag_close_all_db, tag_close_db, tag_create_db, tag_current_version, tag_flush_db, tag_open_db, tag_read_db


tag_current_version

int tag_current_version()

Return	Return the version of the tags database currently open.  Returns VS_TAG_USER_VERSION or higher.  If the current version is VS_TAG_LATEST_VERSION, then the tag database was created by the most recent version of tagsdb.dll installed.  The latest version of the references database is represented by the constant VS_REF_LATEST_VERSION.

See Also	tag_close_all_db, tag_close_db, tag_create_db, tag_current_db, tag_flush_db, tag_open_db, tag_read_db, tagsdb_version


tag_end_context

int tag_end_context(int context_id, int end_line_no, int end_seekpos)

Parameters	Description

context_id	Context ID [ from 1 to tag_get_num_of_context() ] of context tag to set end position of.

end_line_no	Line number where the tag ends.

end_seekpos	Line number where the tag ends.  Technically, this is the seek position of the last character in the tag.  Using a C function for example, this is the seek position of the close brace ending the function body.

Remarks	Set the end positions of the context tag with the given context ID.

Return	 0 on success, or <0 on error.

See Also	tag_get_context, tag_insert_context, tag_set_context_parents


tag_filter_type

int tag_filter_type(int type_id, int filter_flags, [, _str type_name ] )

Parameters	Description

type_id	Unique integer ID of tag  type.

filter_flags	(Output) Union of the following filtering flags.

VS_TAGFILTER_PROC	proc, func, constr, destr, trigger

VS_TAGFILTER_PROTO	proto, procproto

VS_TAGFILTER_DEFINE	define

VS_TAGFILTER_ENUM	enum, enumc

VS_TAGFILTER_GVAR	gvar

VS_TAGFILTER_TYPEDEF	typedef

VS_TAGFILTER_STRUCT	struct, class

VS_TAGFILTER_UNION	union

VS_TAGFILTER_LABEL	label

VS_TAGFILTER_INTERFACE	interface

VS_TAGFILTER_PACKAGE	package, program, library

VS_TAGFILTER_VAR	var

VS_TAGFILTER_CONSTANT	const

VS_TAGFILTER_PROPERTY	prop

VS_TAGFILTER_LVAR	lvar, param

VS_TAGFILTER_MISCELLANEOUS	Misc. + user defined tag types

VS_TAGFILTER_DATABASE	database, table, column, index

VS_TAGFILTER_GUI	form, eventtab, menu, control

VS_TAGFILTER_INCLUDE 	include

VS_TAGFILTER_SUBPROC 	nested procedure or function

Common combinations of tag filters.

VS_TAGFILTER_ANYTHING	Any tag type

VS_TAGFILTER_ANYPROC	PROC,PROTO, SUBPROC

VS_TAGFILTER_ANYDATA	VAR, LVAR, GVAR, PROPERTY

VS_TAGFILTER_ANYSTRUCT	STRUCT, UNION, INTERFACE

type_name	(Optional) Tag type name, used if type_id is unknown (0).

Return	Filter the given tag type based on the given filter flags and return 1 if the type is allowed according to the flags, 0 if not.

See Also	tag_get_type, tag_find_type, tag_next_type


tag_find_class

int tag_find_class(_str &class_name [, _str search_class_name [, boolean normalize [, boolean ignore_case ] ] ] )

Parameters	Description

class_name	(Output) Class name as stored in database.

search_class_name	(Optional) Class name to search for.

normalize	(Optional) Attempt to qualify search_class_name.

ignore_case	(Optional) case-insensitive search?

Remarks	Retrieve the name of the first class included in this tag database, or optionally, the name of a specific class, either to check if the file is in the database or to position the class iterator at a specific point.  If normalize is non-zero, then search_class_name is a simple class name and the search attempts to qualify it with its outer class name or package name, etc., before returning result.  The default search is case-sensitive.

Return	0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

See Also	tag_get_class, tag_next_class


tag_find_context

int tag_find_context(_str tag_name, boolean exact_match, boolean case_sensitive [, boolean allow_anonymous [, _str class_name ] ] )

Parameters	Description

tag_name	Tag name or prefix of tag name to search for.

exact_match	Exact match or prefix match?

case_sensitive	Use case insensitive string comparison?

allow_anonymous	(Optional) Pass through anonymous classes?

class_name	(Optional) Name of class that tag belongs to.

Remarks	Find a the first context entry with the given tag name or prefix.  Use tag_get_context to extract details about the tag.

Return	Context ID of first match or < 0 on error.

See Also	tag_get_context, tag_next_context


tag_find_closest

int tag_find_closest(_str tag_name, _str file_name, int line_no)

Parameters	Description

tag_name	Name of tag to search for.

file_name	Full path to file containing tag.

line_no	Line that tag is expected to be at.

Remarks	Retrieve tag in the given file closest to the given line number.  Use tag_get_info to extract the details about the tag.

Return	0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

See Also	tag_find_equal, tag_next_equal


tag_find_equal

int tag_find_equal(_str tag_name [, boolean case_sensitive [, int class_name] ] )

Parameters	Description

tag_name	Name of tag to search for.

case_sensitive	(optional) default search is case-insensitive.

class_name	(optional) Name of class that tag belongs to.

Remarks	Retrieve the first tag with the given tag name.  Use tag_get_info to extract the details about the tag.

Return	0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

See Also	tag_find_prefix, tag_find_tag, tag_get_detail, tag_next_equal, tag_next_prefix


tag_find_extension

int tag_find_extension(_str &extension [, _str search_for ] )

Parameters	Description

extension	(Output) File extension type found

search_for	(optional) Specific file extension to search for

Remarks	Retrieve the name of a file extension supported by this database.

Return	0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if no more.

See Also	tag_get_extension, tag_next_extension, tag_set_extension


tag_find_file

int tag_find_file(_str &file_name [, _str search_file_name ] )

Parameters	Description

file_name	(Output) File name as stored in database.

search_file_name	(Optional) File name to search for.

Remarks	Retrieve the name of the first file included in this tag database, or optionally, the name of a specific file, either to check if the file is in the database or to position the file iterator at a specific point. Files are ordered lexicographically, case-sensitive on UNIX platforms, case insensitive on DOS/OS2/Windows platforms.

Return	0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

See Also	tag_get_file, tag_find_in_file, tag_next_file


tag_find_global

int tag_find_global(int type_id, int mask, boolean non_zero)

Parameters	Description

type_id	Type id (see tag_get_type)  If (type_id<0), returns tags with any user defined tag types.

mask	Tag attribute flags set.  The intersection of  this set of flags and those for each tag found (tag_flags) will be calculated.

non_zero	Accept tag if (mask & tag_flags) is non zero?

Remarks	Retrieve the first tag included in this tag database with global scope that is one of the given type (type_id) and that matches the given tag flag mask ((mask & tag_flags) != 0) == non_zero. Use tag_get_info to extract the details about the tag.

Example	The following would be used to find the first inline global function.

tag_find_global(VS_TAGTYPE_function, VS_TAGFLAG_inline, true);

Return	0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

See Also	tag_get_type, tag_next_global


tag_find_in_class

int tag_find_in_class(_str class_name)

Parameters	Description

class_name	Class name as stored in database.

Remarks	Find the first tag belonging to the given class. Tags are returned unsorted. Use tag_get_info to extract the details about the tag.

Return	0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

See Also	tag_get_class, tag_get_detail, tag_get_info, tag_next_in_class, tag_next_class


tag_find_in_file

int tag_find_in_file(_str file_name)

Parameters	Description

file_name	File name as stored in database.

Remarks	Find the first tag in the given file. Tags are returned unsorted. Use tag_get_info to extract the details about the tag.

Return	0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

See Also	tag_get_detail, tag_get_file, tag_get_info, tag_next_in_file, tag_next_file


tag_find_include_file

int tag_find_include_file(_str file_name, _str &include_name)

Parameters	Description

file_name	File name as stored in database for source file.

include_name	(Output) full path of included file.

Remarks	Retrieve the name of the first file included by file_name.

Return	0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

See Also	tag_find_included_by, tag_set_date, tag_insert_tag, tag_next_include_file, tag_next_included_by


tag_find_included_by

int tag_find_included_by(_str file_name, _str &included_by)

Parameters	Description

file_name	File name as stored in database for include file.

included_by	(Output) full path of source file including  file_name.

Remarks	Retrieve the name of the first source file that includes file_name.

Return	0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

See Also	tag_find_include_file, tag_set_date, tag_insert_tag, tag_next_include_file, tag_next_included_by


tag_find_local

int tag_find_local(_str tag_name, boolean exact_match, boolean case_sensitive [, boolean allow_anonymous [, _str class_name ] ] )

Parameters	Description

tag_name	Tag name or prefix of tag name to search for.

exact_match	Exact match or prefix match?

case_sensitive	Use case insensitive string comparison?

allow_anonymous	(Optional) Pass through anonymous classes?

class_name	(Optional) Name of class that tag belongs to.

Remarks	Find a the first local variable with the given tag name or prefix.  Use tag_get_local2 to extract details about the tag.

Return	Local ID of first match or < 0 on error.

See Also	tag_get_local, tag_get_local2, tag_next_local


tag_find_prefix

int tag_find_prefix(_str tag_prefix [, boolean case_sensitive [, int class_name] ] )

Parameters	Description

tag_prefix	Prefix of tag to search for.

case_sensitive	(optional) default search is case-insensitive.

class_name	(optional) Name of class that tag belongs to.

Remarks	Retrieve the first tag with the given prefix.  Use tag_get_info to extract the details about the tag.

Return	0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

See Also	tag_find_prefix, tag_find_tag, tag_get_detail, tag_next_equal, tag_next_prefix


tag_find_refer_by

int tag_find_refer_by(int inst_id, int &ref_type, _str &file_name, int &line_no)

Parameters	Description

inst_id	Unique ID of tag instance.

ref_type	(Output) Type of reference, see tag_insert_reference.

file_name	(Output) File name as stored in database.

line_no	(Output) Line number that reference occurs at in file_name.

Remarks	Find the first location in which the given tag is referenced.  The tag is identified by its unique ID, see tag_match_instance.

Return	Returns instance ID (> 0) of context of reference, 0 if unknown, or < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

See Also	tag_get_instance_info, tag_match_instance, tag_next_refer_by


tag_find_refer_to

int tag_find_refer_to(int inst_id, int &ref_type, _str &file_name, int &line_no)

Parameters	Description

inst_id	Unique ID of tag instance.

ref_type	(Output) Type of reference, see tag_insert_reference.

file_name	(Output) File name as stored in database.

line_no	(Output) Line number that reference occurs at in file_name.

Remarks	Find the first tag instance referenced by the given tag instance.  The tag is identified by its unique ID, see tag_match_instance.  This is typically used with functions (caller/callee relationship) or structures and classes (container/item relationships).

Return	Returns instance ID (> 0) of tag referenced in context represented by inst_id or < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

See Also	tag_get_instance_info, tag_match_instance, tag_next_refer_to


tag_find_regex

int tag_find_regex(_str tag_regex [ , _str search_options ] )

Parameters	Description

tag_regex	Regular expression for tag to search for.

search_options	(optional) Options passed to vsStrPos() for evaluating regular expression.

Remarks	Retrieve the first tag matching the given regular expression.  Use tag_get_info to extract the details about the tag.

Return	0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

See Also	pos, tag_find_prefix, tag_find_tag, tag_get_detail, tag_next_equal, tag_next_prefix, tag_next_regex, vsStrPos


tag_find_tag

int tag_find_tag(_str tag_name, _str type_name, _str class_name [, _str arguments ] )

Parameters	Description

tag_name	Name of tag to search for.

type_name	Tag type name (see tag_get_type).

class_name	Name of class that tag belongs to.

arguments	(optional) Function parameters to attempt to match to resolve overloading.  Ignored if there are no matches.

Remarks	Retrieve first tag with the given name, type, and class (to uniquely identify a tag).  Use tag_get_info to extract the details about the tag.

Return	0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

See Also	tag_find_equal, tag_find_prefix, tag_get_detail, tag_get_info, tag_next_tag


tag_find_tag_by_id

int tag_find_tag_by_id()

Remarks	Find the tag having the given tag ID in the database.

Return	0 on success, <0 on error.

See Also	tag_insert_tag, tag_insert_simple, tag_get_tag_id


tag_find_type

int tag_find_type(_str &type_name [, _str search_type_name ] )

Parameters	Description

type_name	(Output) Tag type name as stored in database.

search_type_name	(Optional) Tag type name to search for.

Remarks	Retrieve the name of the first tag type included in this tag database, or optionally, the name of a specific tag type, either to check if it is in the database or to position the iterator at a specific point.

Return	0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

See Also	tag_get_type, tag_next_type


tag_flush_db

int tag_flush_db()

Remarks	Flush all unwritten data to disk for the database.

Return	 0 on success, < 0 on error.

See Also	tag_close_all_db, tag_close_db, tag_create_db, tag_current_db, tag_open_db, tag_read_db


tag_get_class

int tag_get_class(int class_id, _str &class_name)

Parameters	Description

class_id	Unique integer ID of class, from tag_get_detail.

class_name	(Output) Class name as stored in database.

Remarks	Retrieve the name of the class with the given class ID.

Return	0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

See Also	tag_get_detail, tag_find_class, tag_next_class


tag_get_context

int tag_get_context(int context_id, _str &tag_name, _str &tag_type, _str &file_name, int &start_line_no, int &start_seekpos, int &scope_line_no, int &scope_seekpos, int &end_line_no, int &end_seekpos, _str &class_name, int &tag_flags, _str &arguments, _str &return_type)

Parameters	Description

context_id	Context ID [ from 1 to tag_get_num_of_context() ] of context tag to retrieve information about.

tag_name	(Output) Name of context tag (symbol).

tag_type	(Output) Tag type name, see tag_get_type.

file_name	(Output) File path of source file the tag is located in.

start_line_no	(Output) Line number where the tag begins in file_name.

start_seekpos	(Output) Seek position where the tag begins in file_name.

scope_line_no	(Output) Line number where the scope of the tag begins in file_name.  For example, this is the line on which opening brace is found in a C function.  For tags where scope is not applicable, simply the same value as start_line_no.

scope_seekpos	(Output) Seek position where the scope of the tag begins in file_name.  See explanation above.

end_line_no	(Output) Line number where the tag ends in file_name.

end_seekpos	(Output) Line number where the tag ends in file_name.  Technically, this is the seek position of the last character in the tag.  Using a C function for example, this is the seek position of the close brace ending the function body.

class_name	(Output) Name of class or package or other container that the tag belongs to.  See VS_TAGSEPARATOR_class and VS_TAGSEPARATOR_package for more details about constructing this value.  If the tag is not in a class scope, simple pass the empty string for this value.

tag_flags	(Output) Set of tag attribute flags.  See tag_insert_simple for more information about the tag flags.

arguments	(Output) Tag arguments, such as for a function, macro, or parameterized class.

return_type	(Output) Return type and/or value of symbol or constant.  See VS_TAGSEPARATOR_equals for more details.

Remarks	Retrieve information about the given context tag.  Though this function is highly optimized, it is often more efficient to use tag_get_detail2 to retrieve only specific information about a context tag rather than everything.

Return	 0 on success, or <0 on error.

See Also	tag_clear_context, tag_current_context, tag_find_context, tag_get_detail2, tag_get_num_of_context, tag_next_context


tag_get_date

int tag_get_date(_str file_name, _str &modify_date)

Parameters	Description

file_name	File path of source file to retrieve tagging date for.

modify_date	(Output) Modification date of file when tagged.  Format is YYYYMMDDHHMMSSmmm (year, month, day, hour, minute, second, ms).

Remarks	Retrieve the date of tagging for the given file.  The string returned by this function is structured such that consecutive dates are ordered lexicographically, and is reported in local time coordinates (YYYYMMDDHHMMSSmmm).  This function has the side effect of positioning the file iterator on the given file name.

Return	0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if the file is not found.

See Also	tag_get_file, tag_find_file, tag_next_file, tag_set_date


tag_get_db_comment

_str tag_get_db_comment()

Return	Return the description or title for the current database or the empty string on error.

See Also	tag_set_db_comment


tag_get_detail

void tag_get_detail(int tag_detail,  var result)

Parameters	Description

tag_detail	ID of detail to extract, one of:

VS_TAGDETAIL_name 	(string) tag name

VS_TAGDETAIL_type	(string) tag type name, see tag_get_type.

VS_TAGDETAIL_type_id	(int) unique id for tag type.

VS_TAGDETAIL_file_name	(string) full path of file the tag is in

VS_TAGDETAIL_file_date	(string) date of file when tagged

VS_TAGDETAIL_file_line	(int) line number of tag within file

VS_TAGDETAIL_file_id 	(int) unique id for file the tag is located in

VS_TAGDETAIL_class_simple	(string) name of class the tag is present in

VS_TAGDETAIL_class_name	(string) name of class with outer classes

VS_TAGDETAIL_class_package	(string) package/namespace tag belongs to

VS_TAGDETAIL_class_id	(int) unique id for class tag belongs to

VS_TAGDETAIL_flags	(int) tag flags, see tag_insert_simple

VS_TAGDETAIL_return	(string) value or type of var/function

VS_TAGDETAIL_arguments	(string) function or template arguments

VS_TAGDETAIL_tagseekloc	(int) PRIVATE

VS_TAGDETAIL_fileseekloc	(int) PRIVATE

VS_TAGDETAIL_classseekloc	(int) PRIVATE

VS_TAGDETAIL_num_tags	(int) number of tags in database

VS_TAGDETAIL_num_classes	(int) number of classes in database

VS_TAGDETAIL_num_files	(int) number of files in database

VS_TAGDETAIL_num_types	(int) number of types in database

VS_TAGDETAIL_num_refs	(int) number of references in database

VS_TAGDETAIL_throws	(string) function/proc exceptions.

VS_TAGDETAIL_included_by	(string) file including this macro.

VS_TAGDETAIL_return_only	(string) just the return type of variable.

VS_TAGDETAIL_return_value	(string) default value of variable.

result	(Output) Set to tag detail after successful completion of function.  If the current tag is not defined, this will be set to either '' or 0, depending on if the detail is a string or numeric.

Remarks	Retrieve specific information about the current tag (as defined by calls to tag_find_equal, tag_find_prefix, tag_find_in_file, tag_find_in_class, etc.).  This function complements tag_get_info, or can be used in its place for efficiency when only very specific information is needed.

See Also	tag_get_detail2, tag_get_info, tag_find_equal, tag_find_in_class, tag_find_in_file, tag_find_prefix, tag_next_equal, tag_next_in_class, tag_next_in_file, tag_next_prefix


tag_get_detail2

void tag_get_detail2(int tag_detail,  int context_id, var result)

Parameters	Description

tag_detail	ID of detail to extract, one of:

VS_TAGDETAIL_context_tag_file	(string) tag file match is from.

VS_TAGDETAIL_context_name	(string) tag name.

VS_TAGDETAIL_context_type	(string) tag type name.

VS_TAGDETAIL_context_file	(string) file that the tag is in.

VS_TAGDETAIL_context_line	(int) start line number of tag.

VS_TAGDETAIL_context_start_linenum	(int) same as *_line, above.

VS_TAGDETAIL_context_start_seekpos	(int) seek position tag starts at

VS_TAGDETAIL_context_scope_linenum	(int) line number body starts at.

VS_TAGDETAIL_context_scope_seekpos	(int) seek position body starts at.

VS_TAGDETAIL_context_end_linenum	(int) line number tag ends on.

VS_TAGDETAIL_context_end_seekpos	(int) seek position tag ends at.

VS_TAGDETAIL_context_class     	(string) name of class.

VS_TAGDETAIL_context_flags        	(int) tag attribute flags.

VS_TAGDETAIL_context_args          	(string) tag arguments.

VS_TAGDETAIL_context_return   	(string) value or type of symbol.

VS_TAGDETAIL_context_outer         	(int) ID of first enclosing tag.

VS_TAGDETAIL_context_parents      	(string) class derivation.

VS_TAGDETAIL_context_throws      	(string) function/proc exceptions.

VS_TAGDETAIL_context_included_by	(string) file including this macro.

VS_TAGDETAIL_context_return_only	(string) just the type of variable.

VS_TAGDETAIL_context_return_value	(string) default value of variable.

VS_TAGDETAIL_local_tag_file      	(string) tag file match is from.

VS_TAGDETAIL_local_name          	(string) tag name.

VS_TAGDETAIL_local_type	(string) tag type name.

VS_TAGDETAIL_local_file          	(string) file that the tag is in.

VS_TAGDETAIL_local_line         	(int) start line number of tag.

VS_TAGDETAIL_local_start_linenum	(int) same as *_line, above.

VS_TAGDETAIL_local_start_seekpos	(int) seek position tag starts at

VS_TAGDETAIL_local_scope_linenum	(int) line number body starts at.

VS_TAGDETAIL_local_scope_seekpos	(int) seek position body starts at.

VS_TAGDETAIL_local_end_linenum	(int) line number tag ends on.

VS_TAGDETAIL_local_end_seekpos	(int) seek position tag ends at.

VS_TAGDETAIL_local_class     	(string) name of class.

VS_TAGDETAIL_local_flags        	(int) tag attribute flags.

VS_TAGDETAIL_local_args          	(string) tag arguments.

VS_TAGDETAIL_local_return   	(string) value or type of symbol.

VS_TAGDETAIL_local_outer         	(int) ID of first enclosing tag.

VS_TAGDETAIL_local_parents      	(string) class derivation.

VS_TAGDETAIL_local_throws      	(string) function/proc exceptions.

VS_TAGDETAIL_local_included_by	(string) file including this macro.

VS_TAGDETAIL_local_return_only	(string) just the type of variable.

VS_TAGDETAIL_local_return_value	(string) default value of variable.

VS_TAGDETAIL_match_tag_file      	(string) tag file match is from.

VS_TAGDETAIL_match_name          	(string) tag name.

VS_TAGDETAIL_match_type	(string) tag type name.

VS_TAGDETAIL_match_file          	(string) file that the tag is in.

VS_TAGDETAIL_match_line         	(int) start line number of tag.

VS_TAGDETAIL_match_start_linenum	(int) same as *_line, above.

VS_TAGDETAIL_match_start_seekpos	(int) seek position tag starts at

VS_TAGDETAIL_match_scope_linenum	(int) line number body starts at.

VS_TAGDETAIL_match_scope_seekpos	(int) seek position body starts at.

VS_TAGDETAIL_match_end_linenum	(int) line number tag ends on.

VS_TAGDETAIL_match_end_seekpos	(int) seek position tag ends at.

VS_TAGDETAIL_match_class     	(string) name of class.

VS_TAGDETAIL_match_flags        	(int) tag attribute flags.

VS_TAGDETAIL_match_args          	(string) tag arguments.

VS_TAGDETAIL_match_return	   	(string) value or type of symbol.

VS_TAGDETAIL_match_outer         	(int) ID of first enclosing tag.

VS_TAGDETAIL_match_parents      	(string) class derivation.

VS_TAGDETAIL_match_throws      	(string) function/proc exceptions.

VS_TAGDETAIL_match_included_by	(string) file including this macro.

VS_TAGDETAIL_match_return_only	(string) just the type of variable.

VS_TAGDETAIL_match_return_value	(string) default value of variable.

local_or_context_id	ID of local, context, or match tag to get information about, ignored if the detail is one of the details described in tag_get_detail.

result	(Output) Set to tag detail after successful completion of function.  If the given tag does not exist, this will be set to either '' or 0, depending on if the detail is a string or numeric.

Remarks	Retrieve specific information about the given context, local, or match tag (as defined by calls to tag_find_context, tag_find_local, tag_find_prefix, etc.).  This function complements tag_get_context, tag_get_info, tag_get_local, or tag_get_match or can be used in its place for efficiency when only very specific information is needed.

See Also	tag_get_detail, tag_get_info, tag_find_context, tag_find_equal, tag_find_local, tag_find_prefix, tag_next_context, tag_next_equal, tag_next_local


tag_get_extension

int tag_get_extension(_str file_name, _str &extension)

Parameters	Description

file_name	File path of source file to retrieve extension property for.

extension	(Output) File extension property for file_name.

Remarks	Retrieves the extension type for the given filename.  This corresponds to the p_extension property of file_name, not necessarily the literal extension of file_name.

Return	0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if the file is not found.

See Also	tag_get_file, tag_find_file, tag_next_file, tag_set_extension


tag_get_file

int tag_get_file(int file_id, _str &file_name)

Parameters	Description

file_id	Unique integer ID of file, from tag_get_detail.

file_name	(Output) File name as stored in database.

Remarks	Retrieve the name of the file with the given file ID.

Return	0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

See Also	tag_get_detail, tag_find_file, tag_next_file, tag_set_date


tag_get_info

void tag_get_info(_str &tag_name, _str &type_name, _str &file_name, int &line_no, _str &class_name, int &tag_flags)

Parameters	Description

tag_name	(Output) Name of tag or symbol

type_name	(Output) Tag type name, see tag_get_type.

file_name	(Output) File name as stored in database.

line_no	(Output) Line number that tag occurs on in file_name.

class_name	(Output) Name of class that tag belongs to.

tag_flags	(Output) Tag flags indicating symbol attributes, see tag_insert_simple for details.

Remarks	Retrieve general information about the current tag (as defined by calls to tag_find_equal, tag_find_prefix, tag_find_in_file, tag_find_in_class, etc.).  If the current tag is not defined, such as immediately after opening a database or a failed search), all strings will be set to '', and line_no and tag_flags will be set to 0.

See Also	tag_get_detail, tag_find_equal, tag_find_in_class, tag_find_in_file, tag_find_prefix, tag_next_equal, tag_next_in_class, tag_next_in_file, tag_next_prefix


tag_get_inheritance

int tag_get_inheritance(_str class_name, _str &parents)

Parameters	Description

class_name	Qualified name of class or interface to update inheritance information for.  See VS_TAGSEPARATOR_class and VS_TAGSEPARATOR_package for details on constructing this string.

parents	Delimited list of immediate class ancestors. See VS_TAGSEPARATOR_parents for more details on decomposing this string.

Remarks	Retrieve the set of parent classes for a given class.  This function has the side effect of positioning the class iterator on the given class.

Return	0 on success, < 0 on error. Returns BT_RECORD_NOT_FOUND_RC if class_name is not in the database.


tag_get_instance_info

void tag_get_instance_info(int inst_id, _str &inst_name, _str &inst_type, int &inst_flags, _str &inst_class, _str &inst_args, _str &file_name, int &line_no)

Parameters	Description

inst_id	Unique ID of tag instance.

inst_name	(Output) Name of tag or symbol

inst_type	(Output) Tag type name, see tag_get_type.

inst_flags	(Output) Instance flags indicating symbol attributes, see tag_insert_instance for details.

inst_class	(Output) Name of class that tag belongs to.

inst_args	(Output) Arguments associated with tag (e.g. function arguments).

file_name	(Output) File name as stored in database.

line_no	(Output) Line number that tag occurs on in file_name.

Remarks	Retrieve information about the given tag instance (as defined by inst_id).

See Also	tag_find_refer_by, tag_find_refer_to, tag_insert_instance, tag_match_instance, tag_next_refer_by, tag_next_refer_to


tag_get_local

int tag_get_local(int local_id, _str &tag_name, _str &tag_type, _str &file_name, int &line_no, _str &class_name, int &tag_flags, _str &signature, _str &return_type)

Parameters	Description

local_id	Local ID [ from 1 to tag_get_num_of_locals() ] of local variable to retrieve information about.

tag_name	(Output) Name of local variable (symbol).

tag_type	(Output) Tag type name, see tag_get_type.

file_name	(Output) File path of source file the tag is located in.

line_no	(Output) Line number where the tag begins in file_name.

class_name	(Output) Name of class or package or other container that the tag belongs to.  See VS_TAGSEPARATOR_class and VS_TAGSEPARATOR_package for more details about constructing this value.  If the tag is not in a class scope, simple pass the empty string for this value.

tag_flags	(Output) Set of tag attribute flags.  See tag_insert_simple for more information about the tag flags.

arguments	(Output) Tag arguments, such as for a function, macro, or parameterized class.

return_type	(Output) Return type and/or value of symbol or constant.  See VS_TAGSEPARATOR_equals for more details.

Remarks	Retrieve information about the given local variable tag.  Though this function is highly optimized, it is often more efficient to use tag_get_detail2 to retrieve only specific information about a local variable rather than everything.

Return	 0 on success, or <0 on error.

See Also	tag_clear_locals, tag_current_local, tag_find_local, tag_get_detail2, tag_get_local2, tag_get_num_of_locals, tag_next_local


tag_get_local2

int tag_get_local2(int local_id, _str &tag_name, _str &tag_type, _str &file_name, int &start_line_no, int &start_seekpos, int &scope_line_no, int &scope_seekpos, int &end_line_no, int &end_seekpos, _str &class_name, int &tag_flags, _str &signature, _str &return_type)

Parameters	Description

local_id	Local ID [ from 1 to tag_get_num_of_locals() ] of local variable to retrieve information about.

tag_name	(Output) Name of local variable (symbol).

tag_type	(Output) Tag type name, see tag_get_type.

file_name	(Output) File path of source file the tag is located in.

start_line_no	(Output) Line number where the tag begins in file_name.

start_seekpos	(Output) Seek position where the tag begins in file_name.

scope_line_no	(Output) Line number where the scope of the tag begins in file_name.  For example, this is the line on which opening brace is found in a C function.  For tags where scope is not applicable, simply the same value as start_line_no.

scope_seekpos	(Output) Seek position where the scope of the tag begins in file_name.  See explanation above.

end_line_no	(Output) Line number where the tag ends in file_name.

end_seekpos	(Output) Line number where the tag ends in file_name.  Technically, this is the seek position of the last character in the tag.  Using a C function for example, this is the seek position of the close brace ending the function body.

class_name	(Output) Name of class or package or other container that the tag belongs to.  See VS_TAGSEPARATOR_class and VS_TAGSEPARATOR_package for more details about constructing this value.  If the tag is not in a class scope, simple pass the empty string for this value.

tag_flags	(Output) Set of tag attribute flags.  See tag_insert_simple for more information about the tag flags.

arguments	(Output) Tag arguments, such as for a function, macro, or parameterized class.

return_type	(Output) Return type and/or value of symbol or constant.  See VS_TAGSEPARATOR_equals for more details.

Remarks	Retrieve information about the given local variable tag.  Though this function is highly optimized, it is often more efficient to use tag_get_detail2 to retrieve only specific information about a local variable rather than everything.

Return	 0 on success, or <0 on error.

See Also	tag_clear_locals, tag_current_local, tag_find_local, tag_get_detail2, tag_get_num_of_locals, tag_next_local


tag_get_match

int tag_get_match(int local_id, _str &tag_file_name, _str &tag_name, _str &tag_type, _str &file_name, int &line_no, _str &class_name, int &tag_flags, _str &signature, _str &return_type)

Parameters	Description

match_id	Match ID [ from 1 to tag_get_num_of_matches() ] of tag match to retrieve information about.

tag_file_name	(Output) Full path of tag file that tag comes from, empty string if not applicable or unknown.

tag_name	(Output) Name of match (symbol).

tag_type	(Output) Tag type name, see tag_get_type.

file_name	(Output) File path of source file the tag is located in.

line_no	(Output) Line number where the tag begins in file_name.

class_name	(Output) Name of class or package or other container that the tag belongs to.  See VS_TAGSEPARATOR_class and VS_TAGSEPARATOR_package for more details about constructing this value.  If the tag is not in a class scope, simple pass the empty string for this value.

tag_flags	(Output) Set of tag attribute flags.  See tag_insert_simple for more information about the tag flags.

arguments	(Output) Tag arguments, such as for a function, macro, or parameterized class.

return_type	(Output) Return type and/or value of symbol or constant.  See VS_TAGSEPARATOR_equals for more details.

Remarks	Retrieve information about the given tag match.  Though this function is highly optimized, it is often more efficient to use tag_get_detail2 to retrieve only specific information about a match rather than everything.

Return	 0 on success, or <0 on error.

See Also	tag_clear_matches, tag_insert_match, tag_insert_match_fast, tag_get_detail2, tag_get_num_of_matches, tag_pop_matches, tag_push_matches


tag_get_num_of_context

int tag_get_num_of_context()

Return	Return the number of context tags.

See Also	tag_insert_context


tag_get_num_of_locals

int tag_get_num_of_locals()

Return	Return the number of local variable tags.

See Also	tag_insert_local2


tag_get_num_of_matches

int tag_get_num_of_matches()

Return	Return the number of tags in the match set.

See Also	tag_insert_match, tag_insert_match_fast


tag_get_tag_id

int tag_get_tag_id()

Return	Return the tag ID for the current tag.  Returns 0 if there is no tag ID (earlier database version, where tag ID is not supported), or <0 on error.

See Also	tag_insert_tag, tag_insert_simple, tag_find_tag_by_id, tag_get_detail


tag_get_type

int tag_get_type(int type_id, _str &type_name)

Parameters	Description

type_id	Unique integer ID of type, from tag_get_detail.  The standard tag types (below) are by default always inserted in the database.  Tag type ID's 30-127 are reserved for future use in Visual SlickEdit.  Tag type ID's 128-255 are for user defined tag types.

VS_TAGTYPE_proc	1/proc	procedure or command

VS_TAGTYPE_proto	2/proto	function prototype

VS_TAGTYPE_define	3/define	preprocessor macro definition

VS_TAGTYPE_typedef	4/typedef	type definition

VS_TAGTYPE_gvar	5/gvar	global variable declaration

VS_TAGTYPE_struct	6/struct	record or structure definition

VS_TAGTYPE_enumc	7/enumc	enumeration value

VS_TAGTYPE_enum	8/enum	enumerated type

VS_TAGTYPE_class	9/class	class definition

VS_TAGTYPE_union	10/union	structure / union definition

VS_TAGTYPE_label	11/label	label

VS_TAGTYPE_interface	12/interface	interface, e.g., for Java

VS_TAGTYPE_constructor  13/constr	class constructor

VS_TAGTYPE_destructor    14/destr	class destructor

VS_TAGTYPE_package	15/package	package / module / namespace

VS_TAGTYPE_var	16/var	member of a struct or package

VS_TAGTYPE_lvar	17/lvar	local variable declaration

VS_TAGTYPE_constant	18/const	Pascal constant

VS_TAGTYPE_function	19/func	function

VS_TAGTYPE_property	20/prop	property?

VS_TAGTYPE_program	21/prog	Pascal program

VS_TAGTYPE_library	22/lib	Pascal library

VS_TAGTYPE_parameter  23/param	function parameter

VS_TAGTYPE_import	24/import	package import or using

VS_TAGTYPE_friend	25/friend	C++ friend relationship

VS_TAGTYPE_database	26/database	SQL/OO Database

VS_TAGTYPE_table	27/table	database Table

VS_TAGTYPE_column	28/column	database Column

VS_TAGTYPE_index	29/index	database index

VS_TAGTYPE_view	30/view	database view

VS_TAGTYPE_trigger	31/trigger	database trigger

VS_TAGTYPE_form	32/form	GUI Form or window

VS_TAGTYPE_menu	33/menu	GUI Menu

VS_TAGTYPE_control	34/control	GUI Control or Widget

VS_TAGTYPE_eventtab	35/eventtab	GUI Event table

VS_TAGTYPE_procproto  36/procproto	Prototype for procedure

VS_TAGTYPE_task 	37/task	Ada task object

VS_TAGTYPE_include	38/include	C++ include, COBOL copy

VS_TAGTYPE_file	38/file	COBOL file descriptor

VS_TAGTYPE_group	40/group	COBOL group variable

VS_TAGTYPE_subfunc	41/subfunc	Nested function

VS_TAGTYPE_subproc	42/subproc	Nested procedure type_name

Remarks	Retrieve the name of the tag type with the given type ID.

Return	0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

See Also	tag_get_detail, tag_find_type, tag_next_type


tag_insert_context

int tag_insert_context(int outer_context, _str tag_name, _str tag_type, _str file_name, int start_line_no, int start_seekpos, int scope_line_no, int scope_seekpos, int end_line_no, int end_seekpos, _str class_name, int tag_flags, _str signature)

Parameters	Description

outer_context	Unique ID of outer context tag, such as a class the current tag is nested inside.  If not applicable or unknown, use 0.

tag_name	Name of  tag (symbol) to add to current buffer context.

tag_type	Tag type name, see tag_get_type.

file_name	File path of source file the tag is located in (p_buf_name).

start_line_no	Line number where the tag begins in file_name.

start_seekpos	Seek position where the tag begins in file_name.

scope_line_no	Line number where the scope of the tag begins in file_name.  For example, this is the line on which opening brace is found in a C function.  For tags where scope is not applicable, simply the same value as start_line_no.

scope_seekpos	Seek position where the scope of the tag begins in file_name.  See explanation above.

end_line_no	Line number where the tag ends in file_name.

end_seekpos	Line number where the tag ends in file_name.  Technically, this is the seek position of the last character in the tag.  Using a C function for example, this is the seek position of the close brace ending the function body.

class_name	Name of class or package or other container that the tag belongs to.  See VS_TAGSEPARATOR_class and VS_TAGSEPARATOR_package for more details about constructing this value.  If the tag is not in a class scope, simple pass the empty string for this value.

tag_flags	Set of tag attribute flags.  See tag_insert_simple for more information about the tag flags.

signature	Tag signature, includes type, value, and arguments for the symbol being inserted.  See VS_TAGSEPARATOR_args and VS_TAGSEPARATOR_equals for more details about constructing this value.

Remarks	Add a tag and its context information to the context list, which is the list of tags found in the current buffer.  The context for the current tag includes all tag information,  as well as the ending line number and begin/scope/end seek positions in the file.  If unknown, the end line number/seek position may be deferred, see tag_end_context.

Return	 Returns sequence number (context id) of tag context on success, or <0 on error.

See Also	tag_clear_context, tag_current_context, tag_end_context, tag_find_context, tag_get_context, tag_get_detail2, tag_get_num_of_context, tag_insert_local, tag_insert_match, tag_insert_tag, tag_next_context, tag_set_context_parents


tag_insert_file_end

int tag_insert_file_end()

Remarks	Clean up after inserting a series of tags from a single file for update.  Doing this allows the tag database engine to remove any tags from the database that are no longer valid.

Return	 0 on success, < 0 on error.

See Also	tag_insert_file_start, tag_insert_instance, tag_insert_reference, tag_insert_simple, tag_insert_tag, tag_remove_from_file, tag_transfer_context


tag_insert_file_start

int tag_insert_file_start(_str file_name)

Parameters	Description

file_name	File path of source file to begin updating.

Remarks	Set up for inserting a series of tags from a single file for update.  Doing this allows the tag database engine to detect and efficiently handle updates, even if there are duplicate tags.

Return	 0 on success, < 0 on error.

See Also	tag_insert_file_end, tag_insert_instance, tag_insert_reference, tag_insert_simple, tag_insert_tag, tag_remove_from_file, tag_transfer_context


tag_insert_instance

int tag_insert_instance(_str inst_name, _str inst_type, int inst_flags, _str inst_class, _str inst_args, _str file_name, int line_no)

Parameters	Description

inst_name	Name of  tag (symbol) to add to database

inst_type	Tag instance type, see tag_get_type for a list of all standard tag types.

inst_flags	Set of the following instance attribute flags, as applicable.

VS_INSTFLAG_virtual	virtual function (instance)

VS_INSTFLAG_static	static method / member (class)

VS_INSTFLAG_const	C++ const method

VS_INSTFLAG_volatile	C/C++ volatile method

inst_class	Name of class or package or other container that the tag belongs to.  See VS_TAGSEPARATOR_class and VS_TAGSEPARATOR_package for more details about constructing this value.  If the tag is not in a class scope, simple pass the empty string for this value.

inst_args	Arguments associated with tag (e.g. function arguments).

file_name	Name of file where tag instance is located.

line_no	Line number where the tag begins in file_name.  Use 0 to represent an unknown line number.

Remarks	Insert the given tag instance into a references database. If an exact match already exists in the database, then just return the existing ID.  This function is comparable to tag_insert_simple and tag_insert_tag, except that it is specifically tuned for references database.  The most specific difference is the fact that this function returns a unique ID for the instance which is stored in the database as a key, which is not needed for tag databases.  However in a references database, this key is required in order to efficiently index and store huge cross references databases.

Example	The following example illustrates tagging references.

static void foo(int a) {

    printf("a=%d\n",a);

    bar(a+1);

}

static void bar(int ap1) {

     if (a>1000) return;

     foo(a*2);

}

int main(int argc, char *argv[]) {

     foo( 0 );

     return 0;

}

For the C code fragment above, tag_insert_instance and tag_insert_reference would be invoked as follows in order to create a references database.

tag_insert_instance(

"foo", "func", VS_INSTFLAG_static,

"", "int a", "/home/vslick/docs/testrefs.c", 1);   // returns 1

tag_insert_instance(

"bar", "func", VS_INSTFLAG_static,

"", "int ap1", "/home/vslick/docs/testrefs.c", 5);  // returns 2

tag_insert_instance(

"main", "func", 0,

"", "int argc, char*argv[]",

"/home/vslick/docs/testrefs.c", 9);  // returns 3

tag_insert_instance(

"printf", "func", 0,

"", "const char*, . . . "/usr/include/stdio.h", 312);  // returns 4

tag_insert_reference(

4, 1, "/home/vslick/docs/testrefs.c",

VS_REFTYPE_call, "/home/vslick/docs/testrefs.c", 2);

tag_insert_reference(

2, 1, "/home/vslick/docs/testrefs.c",

VS_REFTYPE_call, "/home/vslick/docs/testrefs.c", 3);

tag_insert_reference(

1, 2, "/home/vslick/docs/testrefs.c",

VS_REFTYPE_call, "/home/vslick/docs/testrefs.c", 7);

tag_insert_reference(

1, 3, "/home/vslick/docs/testrefs.c",

VS_REFTYPE_call, "/home/vslick/docs/testrefs.c", 10);

Return	 Tag instance ID (> 0) on success, < 0 on error.

See Also	tag_insert_file_end, tag_insert_file_start, tag_insert_reference, tag_insert_tag


tag_insert_local

int tag_insert_local(_str tag_name, _str tag_type, _str file_name, int line_no, _str class_name, int tag_flags, _str signature)

Parameters	Description

tag_name	Name of  tag (symbol) to add to current buffer context.

tag_type	Tag type name, see tag_get_type.

file_name	File path of source file the tag is located in (p_buf_name).

line_no	Line number where the tag begins in file_name.

class_name	Name of class or package or other container that the tag belongs to.  See VS_TAGSEPARATOR_class and VS_TAGSEPARATOR_package for more details about constructing this value.  If the tag is not in a class scope, simple pass the empty string for this value.

tag_flags	Set of tag attribute flags.  See tag_insert_simple for more information about the tag flags.

signature	Tag signature, includes type, value, and arguments for the symbol being inserted.  See VS_TAGSEPARATOR_args and VS_TAGSEPARATOR_equals for more details about constructing this value.

Remarks	Add a tag and its context information to the local variables list, which is the list of tags found in the current function or procedure, accounting for scope and the current cursor position.  This function is deprecated, use tag_insert_local2 instead.

Return	 Returns sequence number (local id) of local tag on success, or <0 on error.

See Also	tag_clear_locals, tag_current_local, tag_find_local, tag_get_local, tag_get_detail2, tag_get_num_of_locals, tag_insert_context, tag_insert_local2, tag_insert_match, tag_insert_tag, tag_next_local, tag_set_local_parents


tag_insert_local2

int tag_insert_local2(_str tag_name, _str tag_type, _str file_name, int start_line_no, int start_seekpos, int scope_line_no, int scope_seekpos, int end_line_no, int end_seekpos, _str class_name, int tag_flags, _str signature)

Parameters	Description

tag_name	Name of  tag (symbol) to add to current buffer context.

tag_type	Tag type name, see tag_get_type.

file_name	File path of source file the tag is located in (p_buf_name).

start_line_no	Line number where the tag begins in file_name.

start_seekpos	Seek position where the tag begins in file_name.

scope_line_no	Line number where the scope of the tag begins in file_name.  For example, this is the line on which opening brace is found in a C function.  For tags where scope is not applicable, simply the same value as start_line_no.

scope_seekpos	Seek position where the scope of the tag begins in file_name.  See explanation above.

end_line_no	Line number where the tag ends in file_name.

end_seekpos	Line number where the tag ends in file_name.  Technically, this is the seek position of the last character in the tag.  Using a C function for example, this is the seek position of the close brace ending the function body.

class_name	Name of class or package or other container that the tag belongs to.  See VS_TAGSEPARATOR_class and VS_TAGSEPARATOR_package for more details about constructing this value.  If the tag is not in a class scope, simple pass the empty string for this value.

tag_flags	Set of tag attribute flags.  See tag_insert_simple for more information about the tag flags.

signature	Tag signature, includes type, value, and arguments for the symbol being inserted.  See VS_TAGSEPARATOR_args and VS_TAGSEPARATOR_equals for more details about constructing this value.

Remarks	Add a tag and its context information to the local variables list, which is the list of tags found in the current function or procedure, accounting for scope and the current cursor position.  The context for the current tag includes all tag information,  as well as the ending line number and begin/scope/end seek positions in the file.

Return	 Returns sequence number (local id) of local tag on success, or <0 on error.

See Also	tag_clear_locals, tag_current_local, tag_find_local, tag_get_local, tag_get_detail2, tag_get_num_of_locals, tag_insert_context, tag_insert_local, tag_insert_match, tag_insert_tag, tag_next_local, tag_set_local_parents


tag_insert_match

int tag_insert_match(_str tag_file_name, _str tag_name, _str tag_type, _str file_name, int line_no, _str class_name, int tag_flags, _str signature)

Parameters	Description

tag_file_name	Full path of tag file that tag comes from, empty string if not applicable or unknown.

tag_name	Name of  tag (symbol) to add to match set.

tag_type	Tag type name, see tag_get_type.

file_name	File path of source file the tag is located in (p_buf_name).

line_no	Line number where the tag begins in file_name.

class_name	Name of class or package or other container that the tag belongs to.  See VS_TAGSEPARATOR_class and VS_TAGSEPARATOR_package for more details about constructing this value.  If the tag is not in a class scope, simple pass the empty string for this value.

tag_flags	Set of tag attribute flags.  See tag_insert_simple for more information about the tag flags.

signature	Tag signature, includes type, value, and arguments for the symbol being inserted.  See VS_TAGSEPARATOR_args and VS_TAGSEPARATOR_equals for more details about constructing this value.

Remarks	Add a tag to the match set.  The tag database allows you to maintain a list of tags very efficiently through the match set.  This is useful when searching for specific tags.  Many of the context tagging functions are designed to insert directly into the match set.

Return	 Returns sequence number (match id) of match tag on success, or <0 on error.

See Also	tag_clear_matches, tag_get_match, tag_get_detail2, tag_get_num_of_matches, tag_insert_context, tag_insert_local2, tag_insert_match2, tag_insert_match_fast, tag_insert_tag, tag_list_any_symbols, tag_list_class_context, tag_list_class_locals, tag_list_class_tags, tag_list_context_globals, tag_list_context_packages, tag_list_globals_of_type, tag_list_in_file


tag_insert_match2

int tag_insert_match2(_str tag_file_name, _str tag_name, _str tag_type, _str file_name, int start_line_no, int start_seekpos, int scope_line_no, int scope_seekpos, int end_line_no, int end_seekpos, _str class_name, int tag_flags, _str signature)

Parameters	Description

tag_file_name	Full path of tag file that tag comes from, empty string if not applicable or unknown.

tag_name	Name of  tag (symbol) to add to current buffer context.

tag_type	Tag type name, see tag_get_type.

file_name	File path of source file the tag is located in (p_buf_name).

start_line_no	Line number where the tag begins in file_name.

start_seekpos	Seek position where the tag begins in file_name.

scope_line_no	Line number where the scope of the tag begins in file_name.  For example, this is the line on which opening brace is found in a C function.  For tags where scope is not applicable, simply the same value as start_line_no.

scope_seekpos	Seek position where the scope of the tag begins in file_name.  See explanation above.

end_line_no	Line number where the tag ends in file_name.

end_seekpos	Line number where the tag ends in file_name.  Technically, this is the seek position of the last character in the tag.  Using a C function for example, this is the seek position of the close brace ending the function body.

class_name	Name of class or package or other container that the tag belongs to.  See VS_TAGSEPARATOR_class and VS_TAGSEPARATOR_package for more details about constructing this value.  If the tag is not in a class scope, simple pass the empty string for this value.

tag_flags	Set of tag attribute flags.  See tag_insert_simple for more information about the tag flags.

signature	Tag signature, includes type, value, and arguments for the symbol being inserted.  See VS_TAGSEPARATOR_args and VS_TAGSEPARATOR_equals for more details about constructing this value.

Remarks	Add a tag to the match set.  The tag database allows you to maintain a list of tags very efficiently through the match set.  This is useful when searching for specific tags.  Many of the context tagging functions are designed to insert directly into the match set.

Return	 Returns sequence number (match id) of match tag on success, or <0 on error.

See Also	tag_clear_matches, tag_get_match, tag_get_detail2, tag_get_num_of_matches, tag_insert_context, tag_insert_local2, tag_insert_match, tag_insert_match_fast, tag_insert_tag, tag_list_any_symbols, tag_list_class_context, tag_list_class_locals, tag_list_class_tags, tag_list_context_globals, tag_list_context_packages, tag_list_globals_of_type, tag_list_in_file


tag_insert_match_fast

int tag_insert_match_fast(int  match_type, int local_or_context_id )

Parameters	Description

match_type	Specifies where the tag to insert comes from:

VS_TAGMATCH_tag	current tag from database

VS_TAGMATCH_context	item in current context (buffer)

VS_TAGMATCH_local  	item in local variable set (function)

VS_TAGMATCH_match  	item in match set

local_or_context_id	0 if inserting current tag from database, otherwise, specifies the unique integer ID of the item from the context, locals, or match set, as specified by match_type.

Remarks	Add a tag to the match set.  The tag database allows you to maintain a list of tags very efficiently through the match set.  This is useful when searching for specific tags.  Many of the context tagging functions are designed to insert directly into the match set and use this function to do so for efficiency.

Return	Returns sequence number (match id) of match tag on success, or <0 on error.

See Also	tag_clear_matches, tag_get_match, tag_get_detail2, tag_get_num_of_matches, tag_insert_context, tag_insert_local2, tag_insert_match, tag_insert_tag, tag_list_any_symbols, tag_list_class_context, tag_list_class_locals, tag_list_class_tags, tag_list_context_globals, tag_list_context_packages, tag_list_globals_of_type, tag_list_in_file


tag_insert_reference

int tag_insert_reference(int ref_to_id, int ref_by_id, _str ref_file_name, int ref_type, _str file_name, int line_no)

Parameters	Description

ref_to_id	Unique ID of tag referenced from tag_insert_instance or tag_match_instance.

ref_by_id	Unique ID of the context (where the reference occurred) of  from tag_insert_instance or tag_match_instance.  Use 0 to represent the global context or if the context is unknown.

ref_file_name	Name of references (browse database or object) file.

ref_type	Type of reference.

VS_REFTYPE_unknown	unspecified type of reference

VS_REFTYPE_macro	use of #define'd macro

VS_REFTYPE_call	function or procedure call

VS_REFTYPE_var	use of a variable

VS_REFTYPE_import	use/import of a package

VS_REFTYPE_derive	class derivation

VS_REFTYPE_type	use of abstract type

VS_REFTYPE_class	instantiation of class

VS_REFTYPE_constant	use of constant value or enum value

VS_REFTYPE_label	use of label for goto

file_name	Name of file where reference occurs.

line_no	Line number where the reference begins in file_name.  Use 0 to represent an unknown line number.

Remarks	Add a tag reference located in the given file name and line number representing that the tag instance (ref_to_id) used within the context (ref_by_id), also a tag instance.  See tag_insert_instance for an example showing how this function is used.

Return	 0 on success, < 0 on error.

See Also	tag_insert_file_end, tag_insert_file_start, tag_insert_instance, tag_insert_tag


tag_insert_simple

int tag_insert_simple(_str tag_name, int type_id, _str file_name, int line_no,  _str class_name, int tag_flags, _str signature)

Parameters	Description

tag_name	Name of  tag (symbol) to add to database

type_id	Integer tag type ID, see tag_get_type for a list of all standard tag types.

file_name	File path of source file the tag is located in.

line_no	Line number where the tag begins in file_name.  Use 0 to represent an unknown line number.

class_name	Name of class or package or other container that the tag belongs to.  See VS_TAGSEPARATOR_class and VS_TAGSEPARATOR_package for more details about constructing this value.  If the tag is not in a class scope, simple pass the empty string for this value.

tag_flags	Set of the following tag attribute flags, as applicable.

VS_TAGFLAG_virtual	virtual function (instance)

VS_TAGFLAG_static	static method / member (class)

VS_TAGFLAG_access	public/protected/private/package

VS_TAGFLAG_public	test equality with (flags & access)

VS_TAGFLAG_protected	protected access

VS_TAGFLAG_private	private access

VS_TAGFLAG_package	Java package access

VS_TAGFLAG_const	C++ const method

VS_TAGFLAG_final	Java final method or member

VS_TAGFLAG_abstract	abstract/deferred method

VS_TAGFLAG_inline	inline / out-of-line method

VS_TAGFLAG_operator	overloaded operator

VS_TAGFLAG_constructor	class constructor

VS_TAGFLAG_volatile	volatile method

VS_TAGFLAG_template	template class

VS_TAGFLAG_inclass	part of class interface?

VS_TAGFLAG_destructor	class destructor

VS_TAGFLAG_const_destr	class constructor or destructor

VS_TAGFLAG_synchronized	synchronized (thread safe)

VS_TAGFLAG_transient	transient / persistent data

VS_TAGFLAG_native	Java native method

VS_TAGFLAG_macro	Tag was part of macro expansion

VS_TAGFLAG_extern	"extern" C prototype (not local)

VS_TAGFLAG_maybe_var	Proto may be a var.  Anonymous union.

VS_TAGFLAG_anonymous	Anonymous structure or class

VS_TAGFLAG_mutable	mutable C++ class member

VS_TAGFLAG_extern_macro	external macro (COBOL copy file)

signature	Tag signature, includes type, value, and arguments for the symbol being inserted.  See VS_TAGSEPARATOR_args and VS_TAGSEPARATOR_equals for more details about constructing this value.

Remarks	Insert the given tag into the database.

Example	The following example illustrates tagging some sample Java source code.

package java.lang;

/**

 * This interface imposes a total ordering on the objects of each class that

 * implements it.  This ordering is referred to as the class's <i>natural

 * ordering</i>, and the class's <tt>compareTo</tt> method is referred to as

 * its <i>natural comparison method</i>.<p>

 */

 public interface Comparable {

        public int compareTo(Object o);

}

For the Java code fragment above, tag_insert_simple would be invoked as follows in order to insert tags into the database.

tag_insert_simple(

"java.lang", VS_TAGTYPE_package,

"/usr/jdk1.2/src/java/lang/Comparable.java", 1,

"", 0, "");

tag_insert_simple(

"Comparable", VS_TAGTYPE_interface,

"/usr/jdk1.2/src/java/lang/Comparable.java", 8,

"java.lang", VS_TAGFLAG_inclass, "");

tag_insert_simple(

"compareTo", VS_TAGTYPE_proto,

"/usr/jdk1.2/src/java/lang/Comparable.java", 9,

"java.lang/Comparable", VS_TAGFLAG_inclass,

"int\1Object o");

Note that that tag flags denote access restrictions and other attributes of  class members (proc's, proto's, and var's).  Certain combinations of tag flags are not sensible, others have special meanings.  NOT virtual and NOT static implies normal class method.  NOT protected and NOT private implies public access.  BOTH protected and private implies package access.  NOT const implies normal read/write access.  NOT volatile implies normal optimizations are safe.  NOT template implies normal class definition.

Members of an anonymous union have the maybe_var tag flag which in C and C++ implies special rules need to be followed when determining the variable's visibility for context tagging.  For prototypes, the maybe_var flag is set when it is ambiguous whether a tag is a variable declaration (using a class constructor) or a function prototype.

Members of a class, struct, package, etc. should have the VS_TAGFLAG_inclass flag set if the member is declared within the scope of the class, etc.  If a class member does not have this flag, it indicates that it is being defined outside of the class definition.  This situation arises in languages such as C++ where a method prototype appears inside the class definition, but the actual function (definition) is outside the class definition.  Distinguishing what is in the class from other tags makes it easy to find the tags belonging to a class without appearing to list duplicates for definitions and declarations.

Return	 0 on success, < 0 on error.

See Also	tag_insert_file_end, tag_insert_file_start, tag_insert_tag


tag_insert_tag

int tag_insert_tag(_str tag_name, _str tag_type, _str file_name, int line_no,  _str class_name, int tag_flags, _str signature)

Parameters	Description

tag_name	Name of  tag (symbol) to add to database

tag_type	Tag type, see tag_get_type for a list of all standard tag types.  Generally the tag type is a single word, all lowercase.  If the string given is not a standard type, a new user defined type will be inserted into the database.

file_name	File path of source file the tag is located in.  See VS_TAGSEPARATOR_file for more details about constructing this value.

line_no	Line number where the tag begins in file_name.  Use 0 to represent an unknown line number.

class_name	Name of class or package or other container that the tag belongs to.  See VS_TAGSEPARATOR_class and VS_TAGSEPARATOR_package for more details about constructing this value.  If the tag is not in a class scope, simple pass the empty string for this value.

tag_flags	Set of tag attribute flags.  See tag_insert_simple for more information about the tag flags.

signature	Tag signature, includes type, value, and arguments for the symbol being inserted.  See VS_TAGSEPARATOR_args and VS_TAGSEPARATOR_equals for more details about constructing this value.

Remarks	Insert the given tag with accompanying information into the database.  The only difference between this function and tag_insert_simple is that in this function, tag_type is a string, allowing you to insert tags with user defined tag types.

Return	 0 on success, < 0 on error.

See Also	tag_insert_file_end, tag_insert_file_start, tag_insert_simple


tag_is_parent_class

boolean tag_is_parent_class(_str parent_class_name, _str child_class_name, var tag_files, int case_sensitive, boolean normalize )

Parameters	Description

parent_class_name	Class to check if it is a parent (base class).

child_class_name	Class to check if it is derived from parent.

tag_files	List of tag files to search.

case_sensitive	Use case-sensitive string comparisons?

normalize	Attempt to normalize class name or take as-is?

Return	Determine if parent_class_name is a parent of child_class_name, that is, does the given child class derive either directly or transitively from the parent class.  Returns true if the child class derives from the parent class, otherwise false.

See Also	tag_find_class, tag_get_inheritance


tag_is_same_package

boolean tag_is_same_package(_str class_name_1, _str class_name_2, int case_sensitive )

Parameters	Description

class_name_1	First class name, qualified.

class_name_2	Second class name, qualified.

case_sensitive	Use case-sensitive string comparisons?

Return	true if two classes are in the same package scope, otherwise false.

See Also	tag_check_for_package


tag_join_class_name

_str tag_join_class_name(_str class_name, _str outer_class_name, var tag_files, int case_sensitive )

Parameters	Description

class_name	Name of inner class to join with outer class name.

outer_class_name	Name of outer class or package to join.

tag_files	List of tag files to search.

case_sensitive	Use case-sensitive string comparisons?

Return	Determine whether the class name and outer class name should be joined using a package separator or class separator and return the resulting string.  This involves searching for the outer class name as a package, if found, then use the package separator VS_TAGSEPARATOR_package, otherwise use the class separator VS_TAGSEPARATOR_class. The current object must be an editor control or current buffer.  Returns static string if outer_class_name :: class_name was found in the context or tag database, otherwise returns empty string.

See Also	tag_split_class_name


tag_list_any_symbols

void tag_list_any_symbols(int tree_wid, int tree_index, _str tag_name, var tag_files, int filter_flags, int context_flags, int &num_matches, int max_matches, boolean exact_match, boolean case_sensitive )

Parameters	Description

tree_wid	Window ID of the tree control to insert into, if 0, insert tags into the match set, see tag_insert_match.

tree_index	Parent tree node index to insert item under, ignored if tree_wid is zero.

tag_name	Tag name or prefix of tag name to search for.

tag_files	List of tag files to search.

filter_flags	Tag filter flags, only insert tags passing this filter.  See tag_filter_type for more details.

context_flags	Context flags representing what to allow or restrict to.  See tag_check_context_flags for more details.

num_matches	(Input, Output) Number of tags found.

max_matches	Maximum number of tags to report.

exact_match	Exact match or prefix match?

case_sensitive	Use case insensitive string comparison?

Remarks	List any symbols, regardless of context or scope (excluding locals) matching the given tag name, context flags, and filter flags.

See Also	tag_insert_match, tag_tree_insert_tag, tag_tree_prepare_expand


tag_list_class_context

boolean tag_list_class_context(int tree_wid, int tree_index, _str tag_name, _str class_name, var tag_files, int filter_flags, int context_flags, int &num_matches, int max_matches, boolean exact_match, boolean case_sensitive )

Parameters	Description

tree_wid	Window ID of the tree control to insert into, if 0, insert tags into the match set, see tag_insert_match.

tree_index	Parent tree node index to insert item under, ignored if tree_wid is zero.

tag_files	List of tag files to search.

tag_name	Tag name or prefix of tag name to search for.

class_name	Name of class context to search for tags belonging to.

filter_flags	Tag filter flags, only insert tags passing this filter.  See tag_filter_type for more details.

context_flags	Context flags representing what to allow or restrict to.  See tag_check_context_flags for more details.

num_matches	(Input, Output) Number of tags found.

max_matches	Maximum number of tags to report.

exact_match	Exact match or prefix match?

case_sensitive	Use case insensitive string comparison?

Remarks	Attempt to locate the given symbol in the given class by searching the current context.  Recursively looks for symbols in enumerated types and anonymous unions (designated by having *both* the anonymous and maybe_var tag flags).  Look at num_matches to see if any matches were found.  Generally if (num_matches >= max_matches) there may be more matches, but the search terminated early.

Return	true if the definition of the given class, search_class_name, is found, otherwise returns false, indicating that no matches were found.

See Also	tag_find_class, tag_insert_match, tag_list_class_locals, tag_list_class_tags, tag_list_context_globals, tag_tree_insert_tag, tag_tree_prepare_expand


tag_list_class_locals

boolean tag_list_class_locals(int tree_wid, int tree_index, _str tag_name, _str class_name, var tag_files, int filter_flags, int context_flags, int &num_matches, int max_matches, boolean exact_match, boolean case_sensitive )

Parameters	Description

tree_wid	Window ID of the tree control to insert into, if 0, insert tags into the match set, see tag_insert_match.

tree_index	Parent tree node index to insert item under, ignored if tree_wid is zero.

tag_files	List of tag files to search.

tag_name	Tag name or prefix of tag name to search for.

class_name	Name of class context to search for tags belonging to.

filter_flags	Tag filter flags, only insert tags passing this filter.  See tag_filter_type for more details.

context_flags	Context flags representing what to allow or restrict to.  See tag_check_context_flags for more details.

num_matches	(Input, Output) Number of tags found.

max_matches	Maximum number of tags to report.

exact_match	Exact match or prefix match?

case_sensitive	Use case insensitive string comparison?

Remarks	Attempt to locate the given symbol in the given class by searching local variables.  Recursively looks for symbols in enumerated types and anonymous unions (designated by having *both* the anonymous and maybe_var tag flags).  Look at num_matches to see if any matches were found.  Generally if (num_matches >= max_matches) there may be more matches, but the search terminated early.

Return	true if the definition of the given class, search_class_name, is found, otherwise returns false, indicating that no matches were found.

See Also	tag_find_class, tag_insert_match, tag_list_class_context, tag_list_class_tags, tag_list_context_globals, tag_tree_insert_tag, tag_tree_prepare_expand


tag_list_class_tags

boolean tag_list_class_tags(int tree_wid, int tree_index, _str tag_name, _str class_name, var tag_files, int filter_flags, int context_flags, int &num_matches, int max_matches, boolean exact_match, boolean case_sensitive )

Parameters	Description

tree_wid	Window ID of the tree control to insert into, if 0, insert tags into the match set, see tag_insert_match.

tree_index	Parent tree node index to insert item under, ignored if tree_wid is zero.

tag_files	List of tag files to search.

tag_name	Tag name or prefix of tag name to search for.

class_name	Name of class context to search for tags belonging to.

filter_flags	Tag filter flags, only insert tags passing this filter.  See tag_filter_type for more details.

context_flags	Context flags representing what to allow or restrict to.  See tag_check_context_flags for more details.

num_matches	(Input, Output) Number of tags found.

max_matches	Maximum number of tags to report.

exact_match	Exact match or prefix match?

case_sensitive	Use case insensitive string comparison?

Remarks	Attempt to locate the given symbol in the given class by searching the given tag files.  Recursively looks for symbols in enumerated types and anonymous unions (designated by having *both* the anonymous and maybe_var tag flags).  Look at num_matches to see if any matches were found.  Generally if (num_matches >= max_matches) there may be more matches, but the search terminated early.

Return	true if the definition of the given class, search_class_name, is found, otherwise returns false, indicating that no matches were found.

See Also	tag_find_class, tag_insert_match, tag_list_class_context, tag_list_class_locals, tag_list_context_globals, tag_tree_insert_tag, tag_tree_prepare_expand


tag_list_context_globals

void tag_list_context_globals(int tree_wid, int tree_index, _str tag_name, boolean check_context, var tag_files, int filter_flags, int context_flags, int &num_matches, int max_matches, boolean exact_match, boolean case_sensitive )

Parameters	Description

tree_wid	Window ID of the tree control to insert into, if 0, insert tags into the match set, see tag_insert_match.

tree_index	Parent tree node index to insert item under, ignored if tree_wid is zero.

tag_name	Tag name or prefix of tag name to search for.

check_context	Check for symbols in the current context?

tag_files	List of tag files to search.

file_name	Only list tags coming from file with this "base" name.

filter_flags	Tag filter flags, only insert tags passing this filter.  See tag_filter_type for more details.

context_flags	Context flags representing what to allow or restrict to.  See tag_check_context_flags for more details.

num_matches	(Input, Output) Number of tags found.

max_matches	Maximum number of tags to report.

exact_match	Exact match or prefix match?

case_sensitive	Use case insensitive string comparison?

Remarks	List the global symbols visible in the given list of tag files matching the given tag filters and context flags.

See Also	tag_insert_match, tag_tree_insert_tag, tag_tree_prepare_expand


tag_list_context_imports

void tag_list_context_imports(int tree_wid, int tree_index, _str tag_name, var tag_files, int filter_flags, int context_flags, int &num_matches, int max_matches, boolean exact_match, boolean case_sensitive )

Parameters	Description

tree_wid	Window ID of the tree control to insert into, if 0, insert tags into the match set, see tag_insert_match.

tree_index	Parent tree node index to insert item under, ignored if tree_wid is zero.

tag_name	Tag name or prefix of tag name to search for.

tag_files	List of tag files to search.

filter_flags	Tag filter flags, only insert tags passing this filter.  See tag_filter_type for more details.

context_flags	Context flags representing what to allow or restrict to.  See tag_check_context_flags for more details.

num_matches	(Input, Output) Number of tags found.

max_matches	Maximum number of tags to report.

exact_match	Exact match or prefix match?

case_sensitive	Use case insensitive string comparison?

Remarks	List the global symbols visible in the given list of tag files matching the given tag filters and context flags.

See Also	tag_insert_match, tag_tree_insert_tag, tag_tree_prepare_expand


tag_list_context_packages

void tag_list_context_packages(int tree_wid, int tree_index, _str tag_name, var tag_files, int &num_matches, int max_matches, boolean exact_match, boolean case_sensitive )

Parameters	Description

tree_wid	Window ID of the tree control to insert into, if 0, insert tags into the match set, see tag_insert_match.

tree_index	Parent tree node index to insert item under, ignored if tree_wid is zero.

tag_name	Tag name or prefix of tag name to search for.

tag_files	List of tag files to search.

num_matches	(Input, Output) Number of tags found.

max_matches	Maximum number of tags to report.

exact_match	Exact match or prefix match?

case_sensitive	Use case insensitive string comparison?

Remarks	List the packages matching the given tag name, either exactly or as a prefix.

See Also	tag_check_for_package, tag_insert_match, tag_tree_insert_tag, tag_tree_type_is_package, tag_tree_prepare_expand


tag_list_globals_of-type

void tag_list_globals_of_type(int tree_wid, int tree_index, var tag_files, int type_id, int flag_mask, int non_zero, int &num_matches, int max_matches)

Parameters	Description

tree_wid	Window ID of the tree control to insert into, if 0, insert tags into the match set, see tag_insert_match.

tree_index	Parent tree node index to insert item under, ignored if tree_wid is zero.

tag_files	List of tag files to search.

type_id	Type id (see tag_get_type)  If (type_id<0), returns tags with any user defined tag types.

mask	Tag attribute flags set.  The intersection of  this set of flags and those for each tag found (tag_flags) will be calculated.

non_zero	Accept tag if (mask & tag_flags) is non zero?

num_matches	(Input, Output) Number of tags found.

max_matches	Maximum number of tags to report.

Remarks	List the globals of the given type.  See tag_find_global for more details.

See Also	tag_find_global, tag_get_type, tag_insert_match, tag_tree_insert_tag, tag_tree_prepare_expand


tag_list_in_file

void tag_list_in_file(int tree_wid, int tree_index, _str tag_name, var tag_files, int filter_flags, int context_flags, int &num_matches, int max_matches, boolean exact_match, boolean case_sensitive )

Parameters	Description

tree_wid	Window ID of the tree control to insert into, if 0, insert tags into the match set, see tag_insert_match.

tree_index	Parent tree node index to insert item under, ignored if tree_wid is zero.

tag_name	Tag name or prefix of tag name to search for.

tag_files	List of tag files to search.

file_name	Only list tags coming from file with this "base" name.

filter_flags	Tag filter flags, only insert tags passing this filter.  See tag_filter_type for more details.

context_flags	Context flags representing what to allow or restrict to.  See tag_check_context_flags for more details.

num_matches	(Input, Output) Number of tags found.

max_matches	Maximum number of tags to report.

exact_match	Exact match or prefix match?

case_sensitive	Use case insensitive string comparison?

Remarks	List the symbols found in files having the given "base" file name and passing the given filter and context flags.

See Also	tag_insert_match, tag_list_any_symbols, tag_tree_insert_tag, tag_tree_prepare_expand


tag_list_insert_tag

int tag_list_insert_tag(int list_wid, int include_tab, int indent_x, _str tag_name, _str tag_type, _str file_name, int line_no,  _str class_name, int tag_flags, _str signature )

Parameters	Description

list_wid	Window ID of the list control to insert into.

include_tab	If 0, does not create separate tab for details, see tag_tree_make_caption for further explanation.

indent_x	Indent after bitmap, if 0, use default of 60 twips.

tag_name	Name of  tag (symbol) to add to database

tag_type	Tag type, see tag_get_type for a list of all standard tag types.  Generally the tag type is a single word, all lowercase.  If the string given is not a standard type, a new user defined type will be inserted into the database.

file_name	File path of source file the tag is located in.

line_no	Line number where the tag begins in file_name.  Use 0 to represent an unknown line number.

class_name	Name of class or package or other container that the tag belongs to.  See VS_TAGSEPARATOR_class and VS_TAGSEPARATOR_package for more details about constructing this value.  If the tag is not in a class scope, simple pass the empty string for this value.

tag_flags	Set of tag attribute flags.  See tag_insert_simple for more information about the tag flags.

signature	Tag signature, includes type, value, and arguments for the symbol being inserted.  See VS_TAGSEPARATOR_args and VS_TAGSEPARATOR_equals for more details about constructing this value.

Remarks	Insert the given tag with accompanying information into the given list control.  Use tag_tree_prepare_expand prior to calling this function in order to configure the browser bitmap set.

Return	0 on success, < 0 on error.

See Also	_lbadd_item, tag_get_detail, tag_get_info, tag_get_type, tag_insert_tag, tag_tree_insert_tag, tag_tree_make_caption, tag_tree_prepare_expand


tag_match

_str tag_match(_str tag_name, int find_first)

Parameters	Description

tag_name	Name of  tag (symbol) to search for

find_first	If equal to 1, find first match in databases.  Terminate searching if equal to 2, otherwise return the next prefix match for tag_name.

Return	Returns next tag name which is a prefix match of name.  find_first must be 1 to initialize matching.  Returns '' when no more matches are found.  find_first must be 2 to terminate matching so that this procedure may remove its temporary buffers.

See Also	tag_find_prefix, tag_next_prefix, f_match, mt_match


tag_match_instance

int tag_match_instance(_str inst_name, _str inst_type, int inst_flags, _str inst_class, _str inst_args, _str file_name, int line_no)

Parameters	Description

inst_name	Name of  tag (symbol) to add to database

inst_type	Tag instance type, see tag_get_type for a list of all standard tag types.

inst_flags	Set of the following instance attribute flags, as applicable.  See tag_insert_instance for more information.

inst_class	Name of class or package or other container that the tag belongs to.  See VS_TAGSEPARATOR_class and VS_TAGSEPARATOR_package for more details about constructing this value.  If the tag is not in a class scope, simple pass the empty string for this value.

inst_args	Arguments associated with tag (e.g. function arguments).

file_name	Name of file where tag instance is located.

line_no	Line number where the tag begins in file_name.  Use 0 to represent an unknown line number.

case_sensitive	Case sensitive name/class/arguments comparison?

Remarks	Locate the tag instance matching the given parameters.  Instances are matched by tag name first (which must match), then class, type, flags, arguments, and finally file and line proximity.

Return	Returns the ID of the most exact match available, or <0 on error, , BT_RECORD_NOT_FOUND_RC if no matches are found.

See Also	tag_find_refer_by, tag_find_refer_to, tag_insert_instance, tag_next_refer_by, tag_next_refer_to


tag_nearest_context

_str tag_nearest_context(int line_no)

Parameters	Description

line_no	Line number to find context tag nearest to.

Return	Return the index of the context tag starting closest to the given line number.  This differs from the current context because the nearest context is not necessarily the context that you are currently inside.  For example, if the given line_no falls between two class members, the current context would be the class, but the nearest context would be the second class member.  Returns <0 on error or 0 if no current context.

See Also	tag_check_context, tag_current_context, tag_get_context


tag_next_class

int tag_next_class(_str &class_name [, _str search_class_name [, boolean normalize [, boolean ignore_case ] ] ] )

Parameters	Description

class_name	(Output) Class name as stored in database.

search_class_name	(Optional) Class name to search for.

normalize	(Optional) Attempt to qualify search_class_name.

ignore_case	(Optional) case-insensitive search?

Remarks	Retrieve the name of the next class included in this tag database, or optionally, the name of a specific class, either to check if the file is in the database or to position the class iterator at a specific point.  If normalize is non-zero, then search_class_name is a simple class name and the search attempts to qualify it with its outer class name or package name, etc., before returning result.  The default search is case-sensitive.

Return	0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

See Also	tag_find_class, tag_get_class


tag_next_context

int tag_next_context(_str tag_name, boolean exact_match, boolean case_sensitive [, boolean allow_anonymous [, _str class_name ] ] )

Parameters	Description

tag_name	Tag name or prefix of tag name to search for.

exact_match	Exact match or prefix match?

case_sensitive	Use case insensitive string comparison?

allow_anonymous	(Optional) Pass through anonymous classes?

class_name	(Optional) Name of class that tag belongs to.

Remarks	Find a the next context entry with the given tag name or prefix.  Should be called only after first calling tag_find_context.  Use tag_get_context to extract details about the tag.

Return	Context ID of next match or < 0 on error.

See Also	tag_find_context, tag_get_context


tag_next_equal

int tag_next_equal(boolean case_sensitive=false, int class_name=null , boolean skip_duplicates=false)

Parameters	Description

case_sensitive	(optional) default search is case-insensitive.

class_name	(optional) Name of class that tag belongs to.

skip_duplicates	(optional) Skip tags with same name, type and class.

Remarks	Retrieve the next tag with the same tag name as the last one retrieved.  Should be called only after calling tag_find_equal or tag_find_tag.  Use tag_get_info to extract the details about the tag.

Return	0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

See Also	tag_find_equal, tag_find_prefix, tag_find_tag, tag_get_detail, tag_next_prefix


tag_next_extension

int tag_next_extension(_str &extension)

Parameters	Description

extension	(Output) File extension type found

Remarks	Retrieve the name of the next file extension supported by this database.

Return	0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if no more.

See Also	tag_find_extension, tag_get_extension, tag_set_extension


tag_next_file

int tag_next_file(_str &file_name)

Parameters	Description

file_name	(Output) File name as stored in database.

Remarks	Retrieve the name of the next file included in this tag database. Files are ordered lexicographically, case-sensitive on UNIX platforms, case insensitive on DOS/OS2/Windows platforms.

Return	0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if no more.

See Also	tag_get_file, tag_find_file


tag_next_global

int tag_next_global(int type_id, int mask, boolean non_zero)

Parameters	Description

type_id	Type id (see tag_get_type)  If (type_id<0), returns tags with any user defined tag types.

mask	Tag attribute flags set.  The intersection of  this set of flags and those for each tag found (tag_flags) will be calculated.

non_zero	Accept tag if (mask & tag_flags) is non zero?

Remarks	Retrieve the next tag included in this tag database with global scope that is one of the given type (type_id) and that matches the given tag flag mask ((mask & tag_flags) != 0) == non_zero. Should be called only after calling tag_find_global.  Use tag_get_info to extract the details about the tag.

Return	0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

See Also	tag_get_type, tag_find_global


tag_next_in_class

int tag_next_in_class(_str class_name)

Parameters	Description

class_name	Class name as stored in database.

Remarks	Find the first tag belonging to the given class. Tags are returned unsorted.  Should be called only after calling tag_find_in_class. Use tag_get_info to extract the details about the tag.

Return	0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

See Also	tag_get_class, tag_get_detail, tag_get_info, tag_next_in_class, tag_next_class


tag_next_in_file

int tag_next_in_file(_str file_name)

Parameters	Description

file_name	File name as stored in database.

Remarks	Find the next tag in the given file.  Should be called only after calling tag_find_in_file.  Tags are returned unsorted. Use tag_get_info to extract the details about the tag.

Return	0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

See Also	tag_get_detail, tag_get_file, tag_get_info, tag_find_in_file, tag_next_file


tag_next_include_file

int tag_next_include_file(_str file_name, _str &include_name)

Parameters	Description

file_name	File name as stored in database for source file.

include_name	(Output) full path of included file.

Remarks	Retrieve the name of the next file included by file_name.

Return	0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

See Also	tag_next_included_by, tag_find_include_file, tag_find_included_by, tag_set_date, tag_insert_tag


tag_next_included_by

int tag_next_included_by(_str file_name, _str &included_by)

Parameters	Description

file_name	File name as stored in database for include file.

included_by	(Output) full path of source file including  file_name.

Remarks	Retrieve the name of the next source file that includes file_name.

Return	0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

See Also	tag_find_include_file, tag_next_include_file, tag_next_included_by, tag_set_date, tag_insert_tag


tag_next_local

int tag_next_local(_str tag_name, boolean exact_match, boolean case_sensitive [, boolean allow_anonymous [, _str class_name ] ] )

Parameters	Description

tag_name	Tag name or prefix of tag name to search for.

exact_match	Exact match or prefix match?

case_sensitive	Use case insensitive string comparison?

allow_anonymous	(Optional) Pass through anonymous classes?

class_name	(Optional) Name of class that tag belongs to.

Remarks	Find a the next local variable with the given tag name or prefix.  Should be called only after calling tag_find_local.  Use tag_get_local2 to extract details about the tag.

Return	Local ID of next match or < 0 on error.

See Also	tag_find_local, tag_get_local, tag_get_local2


tag_next_prefix

int tag_next_prefix(_str tag_prefix, boolean case_sensitive=false, _str class_name=null, boolean skip_duplicates=false )

Parameters	Description

tag_prefix	Prefix of tag to search for.

case_sensitive	(optional) default search is case-insensitive.

class_name	(optional) Name of class that tag belongs to.

skip_duplicates	(optional) Skip tags with same name, type and class.

Remarks	Retrieve the next tag with the given prefix. Should be called only after calling tag_find_prefix.  Use tag_get_info to extract the details about the tag.

Return	0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

See Also	tag_find_equal, tag_find_prefix, tag_find_tag, tag_get_detail, tag_next_equal


tag_next_refer_by

int tag_next_refer_by(int inst_id, int &ref_type, _str &file_name, int &line_no)

Parameters	Description

inst_id	Unique ID of tag instance.

ref_type	(Output) Type of reference, see tag_insert_reference.

file_name	(Output) File name as stored in database.

line_no	(Output) Line number that reference occurs at in file_name.

Remarks	Find the next location in which the given tag is referenced.  The tag is identified by its unique ID, see tag_match_instance.  Should be called only after calling tag_find_refer_by.

Return	Returns instance ID (> 0) of context of reference, 0 if unknown, or < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

See Also	tag_get_instance_info, tag_match_instance, tag_find_refer_by


tag_next_refer_to

int tag_next_refer_to(int inst_id, int &ref_type, _str &file_name, int &line_no)

Parameters	Description

inst_id	Unique ID of tag instance.

ref_type	(Output) Type of reference, see tag_insert_reference.

file_name	(Output) File name as stored in database.

line_no	(Output) Line number that reference occurs at in file_name.

Remarks	Find the next tag instance referenced by the given tag instance.  The tag is identified by its unique ID, see tag_match_instance.  This is typically used with functions (caller/callee relationship) or structures and classes (container/item relationships).  Should be called only after calling tag_find_refer_to.

Return	Returns instance ID (> 0) of tag referenced in context represented by inst_id or < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

See Also	tag_get_instance_info, tag_match_instance, tag_find_refer_to


tag_next_regex

int tag_next_regex(_str tag_regex [ , _str search_options ] )

Parameters	Description

tag_regex	Regular expression for tag to search for.

search_options	(optional) Options passed to vsStrPos() for evaluating regular expression.

Remarks	Retrieve the next tag matching the given regular expression.  Use tag_get_info to extract the details about the tag.

Return	0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

See Also	pos, tag_find_prefix, tag_find_tag, tag_get_detail, tag_next_equal, tag_next_prefix, tag_next_regex, vsStrPos


tag_next_tag

int tag_next_tag(_str tag_name, _str type_name, _str class_name, [, _str arguments ] )

Parameters	Description

tag_name	Name of tag to search for.

type_name	Tag type name (see tag_get_type).

class_name	Name of class that tag belongs to.

arguments	(optional) Function parameters to attempt to match to resolve overloading.  Ignored if there are no matches.

Remarks	Retrieve the next tag with the given name, type, and class (to uniquely identify a tag).  After calling tag_find_tag, use this function to find other candidates (overloads or duplicates).   Use tag_get_info to extract the details about the tag.

Return	0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

See Also	tag_find_equal, tag_find_prefix, tag_find_tag, tag_get_detail, tag_get_info


tag_next_type

int tag_next_type(_str &type_name)

Parameters	Description

type_name	(Output) Tag  type name as stored in database.

Remarks	Retrieve the name of the next tag type included in this database.

Return	0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if no more.

See Also	tag_get_type, tag_find_type


tag_open_db

int tag_open_db(_str file_name)

Parameters	Description

file_name	File path of database to open.

Remarks	Open an existing database for read-write access.  The database type (tags, references) is automatically detected.  BSC files can not be opened read-write, use tag_read_db instead.

Return	0 on success, < 0 on error.

See Also	tag_close_all_db, tag_close_db, tag_create_db, tag_current_db, tag_current_version, tag_flush_db, tag_read_db


tag_pop_context

int tag_pop_context()

Remarks	Transfers the current match set to the context set and pop it off of the match set stack, making the previous match set active.

Return	0 on success, < 0 on error.

See Also	tag_get_match, tag_insert_match, tag_insert_match_fast, tag_pop_context, tag_pop_matches, tag_push_matches


tag_pop_matches

int tag_pop_matches()

Remarks	Pop the tag match set off of the stack, and make the previous match set active.

Return	0 on success, < 0 on error.

See Also	tag_get_match, tag_insert_match, tag_insert_match_fast, tag_pop_context, tag_push_context, tag_push_matches


tag_push_context

int tag_push_context()

Remarks	Push the current match set onto the stack of match sets and transfer the context set to the top of the match set stack.

Return	0 on success, < 0 on error.

See Also	tag_get_match, tag_insert_match, tag_insert_match_fast, tag_pop_context, tag_pop_matches, tag_push_matches


tag_push_matches

int tag_push_matches()

Remarks	Push the current tag match set onto the stack, and create a new, empty match set.

Return	0 on success, < 0 on error.

See Also	tag_get_match, tag_insert_match, tag_insert_match_fast, tag_pop_context, tag_pop_matches, tag_push_context


tag_read_db

int tag_read_db(_str file_name)

Parameters	Description

file_name	File path of tag database to open.

Remarks	Open an existing database for read-only access.  The database type (tags, references, BSC file) is automatically detected.

Return	0 on success, < 0 on error.

See Also	tag_close_all_db, tag_close_db, tag_create_db, tag_current_db, tag_current_version, tag_flush_db, tag_open_db


tag_remove_from_class

int tag_remove_from_class(_str class_name [ , boolean remove_class ] )

Parameters	Description

class_name	Name of class to remove all tags belonging to.

remove_class	If true, remove class_name from the tag database completely, not just the tags in that class.  Default is false.

Remarks	Remove all tags or references from the given class.  This API is deprecated.

Return	 0 on success, < 0 on error.

See Also	tag_remove_tag


tag_remove_from_file

int tag_remove_from_file(_str file_name [ , boolean remove_file ] )

Parameters	Description

file_name	File path of source file to begin updating.

remove_file	If true, remove file_name from the tag database completely, not just the tags in that file.  Default is false.

Remarks	Remove all tags or references from the given source file. This is an effective, but costly way to perform an incremental update of the database.  First remove all items associated with that file, then insert them again.

Return	 0 on success, < 0 on error.

See Also	tag_insert_file_start, tag_insert_file_end, tag_insert_instance, tag_insert_reference, tag_insert_simple, tag_insert_tag, tag_transfer_context


tag_remove_tag

int tag_remove_tag()

Remarks	Remove the current tag (last retrieved) from the database.  This API is deprecated.

Return	 0 on success, < 0 on error.

See Also	tag_remove_from_file, tag_remove_from_class


tag_set_cache_size

int tag_set_cache_size(int cache_size)

Parameters	Description

cache_size	Amount of memory in bytes.  The minimum size cache allowed is 512k.

Remarks	Specify the amount of memory to use for the database cache.

Return	0 on success, < 0 on error.


tag_set_context_parents

int tag_set_context_parents(int context_id, _str parents)

Parameters	Description

context_id	Context ID [ from 1 to tag_get_num_of_context() ] of context tag representing class or struct to set inheritance relationships for.

parents	Delimited list of immediate class ancestors.  It is important to remember that for some languages, all classes have a default ancestor, such as java.lang/Object in Java. Otherwise, use the empty string to indicate that class_name is a base class.  See VS_TAGSEPARATOR_parents for more details on constructing this string.

Remarks	Set the class inheritance for the given context tag.

Return	 0 on success, or <0 on error.

See Also	tag_end_context, tag_get_context, tag_get_detail2, tag_insert_context, tag_set_inheritance


tag_set_date

int tag_set_date(_str file_name [, _str modify_date] )

Parameters	Description

file_name	File path of source file to set tagging date for.  See VS_TAGSEPARATOR_file for more details about constructing this value.

modify_date	(optional) Modification date of file when tagged, if not given, the modification date is read from disk.  Format is YYYYMMDDHHMMSSmmm (year, month, day, hour, minute, second, ms).

Remarks	Modify the date of tagging for the given file.  Since date of tagging is not involved in indexing, this is safe to do in the record, in place.  This method always uses the current date when setting the date of tagging.

Return	0 on success, < 0 on error.

See Also	tag_get_date, tag_get_file, tag_find_file, tag_next_file


tag_set_db_comment

int tag_set_db_comment(_str comment)

Parameters	Description

comment	Description or title for the currently open database.

Remarks	Sets the database description or title for the currently open database.

Return	0 on success, < 0 on error.

See Also	tag_get_db_comment


tag_set_extension

int tag_set_extension(_str file_name, _str extension )

Parameters	Description

file_name	File path of source file to set extension property for.  See VS_TAGSEPARATOR_file for more details about constructing this value.

extension	File extension property for file_name.

Remarks	API function for setting the extension type for the given filename.  This corresponds to the p_extension property of file_name, not necessarily the literal extension.

Return	0 on success, < 0 on error.

See Also	tag_get_extension, tag_get_file, tag_find_file, tag_next_file


tag_set_inheritance

int tag_set_inheritance(_str class_name, _str parents)

Parameters	Description

class_name	Qualified name of class or interface to update inheritance information for.  See VS_TAGSEPARATOR_class and VS_TAGSEPARATOR_package for details on constructing this string.

parents	Delimited list of immediate class ancestors.  It is important to remember that for some languages, all classes have a default ancestor, such as java.lang/Object in Java. Otherwise, use the empty string to indicate that class_name is a base class.  See VS_TAGSEPARATOR_parents for more details on constructing this string.

Remarks	Modify the set of parent classes for a given class.

Return	0 on success, < 0 on error.


tag_set_local_parents

int tag_set_local_parents(int local_id, _str parents)

Parameters	Description

local_id	Local ID [ from 1 to tag_get_num_of_locals() ] of local variable tag representing class or struct to set inheritance relationships for.

parents	Delimited list of immediate class ancestors.  It is important to remember that for some languages, all classes have a default ancestor, such as java.lang/Object in Java. Otherwise, use the empty string to indicate that class_name is a base class.  See VS_TAGSEPARATOR_parents for more details on constructing this string.

Remarks	Set the class inheritance for the given local variable tag.

Return	 0 on success, or <0 on error.

See Also	tag_get_local2, tag_get_detail2, tag_insert_local, tag_set_inheritance


tag_sort_context

void tag_sort_context( )

Remarks	Sort the items in the current context by seek position.  The precise sort order is first by non-descrasing starting seekpos, and for items with identical start seek positions, non-increasing end seek position, and for items with identical span, the original insertion order for the items.

In addition to sorting the items in the current context, this function computes the outer contexts for each item in the current context.

Return	 0 on success, or <0 on error.

Version	 Planned for Visual SlickEdit 5.0.

See Also	tag_insert_context


tag_sort_locals

void tag_sort_locals( )

Remarks	Sort the locals variables in the current context by seek position.  The precise sort order is first by non-descrasing starting seekpos, and for items with identical start seek positions, non-increasing end seek position, and for items with identical span, the original insertion order for the items.

In addition to sorting the items, this function computes the outer contexts.

Return	 0 on success, or <0 on error.

Version	 Planned for Visual SlickEdit 5.0.

See Also	tag_insert_local2


tag_split_class_name

void tag_split_class_name(_str class_name, _str inner_class_name, _str outer_class_name )

Parameters	Description

class_name	Class name to split.  See VS_TAGSEPARATOR_class and VS_TAGSEPARATOR_package for more details.

inner_class_name	(Output)  Inner class name (class name only).

outer_class_name	(Output)  Outer class name (class name - inner name).

Remarks	Decompose a class name into its outer component and inner class name.  This is strictly a string function, no file I/O or searching is involved.

See Also	tag_join_class_name


tag_transfer_context

int tag_transfer_context(_str file_name)

Parameters	Description

file_name	File name of current buffer, expected to be the same as the buffer all context tags came from.

Remarks	Insert all the tags from the current context into the currently open tag file.  Assumes that the context is up-to-date at the time that this function is called.

Return	0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if the context info is not set or from the wrong file or buffer.

See Also	tag_insert_context, tag_insert_file_end, tag_insert_file_start, tag_insert_tag


tag_tree_add_members_in_category

int tag_tree_add_members_in_category(int type_id, int mask, int non_zero, _str category_name, int &num_items )

Parameters	Description

type_id	Type id (see tag_get_type)  If (type_id<0), inserts global tags with any user defined tag types.

mask	Tag attribute flags set.  The intersection of  this set of flags and those for each tag found (tag_flags) will be calculated.

non_zero	Accept tag if (mask & tag_flags) is non zero?

category_name	Name of tag category to add members from.

num_items	(Input/Output) Number of items inserted.  When the number of items exceeds def_cb_high_refresh, an interpreter function is called to rearrange the category into sections _,  $, A-Z, and Misc.

Remarks	Add globals with the given type the given category, as set up using tag_tree_prepare_expand.  Refer to tag_find_global for details about the parameters type_id, mask, and non_zero.

Return	0 on success, < 0 on error.

See Also	tag_find_global, tag_get_type, tag_tree_add_members_in_section, tag_tree_insert_tag, tag_tree_prepare_expand, tag_tree_set_user_info


tag_tree_add_members_in_section

int tag_tree_add_members_in_section(_str prefix, int type_id, int mask, int non_zero, _str category_name, int &num_items )

Parameters	Description

prefix	Tag name prefix to search for.  If given the specific string "[Misc]", it will insert all tags starting with characters that are not identifier start characters.

type_id	Type id (see tag_get_type)  If (type_id<0), inserts global tags with any user defined tag types.

mask	Tag attribute flags set.  The intersection of  this set of flags and those for each tag found (tag_flags) will be calculated.

non_zero	Accept tag if (mask & tag_flags) is non zero?

category_name	Name of tag category to add members from.

num_items	(Input/Output) Number of items inserted.  See tag_tree_add_members_of for more information about how this relates to refresh operations and prompting.

Remarks	Add globals with the given type the given section of a category, as set up using tag_tree_prepare_expand.  Refer to tag_find_global for details about the parameters type_id, mask, and non_zero.  Categories are divided into sections when they have so many items that it would be impractical to attempt to view all the items in the category under one tree node.  Currently sections are not subdivided into subsections, even if they contain thousands of items.

Return	0 on success, < 0 on error.

See Also	tag_find_global, tag_get_type, tag_tree_add_members_in_category, tag_tree_insert_tag, tag_tree_prepare_expand, tag_tree_set_user_info


tag_tree_add_members_of

int tag_tree_add_members_of(_str class_name, _str in_file_name, int tag_file_id, int &num_items )

Parameters	Description

class_name	Name of class to add members of, case-sensitive.

in_file_name	Only add class members located in this file, use empty string to ignore this constraint.

tag_file_id	Unique numeric ID for tag file, 0 for 'current' tag file.  See tag_tree_set_user_info for more information about the use of this parameter.

num_items	(Input/Output) Number of items inserted.

Remarks	Add the members of the given class to the tree view, as configured using tag_tree_prepare_expand.  This function makes the assumption that the same qualified class name will not be used twice in one file to define separate classes.  Languages having preprocessing like C++ can have this problem, the result is that the members of both classes will be merged. The number of items inserted without prompting is defined by the following interpreter variables:

def_cb_low_refresh	During a refresh operation, stop at this many items.

def_cb_high_refresh 	First prompt at this level, if not refresh operation.

def_cb_flood_refresh 	Prompt at every multiple of this level.

Return	0 on success, < 0 on error.

See Also	tag_tree_add_members_in_category, tag_tree_add_members_in_section, tag_tree_insert_tag, tag_tree_prepare_expand, tag_tree_set_user_info


tag_tree_compare_args

int tag_tree_compare_args(_str arg_list_1, _str arg_list_2, boolean unqualify )

Parameters	Description

arg_list_1	First function argument list, assumes that the syntax is either C++ or Pascal like.

arg_list_2	Second function argument list.

unqualify	Loose comparison, peel off class qualifications before comparing the argument lists.

Return	0 if the argument lists match, non-zero otherwise.

See Also	tag_get_detail, tag_tree_format_args


tag_tree_compose_tag

_str tag_tree_compose_tag(_str tag_name, _str class_name, _str tag_type, int tag_flags [, _str arguments [, _str return_type ] ] )

Parameters	Description

tag_name	Name of  tag (symbol) to encode.

class_name	Name of class or package or other container that the tag belongs to.  See VS_TAGSEPARATOR_class and VS_TAGSEPARATOR_package for more details about constructing this value.  If the tag is not in a class scope, simple pass the empty string for this value.

tag_type	Tag type name, see tag_get_type for standard tag types.

tag_flags	Set of tag attribute flags.  See tag_insert_simple for more information about the tag flags.

arguments	Arguments, such as function or template class parameters.

return_type	Return type of symbol or value of constant or both, separated by VS_TAGSEPARATOR_equals.

Remarks	Encode the given tag as a string.  The format of the entire string is as follows:

tag_name ( class_name : type_name ) tag_flags ( arguments ) return_type

The class_name is optional, if not given the string may be encoded as follows, indicating that the tag is a global:

tag_name ( type_name ) tag_flags ( arguments ) return_type

The type_name, arguments, and return_type are also optional.  If both the arguments and return_type are omitted, the tag is encoded as follows:

tag_name ( class_name : type_name ) tag_flags

Furthermore, if tag_flags is 0, it is omitted.

Note that the encoding format is not resilient against names that contain special characters, however, within the argument list, it is allowed to have parenthesis, as long as they are balanced.

The extension specific procedure and local variable search functions (_<ext>_proc_search) return tags using the format described above.  This function may be used to easily and efficiently implement that part of a proc search function.

Return	String representation for the tag passed in.

See Also	tag_tree_decompose_tag


tag_tree_decompose_tag

void tag_tree_decompose_tag(_str proc_name, _str &tag_name, _str &class_name, _str &tag_type, int &tag_flags [, _str &arguments [, _str &return_type ] ] )

Parameters	Description

proc_name	Encoded tag from tag_tree_compose_tag or an extension-specific tag search function.

tag_name	(Output) Name of  tag (symbol) to encode.

class_name	(Output) Name of class or package or other container that the tag belongs to.  See VS_TAGSEPARATOR_class and VS_TAGSEPARATOR_package for more details about constructing this value.  If the tag is not in a class scope, simple pass the empty string for this value.

tag_type	(Output) Tag type name, see tag_get_type.

tag_flags	(Output) Set of tag attribute flags.  See tag_insert_simple for more information about the tag flags.

arguments	(Output) Arguments, such as function or template class parameters.

return_type	(Output) Return type of symbol or value of constant or both, separated by VS_TAGSEPARATOR_equals.

Remarks	Decode the given proc_name into the components of the tag.  See tag_tree_compose_tag for details about how tags are encoded as strings.

See Also	tag_tree_compose_tag


tag_tree_filter_member

boolean tag_tree_filter_member(int filter_flags, _str tag_type, boolean in_class, int tag_flags, int &i_access, int &i_type )

Parameters	Description

filter_flags	Filtering options flags, see tag_tree_filter_member2.

tag_type	Tag type, see tag_get_type.

in_class	Is this tag a member of a class?

tag_flags	Set of tag attribute flags.  See tag_insert_simple for more information about the tag flags.

i_access	(Output) Access level (public, package, protected, or private) of tag, see tag_tree_filter_member2.

i_type	(Output) Tag bitmap type to use to represent tag, see tag_tree_filter_member2.

Remarks	Filter the given item based on the given filtering flags, and determine the access level and member type.  Though this function is typically used by the class browser for filtering items, it can also be used simply to determine the access level and bitmap type for the tag, just ignore the return value in this case.  This function is deprecated, use tag_tree_filter_member2 instead.

Return	false if the item is filtered out, true if it passes the filters.

See Also	tag_get_info, tag_get_type, tag_tree_filter_member2, tag_tree_insert_tag


tag_tree_filter_member2

boolean tag_tree_filter_member2(int filter_flags, int more_filter_flags, _str tag_type, boolean in_class, int tag_flags, int &i_access, int &i_type )

Parameters	Description

filter_flags	Filtering options flags, combination of the following:

CB_SHOW_class_data	static class data members

CB_SHOW_instance_data 	non-static class data members

CB_SHOW_out_of_line 	not inline functions

CB_SHOW_inline              	inline functions

CB_SHOW_static              	static functions

CB_SHOW_non_virtual         	not virtual member functions

CB_SHOW_virtual             	virtual member functions

CB_SHOW_abstract            	abstract member functions

CB_SHOW_operators           	overloaded operators

CB_SHOW_constructors        	class constructors

CB_SHOW_final_members       	final class members (Java)

CB_SHOW_non_final_members   	not final class members

CB_SHOW_const_members       	const class (C++)

CB_SHOW_non_const_members   	not const class members

CB_SHOW_volatile_members    	volatile variables and functions

CB_SHOW_non_volatile_members  not volatile variables and functions

CB_SHOW_template_classes    	template (parameterized) classes

CB_SHOW_non_template_classes	standard (not template) classes

CB_SHOW_package_members     	members with package scope (Java)

CB_SHOW_private_members     	members with private scope

CB_SHOW_protected_members   	members with protected scope

CB_SHOW_public_members      	members with public scope

CB_SHOW_inherited_members   	inherited members

CB_SHOW_class_members       	class member functions

CB_SHOW_data_members        	class data members

CB_SHOW_other_members       	other members, not functions or data

CB_SHOW_non_abstract        	not abstract functions

CB_SHOW_non_special         	not special functions

CB_SHOW_transient_data      	transient data members (Java)

CB_SHOW_persistent_data     	persistent data members (Java)

CB_SHOW_synchronized        	synchronized functions (Java)

CB_SHOW_non_synchronized    	not synchronized functions (Java)

more_filter_flags	Extended filtering options flags, from the following:

CB_SHOW_native              	native functions (Java, others)

CB_SHOW_non_native          	non-native functions (Java, others)

CB_SHOW_extern              	external functions

CB_SHOW_non_extern          	tags not declared extern

CB_SHOW_macros              	tags declared in expanded macro

CB_SHOW_non_macros          	tag not declared in expanded macros

CB_SHOW_anonymous           	anonymous structs, classes, or unions

CB_SHOW_non_anonymous	named structs, classes, or unions

tag_type	Tag type, see tag_get_type.

in_class	Is this tag a member of a class?

tag_flags	Set of tag attribute flags.  See tag_insert_simple for more information about the tag flags.

i_access	(Output) Access level of tag

CB_access_public    	public or global scope

CB_access_protected 	protected scope

CB_access_private   	private scope

CB_access_package	package scope (Java)

i_type	(Output) Tag bitmap type to use to represent tag.

CB_type_function     	function

CB_type_prototype    	function prototype

CB_type_data         	variable, global, local, class member

CB_type_operator     	overloaded operator (C++)

CB_type_constructor  	class constructor

CB_type_destructor   	class destructor

CB_type_enumeration  	value in enumerated type

CB_type_typedef      	type definition

CB_type_define       	macro definition

CB_type_property     	class property (Delphi Object Pascal)

CB_type_constant     	constant

CB_type_label        	label (for goto statement)

CB_type_import       	import statement

CB_type_friend       	friend relationship (C++)

CB_type_index        	database index

CB_type_trigger      	database trigger

CB_type_control      	GUI control

CB_type_menu         	GUI menu

CB_type_param        	function or procedure parameter

CB_type_proc         	procedure

CB_type_procproto    	procedure prototype

CB_type_include      	include statement

CB_type_file	file descriptor

CB_type_subfunc	nested function

CB_type_subproc	nested procedure

CB_type_miscellaneous	miscellaneous tag type

Container types:

CB_type_struct       	struct or record

CB_type_enum         	enumerated type

CB_type_class        	class type

CB_type_template     	template class

CB_type_base_class   	base class

CB_type_package      	package, library, program, module

CB_type_union        	union or variant type

CB_type_database     	database definition

CB_type_table        	database table

CB_type_form         	GUI form or dialog

CB_type_eventtab     	GUI event table

CB_type_task         	task (Ada)

CB_type_group	group variable/structure

CB_type_misc	miscellaneous container

Remarks	Filter the given item based on the given filtering flags, and determine the access level and member type.  Though this function is typically used by the class browser for filtering items, it can also be used simply to determine the access level and bitmap type for the tag, just ignore the return value in this case.

Return	false if the item is filtered out, true if it passes the filters.

See Also	tag_get_info, tag_get_type, tag_tree_insert_tag, tag_tree_select_bitmap


tag_tree_format_args

_str tag_tree_format_args(_str signature )

Parameters	Description

signature	Return type and parameters of tag, as stored in the database, including VS_TAGSEPARATOR_args to separate the return type from the parameters.

Return	Pretty-print function arguments to output buffer.  The output is returned in a statically allocated string pointer.

See Also	tag_get_detail, tag_tree_make_caption


tag_tree_insert_context

int tag_tree_insert_context(int tree_wid, int tree_index, int include_tab, int force_leaf, int tree_flags, int filter_flags )

Parameters	Description

tree_wid	Window ID of the tree control to insert into.

tree_index	Parent tree node index to insert item under.

include_tab	If 0, does not create separate tab for details, see tag_tree_make_caption for further explanation.

force_leaf	If < 0, force leaf node, if equal to 0, choose by tag type.  Normally "container" tag types, such as classes or structs are automatically inserted as non-leaf nodes.  If > 0, insert the items from the current context as a tree, displaying the heirarchy of inner/outer nesting of tags, going by the positions calculated by tag_sort_context().

tree_flags	Flags passed to _TreeAddItem.

filter_flags	Tag filter flags, only insert tags passing this filter.  See tag_filter_type for more details.

Remarks	Insert all the context tags passing through the tag filter flags into the given tree.  Use tag_tree_prepare_expand prior to calling this function in order to configure the browser bitmap set.

Return	0 on success, < 0 on error.

See Also	_TreeAddItem, tag_filter_type, tag_insert_context, tag_tree_insert_tag, tag_tree_make_caption, tag_tree_prepare_expand


tag_tree_insert_fast

int tag_tree_insert_fast(int tree_wid, int tree_index, int match_type, int local_or_context_id, int include_tab, int force_leaf, int tree_flags, int include_sig, int include_class )

Parameters	Description

tree_wid	Window ID of the tree control to insert into.

tree_index	Parent tree node index to insert item under.

match_type	Specifies where the tag to insert comes from:

VS_TAGMATCH_tag	current tag from database

VS_TAGMATCH_context	item in current context (buffer)

VS_TAGMATCH_local  	item in local variable set (function)

VS_TAGMATCH_match  	item in match set

local_or_context_id	0 if inserting current tag from database, otherwise, specifies the unique integer ID of the item from the context, locals, or match set, as specified by match_type.

include_tab	If 0, does not create separate tab for details, see tag_tree_make_caption for further explanation.

force_leaf	If < 0, force leaf node, otherwise choose by tag type.  Normally "container" tag types, such as classes or structs are automatically inserted as non-leaf nodes.

tree_flags	Flags passed to _TreeAddItem.

include_sig	Include function/class/macro parameters in the caption?

include_class	Include qualified class name in the caption?

Remarks	This optimized version of tag_tree_insert_tag is used to quickly insert an item from the current tag database, context, locals, or match set into a tree control at the specified location.  Use tag_tree_prepare_expand prior to calling this function in order to configure the browser bitmap set.

Return	Tree index of new item on success, < 0 on error.

See Also	_TreeAddItem, tag_insert_context, tag_insert_local, tag_insert_match, tag_insert_tag, tag_tree_insert_tag, tag_tree_make_caption, tag_tree_prepare_expand


tag_tree_insert_tag

int tag_tree_insert_tag(int tree_wid, int tree_index, int include_tab, int force_leaf, int tree_flags, _str tag_name, _str tag_type, _str file_name, int line_no,  _str class_name, int tag_flags, _str signature )

Parameters	Description

tree_wid	Window ID of the tree control to insert into.

tree_index	Parent tree node index to insert item under.

include_tab	If 0, does not create separate tab for details, see tag_tree_make_caption for further explanation.

force_leaf	If < 0, force leaf node, otherwise choose by tag type.  Normally "container" tag types, such as classes or structs are automatically inserted as non-leaf nodes.

tree_flags	Flags passed to _TreeAddItem.

tag_name	Name of  tag (symbol) to add to database

tag_type	Tag type, see tag_get_type for a list of all standard tag types.  Generally the tag type is a single word, all lowercase.  If the string given is not a standard type, a new user defined type will be inserted into the database.

file_name	File path of source file the tag is located in.

line_no	Line number where the tag begins in file_name.  Use 0 to represent an unknown line number.

class_name	Name of class or package or other container that the tag belongs to.  See VS_TAGSEPARATOR_class and VS_TAGSEPARATOR_package for more details about constructing this value.  If the tag is not in a class scope, simple pass the empty string for this value.

tag_flags	Set of tag attribute flags.  See tag_insert_simple for more information about the tag flags.

signature	Tag signature, includes type, value, and arguments for the symbol being inserted.  See VS_TAGSEPARATOR_args and VS_TAGSEPARATOR_equals for more details about constructing this value.

Remarks	Insert the given tag with accompanying information into the given tree control at the specified location.  Use tag_tree_prepare_expand prior to calling this function in order to configure the browser bitmap set.

Return	Tree index of new item on success, < 0 on error.

See Also	_TreeAddItem, tag_get_detail, tag_get_info, tag_get_type, tag_insert_tag, tag_tree_insert_fast, tag_tree_make_caption, tag_tree_prepare_expand


tag_tree_make_caption

_str tag_tree_make_caption(_str tag_name, _str tag_type, _str class_name, int tag_flags, _str arguments, boolean include_tab)

Parameters	Description

tag_name	Name of  tag (symbol).

tag_type	Tag type, see tag_get_type.

class_name	Name of class or package or other container that the tag belongs to.  See VS_TAGSEPARATOR_class and VS_TAGSEPARATOR_package for more details about constructing this value.  If the tag is not in a class scope, simple pass the empty string for this value.

tag_flags	Set of tag attribute flags.  See tag_insert_simple for more information about the tag flags.

arguments	Arguments, such as function or template class parameters.

include_tab	If 0, does not create separate tab for details.

Remarks	Encode class name, member name, signature, etc. in order to make caption for tree item very quickly.  Returns the resulting tree caption as a NULL terminated string.  The output string is generally formatted as follows:

member_name[()] <tab> [class_name::member_name[(arguments)]

Parenthesis are added only for function types (proc, proto, constr, destr, func) and parameterized classes.  The result is returned as a pointer to a static character array.

Example	The following example illustrates constructing a caption for the following C++ class member prototype:

static void MyClass::myMember(int a, bool x);

The function would be invoked as follows:

tag_tree_make_caption("myMember", "func", "MyClass",

VS_TAGFLAG_static, "int a, bool x", include_tab);

producing the following caption if include_tab is true:

myMember()<tab>MyClass::myMember(int a, bool x)

and the following if include_tab is false.

MyClass::myMember(int a, bool x)

Return	Caption formatted in standard form as normally presented in class browser.

See Also	tag_get_detail, tag_get_info, tag_get_instance_info, tag_tree_make_caption_fast


tag_tree_make_caption_fast

_str tag_tree_make_caption_fast(int match_type, int local_or_context_id, boolean include_class, boolean include_args, boolean include_tab)

Parameters	Description

match_type	Specifies where the tag to create a caption for comes from:

local_or_context_id	0 if inserting current tag from database, otherwise, specifies the unique integer ID of the item from the context, locals, or match set, as specified by match_type.

include_class	Include class name in the caption.

include_args	Include function arguments in the caption.

include_tab	If 0, does not create separate tab for details.

Remarks	For the current tag, local, context, or match item, encode class name, member name, signature, etc. in order to make caption for tree item very quickly.  Returns the resulting tree caption as a NULL terminated string.  See tag_tree_make_caption() for further details about the output

Return	Caption formatted in standard form as normally presented in class browser.

See Also	tag_get_detail, tag_get_info, tag_get_instance_info, tag_insert_match_fast, tag_tree_make_caption


tag_tree_prepare_expand

int tag_tree_prepare_expand(int form_wid, int tree_index, int tree_wid, int in_refresh, _str class_filter, _str member_filter, _str exception_name, int filter_flags, var icons)

Parameters	Description

form_wid	Window ID of form containing the tree control.

tree_index	Tree index which items will be inserted under.

tree_wid	Window ID of tree control.

in_refresh	Non-zero if we are in a refresh operation.

class_filter	Regular expression for class filtering.

member_filter	Regular expression for member filtering.

exception_name	Name of tag to be allowed as an exception even if class/member/attribute filtration fails.

filter_flags	Attribute (flag-based) filtration flags.  For details, see tag_tree_filter_member2.

icons	Two-dimensional array of tag bitmaps.

Remarks	This function is called to prepare the tag database DLL for inserting a large number of tags from a common class or category.  It copies a number of options and parameters into globals where they are accessed as members are added under that node.  This mitigates the parameter passing overhead normally that would otherwise be required to apply filters, select bitmaps, and determining the tree to insert into.

Return	0 on success, <0 on error.

See Also	tag_tree_add_members_in_category, tag_tree_add_members_in_section, tag_tree_add_members_of, tag_tree_insert_tag, tag_tree_select_bitmap


tag_tree_select_bitmap

void tag_tree_select_bitmap(int i_access, int i_type, int &leaf_flag, int &pic_member )

Parameters	Description

i_access	Member access level, see tag_tree_filter_member2

i_type	Item type for selecting bitmap, see tag_tree_filter_member2.

leaf_flag	(Output) Is this item a container or leaf?.

pic_member	(Output) Picture index for bitmap.

Remarks	This function is used to get the picture indexes of the icons corresponding to the given i_access level and i_type category.  You must call tag_tree_prepare_expand prior to calling this function.  i_access and i_type are typically obtained from tag_tree_filter_member2.

See Also	_TreeAddItem, tag_tree_prepare_expand, tag_tree_insert_tag


tag_tree_set_user_info

void tag_tree_set_user_info(int tree_wid, int tree_index, int tag_file_id, int file_id, int line_no )

Parameters	Description

tree_wid	Window ID of the tree control to insert into.

tree_index	Parent tree node index to insert item under.

tag_file_id	Unique numeric ID for tag file, 0 for 'current' tag file. Each tag file displayed in the class browser is assigned a unique integer ID, simply numbering them sequentially.  The need for the tag file ID stems from using the raw file_id, which only makes sense in the context of a particular tag file.

file_id	Unique integer ID of file, from tag_get_detail.

line_no	Line number where the tag begins in file_name.  Use 0 to represent an unknown line number.

Remarks	This function sets the user data for the given node in the given tree calculated using the algorithm designed for the class browser, creating a (potentially) large integer that may be decomposed to reveal a tag file ID, file ID, and line number.

The formula used to compute the integer stored is as follows:

tag_file_id * CB_MAX_LINE_NUMBER * CB_MAX_FILE_NUMBER

+  file_id * CB_MAX_LINE_NUMBER + line_no

In most cases, tag_file_id is 0, allowing the result to fit in a normal 32-bit unsigned integer providing that the file_id is sufficiently small.

The tag_file_id, file_id, and line_no identify the tag file name and location in source code for the given tag.  This information, together with the name of the tag from the caption is normally adequate to uniquely identify a tag in a tag database.  The reason for encoding them into a single integer is simply for efficiency and space-savings.  If this information were stored and not encoded in this manner, a tree with 10,000 or more tags displayed would require megabytes of memory, whereas using this scheme it only requires a few hundred kilobytes, as well as mitigating memory fragmentation.

See Also	_TreeSetUserInfo, tag_get_detail, tag_tree_insert_tag, tag_tree_prepare_expand


tag_tree_type_is_class

boolean tag_tree_type_is_class(_str type_name )

Return	Boolean result true if the given  type_name is a class, struct or union type (class, struct, union, interface, or task).

See Also	tag_get_type


tag_tree_type_is_func

boolean tag_tree_type_is_func(_str type_name )

Return	Boolean result true if the given  type_name is a function or procedure type (proc, proto, func, constr, or destr).

See Also	tag_get_type


tag_tree_type_is_package

boolean tag_tree_type_is_package(_str type_name )

Return	Boolean result true if the given  type_name is a package, library, or program type (package, lib, or prog).

See Also	tag_get_type


tagsdb_version

_command tagsdb_version()

Remarks	Display the effective version of tagsdb.dll.


CB_MAX_FILE_NUMBER

constant CB_MAX_FILE_NUMBER = 0x10000 = 65536

Remarks	This constant represents the highest file name ID that can be encoded into the user information for an item in the tree control.  See tag_tree_set_user_info for more information.

See Also	tag_tree_set_user_info, tag_tree_insert_fast, tag_tree_insert_tag


CB_MAX_LINE_NUMBER

constant CB_MAX_LINE_NUMBER = 0x100000 = 1048576

Remarks	This constant represents the highest line number that can be encoded into the user information for an item in the tree control.  See tag_tree_set_user_info for more information.

See Also	tag_tree_set_user_info, tag_tree_insert_fast, tag_tree_insert_tag


VS_REF_LATEST_VERSION

constant VS_REF_LATEST_VERSION

Remarks	This constant represents the latest version of the references database format implemented in the DLL tagsdb.dll.

See Also	tag_current_version


VS_TAG_LATEST_VERSION

constant VS_TAG_LATEST_VERSION

Remarks	This constant represents the latest version of the tagging database format implemented in the DLL tagsdb.dll.

See Also	tag_current_version


VS_TAGSEPARATOR_args

constant VS_TAGSEPARATOR_args = "\1"

Remarks	This constant represents the character used to separate arguments from the return type in the signature for of a function, template class, or #define.  For example, for the C function char *strdup(const char *s), the signature is "char*\1const char*".

See Also	tag_get_detail, tag_insert_tag


VS_TAGSEPARATOR_class

constant VS_TAGSEPARATOR_class = ":"

Remarks	This constant represents the character used to separate inner classes from outer classes in class names.  For example, if you have a class B nested inside a class A, the class name used in the database is A:B.

See Also	tag_find_class, tag_get_class, tag_next_class, tag_insert_tag


VS_TAGSEPARATOR_equals

constant VS_SEPARATOR_equals = "="

Remarks	This constant represents the character used to separate the return type of a typed constant from its value.  For example, for the Pascal constant A:integer:=3, the signature is "integer=3".

See Also	tag_get_detail, tag_insert_tag


VS_TAGSEPARATOR_file

constant VS_TAGSEPARATOR_file = "\1"

Remarks	This constant represents the character used to separate the real source file name from the name of the souce file that an external macro was included from.class names in the list of parent classes that a class derives from.

See Also	tag_get_date, tag_insert_tag, tag_set_date


VS_TAGSEPARATOR_package

constant VS_TAGSEPARATOR_package = "/"

Remarks	This constant represents the character used to separate class names from package names.  For example, if you have a class B in a package A, the class name used in the database is A/B.

See Also	tag_find_class, tag_get_class, tag_next_class, tag_insert_tag


VS_TAGSEPARATOR_parents

constant VS_TAGSEPARATOR_parents = ";"

Remarks	This constant represents the character used to separate class names in the list of parent classes that a class derives from.  For example, if a class derives from class A, and implements interfaces B and C, the list would be A;B;C

See Also	tag_get_inheritance, tag_set_inheritance


VS_TAGSEPARATOR_throws

constant VS_TAGSEPARATOR_throws = "\2"

Remarks	This constant represents the character used to separate the return type and arguments to a function from the list of exceptions thrown by a function.

See Also	tag_get_detail, tag_insert_tag


vsTagCloseDB

int VSAPI vsTagCloseDB( const char *pszFilename=0, int leave_open=0)

Parameters	Description

pszFilename	(optional) File path of database to close.

leave_open	(default false) If false, do not really close the file, instead flush the buffer if open read-write, then leave the file open read-only.

Remarks	Close a tag database.

Example	The following example illustrates closing a tag database.

int status = vsTagCloseDB("C:\temp\tags.vtg",1 /* leave open read-only */);

if (status < 0) {

    xprintf("error %d closing tag file",status);

}

Return	Returns 0 on success, or <0 on error.

See Also	vsTagCreateDB, vsTagOpenDB


vsTagCreateDB

int VSAPI vsTagCreateDB(const char *pszFilename)

Parameters	Description

pszFilename	File path where to create new database.  If the file already exists, it will be truncated.

Remarks	Create a tags database, with standard tables, index, and types.

Example	The following example illustrates creating a new tag database.

int status = vsTagCreateDB("C:\temp\tags.vtg");

if (status < 0) {

    xprintf("error %d creating tag file",status);

}

Return	Returns 0 on success, or <0 on error.

See Also	vsTagCloseDB, vsTagOpenDB


vsTagFindClass

int VSAPI vsTagFindClass(char *pszClassName, const char *pszSearch=0, int normalize=0, int case_sensitive=1, int find_first=1)

Parameters	Description

pszClassName	(output) output buffer for full class name (1024 bytes) Allocate VS_TAG_MAX_CLASSNAME characters

pszSearch	(optional) name of class to look for, can be 0.

normalize	attempt to normalize class name found?

case_sensitive	case sensitive search?

find_first	find first match or next match

Remarks	Return the first class name in the database, matching pszSearch, normalize the class name if necessary (find the class/package scope that this class belongs to).

Example	The following example illustrates listing all classes in the database.

char szClassName[VS_TAG_MAX_CLASSNAME];

int status = vsTagFindClass(szClassName);

while (!status) {

    xprintf("class: %s",szClassName);

    status = vsTagFindClass(szClassName,0,0,0,0);

}

The following example illustrates how to "normalize" a class name to find its class or package scope.

char szClassName[VS_TAG_MAX_CLASSNAME];

int status = vsTagFindClass(szClassName,"FooBar",1,1,1);

if (!status) {

    xprintf("class FooBar normalized: %s",szClassName);

}

Return	Returns 0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

See Also	vsTagFindEqual, vsTagFindMember, vsTagFindTag, vsTagGetClassParents


vsTagFindClosest

int VSAPI vsTagFindClosest( const char *pszTagName, const char *pszFilename, int line_no, int case_sensitive=0)

Parameters	Description

pszTagName	Name of tag to search for.

pszFilename	Full path to file containing tag.

line_no	Line that tag is expected to be at or near.

case_sensitive	Use case insensitive string comparison?

Remarks	Retrieve tag in the given file closest to the given line number.  Use vsTagGetTagInfo to extract the details about the tag.

Example	The following example illustrates tagging references.

int status = vsTagFindClosest("foobar", "C:\temp\junk3.java", 32, 1);

if (status < 0) {

    xprintf("could not find tag foobar");

}

Return	Returns 0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

See Also	vsTagGetTagInfo, vsTagGetDetailI, vsTagGetDetailZ, vsTagFindEqual, vsTagFindGlobal, vsTagFindMember, vsTagFindRegex, vsTagFindFile


vsTagFindEqual

int VSAPI vsTagFindEqual( const char *pszTagName, const char *pszClassName=0, int exact_match=1, int case_sensitive=1, int find_first=1, int skip_duplicates=0)

Parameters	Description

pszTagName	Name of tag or tag prefix to search for.

pszClassName	(optional) class name to search for tag_name having.

exact_match	(optional) exact match or prefix match of pszTagName.

case_sensitive	Use case insensitive string comparison?

find_first	(optional) find first match, or next match.

skip_duplicates	(optional) skip duplicate tags.

Remarks	Retrieve tags with the given tag name or tag name prefix.  Use vsTagGetTagInfo to extract the details about the tag.

Example	The following example illustrates listing the tags that start with the prefix "VS_" and then listing the instances of tags having the name "getName".

int status = vsTagFindEqual("VS_", 0, 0, 1, 1);

while (!status) {

    print_tag();

    status = vsTagFindEqual('VS_", 0, 0, 1, 0);

}

status = vsTagFindEqual("getName", 0, 1, 1, 1);

while (!status) {

    print_tag();

    status = vsTagFindEqual("getName", 0, 1, 1, 0);

}

Return	Returns 0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

See Also	vsTagGetTagInfo, vsTagGetDetailI, vsTagGetDetailZ, vsTagFindEqual, vsTagFindGlobal, vsTagFindMember, vsTagFindRegex, vsTagFindClass


vsTagFindFile

int VSAPI vsTagFindFile(char *pszFilename,const char *pszPrefix=0, int find_first=1)

Parameters	Description

pszFilename	(Output, 1024 bytes) File name as stored in database. Allocate VS_TAG_MAX_FILENAME characters

pszPrefix	(Optional) File name/path prefix to search for.  Ignored if find_first==0.

find_first	(Optional) Find first match or next match?

Remarks	Retrieve the name of files included in this tag database, or optionally, the name of a specific file, either to check if the file is in the database or to position the file iterator at a specific point. Files are ordered lexicographically, case-sensitive on UNIX platforms, case insensitive on DOS/OS2/Windows platforms.

Example	The following example prints all source file names in a tag database.

char szFileName[VS_TAG_MAX_FILENAME];

int status = vsTagFindFile(szFileName);

while (!status) {

     xprintf("file: %s",szFileName);

     status = vsTagFindFile(szFileName,0,0);

}

Return	Returns 0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

See Also	vsTagGetDate, vsTagRetagFile


vsTagFindGlobal

int VSAPI vsTagFindGlobal(int type_id, int mask=0, int nzero=0, int find_first=1)

Parameters	Description

type_id	Type id (VS_TAGTYPE_*) If (type_id<0), returns tags with any user defined tag types.

mask	Tag attribute flags set (VS_TAGFLAG_*).  The intersection of  this set of flags and those for each tag found (tag_flags) will be calculated.

nzero	Accept tag if (mask & tag_flags) is non-zero

find_first	Find first match or next match

Remarks	Retrieve the first tag included in this tag database with global scope that is one of the given type (type_id) and that matches the given tag flag mask ((mask & tag_flags) != 0) == non_zero.  Use vsTagGetTagInfo to extract the details about the tag.

Example	The following example illustrates listing the inline global functions.

int status = vsTagFindGlobal(VS_TAGTYPE_function,

VS_TAGFLAG_inline, 1, 1);

while (!status) {

    print_tag();

    status = vsTagFindGlobal(VS_TAGTYPE_function,

VS_TAGFLAG_inline, 1, 0);

}

Return	Returns 0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

See Also	vsTagGetTagInfo, vsTagGetDetailI, vsTagGetDetailZ, vsTagFindEqual, vsTagFindInFile,  vsTagFindMember, vsTagFindRegex, vsTagFindClass


vsTagFindInFile

int VSAPI vsTagFindInFile(const char *pszFilename, int find_first=1)

Parameters	Description

pszFilename	File name as stored in database.

find_first	find first match or next match.

Remarks	Find tags in the given file.  Tags are returned unsorted.  Use vsTagGetTagInfo to extract the details about the tag.

Example	The following example illustrates listing the tags in a file stored in the database.

int status = vsTagFindInFile("C:\temp\junk3.java");

while (!status) {

    char szTagName[VSMAXFILENAME];

    char szTagType[VSMAXFILENAME];

    vsTagGetDetailZ(VS_TAGDETAIL_name,0,szTagName);

    vsTagGetDetailZ(VS_TAGDETAIL_type,0,szTypeName);

    xprintf("%s(%s)", szTagName, szTypeName);

    status = vsTagFindInFile("C:\temp\junk3.java", 0 /*find next*/);

}

Return	Returns 0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

See Also	vsTagGetTagInfo, vsTagGetDetailI, vsTagGetDetailZ, vsTagFindEqual, vsTagFindGlobal, vsTagFindMember, vsTagFindRegex, vsTagFindFile


vsTagFindMember

int VSAPI vsTagFindMember( const char *pszClassName, const char *pszFilename=0, int find_first=1)

Parameters	Description

pszClassName	Class name to search for members of.

pszFilename	(optional), Tag must come from this file.

find_first	Find first match or next match.

Remarks	Retrieve tags included in this tag database which belong to the given class name, and if specified, comes from the given file.  Use vsTagGetTagInfo to extract the details about the tag.

Example	The following example lists the members of class "Foo".

int status = vsTagFindMember("Foo",0,1);

while (!status) {

    print_tag();

    status = vsTagFindMember("Foo",0,0);

}

Return	Returns 0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

See Also	vsTagGetTagInfo, vsTagGetDetailI, vsTagGetDetailZ, vsTagFindEqual, vsTagFindInFile,  vsTagFindTag, vsTagFindGlobal, vsTagFindClass


vsTagFindRegex

int VSAPI vsTagFindRegex(const char *pszTagRegex, const char *pszSearchOptions=0, int find_first=1)

Parameters	Description

pszTagRegex	Regular expression to search for tags matching.

pszSearchOptions	Search options, passed to vsStrPos().

find_first	Find first match or next match.

Remarks	Find tags in the database with tag names matching the given regular expression.

Example	The following example illustrates how to find all tags having "year", "month" or "day" in the tag name.

int status = vsTagFindRegex("year|month|day","ri",1);

while (!status) {

    print_tag();

    status = vsTagFindRegex("year|month|day","ri",0);

}

Return	Returns 0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

See Also	vsTagGetTagInfo, vsTagGetDetailI, vsTagGetDetailZ, vsTagFindEqual, vsTagFindInFile,  vsTagFindMember, vsTagFindGlobal, vsTagFindClass


vsTagFindTag

int VSAPI vsTagFindTag(const char *pszTagName, int type_id, const char *pszClassName=0, int find_first=1, const char *signature=0)

Parameters	Description

pszTagName	Tag name to find, exact match.

type_id	Tag type to search for pszTagName having (VS_TAGTYPE_*)

pszClassName	Class name to search for pszTagName having.

find_first	Find first match, or next match.

signature	Function signature, ignored if no match found.

Remarks	Find tags with the given, name, type and class. Use vsTagGetTagInfo to extract the details about the tag.

Example	The following example illustrates listing all overloads of the "getName" function in class "Bar":

int status = vsTagFindTag("getName",VS_TAGTYPE_proto,"Bar",1);

while (!status) {

    print_tag();

    status = vsTagFindTag("getName",VS_TAGTYPE_proto,"Bar",0);

}

Return	Returns 0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

See Also	vsTagGetTagInfo, vsTagGetDetailI, vsTagGetDetailZ, vsTagFindEqual, vsTagFindInFile,  vsTagFindMember, vsTagFindGlobal, vsTagFindClass


vsTagGetClassParents

int VSAPI vsTagGetClassParents(const char *pszClassName)

Parameters	Description

pszClassName	Qualified name of class or interface to get inheritance information for.  See vsTagFindClass for information on normalizing a class name.

Remarks	Return the list of parents for the given class name.  The parents are returned as an array of null-terminated character strings.  This function has the side effect of positioning the class iterator on the given class.  Since tagging usually cannot resolve the scope of parent classes, you will normally have to use this in conjunction with vsTagFindClass to get the qualified name for the parent class.

Example	The following example shows how to normalize a class name and get its parents.

// normalize the class name

char szClassName[VS_TAG_MAX_CLASSNAME];

int status = vsTagFindClass(szClassName,"FooBar",1,1,1);

if (!status) {

    xprintf("class FooBar normalized: %s",szClassName);

} else {

    xprintf("could not find class FooBar");

    return;

}

// retrieve the inheritance information

const char **ppParents = vsTagGetClassParents(szClassName);

if (ppParents) {

    for (int i=0; ppParents[i]; ++i ) {

        xprintf("Parent: %s", ppParents[i]);

    }

}

Return	Returns 0 on failure, otherwise it returns the list of parent classes.  Note that the list returned is allocated statically, and NULL terminated.  It will not return more 127 class names.

See Also	vsTagFindEqual, vsTagFindMember, vsTagFindTag, vsTagFindClass


vsTagGetContextInfo

int VSAPI vsTagGetContextInfo( int context_id, char *pszTagName, char *pszTypeName, int &tag_flags, char *pszFilename, int &start_line_no, int &start_seekpos, int &scope_line_no, int &scope_seekpos, int &end_line_no,   int &end_seekpos, char *pszClassName=0, char *pszReturnType=0, char *pszArguments=0, char *pszExceptions=0)

Parameters	Description

context_id	Unique ID of context item, 1..num_of_context.  This function will return an error if this value is out of range, that can be used to know when you have looked at the last context item, see example, below.

pszTagName	(Output, required) Name of tag or symbol.  Allocate VS_TAG_MAX_TAGNAME characters.

pszTypeName	(Output, optional) Tag type name, see tag_get_type.  Allocate VS_TAG_MAX_TYPENAME characters.

tag_flags	(Output) Tag flags indicating symbol attributes, VS_TAGFLAG_*.

pszFilename	(Output, optional) File name as stored in database.  Allocate VS_TAG_MAX_FILENAME characters.

start_line_no	(Output) Line number where the tag begins in file_name.

start_seekpos	(Output) Seek position where the tag begins in file_name.

scope_line_no	(Output) Line number where the scope of the tag begins in file_name.  For example, this is the line on which opening brace is found in a C function.  For tags where scope is not applicable, simply the same value as start_line_no.

scope_seekpos	(Output) Seek position where the scope of the tag begins in file_name.  See explanation above.

end_line_no	(Output) Line number where the tag ends in file_name.

end_seekpos	(Output) Line number where the tag ends in file_name.  Technically, this is the seek position of the last character in the tag.  Using a C function for example, this is the seek position of the close brace ending the function body.

pszClassName	(Output, optional) Name of class that tag belongs to.  Allocate VS_TAG_MAX_CLASSNAME characters.

pszReturnType	(Output, optional) Declared type/value of symbol or function.  Allocate VS_TAG_MAX_SIGNATURE chars.

pszArguments	(Output, optional) Function/Macro arguments.  Allocate VS_TAG_MAX_SIGNATURE characters.

pszExceptions	(Output, optional) Exceptions thrown by function.  Allocate VS_TAG_MAX_SIGNATURE characters.

Remarks	Retrieve general information about the given tag in the current context.  If the context is not loaded, all strings will be set to "", and integers will be set to 0.  Any of the string arguments, except pszTagName, may be passed as 0, and then will not be retrieved.

Example	The following example illustrates printing tag information for all the items in the current context, in no particular order.

for (int i=0; 1; ++i ) {

    char szTagName[VS_TAG_MAX_TAGNAME];

    char szTypeName[VS_TAG_MAX_TYPENAME];

    char szFileName[VS_TAG_MAX_FILENAME];

    char szClassName[VS_TAG_MAX_CLASSNAME];

    char szReturnType[VS_TAG_MAX_SIGNATURE];

    char szArguments[VS_TAG_MAX_SIGNATURE];

    char szExceptions[VS_TAG_MAX_SIGNATURE];

    int tag_flags;

    int start_line_no, start_seekpos;

    int scope_line_no, scope_seekpos;

    int end_line_no, end_seekpos;

    int status = vsTagGetContextInfo(i,

                            szTagName, szTypeName, tag_flags,

                            szFileName, start_line_no, start_seekpos,

                            scope_line_no, scope_seekpos,

                            end_line_no, end_seekpos,

                            szClassName, szReturnType,

                            szArguments, szExceptions);

    if (status) break;

    xprintf("N=%s, T=%s, F=%s:%d, C=%s, F=%d, R=%s, A=%s, X=%s",

                  szTagName, szTypeName, szFileName, line_no,

                  szClassName, tag_flags, szReturnType,

                   szArguments, szExceptions);

}

Return	Returns 0 on success, < 0 on error.

See Also	vsTagGetDetailI, vsTagGetDetailZ


vsTagGetDate

int VSAPI vsTagGetDate(const char *pszFilename, char *pszDate=0)

Parameters	Description

pszFilename	File path of source file to retrieve tagging date for.

pszDate	(optional) Modification date of file when tagged.  Format is YYYYMMDDHHMMSSmmm.  (year, month, day, hour, minute, second, ms).  Allocate 20 bytes.

Remarks	Retrieve the date of tagging for the given file.  The string returned by this function is structured such that consecutive dates are ordered lexicographically, and is reported in local time coordinates (YYYYMMDDHHMMSSmmm).  This function has the side effect of positioning the file iterator on the given file name, and may be used to test for the existence of a file in the database.

Example	The following example prints the date of a temp file if it is in the database.

char szDate[20];

if (vsTagGetDate("C:\temp\junk3.c", szDate)==0) {

    xprintf("date is %s", szDate);

} else {

    xprintf("file not found");

}

Return	Returns 0 on success, < 0 on error, BT_RECORD_NOT_FOUND_RC if not found.

See Also	vsTagFindFile, vsTagRetagFile


vsTagGetDetailI

int VSAPI vsTagGetDetailI(int detail_id, int item_id, int &iValue)

Parameters	Description

detail_id	ID of detail to extract, one of.  Refer to tag_get_detail and tag_get_detail2 for a list of values allowed here.  Note that this function only supports details that have integer values.

item_id	ID of local variable, context item to get information about, ignored if the detail is for the current tag in the database.

iValue	(Output) Set to tag detail value.  If the given tag does not exist, this will be set to 0.

Remarks	Retrieve specific integer information about the given tag, context item or local variable.  This function complements vsTagGetTagInfo(), vsTagGetContextInfo() and vsTagGetLocalInfo(), but is capable of getting much more specific information about the given tag.

Example	The following example shows how to print only the tag name and start line number for all the function prototypes in the current tag database.

int status = vsTagFindGlobal(VS_TAGTYPE_proto, 0, 0, 1);

while (!status) {

    char szTagName[VS_TAG_MAX_TAGNAME];

    int line_no;

    vsTagGetDetailZ(VS_TAGDETAIL_name, 0, szTagName);

    vsTagGetDetailI(VS_TAGDETAIL_file_line, 0, line_no);

    xprintf("%d: %s",line_no, szTagName);

    status = vsTagFindGlobal(VS_TAGTYPE_proto, 0, 0, 0);

}

Return	Returns 0 on success, or <0 on error.

See Also	vsTagGetDetailZ, vsTagGetTagInfo, vsTagGetContextInfo, vsTagGetLocalInfo, tag_get_detail, tag_get_detail2


vsTagGetDetailZ

int VSAPI vsTagGetDetailZ(int detail_id, int item_id, char *pszValue)

Parameters	Description

detail_id	ID of detail to extract, one of.  Refer to tag_get_detail and tag_get_detail2 for a list of values allowed here.  Note that this function only supports details that have integer values.

item_id	ID of local variable, context item to get information about, ignored if the detail is for the current tag in the database.

pszValue	(Output) Set to tag detail value.  If the given tag does not exist, this will be set to the empty string.  Allocate at least VSMAXFILENAME bytes.

Remarks	Retrieve specific string information about the given tag, context item or local variable.  This function complements vsTagGetTagInfo(), vsTagGetContextInfo() and vsTagGetLocalInfo(), but is capable of getting much more specific information about the given tag.

Example	The following example shows how to print only the tag name and start line number for all the tags in the current context.

for (int i=0; 1; ++i ) {

    char szTagName[VS_TAG_MAX_TAGNAME];

    int line_no;

    vsTagGetDetailZ(VS_TAGDETAIL_context_name, i, szTagName);

    vsTagGetDetailI(VS_TAGDETAIL_context_start_linenum, 0, line_no);

    xprintf("%d: %s",line_no, szTagName);

}

Return	Returns 0 on success, or <0 on error.

See Also	vsTagGetDetailI, vsTagGetTagInfo, vsTagGetContextInfo, vsTagGetLocalInfo, tag_get_detail, tag_get_detail2


vsTagGetLocalInfo

int VSAPI vsTagGetLocalInfo( int local_id, char *pszTagName, char *pszTypeName, int &tag_flags, char *pszFilename, int &start_line_no, int &start_seekpos, int &scope_line_no, int &scope_seekpos, int &end_line_no,   int &end_seekpos, char *pszClassName=0, char *pszReturnType=0, char *pszArguments=0, char *pszExceptions=0)

Parameters	Description

local_id	Unique ID of local variable, 1..num_of_locals.  This function will return an error if this value is out of range, that can be used to know when you have looked at the last local variable, see example, below.

pszTagName	(Output, required) Name of tag or symbol.  Allocate VS_TAG_MAX_TAGNAME characters.

pszTypeName	(Output, optional) Tag type name, see tag_get_type.  Allocate VS_TAG_MAX_TYPENAME characters.

tag_flags	(Output) Tag flags indicating symbol attributes, VS_TAGFLAG_*.

pszFilename	(Output, optional) File name as stored in database.  Allocate VS_TAG_MAX_FILENAME characters.

start_line_no	(Output) Line number where the tag begins in file_name.

start_seekpos	(Output) Seek position where the tag begins in file_name.

scope_line_no	(Output) Line number where the scope of the tag begins in file_name.  For example, this is the line on which opening brace is found in a C function.  For tags where scope is not applicable, simply the same value as start_line_no.

scope_seekpos	(Output) Seek position where the scope of the tag begins in file_name.  See explanation above.

end_line_no	(Output) Line number where the tag ends in file_name.

end_seekpos	(Output) Line number where the tag ends in file_name.  Technically, this is the seek position of the last character in the tag.  Using a C function for example, this is the seek position of the close brace ending the function body.

pszClassName	(Output, optional) Name of class that tag belongs to.  Allocate VS_TAG_MAX_CLASSNAME characters.

pszReturnType	(Output, optional) Declared type/value of symbol or function.  Allocate VS_TAG_MAX_SIGNATURE chars.

pszArguments	(Output, optional) Function/Macro arguments.  Allocate VS_TAG_MAX_SIGNATURE characters.

pszExceptions	(Output, optional) Exceptions thrown by function.  Allocate VS_TAG_MAX_SIGNATURE characters.

Remarks	Retrieve general information about the given local variable. If the locals are not loaded, all strings will be set to "", and integers will be set to 0.  Any of the string arguments, except pszTagName, may be passed as 0, and then will not be retrieved.

Example	The following example illustrates printing tag information for all the items in the current context, in no particular order.

for (int i=0; 1; ++i ) {

    char szTagName[VS_TAG_MAX_TAGNAME];

    char szTypeName[VS_TAG_MAX_TYPENAME];

    char szFileName[VS_TAG_MAX_FILENAME];

    char szClassName[VS_TAG_MAX_CLASSNAME];

    char szReturnType[VS_TAG_MAX_SIGNATURE];

    char szArguments[VS_TAG_MAX_SIGNATURE];

    char szExceptions[VS_TAG_MAX_SIGNATURE];

    int tag_flags;

    int start_line_no, start_seekpos;

    int scope_line_no, scope_seekpos;

    int end_line_no, end_seekpos;

    int status = vsTagGetLocalInfo(i,

                            szTagName, szTypeName, tag_flags,

                            szFileName, start_line_no, start_seekpos,

                            scope_line_no, scope_seekpos,

                            end_line_no, end_seekpos,

                            szClassName, szReturnType,

                            szArguments, szExceptions);

    if (status) break;

    xprintf("N=%s, T=%s, F=%s:%d, C=%s, F=%d, R=%s, A=%s, X=%s",

                  szTagName, szTypeName, szFileName, line_no,

                  szClassName, tag_flags, szReturnType,

                   szArguments, szExceptions);

}

Return	Returns 0 on success, < 0 on error.

See Also	vsTagGetDetailI, vsTagGetDetailZ


vsTagGetTagInfo

int VSAPI vsTagGetTagInfo( char *pszTagName, char *pszTypeName, int &tag_flags, char *pszFilename, int &line_no, char *pszClassName=0, char *pszReturnType=0, char *pszArguments=0, char *pszExceptions=0)

Parameters	Description

pszTagName	(Output, required) Name of tag or symbol.  Allocate VS_TAG_MAX_TAGNAME characters.

pszTypeName	(Output, optional) Tag type name, see tag_get_type.  Allocate VS_TAG_MAX_TYPENAME characters.

tag_flags	(Output) Tag flags indicating symbol attributes, VS_TAGFLAG_*.

pszFilename	(Output, optional) File name as stored in database.  Allocate VS_TAG_MAX_FILENAME characters.

line_no	(Output) Line number that tag occurs on in file_name.

pszClassName	(Output, optional) Name of class that tag belongs to.  Allocate VS_TAG_MAX_CLASSNAME characters.

pszReturnType	(Output, optional) Declared type/value of symbol or function.  Allocate VS_TAG_MAX_SIGNATURE chars.

pszArguments	(Output, optional) Function/Macro arguments.  Allocate VS_TAG_MAX_SIGNATURE characters.

pszExceptions	(Output, optional) Exceptions thrown by function.  Allocate VS_TAG_MAX_SIGNATURE characters.

Remarks	Retrieve general information about the current tag (as defined by calls to vsTagFindGlobal, vsTagFindMember, etc.  If the current tag is not defined, such as immediately after opening a database or a failed search), all strings will be set to "", and line_no and tag_flags will be set to 0.  Any of the string arguments, except pszTagName, may be passed as 0, and then will not be retrieved.

Example	The following example illustrates print tag information for the current tag.

static void print_tag() {

    char szTagName[VS_TAG_MAX_TAGNAME];

    char szTypeName[VS_TAG_MAX_TYPENAME];

    char szFileName[VS_TAG_MAX_FILENAME];

    char szClassName[VS_TAG_MAX_CLASSNAME];

    char szReturnType[VS_TAG_MAX_SIGNATURE];

    char szArguments[VS_TAG_MAX_SIGNATURE];

    char szExceptions[VS_TAG_MAX_SIGNATURE];

    int line_no, tag_flags;

    vsTagGetTagInfo(szTagName, szTypeName, tag_flags,

                            szFileName, line_no,

                            szClassName, szReturnType,

                            szArguments, szExceptions);

    xprintf("N=%s, T=%s, F=%s:%d, C=%s, F=%d, R=%s, A=%s, X=%s",

                  szTagName, szTypeName, szFileName, line_no,

                  szClassName, tag_flags, szReturnType,

                   szArguments, szExceptions);

}

Return	Returns 0 on success, < 0 on error.

See Also	vsTagGetDetailI, vsTagGetDetailZ, vsTagFindEqual, vsTagFindInFile,  vsTagFindMember, vsTagFindGlobal, vsTagFindTag, vsTagFindRegex


vsTagListTagFiles

char ** VSAPI vsTagListTagFiles( int doRelative=0,char *pszExt=0, int includeSlickC=1)

Applies To	Edit Window, Editor Control

Parameters	Description

doRelative	When 0, all tag file names are returned with an absolute path.  Otherwise, some tag files may be relative to the current directory.

pszExt	Extension for which the tag files are to be returned.  If this is null, all tag files are returned.

includeSlickC	Indicates whether Slick-C tags file should be returned.

Returns	Returns a pointer to an array of pointers to null terminated strings.  Where the null terminated strings are the tag filenames.  The last pointer in the array is null.

Example

char **pplist=vsTagListTagFiles(0,"c");

for (;*pplist;) {

   xprintf("%s",*pplist);

   ++pplist;

}

See Also	vsTagSetTagFiles


vsTagMakeCaption

int VSAPI vsTagMakeCaption(const char *pszTagName, const char *szTypeName, const char *pszClassName, int tag_flags, const char *pszArguments=0, int include_tab=0)

Parameters	Description

pszTagName	Name of  tag (symbol).

pszTypeName	Tag type, see tag_get_type.

pszClassName	Name of class or package or other container that the tag belongs to.  See VS_TAGSEPARATOR_class and VS_TAGSEPARATOR_package for more details about constructing this value.  If the tag is not in a class scope, simple pass the empty string for this value.

tag_flags	Set of tag attribute flags.  See tag_insert_simple for more information about the tag flags.

pszArguments	Arguments, such as function or template class parameters.

include_tab	If 0, does not create separate tab for details.

Remarks	Encode class name, member name, signature, etc. in order to make caption for tree item very quickly.  Returns the resulting tree caption as a NULL terminated string.  The output string is generally formatted as follows:

member_name[()] <tab> [class_name::member_name[(arguments)]

Parenthesis are added only for function types (proc, proto, constr, destr, func) and parameterized classes.  The result is returned as a pointer to a static character array.

Example	The following example illustrates constructing a caption for the following C++ class member prototype:

static void MyClass::myMember(int a, bool x);

The function would be invoked as follows:

tag_tree_make_caption("myMember", "func", "MyClass",

VS_TAGFLAG_static, "int a, bool x", include_tab);

producing the following caption if include_tab is true:

myMember()<tab>MyClass::myMember(int a, bool x)

and the following if include_tab is false.

MyClass::myMember(int a, bool x)

Return	Caption formatted in standard form as normally presented in class browser. Note the result is returned is a statically allocated NULL terminated string.

See Also	vsTagGetDetailZ, vsTagGetDetailI, vsTagGetTagInfo


vsTagOpenDB

int VSAPI vsTagOpenDB( const char *pszFilename, int read_only=1)

Parameters	Description

pszFilename	File path of database to open.

read_only	(default true) open the database for read access.

Remarks	Open an existing database for read-only or read-write access.  The database type (tags, references) is automatically detected. BSC files can not be opened read-write.

Example	The following example illustrates opening a tag database.

int status = vsTagOpenDB("C:\temp\tags.vtg");

if (status < 0) {

    xprintf("error %d opening tag file",status);

}

Return	Returns 0 on success, or <0 on error.

See Also	vsTagCreateDB, vsTagCloseDB


vsTagRemoveFromFile

int VSAPI vsTagRemoveFromFile(const char *pszFilename,int remove_file=0)

Parameters	Description

pszFilename	File path of source file to remove from tag file.

remove_file	If true, remove file_name from the tag database completely, not just the tags in that file.  Default is false.

Remarks	Remove all tags or references from the given source file.  This is an effective, but costly way to perform an incremental update of the database.  First remove all items associated with that file, then insert them again. Note that the database needs to be open for read-write access when this function is called.

Example	The following example illustrates removing a file from the database.

int status = vsTagOpenDB("C:\temp\tags.vtg",0 /*read write access*/);

if (status) {

    xprintf("error %d opening tag file", status);

}

status = vsTagRemoveFromFile("C:\temp\junk3.java", 1 /*remove file entry*/);

if (status) {

    xprintf("error %d tagging file", status);

}

Return	Returns 0 on success, or <0 on error.

See Also	vsTagOpenDB, vsTagFindFile, vsTagRetagFile, vsTagCloseDB


vsTagRetagFile

int VSAPI vsTagRetagFile(const char *pszFilename,const char *pszExt =0,int reserved=0)

Parameters	Description

pszFilename	Name/Path to source file to tag.

pszExt	File extension to use for tagging this source code.

reserved	future expansion.

Remarks	Retag the given file, using the given extension-specific parser.  Note that the database needs to be open for read-write access when this function is called.

Example	The following example illustrates tagging a Java source file.

int status = vsTagCreateDB("C:\temp\tags.vtg");

if (status) {

    xprintf("error %d creating tag file", status);

}

status = vsTagRetagFile("C:\temp\junk3.java", "java");

if (status) {

    xprintf("error %d tagging file", status);

}

Return	Returns 0 on success, or <0 on error.

See Also	vsTagCreateDB, vsTagOpenDB, vsTagCloseDB, vsTagFindFile, vsTagGetDate, vsTagRemoveFromFile


vsTagSetTagFiles

void VSAPI vsTagSetTagFiles( const char *pszExt, char **ppList, int append=0)

Applies To	Edit Window, Editor Control

Parameters	Description

pszExt	Indicates the extension for which the tag files are to be set.

ppList	Pointer to an array of pointers to null terminated strings.  Where the null terminated strings are the tag filenames.  Tag files names must either have an absolute path or not path at all.   A tag file name with no path indicates a relative tag file.  Relative tag files are always relative to the current directory.

append	When non-zero, the tag file list is appended to the current tag file list.  Otherwise, the extension specific tag files are replaced with the list given.  Only one tag file name can be given when this option is specified.

Remarks	Sets the extension specific tag files.

Example

char *list[20];

list[0]="c:\\temp\\tags.vtg";

list[1]="c:\\temp\\junk.vtg";

list[2]=0;

vsTagSetExtTagFiles("c",list);


vsTagUpdateContext

int VSAPI vsTagUpdateContext( )

Remarks	Update the tags in the current context (current buffer) if necessary.  The context needs to be updated if we switch buffers, or if the buffer is modified.

Example	The following example illustrates updating the list of tags in the current buffer.

int status = vsTagUpdateContext();

if (status) {

    xprintf("error %d updating tags in current buffer", status);

}

Return	Returns 0 on success, or <0 on error.

See Also	vsTagGetContextInfo, vsTagGetDetailI, vsTagGetDetailZ, vsTagUpdateLocals


vsTagUpdateLocals

int VSAPI vsTagUpdateLocals( )

Remarks	Update the list of local variables found in the current function, if necessary.  The locals need to be updated if the cursor moves or if the buffer is modified, or if we switch buffers.

Example	The following example illustrates updating the list of local variables.

int status = vsTagUpdateLocals();

if (status) {

    xprintf("error %d updating tags in current buffer", status);

}

Return	Returns 0 on success, or <0 on error.

See Also	vsTagGetLocalInfo, vsTagGetDetailI, vsTagGetDetailZ, vsTagUpdateContext


This section of the manual describes the features of Visual SlickEdit's ISPF editor emulation.

ISPF Options dialog box

ISPF Primary Commands

ISPF Line Commands

XEDIT Line Commands

ISPF Unsupported Primary Commands

ISPF Emulation Commands


ISPF Options dialog box

ISPF Options dialog box

 ("Tools", "Configuration", "ISPF Options...")

This dialog is used to tune various ISPF emulation options, including:

Prefix area width

The number of characters to display in the prefix area (default is 6).  Note that some line commands require four characters (e.g. BNDS, TABS, COLS, MASK).  To completely remove the prefix area, set the prefix area width to 0.

Display prefix area for read only files

When viewing a file in read only mode (browse mode), should the prefix area be displayed?  Only the following line commands are allowed in read-only mode:

ISPF Line Labels	Define a label.

ISPF Line Command BNDS	Insert a column boundary ruler line.

ISPF Line Command COLS	Insert a column ruler line.

ISPF Line Command First	Expose one or more lines at the beginning of a block of excluded lines.

ISPF Line Command Last	Expose one or more lines at the beginning of a block of excluded lines.

ISPF Line Command Show	Expose one or more lines having the leftmost indentation level in a block of excluded lines.

ISPF Line Command TABS	Displays the tab definition line.

ISPF Line Command Exclude	Specifies one or more lines to be hidden (excluded).

ISPF Line Command Select	Select a block of lines.

Enter places cursor in prefix area

When on, the ENTER key places the cursor in the prefix area of the next line.  When off, the ENTER key places the cursor in column 1 of the next line.

Right CTRL = Enter/Send

When this option is enabled, the Enter key places the cursor at the beginning of the next line, and the Right Ctrl key is used to execute line commands.  When off, the Right Ctrl key acts like a normal control key and the Enter key is used to execute line commands.

Cursor page up/down

When on, the display is scrolled up/down until the line the cursor is on becomes the last/first line displayed, respectively.  If the cursor is already on the top/bottom display line, the display is scrolled one page.  When disabled, page up/down always scrolls one page.

END command saves the file

When this option is enabled, changes to the buffer are saved automatically when the ispf_end (F3) command is performed.  Otherwise, you will be prompted if you want to save changes before closing the file.

XEDIT line commands

When on, the prefix area will support XEDIT-style line commands (see XEDIT Line Commands) in addition to ISPF line commands.

Home places cursor on command line

When on, the home key places the cursor on the command line.  By default, this option is off, and the home key simply moves the cursor to the beginning of the line.

Other ISPF Related options

Further ISPF related options are available on the Extension Options dialog box ("Tools", "Configuration", File Extension Setup...").  These options include auto CAPS mode, edit boundaries, and the truncation column.


ISPF Primary Commands

ISPF Primary Commands

The following standard ISPF primary commands are supported in the Visual SlickEdit ISPF emulation mode.  Primary commands are entered by placing the cursor on the command line, (see ISPF Command Line and Text Box Editing for details about command line editing features).

To place the cursor on the command line, either hit the ESC key, click on the message bar, or use ispf_retrieve (F12).  If configured to do so, (see ISPF Options dialog box), the Home key will also place the cursor on the command line.  Once on the command line, you may use the cursor up/down keys to retrieve the previous/last command entered, respectively.

Though primary commands may be typed at the command line explicitly, for convenience you can simply type the last part of the command name in the command line and it will automatically be mapped to the ISPF specific command.  For example to execute the ISPF reset command, simply type reset at the command line instead of ispf_reset.

Note that some standard Visual SlickEdit built-in commands conflict with ISPF emulation commands.  These conflicts include: copy, cut, delete, find, hex, move, and paste.  To access the built-in command, you may be able to use a menu option or consult the help for that command for specific instructions.

ispf_autonum	Turn on or off automatic renumbering of data when it is saved.

ispf_autosave	Turn on or off prompting to save changes.

ispf_bounds	Set or reset the left and right edit boundaries.

ispf_bnds	Set or reset the left and right edit boundaries

ispf_browse 	Browse a data set or member.

ispf_cancel	Closes the current file or PDS member without saving changes.

ispf_caps	Turn on or off automatic capitalization mode.

ispf_change	Replace one string with another within the current buffer.

ispf_chg	Replace one string with another within the current buffer.

ispf_compare	Compares the file you are editing with another file.

ispf_copy	Inserts the contents of a file or PDS member into the buffer.

ispf_create	Create a new file or PDS member containing the contents of the buffer.

ispf_cut	Cut lines out of the current buffer and place them in the clipboard.

ispf_delete	Deletes lines in the given line range, or the entire buffer.

ispf_edit	This command is identical to the built-in edit command.

ispf_end	Closes the current file.

ispf_exclude	Hides (excludes) lines that match the given search string.

ispf_find	Find occurrences of the given search string in the current buffer.

ispf_flip	Reverses the exclude status of lines.

ispf_hex	Toggles display of the document in hexadecimal mode.

ispf_hilite	Specify the use of color coding in the editor.

ispf_locate	Find lines with a specific line prefix.

ispf_move	Moves the contents of a file or PDS member into the buffer.

ispf_nonumber	Turns off numbering mode.

ispf_number	Controls line numbering mode. Unlike ISPF, this command does effect how lines are inserted.

ispf_paste	Copies lines from the clipboard to the buffer.

ispf_preserve	Controls saving of trailing blanks.

ispf_rchange	Repeats the change requested by the most recent change command.

ispf_renumber	Immediately updates the line numbers in a file.

ispf_replace	Save to contents of the current buffer to an existing file.

ispf_reset	Resets the contents of the line prefix area.

ispf_return	Closes the current file.

ispf_rfind	Repeat the last find operation requested.

ispf_save	This command is identical to the built-in save command.

ispf_sort	Sorts lines of data in a specified order.

ispf_submit	Submit the contents of the current buffer for batch processing.

ispf_swap	Switches to the next buffer.

ispf_tabs	Define logical tab positions.

ispf_unnumber	Blanks out the line numbers in a file.

ispf_undo	This command is identical to the undo command.


ispf_autonum

_command void ispf_autonum[on] [off]

Remarks	Turn on or off automatic renumbering of data when it is saved.  NOTE: this command is currently disabled.

See Also	ispf_number, ispf_renumber, ispf_nonumber


ispf_autosave

_command void ispf_autosave [on] [off] [prompt]

Remarks	Turn on or off prompting to save changes when you issue an ispf_end command.  If autosave is turned on, you will not be prompted, otherwise, you will be prompted.  This only effects the ISPF command ispf_end, and does not effect the built-in quit() command.  The ISPF emulation does not support the NOPROMPT option.

See Also	ispf_end, ispf_cancel, quit, ISPF Options dialog box


ispf_bounds

_command void ispf_bounds [ left-col right-col ]

Remarks	This command is used to set or reset the left and right edit boundaries in ISPF emulation.  The left-col and right-col must be integers, or an asterisk may be used in either one's place to specify the current setting.  To reset the boundaries to the extension-specific defaults, just enter bounds with no arguments.

See Also	ISPF Line Commands, ispf_change, ispf_find, ispf_exclude


ispf_bnds

_command void ispf_bnds( )

Remarks	This command is identical to the ispf_bounds command.


ispf_browse

_command void ispf_browse [ member ]

Remarks	Browse a data set or member.  If the member is a wildcard or directory, this command will generate a list of files to browse in fileman mode.  Otherwise the given file or PDS member is opened for viewing and/or editing.

Return	Returns 0 if successful.  Common return codes are FILE_NOT_FOUND_RC (occurs when wild card specification matches no files), NEW_FILE_RC (empty buffer created with filename specified because file did not exist), PATH_NOT_FOUND_RC, TOO_MANY_FILES_RC, and TOO_MANY_SELECTIONS_RC.  On error, a message is displayed.

See Also	 edit, ispf_end, ispf_cancel


ispf_cancel

_command void ispf_cancel( )

Remarks	This command closes the current file or PDS member without saving any data.  This is useful if you make changes that you do not want to save and are unable to undo.

See Also	ispf_end


ispf_caps

_command void ispf_caps [on] [off]

Remarks	Turn on or off automatic capitalization mode.  If no arguments are given the current mode is toggled.  This is very similar to using the CAPS-LOCK key on the keyboard, except that the setting is maintained per buffer.  When caps mode is on, everything you type is immediately converted to uppercase.

See Also	ISPF Line Command Uppercase, upcase


ispf_change

_command int ispf_change( ) string-1 string-2 [ range ] [next | all | first | last | prev | chars | suffix | word | x | nx] [col-1 [col-2 ]]

Remarks	The change command is used to replace one string with another.  It accepts the same search options as find, locate, and exclude.  See ispf_find for more details about the search arguments.

Return	Returns 0 if successful.

See Also	ispf_find, ispf_exclude, gui_replace, replace, c


ispf_chg

_command int ispf_chg string-1 string-2 [ range ] [next | all | first | last | prev | chars | suffix | word | x | nx] [col-1 [col-2 ]]

Remarks	This command is identical to the ispf_change command.


ispf_compare

_command void ispf_compare [ member ]

Remarks	The compare command compares the file you are editing with another file or PDS member.  The differences are displayed using the Visual SlickEdit's difference editor.  This differs from the usual ISPF compare command, but is more powerful.  Subsequently, this version of the command does not support the optional exclude, next, save, or sysin parameters found in ISPF.

See Also	diff


ispf_copy

_command void ispf_copy [ member ] [after label ] [before label ] [ line range ]

Remarks	The copy command copies the contents of a file or PDS member into the data being edited.  In addition to the file being copied, you can specify the following on the command line:

after label	The destination for the data being copied.  The label may be either an ISPF label or a line number.  The data will be inserted after the specified line.

before label	The destination for the data being copied.  The label may be either an ISPF label or a line number.  The data will be inserted after the specified line.

line range	Two numbers, specifying the starting and ending lines to copy out of the given file.

If neither AFTER nor BEFORE is specified, the default location to insert the data is after the current line (cursor position).  However, if there is an A or B line command in the prefix area, the data will be inserted at that point.

Return	Returns 0 if successful.  Common return codes are FILE_NOT_FOUND_RC, PATH_NOT_FOUND_RC, TOO_MANY_SELECTIONS_RC, and TOO_MANY_FILES_RC.  On error, a message is displayed.

See Also	ispf_move, ISPF Line Command A, ISPF Line Command B, ISPF Line Labels


ispf_create

_command void ispf_create [ member ]

Remarks	The create command is used to create a new file or PDS member from the data you are editing, thus functioning as a save-as function.  If the given file path does not exist, it will be created.

Return	Returns 0 if successful.  Common return codes are INVALID_OPTION_RC, ACCESS_DENIED_RC, ERROR_OPENING_FILE_RC, ERROR_WRITING_FILE_RC, INSUFFICIENT_DISK_SPACE_RC, DRIVE_NOT_READY_RC, and PATH_NOT_FOUND_RC.  On error, a message box is displayed.

See Also	ispf_browse, ispf_end, ispf_cancel, ispf_create, ispf_return, ispf_save


ispf_cut

_command void ispf_cut [ line range ] [default | clipboardname ] [replace] [display]

Remarks	Cut lines out of the current buffer and place them in the specified clipboard.  The following arguments are accepted.

line range	Two numbers or labels, specifying the starting and ending lines to cut to the clipboard.

clipboardname	Place the result on the named clipboard.

default	Place the result on the default clipboard.

replace	Replace the contents of the given clipboard or append to the end of the clipboard.

display	Display list of clipboards.

See Also	ispf_paste, list_clipboards, cut


ispf_delete

_command void ispf_delete [ all|x|nx ] [ line range ]

Remarks	Deletes lines in the given line range, or the entire buffer.  The following arguments are supported:

line range	Two numbers or labels, specifying the starting and ending lines to delete.

all	Delete all lines in the range, excluded or not excluded.  If no line range is given, all implies the entire buffer.

x	Only delete excluded lines.

nx	Only delete displayed lines.

See Also	ISPF Line Command Delete, delete_line


ispf_edit

_command void ispf_edit( )

Remarks	This command is identical to the built-in edit command.


ispf_end

_command void ispf_end( )

Remarks	The end command closes the current file.  If autosave is on (see ISPF Options dialog box), modifications will be saved automatically, otherwise, you will be prompted if you want to save modifications.

See Also	ispf_autosave, ispf_browse, ispf_cancel, ispf_edit, ispf_return


ispf_exclude

_command void ispf_exclude string [ range ] [next | all | first | last | prev | chars | suffix | word | x | nx] [col-1 [col-2 ]]

Remarks	This command hides (excludes) lines that match the given search string or ISPF regular expression. It accepts the same search options as find, locate, and change.  See ispf_find for more details about the search arguments.

Return	Returns 0 if the search string specified is found.  Common return codes are STRING_NOT_FOUND_RC, INVALID_OPTION_RC and INVALID_REGULAR_EXPRESSION_RC.  On error, a message is displayed.

See Also	ispf_find, ispf_flip, ISPF Line Command Exclude


ispf_find

_command int ispf_find string [ range ] [next | all | first | last | prev | chars | suffix | word | x | nx | quiet] [col-1 [col-2 ]]

Remarks	This command finds occurrences of the given search string or ISPF regular expression in the current buffer.  If an occurrence is found in an excluded line, the line will be unexcluded.  Find takes the following common searching arguments (also used in the change, exclude, and locate commands):

string	The string or regular expression to search for.

line range	Two numbers or labels, specifying the starting and ending lines to search within, inclusive.

next	Find the next occurrence starting from the cursor.

all	Find all matches in the specified range.

first	Find only the first occurrence in the specified range.

last	Find only the last occurrence in the specified range.

prev	Find the previous occurrence starting from the cursor.

chars	(default) Locate match anywhere.

prefix	Only find matches at the beginning of a word.

suffix	Only find matches at the end of a word.

word	Only find matches for the entire word.

x	Look for matches only in excluded lines.

nx	Do not report matches in excluded lines.

col-1	Starting column boundary to search within.

col-2	Ending column boundary to search within.

quiet	Do not display messages.

The ISPF find command supports ISPF regular expressions (known as picture strings).  The following table shows the specific picture string characters supported, as well as how they may be expressed as MicroEdge Regular Expressions.

=	?	any character.

^	[^ \t]	non-blank character.

.	[0-9]	non-ASCII character (0x20..0x7E)

#	[0-9]	any single decimal digit.

-	[^0-9]	non-numeric character.

@	[a-zA-Z]	alphabetic character (case-insensitive).

<	[a-z]	lowercase alphabetic character.

>	[A-Z]	uppercase alphabetic character.

$	[~ \ta-zA-Z0-9]	punctuation (not alphabetic, digit, or blank).

Return	Returns 0 if the search string specified is found.  Common return codes are STRING_NOT_FOUND_RC, INVALID_OPTION_RC and INVALID_REGULAR_EXPRESSION_RC.  On error, a message is displayed.

See Also	ispf_change, ispf_locate, ispf_exclude, ispf_hilite, ispf_flip


ispf_flip

_command void ispf_flip [ label range ]

Remarks	Reverses the exclude status of lines in the given range, or if no range is given, the entire buffer.

See Also	ispf_exclude, ispf_find, ISPF Line Command First, ISPF Line Command Exclude


ispf_hex

_command void ispf_hex [ on | off ]

Remarks	Toggles display of the document in hexadecimal mode.  Note that this is not identical to the hexadecimal mode supported by standard ISPF, but actually is simply the hexadecimal editor mode of Visual SlickEdit.  The standard ISPF hex options of VERT and DATA are not supported.

See Also	hex, Hex Editing


ispf_hilite

_command void ispf_hilite [on | off | default | other | asm | book | c | cobol | db2 | dtl | html | java | jcl | panel | pascal | pli | rexx | skel | idl] [reset] [find] [cursor] [disabled]

Remarks	This command is used to specify the use of color coding in the editor.  Normally, color coding is automatically configured when the file is opened.  The standard ISPF hilite options for SEARCH, PAREN, and LOGIC coloring are not supported.  The following options are supported:

on	Turns on program color coding.

off or disable	Turns off program color coding.

default or other	Select fundamental mode color coding

reset	Reset options, turns color coding on.

asm	System/390 Assembler Language

book	BookMaster (not supported)

C	C or C++

cobol	COBOL

db2	DB2 sql

dtl	Dialog Tag Language (not supported)

html	Hypertext Markup Language

java	Java

jcl	MVS Job Control Language

panel	ISPF Panel Language (not supported)

pascal	Pascal

pli or pl1	PL/I

rexx	Rexx

skel	ISPF Skeleton Language (not supported)

idl	Interface Definition Language

find	Toggles highlighting of text when you do a find, this does not work exactly like ISPF, it simply toggles the Visual SlickEdit "Leave Selected" option (see configuration options, "Search Tab").

cursor	Toggles highlighting of the line containing the cursor.  This also does not function exactly like ISPF, instead it simply toggles the "Draw Box around current line" option (see configuration options, "General Tab").

See Also	select_mode


ispf_locate

_command void ispf_locate{ label | line number | [first | last | next | prev] [ change | command | error | excluded | label | special ] [ line range ] }

Remarks	The locate command is used to find lines with specific attributes in the prefix line.  It can be used to find a line with a specific label, line number, command, changed line, error line, or no-save lines.

line or label	Line number or ISPF label to go directly to.

line range	Two numbers or labels, specifying the starting and ending lines to search within, inclusive.

next	Find the next occurrence starting from the cursor.

all	Find all matches in the specified range.

first	Find only the first occurrence in the specified range.

last	Find only the last occurrence in the specified range.

prev	Find the previous occurrence starting from the cursor.

change	Search for lines with a change flag (==CHG>).

command	Search for lines containing an edit line command.

error	Search for lines with an error flag (==ERR>).

excluded	Search only for excluded lines.

label	Search for lines with a label.

special	Search for lines with special non-data lines, (e.g. =COLS>)

quiet	Do not display messages.

Return	0 if the specified line is found.

See Also	ispf_do_lc, ispf_reset, ISPF Line Commands


ispf_move

_command void ispf_move [ member ] [after label ] [before label ]

Remarks	The move command moves the contents of a file or PDS member into the data being edited.  In addition to the file, you can specify the following on the command line:

after label	The destination for the data being copied.  The label may be either an ISPF label or a line number.  The data will be inserted after the specified line.

before label	The destination for the data being copied.  The label may be either an ISPF label or a line number.  The data will be inserted after the specified line.

If neither AFTER nor BEFORE is specified, the default location to insert the data is after the current line (cursor position).  However, if there is an A or B line command in the prefix area, the data will be inserted at that point.

This command is very similar to the ispf_copy command, except that instead of copying the data, this command will copy the data and then remove the file the data is copied from, which is NOT undoable, thus this needs to be used with care.

Return	Returns 0 if successful.  Common return codes are FILE_NOT_FOUND_RC, PATH_NOT_FOUND_RC, TOO_MANY_SELECTIONS_RC, and TOO_MANY_FILES_RC.  On error, a message is displayed.

See Also	ispf_copy, ISPF Line Command A, ISPF Line Command B, ISPF Line Labels


ispf_nonumber

_command void ispf_nonumber( )

Remarks	Turns off numbering mode.  This command is  to "NUMBER OFF".

See Also	ispf_number


ispf_number

_command void ispf_number [ on | off ] [ std | nostd ] [ cobol | nocobol ]

Remarks	The number command controls line numbering mode and lets you immediately renumber the line numbers in a file.  Unlike ISPF, this command does effect how lines are inserted.  However the number command can still be used to renumber the entire buffer on demand.

on	Turn on line numbering mode and renumber buffer.  Unless also specified, this implies that the standard sequence columns will be numbered, or if in COBOL mode, the cobol sequence numbers will be renumbered.

off	Turn off line numbering mode.

std or standard	Line numbers are in the standard sequence columns (73-80).

nostd	Do not number the standard sequence columns.

cob or cobol	Line numbers are as in COBOL, columns 1-6.

nocobol	Do not number the COBOL line numbers.

Note:  Make sure that the line number columns (1-6 for COBOL or 73-80) do not have data in them before renumbering the file.  Otherwise, data may be overwritten with line numbers.  Normally, this is detectable and you will be warned that data was overwritten, but if the data was numeric, you will not be warned.

See Also	ispf_autonum, ispf_nonumber, ispf_renumber, ispf_unnumber


ispf_paste

_command void ispf_paste [ clipboardname ] [ after label ] [before label ] [keep]

Remarks	The paste command copies lines from the clipboard to the specified position in the buffer, or the current line.

after label	The destination for the data being pasted.  The label may be either an ISPF label or a line number.  The data will be inserted after the specified line.

before label	The destination for the data being pasted.  The label may be either an ISPF label or a line number.  The data will be inserted after the specified line.

keep	Do not clear out the clipboard after doing a paste operation.

If neither AFTER nor BEFORE is specified, the default location to insert the data is after the current line (cursor position).  However, if there is an A or B line command in the prefix area, the data will be inserted at that point.

See Also	ispf_cut, list_clipboards, paste, ISPF Line Command A


ispf_preserve

_command void ispf_preserve [ on ] [ off ]

Remarks	The preserve command controls enabling or disabling the saving of trailing blanks in the editor.  Turning on this option is identical to turning off the file save option "Strip trailing spaces" on the File Options dialog box ("Tools", "Configuration", "File Options...").

See Also	Save Options


ispf_rchange

_command void ispf_rchange( )

Remarks	Repeats the change requested by the most recent change command.

Return	Returns 0 if successful.

See Also	ispf_change


ispf_renumber

_command void ispf_renumber [ on ] [ std ] [ cobol ]

Remarks	The renumber command immediately updates the line numbers in a file.

on	Renumber lines as configured for the current file type.

std or standard	Line numbers are in the standard sequence columns (73-80).

cob or cobol	Line numbers are as in COBOL, columns 1-6.

Note:  Make sure that the line number columns (1-6 for COBOL or 73-80) do not have data in them before renumbering the file.  Otherwise, data may be overwritten with line numbers.  Normally, this is detectable and you will be warned that data was overwritten, but if the data was numeric, you will not be warned.

See Also	ispf_autonum, ispf_nonumber, ispf_number, ispf_unnumber


ispf_replace

_command void ispf_replace [ member ]

Remarks	The replace command is used to save to contents of the current buffer to an existing file or PDS member, thus functioning as a save-as function.

Return	Returns 0 if successful.  Common return codes are INVALID_OPTION_RC, ACCESS_DENIED_RC, ERROR_OPENING_FILE_RC, ERROR_WRITING_FILE_RC, INSUFFICIENT_DISK_SPACE_RC, DRIVE_NOT_READY_RC, and PATH_NOT_FOUND_RC.  On error, a message box is displayed.

See Also	ispf_browse, ispf_end, ispf_cancel, ispf_create, ispf_save


ispf_reset

_command void ispf_reset [ all | change | command | error | excluded | find | label | special ] [ line range ]

Remarks	Resets the line prefix area for specific types of lines or all lines in the buffer.  The following options are supported.

all	Reset all line prefixes.  This is the default.

change	Search for lines with a change flag (==CHG>).

command	Search for lines containing an edit line command.

error	Search for lines with an error flag (==ERR>).

excluded	Search only for excluded lines.

label	Search for lines with a label.

special	Search for lines with special non-data lines, (e.g. =COLS>)

line range	Two numbers or labels, specifying the start and end

See Also	ispf_do_lc, ispf_locate, ISPF Line Commands


ispf_return

_command void ispf_return( )

Remarks	This command is identical to the ispf_end command.


ispf_rfind

_command void ispf_rfind( )

Remarks	Repeat the last find operation requested by the last find command issued.

Return	Returns 0 if the search string is found.  Common return codes are STRING_NOT_FOUND_RC and  INVALID_OPTION_RC.  On error, a message is displayed.

See Also	ispf_find


ispf_save

_command void ispf_save( )

Remarks	This command is identical to the built-in save command.


ispf_sort

_command void ispf_sort [ line range ] [X] [NX] sort_field_1 ... sort_field_n

Remarks	The sort command sorts lines of data in a specified order.  It accepts the following arguments:

line range	Two numbers or labels, specifying the starting and ending range of lines to sort, inclusive.

x	Look for matches only in  lines.

nx	Do not report matches in excluded lines.

sort-field-i	Field specifications for sorting data.  See below.

Sort supports up to 100 sort fields.  Each one can have the following options:

A	Sort data in ascending (non-decreasing) order.

D	Sort data in descending (non-decreasing) order.

I	Case insensitive sort.   This option has no effect if the f or n options are specified.

E	Case sensitive sort (default).   This option has no effect if the f or n options are specified.

-f 	Sort data as file names (case sensitive on Unix).

-n	Sort data as integers.

col-1	Starting physical column boundary for this field.

col-2	Ending physical column boundary for the field.

Return	Returns 0 if successful.  Common return codes are 1 (you tried to sort the concurrent process buffer), NOT_ENOUGH_MEMORY_RC, TOO_MANY_SELECTIONS_RC, and INVALID_SELECTION_HANDLE_RC.  On error, a message is displayed.

See Also	sort_buffer, Sorting


ispf_submit

_command void ispf_submit( )

Remarks	This command is identical to the built-in submit command.  Currently it does not support a range argument like standard ISPF.


ispf_swap

_command void ispf_swap( )

Remarks	Switches to the next window if One File per Window is on.  Otherwise, switches to the next buffer.

See Also	next_doc


ispf_tabs

_command void ispf_tabs( )

Remarks	This command is identical to the built-in tabs command.  It does not support the standard ISPF arguments: [on] [off] [std] [all] and tab_character.


ispf_unnumber

_command void ispf_unnumber [ std ] [ cobol ]

Remarks	The unnumber command immediately blanks out the line numbers in a file.

std or standard	Line numbers are in the standard sequence columns (73-80).

cob or cobol	Line numbers are as in COBOL, columns 1-6.

Note:  Make sure that the line number columns (1-6 for COBOL or 73-80) do not have data in them before unnumbering the buffer.  Otherwise, data may be overwritten with line numbers.  Normally, this is detectable and you will be warned that data was overwritten, but if the data was numeric, you may not be warned.

See Also	ispf_autonum, ispf_nonumber, ispf_number, ispf_renumber


ispf_undo

_command void ispf_undo [ member ]

Remarks	This command is identical to the undo command.


ISPF Line Commands

ISPF Line Commands

The following ISPF edit line commands are supported in the ISPF emulation mode.

Enter line commands by typing over the prefix area (on the left hand side of the editor control) which contains either  "======" or the line number.  To place the cursor in the prefix area, click there, cursor left, or back tab until the cursor in is in the prefix area.  In addition, enter will place the cursor in the prefix area of the next line, unless an insert or text entry command is executed.

Edit line commands operate on either a single line or a block of lines.  The commands that operate on blocks require you to place the command on both the first and last lines of the block.

Line commands are processed using the ispf_do_lc command when you press Enter, Ctrl+Enter or the right control key, depending on your preferences (see ISPF Options dialog box).  Several commands or line labels can be entered and then processed at one time.  The ispf_reset command is used to clear the prefix area.

ISPF Line Labels	Define a label.

ISPF Line Command Shift	Shift data left or right.

ISPF Line Command A	Identifies a line after which lines are to be inserted.

ISPF Line Command B	Identifies a line before which lines are to be inserted.

ISPF Line Command BNDS	Insert a column boundary ruler line.

ISPF Line Command Copy	Specify lines to be copied to another location.

ISPF Line Command COLS	Insert a column ruler line.

ISPF Line Command Delete	Deletes one or more lines.

ISPF Line Command First	Expose one or more lines at the beginning of a block of excluded lines.

ISPF Line Command I	Insert one or more blank data entry lines.

ISPF Line Command Lowercase	Converts all uppercase letter alphabetic characters in one or more lines to lowercase.

ISPF Line Command Last	Expose one or more lines at the beginning of a block of excluded lines.

ISPF Line Command Move	Specify lines to be moved to another location.

ISPF Line Command MASK	Displays the contents of the mask used with the insert (I) and text entry (TE) line commands.

ISPF Line Command Make Data	Converts one or more no-save lines to data so that they may be saved when the buffer is saved.

ISPF Line Command Overlay	Identifies one or more lines over which the copy or move block is to be overlayed.

ISPF Line Command Repeat	Specify lines to be repeated immediately following this line or block.

ISPF Line Command Show	Expose one or more lines having the leftmost indentation level in a block of excluded lines.

ISPF Line Command TABS	Displays the tab definition line.

ISPF Line Command TE	Inserts one or more blank lines to allow power typing for text entry.

ISPF Line Command TF	Reflows paragraphs according to the current column boundary settings.

ISPF Line Command TJ	Join this line with the next line.

ISPF Line Command TS	Divides a line so that data can be added.

ISPF Line Command Uppercase	Converts all lowercase letter alphabetic characters in one or more lines to uppercase.

ISPF Line Command Exclude	Specifies one or more lines to be hidden (excluded).

ISPF Line Command Select	Select a block of lines.


ISPF Line Labels

ISPF Line Labels .label

Usage	. label, where label does not start with 'z'

Remarks	Define a label to be used as a marker to identify the given line.  Labels are used to specify a particular line, such as in the ispf_locate command, or to specify a range of lines for an primary command to operate on.  The following labels are built in to the ISPF emulation.

.zfirst	The first line in the buffer (abbreviated .zf).

.zlast	The last line in the buffer (abbreviated .zl).

.zcsr	The current line the cursor is on (abbreviated .zc).

See Also	ispf_change, ispf_copy, ispf_delete, ispf_exclude, ispf_find, ispf_flip, ispf_locate, ispf_paste, ispf_reset, ispf_sort


ISPF Line Command Shift

ISPF Shift Lines Left or Right

Usage	( [n]	Shift the current line n columns right, default 2

(( [n]	Shift the block of lines n columns right, default 2

) [n]	Shift the current line n columns left, default 2

)) [n]	Shift the block of lines n columns left, default 2

< [n]	Data shift the current line n columns right, default 2

<< [n]	Data shift the block of lines n columns right, default 2

> [n]	Data shift the current line n columns left, default 2

>> [n]	Data shift the block of lines n columns left, default 2

Remarks	This set of commands are used for shifting data left or right.  The versions using parenthesis shift text literaly, while the other versions attempts to intelligently shift text without disturbing line numbers or comments.  In all cases, the default number of columns that the text is shifted is two.

There are two forms to these commands.  The single character forms (, ), <, or > specifies that the line and the subsequent n-1 lines are to be shifted.  The two character block forms are placed on the first and last lines of the block to be shifted.

Data is shifted only within the columns defined by the current bounds, or if bounds is turned off, but there is a truncation column, between column 1 and the truncation column.  If the shift operation results in data moving beyond the right or left margins, it is truncated and there is no warning message.

See Also	ispf_bounds


ISPF Line Command A

ISPF Insert After A

Usage	A [n]

Remarks	Identifies a line after which copied or moved lines are to be inserted n times.  You are allowed to specify multiple A, B, or O line commands to have the same copy or move block inserted in multiple places.

See Also	ispf_copy, ispf_paste, ISPF Line Command B, ISPF Line Command Copy, ISPF Line Command Move, ISPF Line Command Overlay


ISPF Line Command B

ISPF Insert Before B

Usage	B [n]

Remarks	Identifies a line before which copied or moved lines are to be inserted n times.  You are allowed to specify multiple A, B, or O line commands to have the same copy or move block inserted in multiple places.

See Also	ispf_copy, ispf_paste, ISPF Line Command B, ISPF Line Command Copy, ISPF Line Command Move, ISPF Line Command Overlay


ISPF Line Command BNDS

ISPF Insert Bounds Ruler BNDS

Usage	BNDS

Remarks	Insert a column boundary ruler line.  After this line is inserted, the < and > marks may be moved in order to adjust the column boundaries.  Note that if you have multiple bounds lines, and you change one, the subsequent bounds lines will also be changed.

A column boundary line with one < sign indicates a left boundary and no right boundary (unbounded).  A column boundary with one > sign indicates a single column boundary (left and right bounds are same).

See Also	ispf_bounds, ISPF Line Command Shift, ISPF Line Command Overlay


ISPF Line Command Copy

ISPF Copy Lines C and CC for blocks

Usage	C [n]	Copy n lines starting with the line with the command.

CC	Copy a block of lines, must match another CC.

Remarks	Specify lines to be copied to another location.  There are two forms to this command, the first form (C [n]) specifies that the line and the subsequent n-1 lines are to be copied.  The second (block) form (CC) is placed on the first and last lines of the block to be copied.  There can be only one copy block specified.  Furthermore, you can not have both a move block and a copy block specified at the same time.

See Also	ISPF Line Command A, ISPF Line Command B, ISPF Line Command Move, ISPF Line Command Overlay


ISPF Line Command COLS

ISPF Insert Columns Ruler COLS or SCALE

Usage	COLS

SCALE

Remarks	Insert a column ruler line.  The column ruler line is read-only.

See Also	ispf_bounds, ispf_tabs, ISPF Line Command BNDS, ISPF Line Command TABS


ISPF Line Command Delete

ISPF Delete Lines D and DD for blocks

Usage	D [n]	Delete n lines starting with the line with the command.

DD	Delete a block of lines, must match another DD.

Remarks	Deletes one or more lines.  There are two forms to this command.  The first form (D [n]) specifies that the line and the subsequent n-1 lines are to be deleted.  The second (block) form (DD) is placed on the first and last lines of the block to be deleted.

See Also	ispf_delete


ISPF Line Command First

ISPF Expose First Lines F and FF

Usage	F [n]	Unexclude (expose) the first n lines of an excluded block.

FF	Unexclude (expose) an entire excluded block.

Remarks	Expose one or more lines at the beginning of a block of excluded lines.  The FF line command exposes the entire block of lines and is  to F[m] where m is the number of lines in the block of excluded lines.

See Also	ispf_exclude, ispf_reset, ISPF Line Command Last, ISPF Line Command Show, ISPF Line Command Exclude


ISPF Line Command I

ISPF Insert Lines I

Usage	I [n]

Remarks	Insert one or more blank data entry lines.

See Also	ispf_enter, ISPF Line Command TE


ISPF Line Command Lowercase

ISPF Lowercase Lines LC, LCC and LCLC for blocks

Usage	LC [n]	Lowercase n lines starting with the line with the command.

LCC	Lowercase a block of lines, must match another LCC or LCLC.

LCLC	Lowercase a block of lines, must match another LCC or LCLC.

Remarks	Converts all uppercase letter alphabetic characters in one or more lines to lowercase.  This command only operates on text within the edit boundary columns.  There are two forms to this command.  The first form (LC [n]) specifies that the line and the subsequent n-1 lines are to be converted.  The second (block) form (LCLC or LCC) is placed on the first and last lines of the block to be converted.

See Also	ispf_caps,  ISPF Line Command Uppercase, lowcase, upcase


ISPF Line Command Last

ISPF Expose Last Lines L and LL

Usage	L [n]	Unexclude (expose) the last n lines of an excluded block.

LL	Unexclude (expose) an entire excluded block (identical to FF).

Remarks	Expose one or more lines at the end of a block of excluded lines.  The LL line command exposes the entire block of lines and is  to L[m] where m is the number of lines in the block of excluded lines.

See Also	ispf_exclude, ispf_reset, ISPF Line Command First, ISPF Line Command Show, ISPF Line Command Exclude


ISPF Line Command Move

ISPF Move Lines M and MM for blocks

Usage	M [n]	Move n lines starting with the line with the command.

MM	Move a block of lines, must match another MM.

Remarks	Specify lines to be moved to another location.  There are two forms to this command, the first form (M [n]) specifies that the line and the subsequent n-1 lines are to be moved.  The second (block) form (MM) is placed on the first and last lines of the block to be moved.  There can be only one move block specified.  Furthermore, you can not have both a move block and a copy block specified at the same time.

See Also	ISPF Line Command A, ISPF Line Command B, ISPF Line Command Copy, ISPF Line Command Overlay


ISPF Line Command MASK

ISPF Insert Mask Line MASK

Usage	MASK

Remarks	Displays the contents of the mask used with the insert (I) and text entry (TE) line commands.  Normally, when a line is inserted, the line is initially blank.  By specifying an insert mask, you can insert a block of lines with a particular template.  The MASK line is editable.  Note that if you specify multiple masks in one file, only the first mask is used.

See Also	ISPF Line Command I, ISPF Line Command TE, ISPF Line Command TS


ISPF Line Command Make Data

ISPF Make Data Lines MD, MDD and MDMD for blocks

Usage	MD [n]	Make n data lines starting with the line with the command.

MDD	Make a block of lines data, must match another MDD or MDMD.

MDMD	Make a block of lines data, must match another MDD or MDMD.

Remarks	Converts one or more no-save lines to data so that they may be saved when the buffer is saved. There are two forms to this command.  The first form (MD [n]) specifies that the line and the subsequent n-1 lines are to be converted.  The second (block) form (MDMD or MDD) is placed on the first and last lines of the block to be converted.

See Also	ISPF Line Commands, ISPF Line Command COLS, ISPF Line Command BNDS, ISPF Line Command MASK, ISPF Line Command TABS


ISPF Line Command Overlay

ISPF Overlay Lines O and OO for blocks

Usage	O [n]	Overlay n lines starting with the line with the command.

OO	Overlay a block of lines, must match another OO.

Remarks	Identifies one or more lines over which the copy or move block is to be overlayed.  Text is only overlayed within the column boundaries. If the copy or move block has less lines than the overlay, it is repeated until it fills the entire overlay block.

There are two forms to this command.  The first form (O [n]) specifies that the line and the subsequent n-1 lines are to be overlayed.  The second (block) form (OO) is placed on the first and last lines of the block to be overlayed.

 	You are allowed to specify multiple A, B, or O line commands to have the same copy or move block inserted or overlayed in multiple places.

See Also	ispf_copy, ispf_paste, ISPF Line Command A, ISPF Line Command B, ISPF Line Command Copy, ISPF Line Command Move, ISPF Line Command Overlay


ISPF Line Command Repeat

 for blocks

Usage	R [n]	Repeat the line with the command n times.

RR [n]	Repeat the block n times, must match another RR.

Remarks	Specify lines to be repeated immediately following this line or block.  There are two forms to this command, the first form (R[n]) specifies that the line is to be repeated n times.  The second (block) form (RR[n]) is placed on the first and last lines of the block to be repeated n times.

See Also	ISPF Line Command A, ISPF Line Command B, ISPF Line Command Copy


ISPF Line Command Show

ISPF Expose Next Level of Code S and SS

Usage	S [n]	Unexclude (expose) the first n lines of an excluded block.

SS	Unexclude (expose) an entire excluded block.

Remarks	Expose one or more lines having the leftmost indentation level in a block of excluded lines.  The SS line command exposes the entire block of lines and is  to S[m] where m is the number of lines in the block of excluded lines.

See Also	ispf_exclude, ispf_reset, ISPF Line Command First, ISPF Line Command Last, ISPF Line Command Exclude


ISPF Line Command TABS

ISPF Insert Tabs Ruler TABS or TABL

Usage	TABS

TABL

Remarks	Displays the tab definition line.  After this line is inserted, the * marks may be moved in order to adjust the tab positions.  Note that if you have multiple tabs lines, and you change one, the subsequent tabs lines will also be changed.

See Also	ispf_tabs, tabs


ISPF Line Command TE

ISPF Insert Text TE

Usage	TE [n]

Remarks	Inserts one or more blank lines to allow power typing for text entry.  This command is identical to the insert (I) command, except that it switches the mode to wrap lines.

See Also	ispf_enter, ISPF Line Command I, ISPF Line Command MASK


ISPF Line Command TF

ISPF Insert Lines TF

Usage	TF

Remarks	Reflows paragraphs according to the current column boundary settings.

See Also	reflow_paragraph


ISPF Line Command TJ

ISPF Join Lines TJ

Usage	TJ

Remarks	Join this line with the next line.

See Also	ISPF Line Command TS, join_line


ISPF Line Command TS

ISPF Split Line TS

Usage	TS

Remarks	Divides a line so that data can be added.  The line is split at the column in which the cursor is in when you hit Enter.  This command does not support multiple lines.

See Also	ISPF Line Command TJ, split_insert_line


ISPF Line Command Uppercase

ISPF Uppercase Lines UC, UCC and UCUC for blocks

Usage	UC [n]	Uppercase n lines starting with the line with the command.

UCC	Uppercase a block of lines, must match another UCC or UCC.

UCUC	Uppercase a block of lines, must match another UCC or UCUC.

Remarks	Converts all lowercase letter alphabetic characters in one or more lines to uppercase.  This command only operates on text within the edit boundary columns.  There are two forms to this command.  The first form (UC [n]) specifies that the line and the subsequent n-1 lines are to be converted.  The second (block) form (UCUC or UCC) is placed on the first and last lines of the block to be converted.

See Also	ispf_caps,  ISPF Line Command Lowercase, lowcase, upcase


ISPF Line Command Exclude

ISPF Exclude Lines X and XX for blocks

Usage	X [n]	Exclude n lines starting with the line with the command.

XX	Exclude a block of lines, must match another XX.

Remarks	Specifies one or more lines to be hidden (excluded). There are two forms to this command.  The first form (X [n]) specifies that the line and the subsequent n-1 lines are to be excluded.  The second (block) form (XX) is placed on the first and last lines of the block to be excluded.

See Also	ispf_exclude, ispf_reset, ISPF Line Command First, ISPF Line Command Last, ISPF Line Command Show


ISPF Line Command Select

ISPF Select Lines Z and ZZ for blocks

Usage	Z [n]	Select n lines starting with the line with the command.

ZZ	Select a block of lines, must match another ZZ.

Remarks	Select a block of lines. There are two forms to this command.  The first form (Z [n]) specifies that the line and the subsequent n-1 lines are to be selected.  The second (block) form (ZZ) is placed on the first and last lines of the block to be selected.

See Also	ispf_cut, ispf_paste


XEDIT Line Commands

XEDIT Line Commands

The following XEDIT line commands are supported and override the like-named ISPF commands when there is a conflict.  XEDIT commands can be enabled using the ISPF Options dialog box.

XEDIT	ISPF	Description

/	R	Repeat the marked line, see ISPF Line Command Repeat.

"	R	Repeat the marked line, see ISPF Line Command Repeat.

F	A	Paste text following line, see ISPF Line Command A.

A	I	Add (insert) line(s), see ISPF Line Command I.

P	B	Paste text before line, see ISPF Line Command B.

L	LC	Make line lowercase, see ISPF Line Command Lowercase.

LL	LCC	Make block lowercase, see ISPF Line Command Lowercase.

U	UC	Make line uppercase, see ISPF Line Command Uppercase.

UU	UCC	Make block uppercase, see ISPF Line Command Uppercase.

Note the following conflicts with standard ISPF edit line commands.

F	Conflicts with unexclude first (F), see ISPF Line Command First.

A	Conflicts with paste after (A), see ISPF Line Command A.

L	Conflicts with unexclude last (L), see ISPF Line Command Last.

LL	Conflicts with unexclude block (LL), see ISPF Line Command Last.


ISPF Unsupported Primary Commands

ISPF Unsupported Primary Commands

The following ISPF primary commands are not supported by Visual SlickEdit's ISPF Emulation mode.  The unsupported commands fall into three categories.  First some ISPF commands are made obsolete by more powerful Visual SlickEdit features, such as recovery, profile, and setundo.  Second, some commands reflect features that we chose not to implement for the emulation, such as ISPF macros, PDF statistics, model, and pack.

autolist	Controls the automatic printing of data to the ISPF list data set.

builtin	Process a built-in command, even if overloaded by a macro.

define	Define a name as an alias or macro.

imacro	Saves the name of an initial macro in the edit profile.

level	Sets the modification level number in PDF library statistics.

model	Copies a model into the buffer or defines a model class.

notes	Controls whether the MODEL command display notes or not.

nulls	Controls null spaces.

pack	Controls whether data is to be stored compressed or not.

profile	Display edit profile.

recovery	Specifies edit recovery options.

rmacro	Saves a recovery macro in the edit profile.

setundo	Controls the UNDO mode.

stats	Generate library statistics.

version	Sets the version number in the PDF library statistics.

view	Save as browse command but prompts on save.


ISPF Emulation Commands

ISPF Emulation Commands

The following commands are supported in Visual SlickEdit ISPF emulation mode.

ispf_bottom	Moves cursor to the end of the buffer.

ispf_down	Moves cursor to next page of text.

ispf_enter	Handle the ENTER key or right-control key in ISPF emulation.

ispf_home	Places the focus on the command line in ISPF emulation.

ispf_retrieve	Does command line retrieval, getting the next command line from the list.

ispf_retrieve_back	Identical to the "ispf_retrieve back" command.

ispf_top	Moves cursor up to the top of the buffer.

ispf_up	Moves cursor up to the previous page of text.

ispf_do_lc	Immediately process all commands found in the line prefix area.


ispf_bottom

_command void ispf_bottom( )

Remarks	Moves cursor to the end of the buffer.

See Also	ispf_top, bottom_of_buffer


ispf_down

_command void ispf_down( )

Remarks	Moves cursor to next page of text.

See Also	ispf_up, page_down


ispf_enter

_command boolean ispf_enter( )

Remarks	Handle the ENTER key or right-control key in ISPF emulation.  On the command line, this behaves like a normal enter key.  Otherwise, this moves the cursor down and to the beginning of the next line.  If the line is a newly inserted line, it places the cursor in column one, otherwise, it places the cursor in the prefix area allowing you to enter line commands.  In addition, this command will cause the line commands to be executed.

Return	True if in ISPF mode and the event was processed, otherwise, returns false.

See Also	ISPF Line Commands


ispf_home

_command void ispf_home( )

Remarks	Places the focus on the command line in ISPF emulation.  If already on the command line, place the cursor at the beginning of the line.

See Also	HOME Key Configurations, ISPF Options dialog box


ispf_retrieve

_command void ispf_retrieve [ back ]

Remarks	Does command line retrieval and places the cursor on the command line, getting the next command line from the list.  If the back option is given, it will get the previous item from the command line history.

See Also	retrieve_next, retrieve_prev


ispf_retrieve_back

_command void ispf_retrieve_back( )

Remarks	This command is identical to the "ispf_retrieve back" command.


ispf_top

_command void ispf_top( )

Remarks	Moves cursor up to the top of the buffer.

See Also	ispf_bottom, top_of_buffer


ispf_up

_command void ispf_up( )

Remarks	Moves cursor up to the previous page of text.

See Also	ispf_down, page_up


ispf_do_lc

_command void ispf_do_lc( )

Remarks	Immediately process all commands found in the line prefix area.

Return	0 on success, <0 on error.

See Also	ispf_enter, ispf_locate, ispf_reset, ISPF Line Commands